Search for multiple Patterns in Sequences
1
1
Entering edit mode
9.1 years ago
ad ▴ 30

Hi, is there a way to use matchPattern from Biostrings to search for a set of patterns rather than just one? If not is there any similar alternative?

I'm using it this so far and it doesn't work

matchPattern("TAATTAAT|ATTAATTATAATAT|ATTATA",subSeq)

and

MotifSearch<-DNAStringSet(c("TAATTAAT","ATTAATTA","TAATAT","ATTATA"))
MotifResults<-vmatchPattern(MotifSearch,subSeq)

Could searching for multiple patterns in multiple strings work too?

Thanks

pattern sequence bioconductor • 1.7k views
ADD COMMENT
0
Entering edit mode
9.1 years ago
Michael 55k

please see ?matchPDict

ADD COMMENT
0
Entering edit mode

Doesn't seem to work if the strings in the stringset are different sizes.

centralMotifSearch<-DNAStringSet(c("TAATTAAT","ATTAATTA","TAATAT","ATTATA"))
pCentralMotifSearch<-PDict(centralMotifSearch)
Error in .Call2("ACtree2_build", tb, pp_exclude, base_codes, nodebuf_ptr,  : 
  element 3 in Trusted Band has a different length than first element

Also matchPDict doesn't seem to work with an XStringSet.

ADD REPLY

Login before adding your answer.

Traffic: 2069 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6