Many thanks! Just what I need.
• 1 views
•
link
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!
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)))) ]
Many thanks! Just what I need.
Log in to answer this question.