DADA2pipe: DADA2 pipeline function

Description Usage Arguments Examples

View source: R/PipelinesScripts.R

Description

This function implements the DADA2 sequence QC and annotation pipeline for amplicon sequence libraries. Requires a directory of fastq files that are named with _R1_001.fastq.gz or _R2_001.fastq.gz, formatted with searchable sample IDs incorporated into the file names. Depends on stringr and DADA2. Returns a phyloseq object with metadata.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
DADA2pipe(
  in.dir,
  ref,
  ID,
  truncLen = c(200, 150),
  trimLeft = c(18, 19),
  maxN = 0,
  maxEE = c(2, 2),
  truncQ = 2,
  rm.phix = TRUE,
  compress = TRUE,
  multithread = TRUE
)

Arguments

in.dir

directory path to fastq files

ref

directory path to reference for taxomony annotation

ID

string to search file names for sample ID values

truncLen

where to truncate sequence forward and reverse reads. Default value is c(200, 150). See DADA2 documentation

trimLeft

removes bases from left, used to remove primers left over. Default value is c(18, 19). See DADA2 documentation

maxN

sets maximum number of N values in sequences that are retained. Default value is 0. See DADA2 documentation

maxEE

sets the maximum number of expected errors for each read. Default value is c(2,2). See DADA2 documentation

truncQ

paramter to tune sequence truncation. Default is 2. See DADA2 documentation

rm.phix

logical to remove PhiX. Default is TRUE. See DADA2 documentation

compress

logical. Default is TRUE. See DADA2 documentation

multithread

logical. Default is TRUE. See DADA2 documentation

metadf

metadata for sequence annotation

Examples

1
DAD2Apipe()

Djeppschmidt/SequenceSOP documentation built on Dec. 17, 2021, 5:27 p.m.