comparison formatoutput.py @ 2:a92a632c4d9b draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metaphlan/ commit f1c6f4fe1e572ace84cf9106bc253603f55aac55"
author iuc
date Mon, 14 Jun 2021 12:48:10 +0000
parents b89b0765695d
children 6dee4abadccb
comparison
equal deleted inserted replaced
1:b89b0765695d 2:a92a632c4d9b
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 60 # skip UNKNOWN lines in Predicted taxon relative abundances
61 if "UNKNOWN" in line:
62 continue
61 # spit lines 63 # spit lines
62 split_line = line[:-1].split('\t') 64 split_line = line[:-1].split('\t')
63 taxo_n = split_line[0].split('|') 65 taxo_n = split_line[0].split('|')
64 if legacy_output: 66 if legacy_output:
65 abundance = split_line[1] 67 abundance = split_line[1]