This section details the available CLI options for configuring the genome-downsampler
application. Each option allows you to customize the behavior and output of the downsampling process.
INPUT_FILEPATH
: Input file path
MAX_COVERAGE
: Maximum coverage
-h
, --help
: Help
-o
, --output
TEXT
: Output file path
-a
, --algorithm
TEXT
: Algorithm
quasi-mcp-cpu
, quasi-mcp-cuda
, mcp-cpu
, qmcp-cpu
, . Default is quasi-mcp-cpu
.-b
, --bed
TEXT:FILE
: BED file with amplicon bounds
-t
, --tsv
TEXT:FILE
: TSV file with primer pairings
-p
, --preprocessing-out
TEXT
: Output file for preprocessed reads
-l
, --min-length
UINT
: Minimum sequence length
-q
, --min-mapq
UINT
: Minimum MAPQ value
-@
, --threads
UINT
: Number of threads
-v
, --verbose
: Verbose mode
Basic usage:
genome-downsampler /data/input.bam 100
Advanced usage with optional arguments:
genome-downsampler /data/input.bam 100 -a quasi-mcp-cuda -v -l 100 -q 50 -p /data/filtered_out_prep.bam -o /data/output.bam -b /data/primers.bed -t /data/pairs.tsv
Verbose mode with preprocessing output:
genome-downsampler /data/input.bam 100 -v -p /data/filtered_out_prep.bam -o /data/output.bam
Using amplicon filtering:
genome-downsampler /data/input.bam 100 -v -o /data/output.bam -b /data/primers.bed -t /data/pairs.tsv
## Installation guide
### Dependencies
This software only supports GNU/Linux systems, if you are a Windows user, we recommend using WSL. In order to run (or compile), the [**HTSlib**](https://github.com/samtools/htslib) and [**OR-Tools**](https://github.com/google/or-tools) are required to be installed on the your machine.
#### Common
Install the following common dependencies by running:
Debian/Ubuntu/Linux Mint:
```bash
sudo apt install autoconf automake make gcc perl zlib1g-dev libbz2-dev liblzma-dev libcurl4-gnutls-dev libssl-dev
Fedora/Red Hat:
sudo dnf install autoconf automake make gcc perl zlib-devel bzip2-devel xz-devel libcurl-devel openssl-devel
OpenSUSE:
sudo zypper install autoconf automake make gcc perl zlib-devel libbz2-devel xz-devel libcurl-devel libopenssl-devel
Arch Linux:
sudo pacman -S autoconf automake make gcc perl zlib bzip2 xz curl openssl
If you prefer to install only HTSlib, you can use the following script. For the full installation guide, visit here:
wget https://github.com/samtools/htslib/releases/download/1.20/htslib-1.20.tar.bz2
tar -xf htslib-1.20.tar.bz2
cd htslib-1.20
make
sudo make install
Alternatively, you can install samtools via package manager, since HTSlib is part of the samtools project.
Debian/Ubuntu/Linux Mint:
sudo apt install samtools
Fedora/Red Hat:
sudo dnf install samtools
OpenSUSE:
sudo zypper install samtools
Arch Linux:
sudo pacman -S samtools
Many package managers does not provide OR-Tools library. To install it on your machine, download the appropriate binaries from here and extract the files.
Now, supposing that ORTOOLS_DIR_NAME
represents the path to the extracted directory, use the following commands:
sudo cp -r ${ORTOOLS_DIR_NAME}/bin/* /usr/local/bin/
sudo cp -r ${ORTOOLS_DIR_NAME}/lib/* /usr/local/lib/
sudo cp -r ${ORTOOLS_DIR_NAME}/include/* /usr/local/include/
sudo cp -r ${ORTOOLS_DIR_NAME}/share/* /usr/local/share/
TODO
mkdir build && cd build && cmake .. && cmake --build .
,<repository-dir>/build/src/genome-downsampler
.