]> git.donarmstrong.com Git - rsem.git/blobdiff - extractRef.cpp
Added a file describing the format of sample_name.stat/sample_name.model
[rsem.git] / extractRef.cpp
index 0a46de0950534ea4c22f3acb8f239de66ef8415f..2d2b17cea4fde25be35e6c9ab6925ba404144a74 100644 (file)
@@ -50,24 +50,24 @@ map<string, string> mi_table; // mapping info table
 map<string, string>::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) {
@@ -304,8 +304,8 @@ int main(int argc, char* argv[]) {
        for (int i = 1; i <= M; i++) {
                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());
+                       fprintf(stderr, "Cannot extract transcript %s's sequence from chromosome %s! Loading chromosome %s's sequence is failed. Please check if 1) the chromosome directory is set correctly; 2) the list of chromosome files is complete; 3) the FASTA files containing chromosome sequences are not truncated or having wrong format.\n", \
+                               transcript.getTranscriptID().c_str(), transcript.getSeqName().c_str(), transcript.getSeqName().c_str());
                        exit(-1);
                }
        }