\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{aligner}\PYG{o}{.}\PYG{n}{mode} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}local\PYGZsq{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{aligner}\PYG{o}{.}\PYG{n}{open\PYGZus{}gap\PYGZus{}score} \PYG{o}{=} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{aligner}\PYG{o}{.}\PYG{n}{extend\PYGZus{}gap\PYGZus{}score} \PYG{o}{=} \PYG{l+m+mi}{0}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{chromosome} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}AAAAAAAACCCCCCCAAAAAAAAAAAGGGGGGAAAAAAAA\PYGZdq{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{transcript} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}CCCCCCCGGGGGG\PYGZdq{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignments1} \PYG{o}{=} \PYG{n}{aligner}\PYG{o}{.}\PYG{n}{align}\PYG{p}{(}\PYG{n}{chromosome}\PYG{p}{,} \PYG{n}{transcript}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{alignments1}\PYG{p}{)}
\PYG{g+go}{1}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment1} \PYG{o}{=} \PYG{n}{alignments1}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{alignment1}\PYG{p}{)}
\PYG{g+go}{AAAAAAAACCCCCCCAAAAAAAAAAAGGGGGGAAAAAAAA}
\PYG{g+go}{        |||||||\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}||||||}
\PYG{g+go}{        CCCCCCC\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}GGGGGG}
\PYG{g+go}{\PYGZlt{}BLANKLINE\PYGZgt{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{sequence} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}CCCCGGGG\PYGZdq{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignments2} \PYG{o}{=} \PYG{n}{aligner}\PYG{o}{.}\PYG{n}{align}\PYG{p}{(}\PYG{n}{transcript}\PYG{p}{,} \PYG{n}{sequence}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{alignments2}\PYG{p}{)}
\PYG{g+go}{1}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignment2} \PYG{o}{=} \PYG{n}{alignments2}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{alignment2}\PYG{p}{)}
\PYG{g+go}{CCCCCCCGGGGGG}
\PYG{g+go}{   ||||||||}
\PYG{g+go}{   CCCCGGGG}
\PYG{g+go}{\PYGZlt{}BLANKLINE\PYGZgt{}}
\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}{print}\PYG{p}{(}\PYG{n}{mapped\PYGZus{}alignment}\PYG{p}{)}
\PYG{g+go}{AAAAAAAACCCCCCCAAAAAAAAAAAGGGGGGAAAAAAAA}
\PYG{g+go}{           ||||\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}||||}
\PYG{g+go}{           CCCC\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}GGGG}
\PYG{g+go}{\PYGZlt{}BLANKLINE\PYGZgt{}}
\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}
