I'm getting this error when processing a standard gtf.
AttributeError: 'GTFEntry' object has no attribute 'feature'
The relevant code is as follows:
for ENTRY in GTF_DATA:
if ENTRY.feature == b"gene": # Only process gene entries
ATTRIBUTES = ENTRY.attributes.decode().split(";")
I'm unsure why I'm getting this error, as the gtf is pretty standard.
3R FlyBase gene 17750129 17763188 . - . gene_id "FBgn0038542"; gene_name "TyrR"; gene_source "FlyBase"; gene_biotype "protein_coding";
3R FlyBase transcript 17750129 17758978 . - . gene_id "FBgn0038542"; transcript_id "FBtr0344474"; gene_name "TyrR"; gene_source "FlyBase"; gene_biotype "protein_coding"; transcript_name "TyrR-RB"; transcript_source "FlyBase"; transcript_biotype "protein_coding";
3R FlyBase exon 17758709 17758978 . - . gene_id "FBgn0038542"; transcript_id "FBtr0344474"; exon_number "1"; gene_name "TyrR"; gene_source "FlyBase"; gene_biotype "protein_coding"; transcript_name "TyrR-RB"; transcript_source "FlyBase"; transcript_biotype "protein_coding"; exon_id "FBtr0344474-E1";
3R FlyBase exon 17757024 17757709 . - . gene_id "FBgn0038542"; transcript_id "FBtr0344474"; exon_number "2"; gene_name "TyrR"; gene_source "FlyBase"; gene_biotype "protein_coding"; transcript_name "TyrR-RB"; transcript_source "FlyBase"; transcript_biotype "protein_coding"; exon_id "FBtr0344474-E2";
Google suggests the problem is with using 'feature' instead of 'type' but I get exactly the same error regardless of the term used.
It's probably something simple that I'm doing wrong but I'm unable to figure it out.
Thanks.
I'm getting this error when processing a standard gtf.
The relevant code is as follows:
I'm unsure why I'm getting this error, as the gtf is pretty standard.
Google suggests the problem is with using 'feature' instead of 'type' but I get exactly the same error regardless of the term used.
It's probably something simple that I'm doing wrong but I'm unable to figure it out.
Thanks.