Convert BAM/CRAM to WisecondorX NPZ format (upstream CLI wrapper)
wisecondorx_convert.RdCalls wisecondorx convert via condathis::run() to convert an aligned
BAM or CRAM file to a .npz file for downstream use with
wisecondorx_newref() or wisecondorx_predict().
Usage
wisecondorx_convert(
bam,
npz,
reference = NULL,
binsize = 5000L,
normdup = FALSE,
env_name = "wisecondorx",
extra_args = character(0)
)Arguments
- bam
Path to an indexed BAM or CRAM file.
- npz
Path for the output
.npzfile (created or overwritten).- reference
Optional path to a FASTA reference file. Required when
bamis a CRAM file. Passed to upstream--reference.- binsize
Bin size in base pairs (default 5000). The reference bin size should be a multiple of this value. Passed to upstream
--binsize.- normdup
Logical; when
TRUE, passes--normdupto skip duplicate removal. Recommended for NIPT data where read depth is low.- env_name
Name of the conda environment containing
wisecondorx(default"wisecondorx"). Created automatically by condathis on first use via thebiocondachannel.- extra_args
Character vector of additional arguments passed verbatim after the mapped CLI flags. For forward compatibility with future upstream WisecondorX releases.
Details
This wrapper exposes the upstream wisecondorx convert CLI flags:
--reference, --binsize, and --normdup.
For a fully native R implementation (no Python dependency) that uses
Rduckhts instead of pysam, see bam_convert() and bam_convert_npz().