getTruncationLength: Get Truncation Length

getTruncationLengthR Documentation

Get Truncation Length

Description

Decides on truncation length for trimmed 16S reads based on quality score means. Default cutoff is a score of 30. Warns you if the beginning (first 10) bases are low-quality, but returns the first low-quality base after the 10th base. If no bases are below score, returns the last base. The truncation lengths can be aggregated (e.g. minimum) and used as an argument in filterAndTrim.

Usage

getTruncationLength(fl, qscore = 30, n = 5e+05, verbose = TRUE)

Arguments

fl

Full names of fastq files.

qscore

Default 30. Mean quality score threshold at which to truncate the remainder of the read.

n

Default 5e+05. The number of reads to sample when processing fastq files.

verbose

Default TRUE. Whether to return message regarding truncation length for each file. Includes warning messages.

Value

Integer vector of truncation lengths to use for the set of fastq files.

Examples

## Not run: 
trunc_len_fwd <- getTruncationLength(c("sample1_R1.fastq", "sample2_R1.fastq"))
trunc_len_rev <- getTruncationLength(c("sample1_R2.fastq", "sample2_R2.fastq"))

## End(Not run)

claraqin/neonMicrobe documentation built on April 11, 2024, 11:47 a.m.