]> git.donarmstrong.com Git - rsem.git/commitdiff
rsem v1.1.11, allow spaces appear in field seqname and attributes gene_id, transcript...
authorBo Li <bli@cs.wisc.edu>
Thu, 25 Aug 2011 14:35:18 +0000 (09:35 -0500)
committerBo Li <bli@cs.wisc.edu>
Thu, 25 Aug 2011 14:35:18 +0000 (09:35 -0500)
BamWriter.h
Transcript.h

index fd0b8b7fb2734321026c85af0253b301279c2627..b39400f5cb9d21c50d2dcdf8ac0222218c5f2286 100644 (file)
@@ -479,7 +479,7 @@ void BamWriter::work(HitWrapper<PairedEndHit> wrapper, Transcripts& transcripts)
        bam_destroy1(b);
        bam_destroy1(b2);
 
-       if (verbose) { printf("Bam output file is generated!"); }
+       if (verbose) { printf("Bam output file is generated!\n"); }
 }
 
 void BamWriter::tr2chr(const Transcript& transcript, int sp, int ep, int& pos, int& n_cigar, std::vector<uint8_t>& data) {
index 8d7be7ae68afae09c773144e45db4ba79b81b36f..90f6e6797b17f949b38e4776fcff7eacb8ace2ce 100644 (file)
@@ -113,7 +113,10 @@ void Transcript::read(std::ifstream& fin) {
        int s;
        std::string tmp;
 
-       fin>>transcript_id>>gene_id>>seqname>>tmp>>length;
+       getline(fin, transcript_id);
+       getline(fin, gene_id);
+       getline(fin, seqname);
+       fin>>tmp>>length;
        assert(tmp.length() == 1 && (tmp[0] == '+' || tmp[0] == '-'));
        strand = tmp[0];
        structure.clear();
@@ -130,7 +133,10 @@ void Transcript::read(std::ifstream& fin) {
 void Transcript::write(std::ofstream& fout) {
        int s = structure.size();
 
-       fout<<transcript_id<<" "<<gene_id<<" "<<seqname<<" "<<strand<<" "<<length<<" ";
+       fout<<transcript_id<<std::endl;
+       fout<<gene_id<<std::endl;
+       fout<<seqname<<std::endl;
+       fout<<strand<<" "<<length<<std::endl;
        fout<<s;
        for (int i = 0; i < s; i++) fout<<" "<<structure[i].start<<" "<<structure[i].end;
        fout<<std::endl;