Entering edit mode
Xiao Shi
▴
90
@xiao-shi-1184
Last seen 10.2 years ago
Hi everybody,
I have a question about using the matchDNAPattern in the Biostrings
package.
I have a DNA string,eg a=DNAString("AGCTGACTCAGTGGCTTGCT"),and i want
to
find a pattern,eg p="AGCT" with one mismatch.So i use :
> matchDNAPattern("AGCT",a,mismatch=1)
Object of class BioString with
Pattern alphabet: -TGCANBDHKMRSVWY
Values:
[1] AGC
[2] AGCT
[3] GCTG
[4] GACT
[5] CAGT
[6] GGCT
[7] TGCT
But i just want those subsequence who's base order is coherent to the
search
pattern.eg,AGCT is a perfect match;GGCT,CGCT,TGCT with one
mismatch;and
AGC,GCTG,CAGT are also in the result list,but the position of base are
changed compared to the search pattern,i don't want them.
How can i achieve this goal?
[[alternative HTML version deleted]]