Error_in_stochastic_simulation

26 views
Skip to first unread message

Carme Blanco

unread,
May 29, 2024, 5:04:54 AM5/29/24
to BioGeoBEARS

Hi everyone,

I ran BioGeoBEARS for a tree with 350 tips and 17 areas, restricting the maximum number of areas a species can occupy to three, with no other constraint or stratigraphy. The best model turns out to be DEC+j. 

Now, I’m trying to run biogeographic stochastic mapping, but I get an error (see below). The problematic node corresponds to a short terminal branch. Its sister species has the same range distribution. I suspect that transitioning from one ancestral area to three with no intermediate steps is causing issues. However, I ran similar analyses in the past without experiencing this problem. Can anyone help me understand what’s happening? Is there any solution that doesn’t involve modifying the distribution range of the extant species?

 

Thanks a lot!

Carme


Error_in_stochastic_simulation; no success on branch below node 22 after 40000 tries. Printing starting/ending states, and events table for last attempt.

Starting state (1-based): 3

Ending state (1-based): 44

Goal state (1-based): 156

 

[1] "Last attempt at events_table_for_branch:"

 

NULL

 

Error in stochastic_map_branch(): Stochastic mapping failed after maxtries=40000 tries on branch below node=22

As manual_history_for_difficult_branches==TRUE, we are manually devising a history to force-fit a difficult branch (e.g. AB -> ACEDFGH)...

 

NOTE: This fix will run, but will NOT work correctly for pure '+a' models (as of 2016-05-07) where d and/or e equals 0, since the manual fix forces a random series of d and e events, on the theory that the events must be super-rare since maxtries failed, so we might as well order them randomly (subject to the constraint that the range is never NULL). For +a models, try increasing maxtries instead.

Starting range:  M

Desired ending range:  HMR

[1] "stochastic_map_branch() found this 'manual' (required range add/subtract events, uniform random distribution on branch) events_table_for_branch:"

 

 

       [,1] [,2]    [,3]        [,4] [,5]  [,6] [,7]  [,8]                  [,9]                [,10] [,11]     [,12] [,13] [,14] [,15]

tmprow "22" "40002" "0.3470839" "3"  "19"  "M"  "HM"  "0.0786523578633846"  "0.268431942136615" "d"   "M->HM"   "1"   "-"   "H"   "-" 

tmprow "22" "40002" "0.3470839" "19" "156" "HM" "HMR" "0.00176823993029079" "0.345316060069709" "d"   "HM->HMR" "4"   "-"   "R"   "-" 

 

 

13:18,14:19,anc:388; 11:15,12:16,anc:386; 9:13,10:14,anc:385; 7:10,8:11,anc:381; 5:8,6:9,anc:379; 3:5,4:6,anc:377; 1:2,2:3,anc:375;

...finished stochastic mapping UPPASS.

Adding cladogenetic events and re-arranging columns...

DONE adding cladogenetic events and re-arranging columns.

FINISHING stochastic_map_given_inputs().

 

Success #1/100 on stochastic mapping attempt #1/100 tries.Error in (length(ana_events_table) > 1) && (is.na(ana_events_table) ==  :

  'length = 4144' in coercion to 'logical(1)'

In addition: Warning messages:

1: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 10 (<-localhost:11213)

2: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 9 (<-localhost:11213)

3: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 8 (<-localhost:11213)

4: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 7 (<-localhost:11213)

5: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 6 (<-localhost:11213)

6: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 5 (<-localhost:11213)

7: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 4 (<-localhost:11213)

8: In forceAndCall(1, FUN, newX[, i], ...) :

  closing unused connection 3 (<-localhost:11213)

Nick Matzke

unread,
May 29, 2024, 5:10:43 AM5/29/24
to bioge...@googlegroups.com
Hi -- this error -- the real issue is at the bottom -- looks like one of the places where new R changed the before of an is.na function or similar -- I believe I fixed all these recently.  Are you using a recent install from GitHub (e.g. from the last few weeks?).  If not, reinstall from GitHub and retry.

Cheers,
Nick


--
You received this message because you are subscribed to the Google Groups "BioGeoBEARS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeobears...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biogeobears/618f55c7-3bf3-4ffb-b362-f6e18a6947a9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages