Questions tagged [dendropy]

DendroPy is a Python library for phylogenetic computing.

DendroPy is a Python library for phylogenetic computing. It provides classes and functions for the simulation, processing, and manipulation of phylogenetic trees and character matrices, and supports the reading and writing of phylogenetic data in a range of formats, such as NEXUS, NEWICK, NeXML, Phylip, FASTA, etc. Application scripts for performing some useful phylogenetic operations, such as data conversion and tree posterior distribution summarization, are also distributed and installed as part of the libary. DendroPy can thus function as a stand-alone library for phylogenetics, a component of more complex multi-library phyloinformatic pipelines, or as a scripting “glue” that assembles and drives such pipelines.

9 questions
2
votes
1 answer

Using python 3.x how can I pass a Tree object from ete3 to DendroPy without writing to file

I'm using the ete3 package in python to build phylogenetic trees from data I've generated with a stochastic model and it works well. I have previously written these trees to newick format and then used another script, with the package Dendropy, to…
cancerconnector
  • 1,225
  • 2
  • 14
  • 21
1
vote
1 answer

Dendropy: Add inner node midway between two nodes

I'm very new to DendroPy. What I want to do seems simple but I can't figure how to do it correctly and I didn't find anything on the internet. I want to add a node midway between two nodes in a existing rooted dendropy tree. from dendropy import…
ALB
  • 13
  • 2
1
vote
0 answers

How to pass a Dendropy object with metadata to ete3 in python3?

If I have a dendropy tree that I annotate with some metadata, for example with some taxonomies, how can I convert the whole tree with metadata into a ete3 object? import dendropy t = dendropy.Tree.get_from_string("(A,(B,(C,D)));",…
aLbAc
  • 337
  • 3
  • 18
1
vote
0 answers

Bug in DendroPy's birth_death_tree function?

I'm not sure if I'm doing something wrong but I've been trying to run a lineage through time (LTT) function for DendroPy using a birth_death_tree (code snippet below:) import dendropy tree =…
1
vote
0 answers

UnicodeDecoderror: 'ascii' codec can't decode byte 0xe9 in position 5: ordinal not in range(128)

I am not a programmer, not even advanced in programming, so please be less mad about my question :D The thing is that I am a biologist, and I just started to learn programming a bit (I have to). I was trying to install dendropy/sumtrees via python…
0
votes
0 answers

Import SNP data into DendroPy for popgen analyses

I am trying to calculate population genetic statistics with DendroPy and need help reading my data. I had a SNP .vcf file from 8 individuals of the same specie and the same population. I converted this file into a Phylip file to be able to read it…
Raksha
  • 45
  • 5
0
votes
1 answer

How to extract patristic distances from dendropy phylogenetic_distance_matrix

I have created a cophenetic distance matrix in dendropy using: from dendropy.simulate import treesim tree = treesim.birth_death_tree(birth_rate=1.0, death_rate=0.5, ntax=10) pdm = tree.phylogenetic_distance_matrix() However, having read the…
user3329732
  • 346
  • 2
  • 15
0
votes
1 answer

Printing tip labels when using the python module dendropy to calculate pairwise distances between nodes on a phylogenetic tree?

I'm trying to create an array in python that will contain all the pairwise distances between every pair of nodes on a phylogenetic tree. I'm currently using dendropy to do this. (I initially looked at biopython but couldn't find an option to do…
Ben Jeffrey
  • 714
  • 9
  • 18
0
votes
1 answer

Adding new nodes to a Tree by dendroPy

I would like to create a tree by dynamically adding nodes to an already existing tree in DendroPy. So here is how I am proceeding, >>> t1 = dendropy.Tree(stream=StringIO("(8,3)"),schema="newick") Now That creates a small tree with two children…
Hirak Sarkar
  • 479
  • 1
  • 4
  • 18