X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Transcript.h;h=90f6e6797b17f949b38e4776fcff7eacb8ace2ce;hb=52f1bd6f44f9b2630b839f192fb9ece18581983b;hp=ea621f3072b98ca16c7b6d6f4e195f10e8ebb624;hpb=a95154919f950f86de9104b2b9dcf1f0c7e83387;p=rsem.git diff --git a/Transcript.h b/Transcript.h index ea621f3..90f6e67 100644 --- a/Transcript.h +++ b/Transcript.h @@ -49,7 +49,7 @@ public: } bool operator< (const Transcript& o) const { - return gene_id < o.gene_id || gene_id == o.gene_id && transcript_id < o.transcript_id; + return gene_id < o.gene_id || (gene_id == o.gene_id && transcript_id < o.transcript_id); } const std::string& getTranscriptID() const { return transcript_id; } @@ -113,7 +113,10 @@ void Transcript::read(std::ifstream& fin) { int s; std::string tmp; - fin>>transcript_id>>gene_id>>seqname>>tmp>>length; + getline(fin, transcript_id); + getline(fin, gene_id); + getline(fin, seqname); + fin>>tmp>>length; assert(tmp.length() == 1 && (tmp[0] == '+' || tmp[0] == '-')); strand = tmp[0]; structure.clear(); @@ -130,7 +133,10 @@ void Transcript::read(std::ifstream& fin) { void Transcript::write(std::ofstream& fout) { int s = structure.size(); - fout<