Learn R Programming

hiReadsProcessor (version 1.8.2)

findAndTrimSeq: Find and trim a short pattern sequence from the subject.

Description

This function facilitates finding and trimming of a short pattern sequence from a collection of subject sequences. The trimming is dictated by side parameter. For more information on the trimming process see the 'side' parameter documentation in trimSeqs. For information regarding the pattern alignment see the documentation for pairwiseAlignSeqs. 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

findAndTrimSeq(patternSeq, subjectSeqs, side = "left", offBy = 0,
  alignWay = "slow", ...)

Arguments

patternSeq
DNAString object or a sequence containing the query sequence to search.
subjectSeqs
DNAStringSet object containing sequences to be searched for the pattern.
side
which side of the sequence to perform the search & trimming: left, right or middle. Default is 'left'.
offBy
integer value dictating if the trimming base should be offset by X number of bases. Default is 0.
alignWay
method to utilize for detecting the primers. One of following: "slow" (Default), "fast", or "blat". Fast, calls vpairwiseAlignSeqs and uses vmatchPattern at its core, which is less accurate with indels and mismatches but much faster. Slow, calls pairwiseAlignSeqs and uses pairwiseAlignment at its core, which is accurate with indels and mismatches but slower. Blat will use blatSeqs.
...
parameters to be passed to pairwiseAlignment, vpairwiseAlignSeqs or blatSeqs depending on which method is defined in 'alignWay' parameter.

Value

  • DNAStringSet object with pattern sequence removed from the subject sequences.

See Also

pairwiseAlignSeqs, vpairwiseAlignSeqs, extractFeature, extractSeqs, primerIDAlignSeqs, findPrimers, findLinkers

Examples

Run this code
findAndTrimSeq(patternSeq="AGACCCTTTT",
subjectSeqs=DNAStringSet(c("AGACCCTTTTGAGCAGCAT","AGACCCTTGGTCGACTCA",
"AGACCCTTTTGACGAGCTAG")), qualityThreshold=.85, doRC=FALSE, side="left",
offBy=1, alignWay = "slow")

Run the code above in your browser using DataLab