comparison formatoutput.py @ 5:abd29bdbfbc9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metaphlan/ commit 08ec37116aab4268fdb93f175b60e50a0bbfafb2
author iuc
date Mon, 27 Feb 2023 06:59:29 +0000
parents 1e919c4f1822
children
comparison
equal deleted inserted replaced
4:aea2c541d79f 5:abd29bdbfbc9
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]