\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{target} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}AAAAAAAACCCCCCCCGGGGGGGGTTTTTTTT\PYGZdq{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{query} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}AAAAAAACCCTCCCCGGCCGGGGTTTAGTTT\PYGZdq{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignments} \PYG{o}{=} \PYG{n}{aligner}\PYG{o}{.}\PYG{n}{align}\PYG{p}{(}\PYG{n}{target}\PYG{p}{,} \PYG{n}{query}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{aligner}\PYG{o}{.}\PYG{n}{mismatch\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}{gap\PYGZus{}score} \PYG{o}{=} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{alignments} \PYG{o}{=} \PYG{n}{aligner}\PYG{o}{.}\PYG{n}{align}\PYG{p}{(}\PYG{n}{target}\PYG{p}{,} \PYG{n}{query}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{alignments}\PYG{p}{)}
\PYG{g+go}{8}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{alignments}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{])}
\PYG{g+go}{AAAAAAAACCCCCCCCGGGGGGGGTTTTTTTT}
\PYG{g+go}{|||||||\PYGZhy{}|||.||||||..|||||||..|||}
\PYG{g+go}{AAAAAAA\PYGZhy{}CCCTCCCCGGCCGGGGTTTAGTTT}
\PYG{g+go}{\PYGZlt{}BLANKLINE\PYGZgt{}}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{m} \PYG{o}{=} \PYG{n}{alignments}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{substitutions}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{m}\PYG{p}{)}
\PYG{g+go}{    A   C   G   T}
\PYG{g+go}{A 7.0 0.0 0.0 0.0}
\PYG{g+go}{C 0.0 7.0 0.0 1.0}
\PYG{g+go}{G 0.0 2.0 6.0 0.0}
\PYG{g+go}{T 1.0 0.0 1.0 6.0}
\PYG{g+go}{\PYGZlt{}BLANKLINE\PYGZgt{}}
\end{Verbatim}
