Re: [R-sig-phylo] Phylogenetic network / ARG representation in ape
Thank you Emmanuel. That’s very helpful. All the best Yan > On 21 May 2021, at 10:04, Emmanuel Paradis wrote: > > ... > Correct. The "phylo" and "evonet" classes ignore whether the (optional) > vector 'edge.length' represents time, number of mutations/substitions, > accumulated variance, ... The only constraint is that it must be numeric. > >> As a corollary, there doesn’t >> appear to be any built-in function to enforce the constraint that those edges >> that are valid at any one genomic location form a marginal (or “local”) tree. > > That's the logic of the S3 class system: it's up to you to add elements, > functions, checks, etc, that are relevant to your project/questions. See for > instance, the tree output by ape::chronos which has the class c("chronos", > "phylo"). You can find another strategy in phangorn which can fit partioned > models of molecular evolution: in that case each partition of the genome has > its own "phylo" tree (the topology can differ among partitions). > >> Is my reading of this correct, and are there any R packages which go any way >> to >> representing marginal trees along a genome in this way? > > Not that I aware of. > >> I ask partially because we are starting to document simple details of how to >> run >> our tree-sequence software in R, via the reticulate package >> (https://tskit.dev/tutorials/tskitr.html), and it would be useful to know if >> we >> could convert our tree sequences (a format which can be thought of as an ARG) >> into a format with a suitable representation in R. We might then be able to >> take advantage of any nice R-based visualisation or analysis packages. > > phangorn has other tools to represent/plot networks with its class "networx". > > Best, > > Emmanuel > >> Cheers >> >> Yan >> ___ >> 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/ ___ 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/
Re: [R-sig-phylo] Phylogenetic network / ARG representation in ape
Hi Yan, - Le 18 Mai 21, à 23:48, Yan Wong y...@pixie.org.uk a écrit : > Dear R-Sig-Phylo, > > I’m interested in representations of ancestral recombination graphs (ARGs). > From > my reading of the extended Newick format (G. Cardona et al., 2008), and the > ape/evonet documentation, it appears as if the R-base representations of > phylogenetic networks don't have a standard way to specify which pieces of a > genome pass though which edges in the network. Correct. The "phylo" and "evonet" classes ignore whether the (optional) vector 'edge.length' represents time, number of mutations/substitions, accumulated variance, ... The only constraint is that it must be numeric. > As a corollary, there doesn’t > appear to be any built-in function to enforce the constraint that those edges > that are valid at any one genomic location form a marginal (or “local”) tree. That's the logic of the S3 class system: it's up to you to add elements, functions, checks, etc, that are relevant to your project/questions. See for instance, the tree output by ape::chronos which has the class c("chronos", "phylo"). You can find another strategy in phangorn which can fit partioned models of molecular evolution: in that case each partition of the genome has its own "phylo" tree (the topology can differ among partitions). > Is my reading of this correct, and are there any R packages which go any way > to > representing marginal trees along a genome in this way? Not that I aware of. > I ask partially because we are starting to document simple details of how to > run > our tree-sequence software in R, via the reticulate package > (https://tskit.dev/tutorials/tskitr.html), and it would be useful to know if > we > could convert our tree sequences (a format which can be thought of as an ARG) > into a format with a suitable representation in R. We might then be able to > take advantage of any nice R-based visualisation or analysis packages. phangorn has other tools to represent/plot networks with its class "networx". Best, Emmanuel > Cheers > > Yan > ___ > 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/ ___ 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/
[R-sig-phylo] Phylogenetic network / ARG representation in ape
Dear R-Sig-Phylo, I’m interested in representations of ancestral recombination graphs (ARGs). From my reading of the extended Newick format (G. Cardona et al., 2008), and the ape/evonet documentation, it appears as if the R-base representations of phylogenetic networks don't have a standard way to specify which pieces of a genome pass though which edges in the network. As a corollary, there doesn’t appear to be any built-in function to enforce the constraint that those edges that are valid at any one genomic location form a marginal (or “local”) tree. Is my reading of this correct, and are there any R packages which go any way to representing marginal trees along a genome in this way? I ask partially because we are starting to document simple details of how to run our tree-sequence software in R, via the reticulate package (https://tskit.dev/tutorials/tskitr.html), and it would be useful to know if we could convert our tree sequences (a format which can be thought of as an ARG) into a format with a suitable representation in R. We might then be able to take advantage of any nice R-based visualisation or analysis packages. Cheers Yan ___ 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/