Description Usage Arguments Value Note See Also Examples
View source: R/hiReadsProcessor.R
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.
1 2 3 |
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 |
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
|
... |
extra parameters for |
IRanges object with starts, stops, and names of the aligned sequences.
For qualityThreshold, the alignment score is calculated by (matches*2)-(mismatches+gaps) which programatically translates to round(nchar(patternSeq)*qualityThreshold)*2.
No indels are allowed in the function, if expecting indels then use pairwiseAlignSeqs
.
If qualityThreshold is 1, then it is a full match, if 0, then any match is accepted which is useful in searching linker sequences at 3' end. Beware, this function only searches for the pattern sequence in one orientation. If you are expecting to find the pattern in both orientation, you might be better off using BLAST/BLAT!
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
pairwiseAlignSeqs
, primerIDAlignSeqs
,
doRCtest
, findAndTrimSeq
, blatSeqs
,
findAndRemoveVector
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.