Hi all,

I have a question regarding the phytools function locate.fossil().

I have had a lot of success with this function but there are two fossils of
mine that the function does not like. I give the function my phylogeny, a
max and min age for the fossil, and the edge for the fossil to be placed
on. So I basically just want the function to estimate the branch length
subtending the fossil and the position of where the node subtending the
fossil attaches in the phylogeny.

For two of my fossils I get the following error.



*Error in bind.tree(tree, tip, where = where, position = pp) :   'position'
is larger than the branch length*

The function does not seem to like my edge constraint with these two
fossils. When I remove my edge constraint it works and the fossil is placed
in the correct time interval but just on a different edge estimated using
ML. For one of my fossils, the edge I place my fossil on ranges from 42 mya
to 4 mya and the age range for the fossil is between 33 and 28 mya. I am
confused why the function does not like the edge constraints I am giving
it. The error that I receive makes me believe that the position the
function is estimating for my fossil may be older than the edge constraint
I am giving it or I could just be missing something, most likely the
latter...

Below is my code. This code works for almost all my fossils except for two
of them.











*fossil_to_add<-fossil_trait_data[13,] locate_fossil_data<-rbind(extant_data,
fossil_to_add) # used this data in
locate.fossil()extant_sister_clade<-rownames(extant_data)[c(grep(fossil_info[13,7],
rownames(extant_data)), grep(fossil_info[13,8],
rownames(extant_data)))]mrca<-getMRCA(tree,
extant_sister_clade)edge<-mrcamin_time<- depth - fossil_info[13,4] # depth
is the root age of the phylogeny max_time<-depth - fossil_info[13,3] # the
max and min ages are positive numbers time_constraints<-c(max_time,
min_time)locate_fossil_tree<-locate.fossil(tree, locate_fossil_data,
time.constraint=time_constraints,edge.constraint=edge, plot=TRUE)*

Any help or advice, would be greatly appreciated!

Best,
Lindsey
-- 
Lindsey DeHaan
Ph.D. Candidate
Department of Earth and Environmental Sciences
University of Michigan

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to