Generate a sequence of specific length with a list of motifs and intersperse with spacers
0
0
Entering edit mode
4 months ago
rykerklie7 ▴ 10

I have a list of motifs and would like to create sequences with all possible combinations and length 127-131nt. Two motifs in the sequence should also be interspersed with spacers (random letters composed of ACGT in any order). The spacers can be of length 5nt or 10nt. So the sequence will be something like below but of length between 127nt-131nt including the motifs and spacers.

       MOTIF1(length 7nt)SPACER(5nt)MOTIF2(length8nt)SPACER(10nt)MOTIF3(length5nt)...


Is there any program or package in R that does this?

python R perl motif sequence • 290 views
1
Entering edit mode

use recursion.

1
Entering edit mode

This server almost does what you need. I don't think spacer length can be defined.