Mercurial > repos > iuc > merge_metaphlan_tables
comparison formatoutput.py @ 5:27258eb73f0c 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:39 +0000 |
| parents | 2e5ae05160e0 |
| children | 27250f92a01a |
comparison
equal
deleted
inserted
replaced
| 4:2e5ae05160e0 | 5:27258eb73f0c |
|---|---|
| 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] |
