How to find complementry sequence within the sequence
0
0
Entering edit mode
2.6 years ago

Hi,

I have multiple sequences and I want to find the presence of complementary sequence within the sequences.

It's just like find stem-loop structure in a sequence.
Length of complementary sequences should not be greater than 5bp.

library(seqinr)

g33 <- ("ATGCATATAATATAGAGGCAT")
nchar(g33)
a <- c2s(comp(s2c(g33)))
a
all(substr(a, 1, 1)== substr(c2s(comp(s2c(g33))), 20, 20))

But, what if my position go on increasing. I tried for loop but failed. I am using library(stringr) in R

Any help is much appreciated. I am a new learner of R.

Thanks

R seqinr • 399 views
ADD COMMENT
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 2014 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