BioGeoBEARS changing extant range

75 views
Skip to first unread message

Justin Bernstein

unread,
Mar 24, 2024, 2:36:04 PM3/24/24
to BioGeoBEARS
Hello all,

I have been trying to run BioGeoBEARS using the manual modification of the states list, and I kept getting an error that the likelihood was likely too small, indicating the change in ancestral ranges over time was likely impossible. I redid this and got the code to work, but now the tips are showing to have the wrong states (i.e., I assigned a tip to state P, and the final models say it has a range of B). I have 6 tips in the tree, each tip occupying 1 of 5 ranges (D P C S B).  Below is the geo.file

6 5 (D P C S B)
Taxon1 10000
Taxon2  01000
Taxon3  00100
Taxon4  00010
Taxon5 00001
Taxon6 00010


When I check the ranges from the 'tipranges' object, I confirm the above ranges by taxon.

I modified the state list by removing some nonadjacent areas by running the following (along with all the other lines from the tutorial on manual editing of these states):
nonadjacent=c("_","DC","DS","DB","PC","PS","PB","CB","DPC","DPS","DPB","DCS","DCB","DSB","PCS","PSB","CSB")

My question is, would this have occurred when I ran the code block to modify the state list? 

Also, I have one other small question:
Do I need to change include_null_range to TRUE or FALSE for all of my models? Because I noticed in the resulting PDFs, there are ranges that should have been omitted in the list above (e.g., CSB). I currently have them set to TRUE, and when I set them to FALSE it seems to fix the issue (which sounds obvious given the name of the option here), but I want to make sure I am not messing anything up with the model, as I noticed in the tutorial this is set to TRUE. Is there a reason for this, or was that just for the sake of the example and I should set all of mine to FALSE?

Thank you in advance! I've attached my script, and a photo with the taxa shown and their correct ranges parenthetically.

Best,
Justin 
TEST_DEC.png
BioGeoBEARS_Tutorial-TEST_GG.R

Nick Matzke

unread,
Mar 24, 2024, 5:43:00 PM3/24/24
to bioge...@googlegroups.com
Hi -- I think, if you remove the range "_" as nonadjacent, that means that include_null_range should be FALSE, throughout the script -- probably that's the issue -- 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/9b5ed3a4-8a03-4066-aa6b-945b5e3f74c3n%40googlegroups.com.
Message has been deleted

Nick Matzke

unread,
Mar 26, 2024, 5:56:55 PM3/26/24
to bioge...@googlegroups.com
Hi -- you are almost certainly just missing some modification to the states_list somewhere.  You should carefully go through and check that the states_list and related items (ranges_list, a human-readable list of texts; colors for each range/state if you are modifying that, etc.) is being modified as you intend.

Double check with:
http://phylo.wikidot.com/example-biogeobears-scripts#manual_modify_states

E.g. did you make sure that this is happening after your modification?
# INPUT the NEW states list into the BioGeoBEARS_run_object
BioGeoBEARS_run_object$states_list = states_list_0based_NEW


Cheers!
Nick


On Wed, Mar 27, 2024 at 10:37 AM Justin Bernstein <jmber...@gmail.com> wrote:
Hi Nick,

Thanks for the quick reply. I ran it and changed the following line to remove the "_" and set all instances of include_null_range to FALSE, but unfortunately I get the same plot. The terminal ranges are being changed from what they are in the geo file. Any ideas of what might cause this?
nonadjacent=c("DC","DS","DB","PC","PS","PB","CB","DPC","DPS","DPB","DCS","DCB","DSB","PCS","PSB","CSB")

Cheers!
Reply all
Reply to author
Forward
0 new messages