From 528adfdb2f882b8ea6e835f07989362390901820 Mon Sep 17 00:00:00 2001 From: Mervin Fansler Date: Tue, 3 Jan 2023 16:12:52 -0500 Subject: [PATCH] contig as gene --- umi_tools/group.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/umi_tools/group.py b/umi_tools/group.py index 2e0c835..8780800 100644 --- a/umi_tools/group.py +++ b/umi_tools/group.py @@ -286,7 +286,10 @@ def main(argv=None): if options.tsv: if options.per_gene: - gene = read.get_tag(gene_tag) + if options.per_contig: + gene = read.reference_name + else: + gene = read.get_tag(gene_tag) else: gene = "NA" mapping_outfile.write("%s\n" % "\t".join(map(str, (