How to convert MEME MOTIF to all potential sequences?
1
0
Entering edit mode
5.5 years ago
Oo • 0

Dear all,

I have a list of RNA motifs in the standard MEME format (MOTIF CYUACUCUCAGAYCC MEME) and would like to check for characteristics. For this I need the general RNA sequence (AUGCs) so my question therefore is: how can I obtain all possible RNA sequences from the compacted MEME sequence format?

Thanks in advance!

RNA meme motif sequences • 1.3k views
ADD COMMENT
1
Entering edit mode
5.5 years ago

This can easily by done with biopython, see this answer on StackOverflow for full code/explanation. I've posted the necessary function below.

from Bio import Seq
from itertools import product

def extend_ambiguous_dna(seq):
   """return list of all possible sequences given an ambiguous DNA input"""
   d = Seq.IUPAC.IUPACData.ambiguous_dna_values
   return [ list(map("".join, product(*map(d.get, seq)))) ]
ADD COMMENT
0
Entering edit mode

Many thanks! Just what I need.

ADD REPLY

Login before adding your answer.

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