]> git.donarmstrong.com Git - rsem.git/blobdiff - synthesisRef.cpp
Updated samtools to 0.1.19
[rsem.git] / synthesisRef.cpp
index 3bb28086b3fee8755d81b88ad8f053b1ffd5a0af..aa0d473b6537088fcb820f246de9898fa1864ef4 100644 (file)
@@ -17,7 +17,7 @@ int M;
 map<string, string> name2seq;
 map<string, string>::iterator iter;
 
-Transcripts transcripts;
+Transcripts transcripts(1); // no genome, just transcript set
 char groupF[STRLEN], tiF[STRLEN], refFastaF[STRLEN], chromListF[STRLEN];
 
 bool hasMappingFile;
@@ -104,7 +104,7 @@ void writeResults(char* refName) {
 }
 
 int main(int argc, char* argv[]) {
-       if (argc < 5 || (hasMappingFile = atoi(argv[3])) && argc < 6) {
+  if (argc < 5 || ((hasMappingFile = atoi(argv[3])) && argc < 6)) {
                printf("Usage: synthesisRef refName quiet hasMappingFile [mappingFile] reference_file_1 [reference_file_2 ...]\n");
                exit(-1);
        }
@@ -118,7 +118,6 @@ int main(int argc, char* argv[]) {
        ifstream fin;
        string line, gseq;
        string seqname, gene_id;
-       void* pt;
 
        vector<Interval> vec;
 
@@ -127,13 +126,13 @@ int main(int argc, char* argv[]) {
        for (int i = start; i < argc; i++) {
                fin.open(argv[i]);
                if (!fin.is_open()) { fprintf(stderr, "Cannot open %s! It may not exist.\n", argv[i]); exit(-1); }
-               pt = getline(fin, line);
-               while (pt != 0 && line[0] == '>') {
+               getline(fin, line);
+               while ((fin) && (line[0] == '>')) {
                        istringstream strin(line.substr(1));
                        strin>>seqname;
 
                        gseq = "";
-                       while((pt = getline(fin, line)) && line[0] != '>') {
+                       while((getline(fin, line)) && (line[0] != '>')) {
                            gseq += line;
                        }