From 3d59b5d03d379a5d12e262b4a2086187c4cb10c3 Mon Sep 17 00:00:00 2001 From: iquasere Date: Wed, 20 Dec 2023 17:18:19 +0000 Subject: [PATCH] Added parameter for distributing quantification of each enzyme by the KOs identified for it --- keggcharter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/keggcharter.py b/keggcharter.py index 8ef3a3a..2567097 100644 --- a/keggcharter.py +++ b/keggcharter.py @@ -36,6 +36,9 @@ def get_arguments(): "-mm", "--metabolic-maps", help="IDs of metabolic maps to output", default=','.join(keggcharter_prokaryotic_maps())) parser.add_argument("-qcol", "--quantification-columns", help="Names of columns with quantification") + parser.add_argument( + "-dq", "--distribute-quantification", default=False, action="store_true", + help="Quantification of each enzyme is divided by all KOs identified for it.") parser.add_argument( "-tls", "--taxa-list", help="List of taxa to represent in genomic potential charts (comma separated)") # TODO - must be tested parser.add_argument( @@ -669,7 +672,9 @@ def main(): cog2ko_file=f'{sys.path[0]}/cog2ko_keggcharter.tsv', threads=args.threads, step=args.step) - data = prepare_data_for_charting(data, ko_column='KO (KEGGCharter)', mt_cols=args.quantification_columns) + data = prepare_data_for_charting( + data, ko_column='KO (KEGGCharter)', mt_cols=args.quantification_columns, + distribute_quantification=args.distribute_quantification) data.to_csv(f'{args.output}/data_for_charting.tsv', sep='\t', index=False) if not args.input_taxonomy: taxon_to_mmap_to_orthologs = download_resources(