Skip to content
Commits on Source (7)
repo: 0fdb21ec3cf53e710d679fbd7768f91510570ae7
node: edea23ce7c21765cbd9ff601e1f91614241eae81
node: c1fa530b9bcac13bbccacf8bfafd500536d17b7c
branch: default
tag: 1.1
tag: 1.1.3
......@@ -3,4 +3,10 @@ syntax: glob
*.pyc
*.DS_Store
*.log
examples/ade_pcopri
examples/neisseriaceae/
examples/caritro_fig6/
examples/andrew_crc_cutc/
examples/nic_erectale/
examples/rand/
examples/test/
b2e0ba66718673ea28cb217c8e5dcd8e578fd033 export2graphlan
c168a100f37e23e2c110849a8d91fac8da49f5bd export2graphlan
eae40ebc0030c7179baed999c74de412ba696598 pyphlan
......@@ -5,3 +5,6 @@ ba9c6f680022333b5b1bf0652748ab2db29e888a 0.9
eaa3d2e05d74912da0f013bbfbb199764b180f05 0.9.5
64570f7d4ae33f46ddd360101c13555396a0cab1 0.9.6
7d483b7d34ccadb30f5c56f82b7aab19a820d1d6 1.0
edea23ce7c21765cbd9ff601e1f91614241eae81 1.1
17f32c8d85849d397884564680c145e5b8d28923 1.1.1
3820c323e3c68d3d9e02bae2aefbc7d179df80bf 1.1.2
graphlan (1.1.3-1) unstable; urgency=medium
* New upstream version
* debhelper 11
* Point Vcs fields to salsa.debian.org
* Standards-Version: 4.2.1
-- Andreas Tille <tille@debian.org> Wed, 26 Sep 2018 13:35:33 +0200
graphlan (1.1-3) unstable; urgency=medium
* Moved packaging from SVN to Git
......
......@@ -3,12 +3,12 @@ Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.
Uploaders: Andreas Tille <tille@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 10),
Build-Depends: debhelper (>= 11~),
python-all,
dh-python
Standards-Version: 4.1.1
Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/graphlan.git
Vcs-Git: https://anonscm.debian.org/git/debian-med/graphlan.git
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/med-team/graphlan
Vcs-Git: https://salsa.debian.org/med-team/graphlan.git
Homepage: https://bitbucket.org/nsegata/graphlan/wiki/Home
Package: graphlan
......
......@@ -69,8 +69,6 @@ Bacill.Bacillale.Thermoactinomycetaceae.unclassified ring_shape 1 v
Bacilli.Lactobacillales.Aerococcaceae.Eremococcus ring_shape 1 v
Bacilli.Lactobacillales.Carnobacteriaceae.Carnobacterium ring_shape 1 v
Bacilli.Lactobacillales.Carnobacteriaceae.Desemzia ring_shape 1 v
Bacilli.Lactobacillales.Lactobacillaceae.Lactobacillus ring_shape 1 v
Bacilli.Lactobacillales.Lactobacillaceae.Pediococcus ring_shape 1 v
Clostridia.Clostridiales.Incertae_Sedis_XI.Finegoldia ring_shape 1 v
Clostridia.Clostridiales.Incertae_Sedis_XI.Gallicola ring_shape 1 v
Clostridia.Clostridiales.Incertae_Sedis_XI.Helcococcus ring_shape 1 v
......@@ -96,8 +94,6 @@ Bacill.Bacillale.Thermoactinomycetaceae.unclassified ring_width 1 0.6
Bacilli.Lactobacillales.Aerococcaceae.Eremococcus ring_width 1 0.6
Bacilli.Lactobacillales.Carnobacteriaceae.Carnobacterium ring_width 1 0.6
Bacilli.Lactobacillales.Carnobacteriaceae.Desemzia ring_width 1 0.6
Bacilli.Lactobacillales.Lactobacillaceae.Lactobacillus ring_width 1 0.6
Bacilli.Lactobacillales.Lactobacillaceae.Pediococcus ring_width 1 0.6
Clostridia.Clostridiales.Incertae_Sedis_XI.Finegoldia ring_width 1 0.6
Clostridia.Clostridiales.Incertae_Sedis_XI.Gallicola ring_width 1 0.6
Clostridia.Clostridiales.Incertae_Sedis_XI.Helcococcus ring_width 1 0.6
......@@ -123,8 +119,6 @@ Bacill.Bacillale.Thermoactinomycetaceae.unclassified ring_height 1 0.6
Bacilli.Lactobacillales.Aerococcaceae.Eremococcus ring_height 1 0.6
Bacilli.Lactobacillales.Carnobacteriaceae.Carnobacterium ring_height 1 0.6
Bacilli.Lactobacillales.Carnobacteriaceae.Desemzia ring_height 1 0.6
Bacilli.Lactobacillales.Lactobacillaceae.Lactobacillus ring_height 1 0.6
Bacilli.Lactobacillales.Lactobacillaceae.Pediococcus ring_height 1 0.6
Clostridia.Clostridiales.Incertae_Sedis_XI.Finegoldia ring_height 1 0.6
Clostridia.Clostridiales.Incertae_Sedis_XI.Gallicola ring_height 1 0.6
Clostridia.Clostridiales.Incertae_Sedis_XI.Helcococcus ring_height 1 0.6
......
......@@ -14,10 +14,16 @@
#------------------------------------------------------------------------------
__author__ = 'Nicola Segata (nsegata@hsph.harvard.edu)'
__version__ = '0.9.7'
__date__ = '21 July 2014'
__version__ = '1.1.3'
__date__ = '5 June 2018'
import sys
if sys.version_info[0] > 2:
raise Exception("GraPhlAn requires Python 2, your current Python version is {}.{}.{}"
.format(sys.version_info[0], sys.version_info[1], sys.version_info[2]))
from sys import argv
from argparse import ArgumentParser
from src.graphlan_lib import CircTree as CTree
......@@ -53,6 +59,8 @@ def read_params(args):
arg('--external_legends', default=False, action='store_true',
help = "specify whether the two external legends should be put in separate file or keep them "
"along with the image (default behavior)")
arg('--avoid_reordering', default=True, action='store_false',
help = "specify whether the tree will be reorder or not (default the tree will be reordered)")
arg( '-v','--version', action='version', version="GraPhlAn version "+__version__+" ("+__date__+")",
help="Prints the current GraPhlAn version and exit" )
return vars(parser.parse_args())
......@@ -67,4 +75,5 @@ if __name__ == "__main__":
out_dpi=args['dpi'],
out_size=args['size'],
out_pad=args['pad'],
external_legends = args['external_legends'])
external_legends=args['external_legends'],
reorder_tree=args['avoid_reordering'])
......@@ -11,10 +11,16 @@
#------------------------------------------------------------------------------
__author__ = 'Nicola Segata (nsegata@hsph.harvard.edu)'
__version__ = '0.9'
__date__ = '22 August 2012'
__version__ = '1.1.3'
__date__ = '5 June 2018'
import sys
if sys.version_info[0] > 2:
raise Exception("GraPhlAn requires Python 2, your current Python version is {}.{}.{}"
.format(sys.version_info[0], sys.version_info[1], sys.version_info[2]))
from sys import argv
from argparse import ArgumentParser
from src.graphlan_lib import CircTree as CTree
......
This diff is collapsed.
......@@ -171,7 +171,10 @@ class PpaTree:
tree.root = BClade()
def add_clade_rec( father, txt_tree ):
fl = set([t[0] for t in txt_tree])
fl = []
for c in [t[0] for t in txt_tree]:
if c in fl: continue
else: fl.append(c)
father.clades = []
for c in fl:
nclade = BClade( branch_length = 1.0,
......@@ -662,25 +665,34 @@ class PpaTree:
#self.tree.reroot_at_edge( list(longest)[-1], update_splits=True )
def reorder_tree( self ):
def reorder_tree( self, reorder_tree ):
self._ord_terms = []
def reorder_tree_rec( clade ):
def reorder_tree_rec( clade, reorder_tree ):
if clade.is_terminal():
self._ord_terms.append( clade )
return clade,clade
if reorder_tree:
clade.clades.sort(key=lambda x:len(x.get_terminals()), reverse = True)
for c in clade.clades:
c.fc,c.lc = reorder_tree_rec( c )
c.fc,c.lc = reorder_tree_rec( c, reorder_tree )
return clade.clades[0].fc,clade.clades[-1].lc
#clade.fc, clade.lc = clade.clades[0], clade.clades[-1]
reorder_tree_rec( self.tree.root )
reorder_tree_rec( self.tree.root, reorder_tree )
last = None # self._ord_terms[-1]
for c in self._ord_terms:
c.pc = last
if last:
last.nc = c
last = c
c.nc = None
#self._ord_terms[-1].nc = None # self._ord_terms[0]
......