mosdepth
mosdepth copied to clipboard
0.3.1 version from bioconda missing --d4 option
Hi, I wanted to use the --d4 option from the latest version but mosdepth installed through bioconda does not appear to have it.
At first I thought there was an issue with the bioconda recipe, but looking at it the downloaded version and sha sum seems all good.
I did not find where it is going wrong.
mosdepth 0.3.1
Usage: mosdepth [options] <prefix> <BAM-or-CRAM>
Arguments:
<prefix> outputs: `{prefix}.mosdepth.dist.txt`
`{prefix}.mosdepth.summary.txt`
`{prefix}.per-base.bed.gz` (unless -n/--no-per-base is specified)
`{prefix}.regions.bed.gz` (if --by is specified)
`{prefix}.quantized.bed.gz` (if --quantize is specified)
`{prefix}.thresholds.bed.gz` (if --thresholds is specified)
<BAM-or-CRAM> the alignment file for which to calculate depth.
Common Options:
-t --threads <threads> number of BAM decompression threads [default: 0]
-c --chrom <chrom> chromosome to restrict depth calculation.
-b --by <bed|window> optional BED file or (integer) window-sizes.
-n --no-per-base dont output per-base depth. skipping this output will speed execution
substantially. prefer quantized or thresholded values if possible.
-f --fasta <fasta> fasta file for use with CRAM files [default: ].
Other options:
-F --flag <FLAG> exclude reads with any of the bits in FLAG set [default: 1796]
-i --include-flag <FLAG> only include reads with any of the bits in FLAG set. default is unset. [default: 0]
-x --fast-mode dont look at internal cigar operations or correct mate overlaps (recommended for most use-cases).
-q --quantize <segments> write quantized output see docs for description.
-Q --mapq <mapq> mapping quality threshold. reads with a quality less than this value are ignored [default: 0]
-T --thresholds <thresholds> for each interval in --by, write number of bases covered by at
least threshold bases. Specify multiple integer values separated
by ','.
-m --use-median output median of each region (in --by) instead of mean.
-R --read-groups <string> only calculate depth for these comma-separated read groups IDs.
-h --help show help
It seems that the bioconda compilation was done without d4 support.
-
First you must install d4 (https://github.com/38/d4-format). Clone the repo, enter the directory "d4bindings" and follow the "install.sh" script or fix the paths to your convenience: cargo-build and copy the two files (d4bindings/include/d4.h and the newly created target/release/libd4binding.so). For me it is /usr/include and /usr/lib64.
-
Clone this package (mosdepth), edit the file "nim.cfg" adding the following two lines "-d:d4" and "-d:danger" to the top of the file.
-
Build and install the package with "nimble install".
-
Run mosdepth with the flag --d4 and without -n|--no-per-base
Thanks, indeed that's what I understood with the compilation that happened on bioconda. I took another route to install d4 in fact, I used the rust package manager cargo to install d4utils. I needed an easy way so that it could be installed inside a singularity container, without the need to modify compiler directives (a bit tricky to do automatically in a container recipe).