X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=PairedEndQModel.h;h=a2f798120cc2524cae41b7f156aaa4bad524cced;hp=c61f6c872eaa26be6db47eac88de2c174a1c634f;hb=9eef8b58056b7cdaad1b4bdb2b2904d9fc0ff430;hpb=f67ec16ff8add74c17df026f77cf39e5a1aca051 diff --git a/PairedEndQModel.h b/PairedEndQModel.h index c61f6c8..a2f7981 100644 --- a/PairedEndQModel.h +++ b/PairedEndQModel.h @@ -8,6 +8,7 @@ #include #include #include +#include #include "utils.h" #include "my_assert.h" @@ -197,7 +198,7 @@ public: const LenDist& getGLD() { return *gld; } void startSimulation(simul*, double*); - bool simulate(int, PairedEndReadQ&, int&); + bool simulate(READ_INT_TYPE, PairedEndReadQ&, int&); void finishSimulation(); //Use it after function 'read' or 'estimateFromReads' @@ -213,7 +214,7 @@ private: static const int read_type = 3; int M; - int N[3]; + READ_INT_TYPE N[3]; Refs *refs; int seedLen; @@ -246,7 +247,7 @@ void PairedEndQModel::estimateFromReads(const char* readFN) { genReadFileNames(readFN, i, read_type, s, readFs); ReadReader reader(s, readFs, refs->hasPolyA(), seedLen); // allow calculation of calc_lq() function - int cnt = 0; + READ_INT_TYPE cnt = 0; while (reader.next(read)) { SingleReadQ mate1 = read.getMate1(); SingleReadQ mate2 = read.getMate2(); @@ -264,14 +265,14 @@ void PairedEndQModel::estimateFromReads(const char* readFN) { } } else if (verbose && (mate1.getReadLength() < seedLen || mate2.getReadLength() < seedLen)) { - printf("Warning: Read %s is ignored due to at least one of the mates' length < seed length %d!\n", read.getName().c_str(), seedLen); + std::cout<< "Warning: Read "<< read.getName()<< " is ignored due to at least one of the mates' length < seed length "<< seedLen<< "!"<< std::endl; } ++cnt; - if (verbose && cnt % 1000000 == 0) { printf("%d READS PROCESSED\n", cnt); } + if (verbose && cnt % 1000000 == 0) { std::cout<< cnt<< " READS PROCESSED"<< std::endl; } } - if (verbose) { printf("estimateFromReads, N%d finished.\n", i); } + if (verbose) { std::cout<<"estimateFromReads, N"<< i<<" finished."<< std::endl; } } mld->finish(); @@ -375,7 +376,7 @@ void PairedEndQModel::startSimulation(simul* sampler, double* theta) { nqpro->startSimulation(); } -bool PairedEndQModel::simulate(int rid, PairedEndReadQ& read, int& sid) { +bool PairedEndQModel::simulate(READ_INT_TYPE rid, PairedEndReadQ& read, int& sid) { int dir, pos; int insertL, mateL1, mateL2; std::string name;