vpairwiseAlignSeqs: Align a short pattern to variable length target sequences.

Description Usage Arguments Value Note See Also Examples

View source: R/hiReadsProcessor.R

Description

Align a fixed length short pattern sequence to subject sequences using vmatchPattern. This function is meant for aligning a short pattern onto large collection of subjects. If you are looking to align a vector sequence to subjects, then please use BLAT.

Usage

1
2
3
vpairwiseAlignSeqs(subjectSeqs = NULL, patternSeq = NULL,
  side = "left", qualityThreshold = 1, showStats = FALSE,
  bufferBases = 5, doRC = TRUE, parallel = FALSE, ...)

Arguments

subjectSeqs

DNAStringSet object containing sequences to be searched for the pattern. This is generally bigger than patternSeq, and cases where subjectSeqs is smaller than patternSeq will be ignored in the alignment.

patternSeq

DNAString object or a sequence containing the query sequence to search. This is generally smaller than subjectSeqs.

side

which side of the sequence to perform the search: left, right, or middle. Default is 'left'.

qualityThreshold

percent of patternSeq to match. Default is 1, full match. This is supplied to max.mismatch parameter of vmatchPattern as round(nchar(patternSeq)*(1-qualityThreshold)).

showStats

toggle output of search statistics. Default is FALSE.

bufferBases

use x number of bases in addition to patternSeq length to perform the search. Beneficial in cases where the pattern has homopolymers or indels compared to the subject. Default is 5. Doesn't apply when side='middle'.

doRC

perform reverse complement search of the defined pattern. Default is TRUE.

parallel

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

...

extra parameters for vmatchPattern except for 'max.mismatch' since it's calculated internally using the 'qualityThreshold' parameter.

Value

IRanges object with starts, stops, and names of the aligned sequences.

Note

See Also

pairwiseAlignSeqs, primerIDAlignSeqs, doRCtest, findAndTrimSeq, blatSeqs, findAndRemoveVector

Examples

1
2
3
4
5
6
7
subjectSeqs <- c("CCTGAATCCTGGCAATGTCATCATC", "ATCCTGGCAATGTCATCATCAATGG", 
"ATCAGTTGTCAACGGCTAATACGCG", "ATCAATGGCGATTGCCGCGTCTGCA", 
"CCGCGTCTGCAATGTGAGGGCCTAA", "GAAGGATGCCAGTTGAAGTTCACAC")
subjectSeqs <- DNAStringSet(xscat("AAAAAAAAAA", subjectSeqs))
vpairwiseAlignSeqs(subjectSeqs, "AAAAAAAAAA", showStats=TRUE)
vpairwiseAlignSeqs(subjectSeqs, "AAAAAAAAAA", showStats=TRUE,
qualityThreshold=0.5)

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