\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio} \PYG{k+kn}{import} \PYG{n}{AlignIO}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment} \PYG{o}{=} \PYG{n}{AlignIO}\PYG{o}{.}\PYG{n}{read}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}PF05371\PYGZus{}seed.sth\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}stockholm\PYGZdq{}}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{name\PYGZus{}mapping} \PYG{o}{=} \PYG{p}{\PYGZob{}\PYGZcb{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{for} \PYG{n}{i}\PYG{p}{,} \PYG{n}{record} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{alignment}\PYG{p}{):}
\PYG{g+gp}{... }    \PYG{n}{name\PYGZus{}mapping}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]} \PYG{o}{=} \PYG{n}{record}\PYG{o}{.}\PYG{n}{id}
\PYG{g+gp}{... }    \PYG{n}{record}\PYG{o}{.}\PYG{n}{id} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}seq}\PYG{l+s+si}{\PYGZpc{}i}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{\PYGZpc{}} \PYG{n}{i}
\PYG{g+gp}{...}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{name\PYGZus{}mapping}\PYG{p}{)}
\PYG{g+go}{\PYGZob{}0: \PYGZsq{}COATB\PYGZus{}BPIKE/30\PYGZhy{}81\PYGZsq{}, 1: \PYGZsq{}Q9T0Q8\PYGZus{}BPIKE/1\PYGZhy{}52\PYGZsq{}, 2: \PYGZsq{}COATB\PYGZus{}BPI22/32\PYGZhy{}83\PYGZsq{}, 3: \PYGZsq{}COATB\PYGZus{}BPM13/24\PYGZhy{}72\PYGZsq{}, 4: \PYGZsq{}COATB\PYGZus{}BPZJ2/1\PYGZhy{}49\PYGZsq{}, 5: \PYGZsq{}Q9T0Q9\PYGZus{}BPFD/1\PYGZhy{}49\PYGZsq{}, 6: \PYGZsq{}COATB\PYGZus{}BPIF1/22\PYGZhy{}73\PYGZsq{}\PYGZcb{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{AlignIO}\PYG{o}{.}\PYG{n}{write}\PYG{p}{([}\PYG{n}{alignment}\PYG{p}{],} \PYG{l+s+s2}{\PYGZdq{}PF05371\PYGZus{}seed.phy\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}phylip\PYGZdq{}}\PYG{p}{)}
\end{Verbatim}
