Skip to content
Brent Pedersen edited this page Jan 22, 2025 · 2 revisions

F.A.Q.

Why doesn't mosdepth allow a base-quality filter.

mosdepth operates on chunks of reads where the chunks are defined by the cigar string. Usually, a read will have a single chunk (given, e.g. 151M cigar). Since mosdepth does not have to look at base-qualities it is much faster. If you need this, you can trim reads prior to aligning or use samtools depth.

How to build with d4?

(answsered by @LudvigOlsen in #247)

cd ~/
git clone https://github.com/38/d4-format
cd d4-format
cargo build --release --package d4binding

# Make dirs for the relevant files (could probably skip this and point directly to d4-format/)
mkdir -p ~/local/d4/lib
mkdir -p ~/local/d4/include

cp ~/d4-format/target/release/libd4binding.* ~/local/d4/lib/
cp ~/d4-format/d4binding/include/d4.h       ~/local/d4/include/

cd ../mosdepth/
nim c -d:d4 -d:release --passC:"-I$HOME/d4-format/d4binding/include" --passL:"-L$HOME/d4-format/target/release" mosdepth.nim

I added the following to .bashrc:

# d4tools
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/local/d4/lib/
export LIBRARY_PATH=$LIBRARY_PATH:$HOME/local/d4/lib/
export C_INCLUDE_PATH=$C_INCLUDE_PATH:$HOME/local/d4/include/
Clone this wiki locally