Learn R Programming

GREP2 (version 1.0.2)

trim_fastq: Trim fastq files using Trimmomatic

Description

trim_fastq trim fastq files based on the illumina instruments using Trimmomatic.

Usage

trim_fastq(srr_id, fastq_dir, instrument, library_layout = c("SINGLE",
  "PAIRED"), destdir, n_thread)

Arguments

srr_id

SRA run accession ID.

fastq_dir

directory of the fastq files.

instrument

name of the illumina sequencing platform. For example, 'HiSeq'.

library_layout

layout of the library used. Either 'SINGLE' or 'PAIRED'.

destdir

directory where the trimmed fastq files will be saved.

n_thread

number of cores.

Value

trimmed fastq files.

Details

The following parameters are used as default in the trimmoatic function:

  1. Remove leading low quality or N bases (below quality 3) (LEADING:3)

  2. Remove trailing low quality or N bases (below quality 3) (TRAILING:3)

  3. Scan the read with a 4-base wide sliding window, cutting when the average quality per base drops below 15 (SLIDINGWINDOW:4:15)

  4. Drop reads below the 36 bases long (MINLEN:36)

References

Anthony M. Bolger, Marc Lohse, and Bjoern Usadel (2014): Trimmomatic: a flexible trimmer for Illumina sequence data. Bioinformatics, 30(15), 2114-2120. https://doi.org/10.1093/bioinformatics/btu170

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
fastq_dir=system.file("extdata","", package="GREP2")
trim_fastq(srr_id="SRR5890521",fastq_dir=fastq_dir,
instrument="MiSeq",library_layout="SINGLE",
destdir=tempdir(),n_thread=2)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab