X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=synthesisRef.cpp;h=aa0d473b6537088fcb820f246de9898fa1864ef4;hb=f5dc7f9504136b08210ca8a5f3371060b4c04f60;hp=3bb28086b3fee8755d81b88ad8f053b1ffd5a0af;hpb=019648be71e0b8ea5772530b5496720fcb841bba;p=rsem.git diff --git a/synthesisRef.cpp b/synthesisRef.cpp index 3bb2808..aa0d473 100644 --- a/synthesisRef.cpp +++ b/synthesisRef.cpp @@ -17,7 +17,7 @@ int M; map name2seq; map::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 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; }