\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{Bio.Seq} \PYG{k+kn}{import} \PYG{n}{Seq}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment1}\PYG{o}{.}\PYG{n}{target} \PYG{o}{=} \PYG{n}{Seq}\PYG{p}{(}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{alignment1}\PYG{o}{.}\PYG{n}{target}\PYG{p}{))}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment1}\PYG{o}{.}\PYG{n}{query} \PYG{o}{=} \PYG{n}{Seq}\PYG{p}{(}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{alignment1}\PYG{o}{.}\PYG{n}{query}\PYG{p}{))}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment2}\PYG{o}{.}\PYG{n}{target} \PYG{o}{=} \PYG{n}{Seq}\PYG{p}{(}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{alignment2}\PYG{o}{.}\PYG{n}{target}\PYG{p}{))}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment2}\PYG{o}{.}\PYG{n}{query} \PYG{o}{=} \PYG{n}{Seq}\PYG{p}{(}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{alignment2}\PYG{o}{.}\PYG{n}{query}\PYG{p}{))}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{mapped\PYGZus{}alignment} \PYG{o}{=} \PYG{n}{alignment1}\PYG{o}{.}\PYG{n}{map}\PYG{p}{(}\PYG{n}{alignment2}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{format}\PYG{p}{(}\PYG{n}{mapped\PYGZus{}alignment}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}psl\PYGZdq{}}\PYG{p}{)}
\PYG{g+go}{\PYGZsq{}8\PYGZbs{}t0\PYGZbs{}t0\PYGZbs{}t0\PYGZbs{}t0\PYGZbs{}t0\PYGZbs{}t1\PYGZbs{}t11\PYGZbs{}t+\PYGZbs{}tquery\PYGZbs{}t8\PYGZbs{}t0\PYGZbs{}t8\PYGZbs{}ttarget\PYGZbs{}t40\PYGZbs{}t11\PYGZbs{}t30\PYGZbs{}t2\PYGZbs{}t4,4,\PYGZbs{}t0,4,\PYGZbs{}t11,26,\PYGZbs{}n\PYGZsq{}}
\end{Verbatim}
