Skip to content

Commit 3a03d64

Browse files
author
Your Name
committed
Updated files
1 parent 42fd225 commit 3a03d64

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

metaDMG.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ int main_print_ugly(int argc, char **argv) {
12691269
gzprintf(fpfpfp, "%s\t5'\t%d", sam_hdr_tid2name(hdr, taxid), i);
12701270

12711271
for (int ii = 0; ii < 16; ii++)
1272-
gzprintf(fpfpfp, "\t%.2f", it->second.fwD[i * 16 + ii]);
1272+
gzprintf(fpfpfp, "\t%.0f", it->second.fwD[i * 16 + ii]);
12731273
gzprintf(fpfpfp, "\n");
12741274
}
12751275
for (int i = 0; i < howmany; i++) {
@@ -1280,7 +1280,7 @@ int main_print_ugly(int argc, char **argv) {
12801280
else
12811281
gzprintf(fpfpfp, "%s\t3'\t%d", sam_hdr_tid2name(hdr, taxid), i);
12821282
for (int ii = 0; ii < 16; ii++)
1283-
gzprintf(fpfpfp, "\t%.2f", it->second.bwD[i * 16 + ii]);
1283+
gzprintf(fpfpfp, "\t%.0f", it->second.bwD[i * 16 + ii]);
12841284
gzprintf(fpfpfp, "\n");
12851285
}
12861286
}

ngsLCA.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)