filter_and_trim: Filter and Trim Sample Sequences

Description Usage Arguments Value References Examples

Description

Filters and trims paired forward and reverse FASTQ files.

Usage

1
filter_and_trim(samplNames, fnFs, fnRs, outDir, truncLen)

Arguments

samplNames

vector of sample names

fnFs

vector of paths to forward samples

fnRs

vector of paths to reverse samples

outDir

specified directory to output filtered reads

truncLen

a vector with two elements, the first being the truncated length for the forward reads and the second being the truncated length for the reverse reads

Value

new filtered reads put into the filtered/ directory

References

fastqFilter vs fastqPairedFilter vs filterAndTrim https://github.com/benjjneb/dada2/issues/311

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Setup variables
out_dir <- "output"
trunc_len <- c(225, 175)
ids <- c("s001", "s002")

# Import data
pkg <- "dada2HPCPipe"
dat <- "extdata"
sample1 <- system.file(dat, "s001-GTGCTA.fastq", package = pkg)
sample2 <- system.file(dat, "s002-GTGCTG.fastq", package = pkg)

# Run trim and filter
out <- filter_and_trim(ids, sample1, sample2, out_dir, trunc_len)

erictleung/dada2HPCPipe documentation built on May 10, 2019, 1:19 p.m.