X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=extractRef.cpp;h=1a56cc15e8c615f02e14c7cd15f4e8c787e5a172;hb=8b43fb90ed3bc98f5de8d6f934ea6739dbd1e694;hp=0a46de0950534ea4c22f3acb8f239de66ef8415f;hpb=9eef8b58056b7cdaad1b4bdb2b2904d9fc0ff430;p=rsem.git diff --git a/extractRef.cpp b/extractRef.cpp index 0a46de0..1a56cc1 100644 --- a/extractRef.cpp +++ b/extractRef.cpp @@ -50,24 +50,24 @@ map mi_table; // mapping info table map::iterator mi_iter; //mapping info table's iterator void loadMappingInfo(char* mappingF) { - ifstream fin(mappingF); - string line, key, value; - - if (!fin.is_open()) { - fprintf(stderr, "Cannot open %s! It may not exist.\n", mappingF); - exit(-1); - } - - mi_table.clear(); - while (getline(fin, line)) { - line = cleanStr(line); - if (line[0] == '#') continue; - istringstream strin(line); - strin>>value>>key; - mi_table[key] = value; - } - - fin.close(); + ifstream fin(mappingF); + string line, key, value; + + if (!fin.is_open()) { + fprintf(stderr, "Cannot open %s! It may not exist.\n", mappingF); + exit(-1); + } + + mi_table.clear(); + while (getline(fin, line)) { + line = cleanStr(line); + if (line[0] == '#') continue; + istringstream strin(line); + strin>>value>>key; + mi_table[key] = value; + } + + fin.close(); } bool buildTranscript(int sp, int ep) { @@ -305,7 +305,7 @@ int main(int argc, char* argv[]) { if (seqs[i] == "") { 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()); + transcript.getTranscriptID().c_str(), transcript.getSeqName().c_str()); exit(-1); } }