findAndRemoveVector: Find and trim vector sequence from reads.

Description Usage Arguments Value Note See Also

View source: R/hiReadsProcessor.R

Description

This function facilitates finding and trimming of long/short fragments of vector present in LM-PCR products. The algorithm looks for vector sequence present anywhere within the read and trims according longest contiguous match on either end of the read. Alignment is doing using BLAT

Usage

1
2
findAndRemoveVector(reads, Vector, minLength = 10,
  returnCoords = FALSE, parallel = TRUE)

Arguments

reads

DNAStringSet object containing sequences to be trimmed for vector.

Vector

DNAString object containing vector sequence to be searched in reads.

minLength

integer value dictating minimum length of trimmed sequences to return. Default is 10.

returnCoords

return the coordinates of vector start-stop for the matching reads. Defaults to FALSE.

parallel

use parallel backend to perform calculation with BiocParallel. Defaults to TRUE. If no parallel backend is registered, then a serial version is ran using SerialParam.

Value

DNAStringSet object with Vector sequence removed from the reads. If returnCoords=TRUE, then a list of two named elements "hits" & "reads". The first element, "hits" is a GRanges object with properties of matched region and whether it was considered valid denoted by 'good.row'. The second element, "reads" is a DNAStringSet object with Vector sequence removed from the reads.

Note

If parallel=TRUE, then be sure to have a parallel backend registered before running the function. One can use any of the following MulticoreParam SnowParam

See Also

pairwiseAlignSeqs, vpairwiseAlignSeqs, pslToRangedObject, blatSeqs, read.blast8, findAndTrimSeq


hiReadsProcessor documentation built on Nov. 8, 2020, 5:43 p.m.