trimNs: Trim N's From Sequences

View source: R/trimNs.R

trimNsR Documentation

Trim N's From Sequences

Description

Removes N's from beginning and end of sequences.

Usage

trimNs(x)

Arguments

x

a DNAbin object or list or matrix that can be coerced into one.

Value

sequences with beginning and trailing N's removed.

Author(s)

Eric Archer eric.archer@noaa.gov

Examples

 test.seqs <- list(
   A = c(rep("n", 5), "a", "c", "g", "t", rep("n", 3)),
   B = c(rep("n", 3), "a", "c", "g", "t", rep("n", 5)),
   C = c("a", "c", "g", "t", rep("n", 8))
 )

test.seqs
trimmed <- trimNs(test.seqs)  
as.character(trimmed)
 

EricArcher/strataG documentation built on Feb. 12, 2023, 4:11 a.m.