trimNs: Trim ambiguous sequence from ends of reads

View source: R/dna.R

trimNsR Documentation

Trim ambiguous sequence from ends of reads

Description

Trim sequences to the first occurrence of a given length of unambiguous bases, e.g. to trim noisy starts and ends from Sanger sequences. Note that sequences shorter than nonNStretch will be completely deleted since they do not contain any stretch of unambiguous bases to pass the threshold.

Usage

trimNs(seqs, nonNStretch = c(10, 10), nChars = c("N"))

Arguments

seqs

sequences to be trimmed

nonNStretch

a one or two element (specifying start, end) to delete until finding a stretch of nonNs greater this length (0 means no trimming)

nChars

a vector of characters to count as Ns

Value

Vector sequences with ends trimmed

Examples

trimNs('NNNANNACTNGAGANNNNAAN',3)

sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.