Skip to content
Snippets Groups Projects
Commit 84a877bb authored by Veronique Legrand's avatar Veronique Legrand
Browse files

bug fix+ traces for debug

parent 5d04ab44
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
using namespace std; using namespace std;
//#define DEBUG
#define BENCHMARK #define BENCHMARK
#ifdef BENCHMARK #ifdef BENCHMARK
...@@ -121,24 +122,31 @@ void lowFilterCMS(FqBaseBackend* map_id_backend[],int nb_be,int k, CountMinSketc ...@@ -121,24 +122,31 @@ void lowFilterCMS(FqBaseBackend* map_id_backend[],int nb_be,int k, CountMinSketc
for (i=0;i<nb_be;i++){ for (i=0;i<nb_be;i++){
map_id_backend[i]->openFile(); map_id_backend[i]->openFile();
} }
cout<<"all input files are open"<<endl;
for (it=io_sr->begin(); it!=io_sr->end(); ++it) { for (it=io_sr->begin(); it!=io_sr->end(); ++it) {
for (it_offs=it->second.begin();it_offs!=it->second.end();it_offs++) { for (it_offs=it->second.begin();it_offs!=it->second.end();it_offs++) {
unsigned int j=it_offs->first; unsigned int j=it_offs->first;
for (it_struct=it_offs->second.begin();it_struct!=it_offs->second.end();it_struct++) { for (it_struct=it_offs->second.begin();it_struct!=it_offs->second.end();it_struct++) {
// read dna string corresponding to fastq record if (it_struct->fileid) {
DnaSeqStr a_seqs[2]; // read dna string corresponding to fastq record
init_DnaSeqStr(&a_seqs[0]); DnaSeqStr a_seqs[2];
init_DnaSeqStr(&a_seqs[1]); init_DnaSeqStr(&a_seqs[0]);
getDNASeqstr(map_id_backend,*it_struct,j,a_seqs); init_DnaSeqStr(&a_seqs[1]);
// decompose dna string into k-mers and turn k_mers into numbers. getDNASeqstr(map_id_backend,*it_struct,j,a_seqs);
decomposeReadInKMerNums(read_p, nbrKmerDecompo,k,a_seqs); #ifdef DEBUG
ret=pcms->isBeneathMinKappa(nbrKmerDecompo); cout<<a_seqs[0].fq_record_buf<<" "<<a_seqs[0].start_idx<<" "<<a_seqs[0].length<<endl;
if (ret) it_struct->fileid=0; cout<<a_seqs[1].fq_record_buf<<" "<<a_seqs[1].start_idx<<" "<<a_seqs[1].length<<endl;
nbrKmerDecompo.clear(); #endif
// decompose dna string into k-mers and turn k_mers into numbers.
decomposeReadInKMerNums(read_p, nbrKmerDecompo,k,a_seqs);
ret=pcms->isBeneathMinKappa(nbrKmerDecompo);
if (ret) it_struct->fileid=0;
nbrKmerDecompo.clear();
}
} }
} }
} }
cout<<"going to close input files."<<endl;
for (i=0;i<nb_be;i++){ for (i=0;i<nb_be;i++){
map_id_backend[i]->closeFile(); map_id_backend[i]->closeFile();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment