From 3a28bf235e7b1f5407ce8d177b61de2e8dabc7e6 Mon Sep 17 00:00:00 2001 From: Bo Li Date: Mon, 26 May 2014 20:06:54 -0500 Subject: [PATCH] Changed the behavior of parsing GTF file. Now if a GTF line's feature is not exon and it does not contain a gene_id or transcript_id attribute, only a warning message will be produced (instead of failing the RSEM) --- GTFItem.h | 6 ++++-- WHAT_IS_NEW | 6 ++++++ samValidator.cpp | 2 +- scanForPairedEndReads.cpp | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) 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; } diff --git a/WHAT_IS_NEW b/WHAT_IS_NEW index 2c6f2c7..da4c764 100644 --- a/WHAT_IS_NEW +++ b/WHAT_IS_NEW @@ -1,3 +1,9 @@ +RSEM v1.2.13 + +- Changed the behavior of parsing GTF file. Now if a GTF line's feature is not "exon" and it does not contain a "gene_id" or "transcript_id" attribute, only a warning message will be produced (instead of failing the RSEM) + +-------------------------------------------------------------------------------------------- + RSEM v1.2.12 - Enabled allele-specific expression estimation diff --git a/samValidator.cpp b/samValidator.cpp index 6e60210..5586c8c 100644 --- a/samValidator.cpp +++ b/samValidator.cpp @@ -36,7 +36,7 @@ int main(int argc, char* argv[]) { size_t len = suffix.length(); for (size_t i = 0; i < len; i++) suffix[i] = tolower(suffix[i]); - general_assert(suffix == "sam" || suffix == "bam", "Cannot recognize input file's file type! The file suffix is neither sam or bam."); + general_assert(suffix == "sam" || suffix == "bam", "Cannot recognize input file's file type! The file suffix is neither sam nor bam."); in = (suffix == "sam" ? samopen(argv[1], "r", NULL) : samopen(argv[1], "rb", NULL)); general_assert(in != 0, "Cannot open input file!"); diff --git a/scanForPairedEndReads.cpp b/scanForPairedEndReads.cpp index 7b20e11..3669f5f 100644 --- a/scanForPairedEndReads.cpp +++ b/scanForPairedEndReads.cpp @@ -50,7 +50,7 @@ bool less_than(bam1_t *a, bam1_t *b) { int main(int argc, char* argv[]) { if (argc != 3) { - printf("UsaOAge: rsem-scan-for-paired-end-reads input.sam output.bam\n"); + printf("Usage: rsem-scan-for-paired-end-reads input.sam output.bam\n"); exit(-1); } -- 2.39.2