[BioPython] Inverse codon table?

Sebastian Bassi sbassi at gmail.com
Tue Aug 14 18:55:24 UTC 2007


On 8/14/07, Sebastian Bassi <sbassi at gmail.com> wrote:
> function from Biopython just return one possible sequence. I want them
> all :)

This returns all possible combinations:

peptidoORI="MANCNGASK"
tot=0
for x in peptidoORI:
    tot=tot+len(bt[x])
allpepts=[""]*tot
for aa in peptidoORI:
    i=0
    for x in range(tot):
        if i==len(bt[aa]):
            i=0
        else:
            pass
        allpepts[x]=allpepts[x]+bt[aa][i]
        i=i+1

>>> allpepts
['ATGGCAAATTGTAATGGAGCAAGTAAA', 'ATGGCTAACTGCAACGGTGCTAGCAAG',
'ATGGCCAATTGTAATGGCGCCTCAAAA', 'ATGGCGAACTGCAACGGGGCGTCTAAG',
'ATGGCAAATTGTAATGGAGCATCCAAA', 'ATGGCTAACTGCAACGGTGCTTCGAAG',
'ATGGCCAATTGTAATGGCGCCAGTAAA', 'ATGGCGAACTGCAACGGGGCGAGCAAG',
'ATGGCAAATTGTAATGGAGCATCAAAA', 'ATGGCTAACTGCAACGGTGCTTCTAAG',
'ATGGCCAATTGTAATGGCGCCTCCAAA', 'ATGGCGAACTGCAACGGGGCGTCGAAG',
'ATGGCAAATTGTAATGGAGCAAGTAAA', 'ATGGCTAACTGCAACGGTGCTAGCAAG',
'ATGGCCAATTGTAATGGCGCCTCAAAA', 'ATGGCGAACTGCAACGGGGCGTCTAAG',
'ATGGCAAATTGTAATGGAGCATCCAAA', 'ATGGCTAACTGCAACGGTGCTTCGAAG',
'ATGGCCAATTGTAATGGCGCCAGTAAA', 'ATGGCGAACTGCAACGGGGCGAGCAAG',
'ATGGCAAATTGTAATGGAGCATCAAAA', 'ATGGCTAACTGCAACGGTGCTTCTAAG',
'ATGGCCAATTGTAATGGCGCCTCCAAA', 'ATGGCGAACTGCAACGGGGCGTCGAAG',
'ATGGCAAATTGTAATGGAGCAAGTAAA', 'ATGGCTAACTGCAACGGTGCTAGCAAG',
'ATGGCCAATTGTAATGGCGCCTCAAAA']

-- 
Bioinformatics news: http://www.bioinformatica.info
Lriser: http://www.linspire.com/lraiser_success.php?serial=318



More information about the Biopython mailing list