Skip to content

--d4 Creates d4 files with inf/NaN values #237

@cademirch

Description

@cademirch

Been doing some work in the d4 repo and wanted to compare d4 files made using d4tools create and mosdepth. However with the small BAMs I've been testing with, mosdepth created d4 files have inf/NaN values for depth. Not sure if this is an issue with d4 or mosdepth.

Mosdepth versions tested: 0.3.6 (from conda) and 0.3.8 (the mosdepth_d4 binary in the releases page)

d4tools was built from source in a fresh clone of the repo.

d4tools create

> d4tools create -Azr ../data/genome.fna.fai ../data/test.bam test.d4
> d4tools show test.d4 > show.out
> head show.out
NC_052520.2	0	116790	0
NC_052520.2	116790	116942	1
NC_052520.2	116942	116946	0
NC_052520.2	116946	117093	1
NC_052520.2	117093	138700	0
NC_052520.2	138700	138848	1
NC_052520.2	138848	138852	2
NC_052520.2	138852	139000	1
NC_052520.2	139000	225154	0
NC_052520.2	225154	225306	1

mosdepth 0.3.6

> mosdepth --d4 test ../data/test.bam
> d4tools show test.per-base.d4 > show.out
> head show.out
NC_052520.2	0	36240	NaN
NC_052520.2	36240	36391	inf
NC_052520.2	36391	36426	NaN
NC_052520.2	36426	36577	inf
NC_052520.2	36577	43701	NaN
NC_052520.2	43701	43971	inf
NC_052520.2	43971	116790	NaN
NC_052520.2	116790	116941	inf
NC_052520.2	116941	116946	NaN
NC_052520.2	116946	117092	inf

0.3.8 is the same output as 0.3.6, no need to show it here.

Attached zipped folder of all the files for reference.
mosdepth-test.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions