Skip to content

Commit

Permalink
1.7.6: bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
smirarab committed May 2, 2017
1 parent a19885e commit 0b007b5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- Version 1.7.6:
- ** Bug Fix **: PASTA used to sometimes fail due to troubles with new dendropy rooting

- Version 1.7.4:
- ** Bug Fix **: fixed a bug that eliminated one sequence

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ Debug
-------
To show debug information, set the following environmental variables:
```
PASTA_DEBUG=TRUE
PASTA_LOGGING_LEVEL=DEBUG
PASTA_LOGGING_FORMAT=RICH
export PASTA_DEBUG=TRUE
export PASTA_LOGGING_LEVEL=DEBUG
export PASTA_LOGGING_FORMAT=RICH
```
(last line is optional)

Expand Down
2 changes: 1 addition & 1 deletion pasta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
PROGRAM_NAME = "PASTA"
PROGRAM_AUTHOR = ["Siavash Mirarab","Nam Nguyen","Jiaye Yu", "Mark T. Holder", "Jeet Sukumaran", "Jamie Oaks"]
PROGRAM_LICENSE = "GNU General Public License, version 3"
PROGRAM_VERSION = "1.7.5"
PROGRAM_VERSION = "1.7.6"
PROGRAM_YEAR = "2013-2017"
PROGRAM_DESCRIPTION = "Practical Alignment using SATe and TrAnsitivity"
PROGRAM_WEBSITE = "http://www.cs.utexas.edu/~phylo/software/pasta/"
Expand Down
6 changes: 4 additions & 2 deletions pasta/pastajob.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ def build_subsets_tree(self, curr_tmp_dir_par):
#_LOG.debug("fake taxa inferred")
#Then make sure the tree is rooted at a branch (not at a node).
if len(subsets_tree._tree.seed_node.child_nodes()) > 2:
subsets_tree._tree.reroot_at_edge(subsets_tree._tree.seed_node.child_nodes()[0].edge)
_LOG.debug("Subset Labeling (start):\n%s" %str(subsets_tree.compose_newick())[0:200])
c = subsets_tree._tree.seed_node.child_nodes()[0]
subsets_tree._tree.reroot_at_edge(c.edge,length1=c.edge.length/2., length2=c.edge.length/2.)
_LOG.debug("Subset Labeling (start):\n%s" %str(subsets_tree.compose_newick(suppress_rooting=False)))
#_LOG.debug("Subset Labeling (start):\n%s" %str(len(subsets_tree._tree.seed_node.child_nodes())))
# Then label internal branches based on their children, and collapse redundant edges.
for node in subsets_tree._tree.postorder_internal_node_iter():
# my label is the intersection of my children,
Expand Down
4 changes: 2 additions & 2 deletions pasta/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def leaf_node_names(self):
def __str__(self):
return self.compose_newick()

def compose_newick(self):
return self._tree.as_string(schema="newick",suppress_rooting = True)
def compose_newick(self,suppress_rooting = True):
return self._tree.as_string(schema="newick",suppress_rooting)
#return self._tree.compose_newick()

def read_tree_from_file(self, treefile, file_format):
Expand Down

0 comments on commit 0b007b5

Please sign in to comment.