Browse by type
A tool designed to provide ultrafast all-in-one preprocessing and quality control for FastQ data.
This tool is designed for processing short reads (i.e. Illumina NovaSeq, MGI), if you are looking for tools to process long reads (i.e. Nanopore, PacBio, Cyclone), please use fastplong.
fastp supports batch processing of multiple FASTQ files in a folder, see - batch processing
If you use fastp in your work, you can cite fastp as: Shifu Chen. fastp 1.0: An ultra-fast all-round tool for FASTQ data quality control and preprocessing. iMeta 4.5 (2025): e70078 https://doi.org/10.1002/imt2.70078
If you find a bug or have additional requirement for fastp, please file an issue:https://github.com/OpenGene/fastp/issues/new
fastp -i in.fq -o out.fq
fastp -i in.R1.fq.gz -I in.R2.fq.gz -o out.R1.fq.gz -O out.R2.fq.gz
By default, the HTML report is saved to fastp.html (can be specified with -h option), and the JSON report is saved to fastp.json (can be specified with -j option).
fastp creates reports in both HTML and JSON format.
* HTML report: http://opengene.org/fastp/fastp.html
* JSON report: http://opengene.org/fastp/fastp.json
# note: the fastp version in bioconda may be not the latest
conda install -c bioconda fastp
This binary was compiled on CentOS, and tested on CentOS/Ubuntu
# download the latest build
wget http://opengene.org/fastp/fastp
chmod a+x ./fastp
# or download specified version, i.e. fastp v1.3.3
wget http://opengene.org/fastp/fastp.1.3.3
mv fastp.1.3.3 fastp
chmod a+x ./fastp
fastp depends on libisal, libdeflate and libhwy (Google Highway >= 1.1.0). Please install all three before building.
You can install all dependencies at once with conda:
conda install -c conda-forge isa-l libdeflate libhwy
Or install them individually using your system package manager:
Install via brew install isa-l (macOS) or apt install libisal-dev (Ubuntu, dynamic linking only). Note: Ubuntu's libisal-dev does not ship a static library (.a). For static linking, compile from source (requires nasm, autoconf, automake, libtool):
git clone --depth=1 --branch v2.31.0 https://github.com/intel/isa-l.git
cd isa-l
./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib64
make -j
sudo make install
Install via package manager: apt install libdeflate-dev (Ubuntu) or brew install libdeflate (macOS). Or compile from source:
git clone https://github.com/ebiggers/libdeflate.git
cd libdeflate
cmake -B build
cmake --build build
sudo cmake --install build
Google Highway (>= 1.1.0) provides portable SIMD acceleration. Install via brew install highway (macOS) or conda install -c conda-forge libhwy. Note: apt install libhwy-dev on Ubuntu 24.04 provides 1.0.7 which is too old — compile from source instead:
git clone --depth=1 --branch 1.3.0 https://github.com/google/highway.git
cd highway
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DHWY_ENABLE_TESTS=OFF -DHWY_ENABLE_EXAMPLES=OFF
cmake --build build
sudo cmake --install build
# get source (you can also use browser to download from master or releases)
git clone https://github.com/OpenGene/fastp.git
# build
cd fastp
make -j
# Install
sudo make install
On macOS with Homebrew, you may need to specify the include and library paths:
make -j INCLUDE_DIRS=/opt/homebrew/include LIBRARY_DIRS=/opt/homebrew/lib
fastp supports both single-end (SE) and paired-end (PE) input/output.
* for SE data, you only have to specify read1 input by -i or --in1, and specify read1 output by -o or --out1.
* for PE data, you should also specify read2 input by -I or --in2, and specify read2 output by -O or --out2.
* if you don't specify the output file names, no output files will be written, but the QC will still be done for both data before and after filtering.
* the output will be gzip-compressed if its file name ends with .gz
fastp supports streaming the passing-filter reads to STDOUT, so that it can be passed to other compressors like bzip2, or be passed to aligners like bwa and bowtie2.
* specify --stdout to enable this mode to stream output to STDOUT
* for PE data, the output will be interleaved FASTQ, which means the output will contain records like record1-R1 -> record1-R2 -> record2-R1 -> record2-R2 -> record3-R1 -> record3-R2 ...
--stdin if you want to read the STDIN for processing.--interleaved_in to indicate that.--unpaired1 to store the reads that read1 passes filters but its paired read2 doesn't, as well as --unpaired2 for unpaired read2.--unpaired1 and --unpaired2 can be the same, so the unpaired read1/read2 will be written to the same single file.--failed_out to specify the file name to store the failed reads.--failed_out, its failure reason will be appended to its read name. For example, failed_quality_filter, failed_too_short etc.failure reason will be paired_read_is_failing.If you don't want to process all the data, you can specify --reads_to_process to limit the reads to be processed. This is useful if you want to have a fast preview of the data quality, or you want to create a subset of the filtered data.
You can enable the option --dont_overwrite to protect the existing files not to be overwritten by fastp. In this case, fastp will report an error and quit if it finds any of the output files (read1, read2, json report, html report) already exists before.
See output splitting
Multiple filters have been implemented.
Quality filtering is enabled by default, but you can disable it by -Q or disable_quality_filtering. Currently it supports filtering by limiting the N base number (-n, --n_base_limit), and the percentage of unqualified bases.
To filter reads by its percentage of unqualified bases, two options should be provided:
* -q, --qualified_quality_phred the quality value that a base is qualified. Default 15 means phred quality >=Q15 is qualified.
* -u, --unqualified_percent_limit how many percents of bases are allowed to be unqualified (0~100). Default 40 means 40%
You can also filter reads by its average quality score
* -e, --average_qual if one read's average quality score <avg_qual, then this read/pair is discarded. Default 0 means no requiremen
$ claude mcp add fastp \
-- python -m otcore.mcp_server <graph>