Very simple quality filtering on paired reads when read1, read2, a single read, or both reads based on percentage of passed bases. Always keeps the paired reads together.
This is a modified C++ implementation of the read_qual_filter.py script for performance reasons.
First clone the repository:
git clone https://github.com/WEHIGenomicsRnD/qualfilter.git
cd qualfilter
Now you have to install the dependencies shargs and seqan3:
git clone --recurse-submodules https://github.com/seqan/sharg-parser.git
git clone --recurse-submodules https://github.com/seqan/seqan3.git
Now build the project:
./build.sh
This will build the binary file to build/qualfilter
.
If you have permissions to install on your system you can also run:
cd build
make install
You can now run the test:
./test.sh
The test.sh shows example usage:
./build/qualfilter \
-l test_data/sample_R1.fastq.gz \
-r test_data/sample_R2.fastq.gz \
-o test \
-m both \
-q 10 \
-p 80
OPTIONS
Input/output options:
-l, --read1 (std::string)
Read 1 FASTQ file.. The input file must exist and read permissions must be granted. Valid file extensions
are: [fq.gz, fastq.gz, fq, fastq].
-r, --read2 (std::string)
Read 2 FASTQ file.. The input file must exist and read permissions must be granted. Valid file extensions
are: [fq.gz, fastq.gz, fq, fastq].
-o, --out-prefix (std::string)
Prefix for output files.
-m, --mode (std::string)
Mode to run in. Default: "single". Value must be one of [read1, read2, single, both].
-q, --min-qual (signed 32 bit integer)
Quality score to filter on. Default: 30. Value must be in range [0,40].
-p, --min-pass-percent (float)
Minimum percent (0-100) of bases that must pass the quality filter. Default: 80. Value must be in range [0,100].
Common options
-h, --help
Prints the help page.
-hh, --advanced-help
Prints the help page including advanced options.
--version
Prints the version information.
--copyright
Prints the copyright/license information.
--export-help (std::string)
Export the help page information. Value must be one of [html, man, ctd, cwl].
--version-check (bool)
Whether to check for the newest app version. Default: true