# fastp 0.23.2 {{< admonition success "Installed" true >}} This software should be available with no extra configuration. {{< /admonition >}} ## fastp 0.23.2 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. ### features 0. comprehensive quality profiling for both before and after filtering data (quality curves, base contents, KMER, Q20/Q30, GC Ratio, duplication, adapter contents...) 1. filter out bad reads (too low quality, too short, or too many N...) 2. cut low quality bases for per read in its 5' and 3' by evaluating the mean quality from a sliding window (like Trimmomatic but faster). 3. trim all reads in front and tail 4. cut adapters. Adapter sequences can be automatically detected, which means you don't have to input the adapter sequences to trim them. 5. correct mismatched base pairs in overlapped regions of paired end reads, if one base is with high quality while the other is with ultra low quality 6. trim polyG in 3' ends, which is commonly seen in NovaSeq/NextSeq data. Trim polyX in 3' ends to remove unwanted polyX tailing (i.e. polyA tailing for mRNA-Seq data) 7. preprocess unique molecular identifier (UMI) enabled data, shift UMI to sequence name. 8. report JSON format result for further interpreting. 9. visualize quality control and filtering results on a single HTML page (like FASTQC but faster and more informative). 10. split the output to multiple files (0001.R1.gz, 0002.R1.gz...) to support parallel processing. Two modes can be used, limiting the total split file number, or limitting the lines of each split file. 11. support long reads (data from PacBio / Nanopore devices). 12. support reading from STDIN and writing to STDOUT 13. support interleaved input 14. support ultra-fast FASTQ-level deduplication 15. ... This tool is being intensively developed, and new features can be implemented soon if they are considered useful. If you have any additional requirement for `fastp`, please file an issue:https://github.com/OpenGene/fastp/issues/new ### simple usage * for single end data (not compressed) ``` fastp -i in.fq -o out.fq ``` * for paired end data (gzip compressed) ``` 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). ### examples of report `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 ------------------------------------------------------------------------------- ## Location and version ```console $ which fastp /local/cluster/bin/fastp $ fastp --version fastp 0.23.2 ``` ## help message ```console [Linux@chrom1 cluster]$ fastp --help usage: fastp [options] ... options: -i, --in1 read1 input file name (string [=]) -o, --out1 read1 output file name (string [=]) -I, --in2 read2 input file name (string [=]) -O, --out2 read2 output file name (string [=]) --unpaired1 for PE input, if read1 passed QC but read2 not, it will be written to unpaired1. Default is to discard it. (string [=]) --unpaired2 for PE input, if read2 passed QC but read1 not, it will be written to unpaired2. If --unpaired2 is same as --unpaired1 (default mode), both unpaired reads will be written to this same file. (string [=]) --overlapped_out for each read pair, output the overlapped region if it has no any mismatched base. (string [=]) --failed_out specify the file to store reads that cannot pass the filters. (string [=]) -m, --merge for paired-end input, merge each pair of reads into a single read if they are overlapped. The merged reads will be written to the file given by --merged_out, the unmerged reads will be written to the files specified by --out1 and --out2. The merging mode is disabled by default. --merged_out in the merging mode, specify the file name to store merged output, or specify --stdout to stream the merged output (string [=]) --include_unmerged in the merging mode, write the unmerged or unpaired reads to the file specified by --merge. Disabled by default. -6, --phred64 indicate the input is using phred64 scoring (it'll be converted to phred33,so the output will still be phred33) -z, --compression compression level for gzip output (1 ~ 9). 1 is fastest, 9 is smallest, default is 4. (int [=4]) --stdin input from STDIN. If the STDIN is interleaved paired-end FASTQ, please alsoadd --interleaved_in. --stdout stream passing-filters reads to STDOUT. This option will result in interleaved FASTQ output for paired-end output. Disabled by default. --interleaved_in indicate that is an interleaved FASTQ which contains both read1 and read2. Disabled by default. --reads_to_process specify how many reads/pairs to be processed. Default 0 means process all reads. (int [=0]) --dont_overwrite don't overwrite existing files. Overwritting is allowed by default. --fix_mgi_id the MGI FASTQ ID format is not compatible with many BAM operation tools, enable this option to fix it. -V, --verbose output verbose log information (i.e. when every 1M reads are processed). -A, --disable_adapter_trimming adapter trimming is enabled by default. If this option is specified, adapter trimming is disabled -a, --adapter_sequence the adapter for read1. For SE data, if not specified, the adapter will be auto-detected. For PE data, this is used if R1/R2 are found not overlapped. (string [=auto]) --adapter_sequence_r2 the adapter for read2 (PE data only). This is used if R1/R2 are found not overlapped. If not specified, it will be the same as (string [=auto]) --adapter_fasta specify a FASTA file to trim both read1 and read2 (if PE) by all the sequences in this FASTA file (string [=]) --detect_adapter_for_pe by default, the auto-detection for adapter is for SE data input only, turn on this option to enable it for PE data. -f, --trim_front1 trimming how many bases in front for read1, default is 0 (int [=0]) -t, --trim_tail1 trimming how many bases in tail for read1, default is 0 (int [=0]) -b, --max_len1 if read1 is longer than max_len1, then trim read1 at its tail to make it aslong as max_len1. Default 0 means no limitation (int [=0]) -F, --trim_front2 trimming how many bases in front for read2. If it's not specified, it will follow read1's settings (int [=0]) -T, --trim_tail2 trimming how many bases in tail for read2. If it's not specified, it will follow read1's settings (int [=0]) -B, --max_len2 if read2 is longer than max_len2, then trim read2 at its tail to make it aslong as max_len2. Default 0 means no limitation. If it's not specified, it will follow read1's settings (int [=0]) -D, --dedup enable deduplication to drop the duplicated reads/pairs --dup_calc_accuracy accuracy level to calculate duplication (1~6), higher level uses more memory (1G, 2G, 4G, 8G, 16G, 24G). Default 1 for no-dedup mode, and 3 for dedup mode. (int [=0]) --dont_eval_duplication don't evaluate duplication rate to save time and use less memory. -g, --trim_poly_g force polyG tail trimming, by default trimming is automatically enabled forIllumina NextSeq/NovaSeq data --poly_g_min_len the minimum length to detect polyG in the read tail. 10 by default. (int [=10]) -G, --disable_trim_poly_g disable polyG tail trimming, by default trimming is automatically enabled for Illumina NextSeq/NovaSeq data -x, --trim_poly_x enable polyX trimming in 3' ends. --poly_x_min_len the minimum length to detect polyX in the read tail. 10 by default. (int [=10]) -5, --cut_front move a sliding window from front (5') to tail, drop the bases in the windowif its mean quality < threshold, stop otherwise. -3, --cut_tail move a sliding window from tail (3') to front, drop the bases in the windowif its mean quality < threshold, stop otherwise. -r, --cut_right move a sliding window from front to tail, if meet one window with mean quality < threshold, drop the bases in the window and the right part, and then stop. -W, --cut_window_size the window size option shared by cut_front, cut_tail or cut_sliding. Range:1~1000, default: 4 (int [=4]) -M, --cut_mean_quality the mean quality requirement option shared by cut_front, cut_tail or cut_sliding. Range: 1~36 default: 20 (Q20) (int [=20]) --cut_front_window_size the window size option of cut_front, default to cut_window_size if not specified (int [=4]) --cut_front_mean_quality the mean quality requirement option for cut_front, default to cut_mean_quality if not specified (int [=20]) --cut_tail_window_size the window size option of cut_tail, default to cut_window_size if not specified (int [=4]) --cut_tail_mean_quality the mean quality requirement option for cut_tail, default to cut_mean_quality if not specified (int [=20]) --cut_right_window_size the window size option of cut_right, default to cut_window_size if not specified (int [=4]) --cut_right_mean_quality the mean quality requirement option for cut_right, default to cut_mean_quality if not specified (int [=20]) -Q, --disable_quality_filtering quality filtering is enabled by default. If this option is specified, quality filtering is disabled -q, --qualified_quality_phred the quality value that a base is qualified. Default 15 means phred quality >=Q15 is qualified. (int [=15]) -u, --unqualified_percent_limit how many percents of bases are allowed to be unqualified (0~100). Default 40 means 40% (int [=40]) -n, --n_base_limit if one read's number of N base is >n_base_limit, then this read/pair is discarded. Default is 5 (int [=5]) -e, --average_qual if one read's average quality score =1000), a sequential number prefix will be added to output name ( 0001.out.fq, 0002.out.fq...), disabled by default (long [=0]) -d, --split_prefix_digits the digits for the sequential number padding (1~10), default is 4, so the filename will be padded as 0001.xxx, 0 to disable padding (int [=4]) --cut_by_quality5 DEPRECATED, use --cut_front instead. --cut_by_quality3 DEPRECATED, use --cut_tail instead. --cut_by_quality_aggressive DEPRECATED, use --cut_right instead. --discard_unmerged DEPRECATED, no effect now, see the introduction for merging. -?, --help print this message ``` software ref: research ref: