A tool designed to provide fast all-in-one preprocessing for FastQ files. This tool is developed in C++ with multithreading supported to afford high performance.
Citation: Shifu Chen. 2023. Ultrafast one-pass FASTQ data preprocessing, quality control, and deduplication using fastp. iMeta 2: e107. https://doi.org/10.1002/imt2.107
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.
# 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 v0.23.4 wget http://opengene.org/fastp/fastp.0.23.4 mv fastp.0.23.4 fastp chmod a+x ./fastp
fastp
depends on libdeflate
and libisal
, while libisal
is not compatible with gcc 4.8. If you use gcc 4.8, your fastp will fail to run. Please upgrade your gcc before you build the libraries and fastp.
See https://github.com/intel/isa-l
autoconf
, automake
, libtools
, nasm (>=v2.11.01)
and yasm (>=1.2.0)
are required to build this isal
git clone https://github.com/intel/isa-l.git cd isa-l ./autogen.sh ./configure --prefix=/usr --libdir=/usr/lib64 make sudo make install
See https://github.com/ebiggers/libdeflate
git clone https://github.com/ebiggers/libdeflate.git cd libdeflate cmake -B build cmake --build build 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 # Install sudo make install
You can add -j8
option to make/cmake
to use 8 threads for the compilation.
fastp
supports both single-end (SE) and paired-end (PE) input/output.
-i
or --in1
, and specify read1 output by -o
or --out1
.-I
or --in2
, and specify read2 output by -O
or --out2
..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
.
--stdout
to enable this mode to stream output to STDOUTrecord1-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 requirement (int [=0])Length filtering is enabled by default, but you can disable it by -L
or --disable_length_filtering
. The minimum length requirement is specified with -l
or --length_required
.
For some applications like small RNA sequencing, you may want to discard the long reads. You can specify --length_limit
to discard the reads longer than length_limit
. The default value 0 means no limitation.
Low complexity filter is disabled by default, and you can enable it by -y
or --low_complexity_filter
. The complexity is defined as the percentage of base that is different from its next base (base[i] != base[i+1]). For example:
# a 51-bp sequence, with 3 bases that is different from its next base
seq = 'AAAATTTTTTTTTTTTTTTTTTTTTGGGGGGGGGGGGGGGGGGGGGGCCCC'
complexity = 3/(51-1) = 6%
The threshold for low complexity filter can be specified by -Y
or --complexity_threshold
. It's range should be 0~100
, and its default value is 30, which means 30% complexity is required.
New filters are being implemented. If you have a new idea or new request, please file an issue.
Adapter trimming is enabled by default, but you can disable it by -A
or --disable_adapter_trimming
. Adapter sequences can be automatically detected for both PE/SE data.
-a
or --adapter_sequence
option. If adapter sequence is specified, the auto detection for SE data will be disabled.--adapter_sequence
, and for read2 by --adapter_sequence_r2
. If fastp
fails to find an overlap (i.e. due to low quality bases), it will use these sequences to trim adapters for read1 and read2 respectively.--detect_adapter_for_pe
to enable it.fastp
will run a little slower if you specify the sequence adapters or enable adapter auto-detection, but usually result in a slightly cleaner output, since the overlap analysis may fail due to sequencing errors or adapter dimers.--adapter_sequence=AGATCGGAAGAGCACACGTCTGAACTCCAGTCA --adapter_sequence_r2=AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
to your command lines, or enable auto detection for PE data by specifing detect_adapter_for_pe
.fastp
contains some built-in known adapter sequences for better auto-detection. If you want to make some adapters to be a part of the built-in adapters, please file an issue.You can also specify --adapter_fasta
to give a FASTA file to tell fastp
to trim multiple adapters in this FASTA file. Here is a sample of such adapter FASTA file:
>Illumina TruSeq Adapter Read 1
AGATCGGAAGAGCACACGTCTGAACTCCAGTCA
>Illumina TruSeq Adapter Read 2
AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
>polyA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
The adapter sequence in this file should be at least 6bp long, otherwise it will be skipped. And you can give whatever you want to trim, rather than regular sequencing adapters (i.e. polyA).
fastp
first trims the auto-detected adapter or the adapter sequences given by --adapter_sequence | --adapter_sequence_r2
, then trims the adapters given by --adapter_fasta
one by one.
The sequence distribution of trimmed adapters can be found at the HTML/JSON reports.
fastp
supports per read sliding window cutting by evaluating the mean quality scores in the sliding window. From v0.19.6
, fastp
supports 3 different operations, and you enable one or all of them:
-5, --cut_front
move a sliding window from front (5') to tail, drop the bases in the window if its mean quality is below cut_mean_quality, stop otherwise. Default is disabled. The leading N bases are also trimmed. Use cut_front_window_size
to set the widnow size, and cut_front_mean_quality
to set the mean quality threshold. If the window size is一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。
深度推理能力全新升级,全面对标OpenAI o1
科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。
一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型
Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。
字节跳动发布的AI编程神器IDE
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
AI助力,做PPT更简单!
咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。
选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。
专业的AI公文写作平台,公文写作神器
AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。
OpenAI Agents SDK,助力开发者便捷使用 OpenAI 相关功能。
openai-agents-python 是 OpenAI 推出的一款强大 Python SDK,它为开发者提供了与 OpenAI 模型交互的高效工具,支持工具调用、结果处理、追踪等功能,涵盖多种应用场景,如研究助手、财务研究等,能显著提升开发效率,让开发者更轻松地利用 OpenAI 的技术优势。
高分辨率纹理 3D 资产生成
Hunyuan3D-2 是腾讯开发的用于 3D 资产生成的强大工具,支持从文本描述、单张图片或多视角图片生成 3D 模型,具备快速形状生成能力,可生成带纹理的高质量 3D 模型,适用于多个领域,为 3D 创作提供了高效解决方案。
一个具备存储、管理和客户端操作等多种功能的分布式文件系统相关项目。
3FS 是一个功能强大的分布式文件系统项目,涵盖了存储引擎、元数据管理、客户端工具等多个模块。它支持多种文件操作,如创建文件和目录、设置布局等,同时具备高效的事件循环、节点选择和协程池管理等特性。适用于需要大规模数据存储和管理的场景,能够提高系统的性能和可靠性,是分布式存储领域的优质解决方案。
最新AI工具、AI资讯
独家AI资源、AI项目落地
微信扫一扫关注公众号