Skip to content

Commit 9525595

Browse files
committed
small optimizations
1 parent 5ec8fee commit 9525595

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mosdepth.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ proc write_distribution(chrom: string, d: var seq[int64], fh:File) =
416416
if irev > 300 and v == 0: continue
417417
cum += float64(v) / float64(sum)
418418
if cum < 8e-5: continue
419-
fh.write_line(chrom, "\t", $irev & "\t" & su.format_float(cum, ffDecimal, precision=precision))
419+
fh.write_line(chrom, "\t", irev, "\t", su.format_float(cum, ffDecimal, precision=precision))
420420
# reverse it back because we use to update the full genome
421421
reverse(d)
422422

@@ -586,8 +586,8 @@ proc main(bam: hts.Bam, chrom: region_t, mapq: int, min_len: int, max_len: int,
586586
global_region_stat.clear()
587587
global_stat.clear()
588588

589-
var region_distribution = new_seq[int64](1000)
590-
var global_distribution = new_seq[int64](1000)
589+
var region_distribution = new_seq[int64](512)
590+
var global_distribution = new_seq[int64](512)
591591

592592
if $args["--read-groups"] != "nil":
593593
for r in ($args["--read-groups"]).split(','):

0 commit comments

Comments
 (0)