downsample NGS data sets
Project description
This is is the downsampling pipeline from the Sequana project
- Overview:
downsample NGS data sets
- Input:
a set of FastQ or FASTA files
- Output:
a set of downsampled files
- Status:
production
- Citation(sequana):
Cokelaer et al, (2017), ‘Sequana’: a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI doi:10.21105/joss.00352
- Citation(pipeline):
Installation
You must install Sequana first:
pip install sequana
Then, just install this package:
pip install sequana_downsampling
Usage
sequana_downsampling --help sequana_downsampling --input-directory DATAPATHH sequana_downsampling --downsampling-method random --downsampling-max-entries 100 sequana_downsampling --downsampling-method random_pct --downsampling-percent 10 --downsampling-input-format fasta --input-pattern "whatever*fasta"
Note that the current implementation handles fastq files (zipped or not) and fasta files (uncompressed only)
This creates a directory with the pipeline and configuration file. You will then need to execute the pipeline:
cd downsampling sh downsampling.sh # for a local run
This launch a snakemake pipeline. If you are familiar with snakemake, you can retrieve the pipeline itself and its configuration files and then execute the pipeline yourself with specific parameters:
snakemake -s downsampling.rules -c config.yaml --cores 4 --stats stats.txt
Or use sequanix interface.
Examples of a set of FastQ zipped files in the current directory:
sequana_downsampling –run –downsampling-method random_pct cd downsampling make clean
This will create a directory called downsampling, and randomly select 10% of the input reads for each file with extension .fastq.gz in the current directory. Since -run is used, the pipeline is executed automatically. The following commands will enter into the directory and called a Makefile. This will clean the directory for temporary files.
Requirements
This pipelines requires the following executable(s):
sequana
pigz
Details
This pipeline runs downsampling in parallel on the input fastq or fasta files (paired or not). If paired, the one-to-one mapping is conserved.
It can take as input a set of FastQ files, or FastA files. by default, the pipeline with randomly select 1000 entries from each input files. You can increase this number using –downsampling-max-entries option. If you prefer to select a percentage of the entries instead, you can change the downsamping method as follows:
--downsampling-method random_pct
and change the value if needed (default is 10%):
--downsampling-percent 20
Note that input FastQ can be gzipped. Output files are gzipped. FastA input files must be compressed for now
Rules and configuration details
Here is the latest documented configuration file to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.
Changelog
Version |
Description |
---|---|
0.8.5 |
|
0.8.4 |
|
0.8.3 |
|
0.8.2 |
|
0.8.1 |
|
0.8.0 |
First release. |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for sequana_downsampling-0.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e6b158d186f164cb3e18c6dd6d2836999b2f396ea4a4736d7b2c7787b171f47 |
|
MD5 | 373637332ee07f13698e57ec4dfe965c |
|
BLAKE2b-256 | 8a9c01b0c011c89a9e23c092ee74b19680ceba99e0db0fdfd9950df68553df5e |