int start = items[i].getStart();
int end = items[i].getEnd();
- assert(strand == items[i].getStrand());
- assert(seqname == items[i].getSeqName());
+ if (strand != items[i].getStrand()) {
+ fprintf(stderr, "According to the GTF file given, a transcript has exons from different orientations!\n");
+ exit(-1);
+ }
+ if (seqname != items[i].getSeqName()) {
+ fprintf(stderr, "According to the GTF file given, a transcript has exons on multiple chromosomes!\n");
+ exit(-1);
+ }
if (cur_e + 1 < start) {
if (cur_s > 0) vec.push_back(Interval(cur_s, cur_e));
}
int main(int argc, char* argv[]) {
- if (argc < 6 || (hasMappingFile = atoi(argv[4])) && argc < 7) {
+ if (argc < 6 || ((hasMappingFile = atoi(argv[4])) && argc < 7)) {
printf("Usage: rsem-extract-reference-transcripts refName quiet gtfF hasMappingFile [mappingFile] chromosome_file_1 [chromosome_file_2 ...]\n");
exit(-1);
}
for (int i = 1; i <= M; i++) {
if (seqs[i] == "") {
- fprintf(stderr, "%s's sequence is empty! You must provide all chromosome files of transcripts which are presented in the .gtf file!\n", transcripts.getTranscriptAt(i).getTranscriptID().c_str());
+ const Transcript& transcript = transcripts.getTranscriptAt(i);
+ fprintf(stderr, "Cannot extract transcript %s's sequence from chromosome %s, whose information might not be provided! Please check if the chromosome directory is set correctly or the list of chromosome files is complete.\n", \
+ transcript.getTranscriptID().c_str(), transcript.getGeneID().c_str());
exit(-1);
}
}