migoox / genome-downsampler

Other
2 stars 0 forks source link

Genome Downsampler

Table of Contents

Command Line Interface (CLI) Options

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.

Positional Arguments

Optional Arguments

Usage Examples

  1. Basic usage:

    genome-downsampler /data/input.bam 100
  2. 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
  3. Verbose mode with preprocessing output:

    genome-downsampler /data/input.bam 100 -v -p /data/filtered_out_prep.bam -o /data/output.bam
  4. 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

HTSlib

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

OR-Tools

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/

Install using precompiled binaries

TODO

Building from source

  1. install the dependencies,
  2. clone the repository,
  3. navigate to the repository directory and run mkdir build && cd build && cmake .. && cmake --build .,
  4. the binary file location: <repository-dir>/build/src/genome-downsampler.