@@ -236,7 +236,7 @@ int do_lca(std::vector<int> &taxids, int2int &parent) {
236236 // now counts contain how many time a node is traversed to the root
237237 int2int dist2root;
238238 for (int2int::iterator it = counter.begin (); it != counter.end (); it++)
239- if (it->second == ( int ) taxids.size ())
239+ if (it->second == taxids.size ())
240240 dist2root[nodes2root (it->first , parent)] = it->first ;
241241 for (int2int::iterator it = dist2root.begin (); 0 && it != dist2root.end (); it++)
242242 fprintf (stderr, " %d\t ->%d\n " , it->first , it->second );
@@ -426,20 +426,19 @@ void hts(gzFile fp, samFile *fp_in, int2int &i2i, int2int &parent, bam_hdr_t *hd
426426 kstr->s = NULL ;kstr->l = kstr->m =0 ;
427427 long nreads = 0 ;
428428 while (sam_read1 (fp_in, hdr, aln) >= 0 ) {
429- fprintf (stderr," Look a dollar\n " );
430429 if (maxreads!=-1 &&nreads>=maxreads)
431430 break ;
432431 if (bam_is_unmapped (aln)) {
433- fprintf (stderr," skipping: %s unmapped \n " ,bam_get_qname (aln ));
432+ // fprintf(stderr,"skipping: %s unmapped \n",bam_get_qname(b ));
434433 continue ;
435434 }
436435 if (bam_is_failed (aln)) {
437- fprintf (stderr," skipping: %s failed: flags=%d \n " ,bam_get_qname (aln),aln ->core .flag );
436+ // fprintf(stderr,"skipping: %s failed: flags=%d \n",bam_get_qname(b),b ->core.flag);
438437 continue ;
439438 }
440439 char *qname = bam_get_qname (aln);
441440 int chr = aln->core .tid ; // contig name (chromosome)
442- fprintf (stderr," %d %d\n " ,aln->core .qual ,minmapq);
441+ // fprintf(stderr,"%d %d\n",aln->core.qual,minmapq);
443442 static int ntimes = 3 ;
444443 if (aln->core .qual < minmapq && ntimes > 0 ) {
445444 ntimes--;
@@ -458,7 +457,7 @@ void hts(gzFile fp, samFile *fp_in, int2int &i2i, int2int &parent, bam_hdr_t *hd
458457 }
459458 if (minlength != -1 && (aln->core .l_qseq < minlength))
460459 continue ;
461- // change of readname
460+ // change of ref
462461 if (strcmp (last, qname) != 0 ) {
463462 if (taxids.size () > 0 && skip == 0 ) {
464463 // fprintf(stderr,"length of taxids:%lu and other:%lu minedit:%d\n",taxids.size(),editdist.size(),*std::min_element(editdist.begin(),editdist.end()));
0 commit comments