This program is a wrapper to occurrenceFilter. It removes the duplicated sequences of a FASTQ file.

unique_filter(input)

Arguments

input

ShortReadQ object

Value

Filtered ShortReadQ object

Examples

require('Biostrings') require('ShortRead') set.seed(10) s <- random_seq(10, 10) s <- sample(s, 30, replace = TRUE) q <- random_qual(30, 10) n <- seq_names(30) my_read <- ShortReadQ(sread = s, quality = q, id = n) # check presence of duplicates isUnique(as.character(sread(my_read)))
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE #> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #> [25] FALSE FALSE FALSE FALSE FALSE FALSE
# apply the filter filtered <- unique_filter(my_read) isUnique(as.character(sread(filtered)))
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE