You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -79,10 +79,17 @@ for k in myTree.Objects:
79
79
80
80
--------------------
81
81
82
+
## galindia
83
+

84
+
85
+
[`galindia.ipynb`](galindia.ipynb) is a work in progress that uses baltic to plot JSONs from [nextstrain.org](nextstrain.org) in order to allow customisable, static, publication-ready figures for phylogenies coming from nextstrain's augur pipeline.
86
+
87
+
--------------------
82
88
## baltic was used in the following publications:
89
+
- Dudas G, Carvalho L, Rambaut A, Bedford T. _MERS-CoV spillover at the camel-human interface_, 2017. __bioRxiv__ 173211; doi: https://doi.org/10.1101/173211.
83
90
- Grubaugh ND, Ladner JT, Kraemer MUG, Dudas G, Tan AL, Gangavarapu K, Wiley MR, White S, Thézé J, ..., Bedford T, Pybus OG, Isern S, Palacios G, Andersen KG. _Multiple introductions of Zika virus into the United States revealed through genomic epidemiology_, 2017. __Nature__ 546:401–405.
84
91
- Dudas G, Carvalho LM, Bedford T, Tatem AJ, ..., Suchard M, Lemey P, Rambaut A. _Virus genomes reveal the factors that spread and sustained the West African Ebola epidemic_, 2017. __Nature__ 544(7650): 309-315.
85
-
- Bell SM, Bedford T. _Modern-Day SIV viral diversity generated by extensive recombination and cross-species transmission_, 2017. __bioRxiv__ 101725; doi: https://doi.org/10.1101/101725
92
+
- Bell SM, Bedford T. _Modern-Day SIV viral diversity generated by extensive recombination and cross-species transmission_, 2017. __PLoS Pathog__ 13(7): e1006466.
86
93
- Holmes EC, Dudas G, Rambaut A, Andersen KG. _The Evolution of Ebola virus: Insights from the 2013-2016 Epidemic_, 2016. __Nature__ 538(7624): 193-200.
87
94
- Whitmer SLM, Albariño C, Shepard SS, Dudas G, ..., Nichol ST, Ströher U. _Preliminary Evaluation of the Effect of Investigational Ebola Virus Disease Treatments on Viral Genome Sequences_, 2016. __Journal of Infectious Diseases__:jiw177.
88
95
- Rambaut A, Dudas G, Carvalho LM, Park DJ, Yozwiak NL, Holmes EC, Andersen KG. _Comment on “Mutation rate and genotype variation of Ebola virus from Mali case sequences”_, 2016. __Science__ 353(6300):658-658.
self.drawTree() ## update x and y positions of each branch, since y positions will have changed because of sorting
351
356
352
-
defdrawTree(self,order=None):
357
+
defdrawTree(self,order=None,verbose=False):
353
358
""" Find x and y coordinates of each branch. """
354
359
iforder==None:
355
360
order=[xforxinself.traverse_tree() ifx.branchType=='leaf'] ## order is a list of tips recovered from a tree traversal to make sure they're plotted in the correct order along the vertical tree dimension
""" Collapse an entire subtree into a clade object. """
@@ -583,7 +605,7 @@ def get_value(ob,tr):
583
605
returnob.traits[tr]
584
606
ifverbose==True:
585
607
print'Collapsing based on trait'
586
-
nodes_to_delete=[nforninnewTree.nodesifn.traits.has_key(trait) andf(get_value(n,trait))==True] ## fetch a list of all nodes who are not the root and who satisfy the condition
608
+
nodes_to_delete=[nforninnewTree.nodesiff(get_value(n,trait))==Trueifn!=newTree.root] ## fetch a list of all nodes who are not the root and who satisfy the condition
587
609
else:
588
610
assert [w.branchTypeforwindesignated_nodes].count('node')==len(designated_nodes),'Non-node class detected in list of nodes designated for deletion'
589
611
assertlen([wforwindesignated_nodesifw.parent.index=='Root'])==0,'Root node was designated for deletion'
@@ -599,6 +621,8 @@ def get_value(ob,tr):
599
621
k.parent.children+=zero_node## add them to the zero node's parent
600
622
old_parent=k## node to be deleted is the old parent
601
623
new_parent=k.parent## once node is deleted, the parent to all their children will be the parent of the deleted node
624
+
ifnew_parent==None:
625
+
new_parent=self.root
602
626
ifverbose==True:
603
627
print'Removing node %s, attaching children %s to node %s'%(old_parent.index,[w.indexforwink.children],new_parent.index)
604
628
forwinnewTree.Objects: ## assign the parent of deleted node as the parent to any children of deleted node
0 commit comments