This is is the downsampling pipeline from the Sequana project
You must install Sequana first:
pip install sequana
Then, just install this package:
pip install sequana_downsampling
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.
This pipelines requires the following executable(s):
- sequana
- pigz
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
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.
Version | Description |
---|---|
0.8.5 |
|
0.8.4 |
|
0.8.3 |
|
0.8.2 |
|
0.8.1 |
|
0.8.0 | First release. |