From 8f7de074c688918cf8883a8cc374169044b1a796 Mon Sep 17 00:00:00 2001 From: Aitor Blanco Date: Fri, 1 Sep 2023 11:19:58 +0200 Subject: [PATCH] Adds avg read length in the output header with run the -t rel_ab_w_read_stats option --- metaphlan/metaphlan.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metaphlan/metaphlan.py b/metaphlan/metaphlan.py index 2aaa390..d6aa8e7 100755 --- a/metaphlan/metaphlan.py +++ b/metaphlan/metaphlan.py @@ -1429,6 +1429,9 @@ def main(): outf.write('#{}\n'.format(pars['index'])) outf.write('#{}\n'.format(' '.join(sys.argv))) outf.write('#{} reads processed\n'.format(n_metagenome_reads)) + + if pars['t'] == 'rel_ab_w_read_stats': + outf.write('#Average read length {}\n'.format(avg_read_length)) if not CAMI_OUTPUT: outf.write('#' + '\t'.join((pars["sample_id_key"], pars["sample_id"])) + '\n')