diff --git a/pisces/index.py b/pisces/index.py index 69a5cf3..71c0ce2 100755 --- a/pisces/index.py +++ b/pisces/index.py @@ -339,6 +339,10 @@ def features_to_string(features, fasta_in, masked=True, strand=True): transcripts = tuple(db.children(gene, featuretype='transcript', order_by='start')) if len(transcripts) == 0: # gene that has no transcripts continue # gene will have no transcript sequence or exons + try: + transcript['transcript_id'] + except KeyError: + continue # transcript id is missing (ex TRNAV-CAC gene in RefSeq) for transcript in transcripts: # Write entry in the transcripts to genes table gene2tx.write("{txp}\t{gene}\n".format(