Skip to content

Commit 9c0641a

Browse files
committed
1 parent 8646182 commit 9c0641a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/salmon_tx2gene.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def tx2gene(gtf, salmon, gene_id, extra, out):
4444
votes[item_pair[0].strip()] += 1
4545

4646
attr_dict[item_pair[0].strip()] = value
47-
gene_dict[attr_dict[gene_id]].append(attr_dict)
47+
try:
48+
gene_dict[attr_dict[gene_id]].append(attr_dict)
49+
except KeyError:
50+
continue
4851

4952
if not votes:
5053
logger.warning("No attribute in GTF matching transcripts")

0 commit comments

Comments
 (0)