\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{test\PYGZus{}seq}\PYG{o}{=}\PYG{n}{Seq}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}TAAGCGTGCACGCGCAACACGTGCATTA\PYGZdq{}}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{arnt}\PYG{o}{.}\PYG{n}{pseudocounts} \PYG{o}{=} \PYG{n}{motifs}\PYG{o}{.}\PYG{n}{jaspar}\PYG{o}{.}\PYG{n}{calculate\PYGZus{}pseudocounts}\PYG{p}{(}\PYG{n}{arnt}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{pssm} \PYG{o}{=} \PYG{n}{arnt}\PYG{o}{.}\PYG{n}{pssm}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{max\PYGZus{}score} \PYG{o}{=} \PYG{n}{pssm}\PYG{o}{.}\PYG{n}{max}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{min\PYGZus{}score} \PYG{o}{=} \PYG{n}{pssm}\PYG{o}{.}\PYG{n}{min}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{abs\PYGZus{}score\PYGZus{}threshold} \PYG{o}{=} \PYG{p}{(}\PYG{n}{max\PYGZus{}score} \PYG{o}{\PYGZhy{}} \PYG{n}{min\PYGZus{}score}\PYG{p}{)} \PYG{o}{*} \PYG{l+m+mf}{0.8} \PYG{o}{+} \PYG{n}{min\PYGZus{}score}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{for} \PYG{n}{position}\PYG{p}{,} \PYG{n}{score} \PYG{o+ow}{in} \PYG{n}{pssm}\PYG{o}{.}\PYG{n}{search}\PYG{p}{(}\PYG{n}{test\PYGZus{}seq}\PYG{p}{,}
\PYG{g+go}{                                       threshold=abs\PYGZus{}score\PYGZus{}threshold):}
\PYG{g+gp}{... }    \PYG{n}{rel\PYGZus{}score} \PYG{o}{=} \PYG{p}{(}\PYG{n}{score} \PYG{o}{\PYGZhy{}} \PYG{n}{min\PYGZus{}score}\PYG{p}{)} \PYG{o}{/} \PYG{p}{(}\PYG{n}{max\PYGZus{}score} \PYG{o}{\PYGZhy{}} \PYG{n}{min\PYGZus{}score}\PYG{p}{)}
\PYG{g+gp}{... }    \PYG{k}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}Position }\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s2}{: score = }\PYG{l+s+si}{\PYGZpc{}5.3f}\PYG{l+s+s2}{, rel. score = }\PYG{l+s+si}{\PYGZpc{}5.3f}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}
\PYG{g+go}{            position, score, rel\PYGZus{}score))}
\PYG{g+gp}{...}
\PYG{g+go}{Position 2: score = 5.362, rel. score = 0.801}
\PYG{g+go}{Position 8: score = 6.112, rel. score = 0.831}
\PYG{g+go}{Position \PYGZhy{}20: score = 7.103, rel. score = 0.870}
\PYG{g+go}{Position 17: score = 10.351, rel. score = 1.000}
\PYG{g+go}{Position \PYGZhy{}11: score = 10.351, rel. score = 1.000}
\end{Verbatim}
