comparison formatoutput.py @ 5:b4c750fe0fe3 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metaphlan/ commit f3a89af137b13715f9fb13383577aceb2c445ce6
author iuc
date Sat, 03 Dec 2022 10:42:36 +0000
parents b6ecdfac241f
children
comparison
equal deleted inserted replaced
4:97ad0d817a45 5:b4c750fe0fe3
55 # parse metaphlan file 55 # parse metaphlan file
56 for line in metaphlan_output_f.readlines(): 56 for line in metaphlan_output_f.readlines():
57 # skip headers 57 # skip headers
58 if line.startswith("#"): 58 if line.startswith("#"):
59 continue 59 continue
60 # skip UNKNOWN lines in Predicted taxon relative abundances 60
61 if "UNKNOWN" in line: 61 # skip UNKNOWN (v3) or UNCLASSIFIED (v4) lines in predicted taxon relative abundances
62 if "UNKNOWN" in line or 'UNCLASSIFIED' in line:
62 continue 63 continue
64
63 # spit lines 65 # spit lines
64 split_line = line[:-1].split('\t') 66 split_line = line[:-1].split('\t')
65 taxo_n = split_line[0].split('|') 67 taxo_n = split_line[0].split('|')
66 if legacy_output: 68 if legacy_output:
67 abundance = split_line[1] 69 abundance = split_line[1]