X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=GTFItem.h;h=e0499be9139ab226a1643aea47e379e92af275f4;hp=a908375c9296ca1ba9ce0717969b11e30bffd109;hb=8bc3c21a5168b1dd6e36a95c018013e6a7641fee;hpb=229ba9d68e0a801907631887640ab475d51c560c diff --git a/GTFItem.h b/GTFItem.h index a908375..e0499be 100644 --- a/GTFItem.h +++ b/GTFItem.h @@ -80,8 +80,10 @@ public: } } - my_assert(find_gene_id, line, "Cannot find gene_id!"); - my_assert(find_transcript_id, line, "Cannot find transcript_id!"); + my_assert(feature != "exon" || find_gene_id, line, "Cannot find gene_id!"); + my_assert(feature != "exon" || find_transcript_id, line, "Cannot find transcript_id!"); + if (!find_gene_id && feature != "exon") { printf("Warning: line \" %s \" does not contain a gene_id attribute! Since this line will not be used for reference construction, it is skipped. But if you think this GTF file is corrupted, you should find a complelete GTF file instead and rebuild the reference.\n", line.c_str()); } + if (!find_transcript_id && feature != "exon") { printf("Warning: line \" %s \" does not contain a transcript_id attribute! Since this line will not be used for reference construction, it is skipped. But if you think this GTF file is corrupted, you should find a complelete GTF file instead and rebuild the reference.\n", line.c_str()); } } std::string getSeqName() { return seqname; }