Description Usage Arguments Value Note See Also Examples
View source: R/hiReadsProcessor.R
This function trims a DNAStringSet object using the ranges from left, right, or middle of the sequence. This is a helper function utilized in primerIDAlignSeqs
and extractSeqs
. If dnaSet and coords are not the same length, then they are required to have a names attribute to perform the matched trimming.
1 | trimSeqs(dnaSet, coords, side = "middle", offBy = 0)
|
dnaSet |
DNAStringSet object containing sequences to be trimmed. |
coords |
IRanges object containing boundaries. |
side |
either 'left','right',or the Default 'middle'. |
offBy |
integer value dictating if the supplied coordinates should be offset by X number of bases. Default is 0. |
a DNAStringSet object with trimmed sequences.
If side is left, then any sequence following end of coords+offBy is returned. If side is right, then sequence preceding start of coords-offBy is returned. If side is middle, then sequence contained in coords is returned where offBy is added to start and subtracted from end in coords.
extractSeqs
, primerIDAlignSeqs
1 2 3 4 5 6 7 | dnaSet <- DNAStringSet(c("AAAAAAAAAACCTGAATCCTGGCAATGTCATCATC",
"AAAAAAAAAAATCCTGGCAATGTCATCATCAATGG", "AAAAAAAAAAATCAGTTGTCAACGGCTAATACGCG",
"AAAAAAAAAAATCAATGGCGATTGCCGCGTCTGCA", "AAAAAAAAAACCGCGTCTGCAATGTGAGGGCCTAA",
"AAAAAAAAAAGAAGGATGCCAGTTGAAGTTCACAC"))
coords <- IRanges(start=1, width=rep(10,6))
trimSeqs(dnaSet, coords, side="left", offBy=1)
trimSeqs(dnaSet, coords, side="middle")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.