Friday, March 13, 2015

bpy2. Alphabet for Sequences

The different alphabet a sequence, such as DNA, RNA, or protein, might have, can be found by using Bio.Alphabet.IUPAC.__dict__


We remove, from the printout, any entries staring with a '_'.

# bpy2.py
from __future__ import print_function
from Bio.Alphabet import IUPAC
for i in IUPAC.__dict__:
    if i[0]=='_': continue
    print(i)

#Alphabet
#unambiguous_dna
#IUPACAmbiguousDNA
#protein
#ambiguous_rna
#IUPACProtein
#IUPACUnambiguousDNA
#unambiguous_rna
#ExtendedIUPACProtein
#extended_protein
#IUPACUnambiguousRNA
#ExtendedIUPACDNA
#extended_dna
#IUPACAmbiguousRNA
#IUPACData
#ambiguous_dna

No comments:

Post a Comment