Mercurial > repos > iuc > customize_metaphlan_database
comparison formatoutput.py @ 2:487da152fb43 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:54 +0000 |
parents | 025b0113ee97 |
children | 892a0629e2ed |
comparison
equal
deleted
inserted
replaced
1:025b0113ee97 | 2:487da152fb43 |
---|---|
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] |