diff --git a/src/transcriptome.cpp b/src/transcriptome.cpp index 6534203cd7..a41d938598 100644 --- a/src/transcriptome.cpp +++ b/src/transcriptome.cpp @@ -604,6 +604,15 @@ int32_t Transcriptome::parse_transcripts(vector * transcripts, uint3 auto chrom_lengths_it = chrom_lengths.find(chrom); + transcript_line_ss.ignore(numeric_limits::max(), '\t'); + assert(getline(transcript_line_ss, feature, '\t')); + + // Select only relevant feature types. + if (feature != feature_type && !feature_type.empty()) { + + continue; + } + if (chrom_lengths_it == chrom_lengths.end()) { if (error_on_missing_path) { @@ -618,15 +627,6 @@ int32_t Transcriptome::parse_transcripts(vector * transcripts, uint3 } } - transcript_line_ss.ignore(numeric_limits::max(), '\t'); - assert(getline(transcript_line_ss, feature, '\t')); - - // Select only relevant feature types. - if (feature != feature_type && !feature_type.empty()) { - - continue; - } - // Parse start and end exon position and convert to 0-base. assert(getline(transcript_line_ss, pos, '\t')); int32_t spos = stoi(pos) - 1;