Mercurial > repos > iuc > extract_metaphlan_database
comparison formatoutput.py @ 2:b6ecdfac241f 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:47:06 +0000 |
| parents | 1aaa9b943a83 |
| children | b4c750fe0fe3 |
comparison
equal
deleted
inserted
replaced
| 1:1aaa9b943a83 | 2:b6ecdfac241f |
|---|---|
| 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] |
