Skip to content

Commit

Permalink
Fix for the lineage_wf command that was causing an invalid marker set…
Browse files Browse the repository at this point in the history
… to be selected in rare cases when using the reduced_tree flag.
  • Loading branch information
donovan-h-parks committed Nov 9, 2017
1 parent 82cb6d9 commit 24d0876
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bin/checkm
Expand Up @@ -642,7 +642,7 @@ i.e. checkm unique will now fail''')
formatter_class=CustomHelpFormatter,
parents=[plot_need_qa_results_parser],
description='Identify outliers in bins relative to reference distributions.',
epilog='Example: checkm outliers ./bins tetra.tsv outliers.tsv')
epilog='Example: checkm outliers ./output ./bins tetra.tsv outliers.tsv')
outlier_parser.add_argument('bin_folder', help="folder containing bins (fasta format)")
outlier_parser.add_argument('tetra_profile', help='tetranucleotide profiles for each sequence (see tetra command)')
outlier_parser.add_argument('output_file', help="print results to file")
Expand Down
2 changes: 1 addition & 1 deletion checkm/DATA_CONFIG
@@ -1 +1 @@
{"dataRoot": "", "remoteManifestURL": "https://data.ace.uq.edu.au/public/CheckM_databases/", "manifestType": "CheckM", "localManifestName": ".dmanifest", "remoteManifestName": ".dmanifest"}
{"dataRoot": "", "remoteManifestURL": "https://data.ace.uq.edu.au/public/CheckM_databases/", "manifestType": "CheckM", "remoteManifestName": ".dmanifest", "localManifestName": ".dmanifest"}
2 changes: 1 addition & 1 deletion checkm/VERSION
@@ -1 +1 @@
1.0.7
1.0.8
20 changes: 16 additions & 4 deletions checkm/markerSets.py
Expand Up @@ -96,11 +96,23 @@ def setLineageSpecificSelectedMarkerSet(self, selectedMarkerSetMap):
uid = self.mostSpecificMarkerSet().UID

selectedId = selectedMarkerSetMap[uid]

self.selectedLinageSpecificMarkerSet = None
for ms in self.markerSets:
if ms.UID == selectedId:
self.selectedLinageSpecificMarkerSet = ms

while not self.selectedLinageSpecificMarkerSet:
for ms in self.markerSets:
if ms.UID == selectedId:
self.selectedLinageSpecificMarkerSet = ms
break

if not self.selectedLinageSpecificMarkerSet:
# This is a hack for the reduced tree. Since not all
# marker sets are in the reduced tree it is possible the
# selected marker set might not be avaliable. In this case,
# we should move to the next suitable marker set. Ideally,
# this could be avoided by just forcing in the selected
# marker set.
selectedId = selectedMarkerSetMap[selectedId]
else:
break

if self.selectedLinageSpecificMarkerSet == None:
Expand Down

0 comments on commit 24d0876

Please sign in to comment.