Dear group,
I aim to infer a Brownian motion process for multiple traits along a proposed tree where some taxa do no have continuous character data.
While e.g. dnPhyloBrownianREML allows for taxa missing trait values, dnPhyloMultivariateBrownianREML and dnPhyloBrownianMultiSampleREML do not.
Therefore, I try to drop the taxa without trait values from the proposed tree to feed the reduced tree into dnPhyloMultivariateBrownianREML() but I cannot figure this out.
Attached are two scripts based on the simple Brownian motion tutorial.
The script prune_tips_fixed_tree.Rev uses a fixed tree and it works to drop a tip from the tree psi at lines 50-57. The key are these lines:
psi_missing <- psi
psi_missing.dropTip(taxa_remove)
The script prune_tips_sampled_tree.Rev uses the same tree topology as before but infers the node ages. I obtain the sampled phylogeny psi in lines 57-59.
psi_dist = dnBDP(lambda = speciation_rate, mu = extinction_rate,
rho = 1.0, rootAge = root_age, condition = "nTaxa", taxa = taxa)
psi ~ dnConstrainedTopology(psi_dist, initialTree = starting_tree)
I create a deterministic variable of psi in line 77
psi_missing := psi
and try to drop the tip
psi_missing.dropTip(taxa_remove)
but the number of taxa remains unchanged (see psi_missing.taxa().size() ).
Using other operators instead of the deterministic := (i.e. <- or =) to create psi_missing allows to drop tips but the reduced tree is not the currently proposed. Instead it is the starting tree from line 59 as shown by monitoring the tree length that remains constant across MCMC samples.
I am using RevBayes 1.2.5 on a Linux machine.
Thanks for any input and ideas!
Best,
Torsten