seq_filter: Remove a set of sequences

Description Usage Arguments Value Author(s) Examples

View source: R/seq_filter.R

Description

Removes a set of sequences

Usage

1
seq_filter(input, rm.seq)

Arguments

input

ShortReadQ object

rm.seq

Ccharacter vector with sequences to remove

Value

Filtered ShortReadQ object

Author(s)

Leandro Roser learoser@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
require(ShortRead)

set.seed(10)
input <- random_length(30, 3:7)
rm.seq  = c('TGGTC', 'CGGT', 'GTTCT', 'ATA')

# verify that some sequences match
match_before <- unlist(lapply(rm.seq,
 function(x) grep(x, as.character(sread(input)))))

filtered <- seq_filter(input,rm.seq =  rm.seq)

# verify that matching sequences were removed
match_after <- unlist(lapply(rm.seq, 
function(x) grep(x, as.character(sread(filtered)))))

FastqCleaner documentation built on Nov. 8, 2020, 5:05 p.m.