diff --git a/pisces/index.py b/pisces/index.py index 71c0ce2..fb0346b 100755 --- a/pisces/index.py +++ b/pisces/index.py @@ -339,11 +339,11 @@ 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: + try: + transcript['transcript_id'] + except KeyError: + continue # transcript id is missing (ex TRNAV-CAC gene in RefSeq) # Write entry in the transcripts to genes table gene2tx.write("{txp}\t{gene}\n".format( gene=gene['gene_id'][0],