Commit 20f1c1d3 by Celine Mercier

Fixed a potential bug with the parsing of taxonomic paths when using

obitaxonomy after obiaddtaxids on a general UNITE database
parent f32ca9e9
...@@ -182,8 +182,8 @@ def editTaxonomyOptions(optionManager): ...@@ -182,8 +182,8 @@ def editTaxonomyOptions(optionManager):
metavar="<path>", metavar="<path>",
default='', default='',
help="works with the -F option. Field name for the taxonomy path of the taxa if they are in the headers of the sequences. " help="works with the -F option. Field name for the taxonomy path of the taxa if they are in the headers of the sequences. "
"Must be of the form 'Fungi, Agaricomycetes, Thelephorales, Thelephoraceae' with the highest ancestors" "Must be of the form 'Fungi,Agaricomycetes,Thelephorales,Thelephoraceae' with the highest ancestors"
" first and ', ' as separators between ancestors") " first and ',' as separators between ancestors")
# optionManager.add_option('-P','--force_ancestor', # optionManager.add_option('-P','--force_ancestor',
# action="store_true", dest="force_ancestor", # action="store_true", dest="force_ancestor",
...@@ -267,7 +267,7 @@ if __name__ == '__main__': ...@@ -267,7 +267,7 @@ if __name__ == '__main__':
elif options.path != '' : elif options.path != '' :
previous = options.taxonomy.findTaxonByTaxid(restricting_ancestor) previous = options.taxonomy.findTaxonByTaxid(restricting_ancestor)
if seq[options.path] != '' : if seq[options.path] != '' :
ancestors = [a for a in seq[options.path].split(', ')] ancestors = [a for a in seq[options.path].split(',')]
if ancestors[-1] != t : if ancestors[-1] != t :
ancestors.append(t) ancestors.append(t)
else : # useful when data is from UNITE databases but could disappear else : # useful when data is from UNITE databases but could disappear
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment