X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=synthesisRef.cpp;h=8ce268c197dfff87b7c6d989077fe863cc0d1a4c;hb=cb94fd597b180aa7cb01ae84c9d1025201b98d8e;hp=005cf95fee33e1031077a5993b1c771f1e4d6579;hpb=a95154919f950f86de9104b2b9dcf1f0c7e83387;p=rsem.git diff --git a/synthesisRef.cpp b/synthesisRef.cpp index 005cf95..8ce268c 100644 --- a/synthesisRef.cpp +++ b/synthesisRef.cpp @@ -17,8 +17,8 @@ int M; map name2seq; map::iterator iter; -Transcripts transcripts; -char groupF[STRLEN], tiF[STRLEN], refFastaF[STRLEN]; +Transcripts transcripts(1); // no genome, just transcript set +char groupF[STRLEN], tiF[STRLEN], refFastaF[STRLEN], chromListF[STRLEN]; bool hasMappingFile; char mappingFile[STRLEN]; @@ -56,12 +56,13 @@ char check(char c) { } void writeResults(char* refName) { - ofstream fout; + ofstream fout, fout2; string cur_gene_id, name; sprintf(groupF, "%s.grp", refName); sprintf(tiF, "%s.ti", refName); sprintf(refFastaF, "%s.transcripts.fa", refName); + sprintf(chromListF, "%s.chrlist", refName); transcripts.writeTo(tiF); if (verbose) { printf("Transcript Information File is generated!\n"); } @@ -79,7 +80,7 @@ void writeResults(char* refName) { fout.close(); if (verbose) { printf("Group File is generated!\n"); } - // We have to generate this .transcripts.fa, even reference_file is only one. Reason : polyA choice 2, need ">transcript_id" + fout2.open(chromListF); fout.open(refFastaF); for (int i = 1; i <= M; i++) { name = transcripts.getTranscriptAt(i).getTranscriptID(); @@ -90,13 +91,20 @@ void writeResults(char* refName) { } fout<<">"<second<second.length()<