X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=SamParser.h;h=425593a91d8c48f72f28783abafc090e0f5c6920;hb=cb94fd597b180aa7cb01ae84c9d1025201b98d8e;hp=335984e7394f2645ef4ee178032c57799c69d312;hpb=58f823f5be6dfbe00896fc44ac3aac5e881e9c5c;p=rsem.git diff --git a/SamParser.h b/SamParser.h index 335984e..425593a 100644 --- a/SamParser.h +++ b/SamParser.h @@ -13,8 +13,8 @@ #include "utils.h" -#include "Transcript.h" -#include "Transcripts.h" +#include "RefSeq.h" +#include "Refs.h" #include "SingleRead.h" #include "SingleReadQ.h" @@ -25,7 +25,7 @@ class SamParser { public: - SamParser(char, const char*, Transcripts&, const char* = 0); + SamParser(char, const char*, Refs&, const char* = 0); ~SamParser(); /** @@ -79,7 +79,7 @@ private: char SamParser::rtTag[STRLEN] = ""; // default : no tag, thus no Type 2 reads // aux, if not 0, points to the file name of fn_list -SamParser::SamParser(char inpType, const char* inpF, Transcripts& transcripts, const char* aux) { +SamParser::SamParser(char inpType, const char* inpF, Refs& refs, const char* aux) { switch(inpType) { case 'b': sam_in = samopen(inpF, "rb", aux); break; case 's': sam_in = samopen(inpF, "r", aux); break; @@ -91,14 +91,14 @@ SamParser::SamParser(char inpType, const char* inpF, Transcripts& transcripts, c if (header == 0) { fprintf(stderr, "Fail to parse sam header!\n"); exit(-1); } // Check if the reference used for aligner is the transcript set RSEM generated - if (transcripts.getM() != header->n_targets) { + if (refs.getM() != header->n_targets) { fprintf(stderr, "Number of transcripts does not match! Please align reads against the transcript set and use RSEM generated reference for your aligner!\n"); exit(-1); } for (int i = 0; i < header->n_targets; i++) { - const Transcript& transcript = transcripts.getTranscriptAt(i + 1); + const RefSeq& refseq = refs.getRef(i + 1); // If update int to long, chance the (int) conversion - if (transcript.getTranscriptID().compare(header->target_name[i]) != 0 || transcript.getLength() != (int)header->target_len[i]) { + if (refseq.getName().compare(header->target_name[i]) != 0 || refseq.getTotLen() != (int)header->target_len[i]) { fprintf(stderr, "Transcript information does not match! Please align reads against the transcript set and use RSEM generated reference for your aligner!\n"); exit(-1); }