## Trim reads for several criteria

### Description

This tool is a general trimming tool containing all the trimming methods used in the PRINSEQ package, including the poly-A/T and quality methods. The input data can be in FASTQ or in FASTA format.

### Details

Only those trimming methods are used for which you assigned a value. You can use several trimming methods at the same time. For example trimming with parameters Trim left: 3 and Trim right: 10 would produce a reads set where all the reads are trimmed by removing 3 bases form the 5'-end and 10 bases from the 3'-end. For detailed description of the different trimming options, please check the PRINSEQ manual. From the table below, you can check what PRINSEQ command line options the parameter definitions correspond to:

Parameter name | Command line | Description
Trim to length | -trim_to_len | Trim all reads from the 3-prime-end to result in reads with this length.
Trim left | -trim_left | Trim reads at the 5-prime-end by given number of positions.
Trim right | -trim.right | Trim reads at the 3-prime-end by given number of positions.
Trim left tails | -trim_tail_left | Trim poly-A/T tail with a minimum length of the given value at the 5-prime-end.
Trim right tails | -trim_tail_right | Trim poly-A/T tail with a minimum length of the given value at the 3-prime-end.
Trim left poly-N tails | -trim_ns_left | Trim poly-N tail with a minimum length of the given value at the 5-prime-end.
Trim right poly-N tails | -trim_ns_right | Trim poly-N tail with a minimum length of the given value at the 3-prime-end.
Trim 5-prime-end by quality | -trim_qual_left | Trim reads by quality score from the 5-prime-end with the given threshold score.
Trim 3-prime-end by quality | -trim_qual_right | Trim reads by quality score from the 3-prime-end with the given threshold score.
The quality score calculation method | -trim_qual_type | Type of quality score calculation to use
Quality score comparison condition | -trim_qual_rule | Rule to use to compare quality score threshold to calculated value.
Window for quality calculation | -trim_qual_window | The sliding window size used to calculate quality score by type. To stop at the first base that fails the rule defined, use a window size of 1.
Step size to move the quality window | -trim_qual_step | Step size used to move the sliding window. To move the window over all quality scores without missing any, the step size should be less or equal to the window size.
Base quality encoding | -phred64 | Select "Sanger" for Illumina 1.8+, Sanger, Roche/454, Ion Torrent and PacBio data.
Minimum length | -min_len | Select only reads that are longer than the given value after trimming. |

### Output

By default the tool outputs the reads that pass the trimming conditions. For paired end reads you can also choose to output the singletons to separate files. You can also print out a log file that contains information about the filtering task and statistics about how many reads were accepted and rejected.

### Reference

This tool is based on the PRINSEQ package.