\begin{Verbatim}[commandchars=\\\{\}]
\PYG{k+kn}{from} \PYG{n+nn}{Bio} \PYG{k+kn}{import} \PYG{n}{SeqIO}

\PYG{n}{primer\PYGZus{}reads} \PYG{o}{=} \PYG{p}{(}
    \PYG{n}{rec}
    \PYG{k}{for} \PYG{n}{rec} \PYG{o+ow}{in} \PYG{n}{SeqIO}\PYG{o}{.}\PYG{n}{parse}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}SRR020192.fastq\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}fastq\PYGZdq{}}\PYG{p}{)}
    \PYG{k}{if} \PYG{n}{rec}\PYG{o}{.}\PYG{n}{seq}\PYG{o}{.}\PYG{n}{startswith}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}GATGACGGTGT\PYGZdq{}}\PYG{p}{)}
\PYG{p}{)}
\PYG{n}{count} \PYG{o}{=} \PYG{n}{SeqIO}\PYG{o}{.}\PYG{n}{write}\PYG{p}{(}\PYG{n}{primer\PYGZus{}reads}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}with\PYGZus{}primer.fastq\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}fastq\PYGZdq{}}\PYG{p}{)}
\PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}Saved }\PYG{l+s+si}{\PYGZpc{}i}\PYG{l+s+s2}{ reads\PYGZdq{}} \PYG{o}{\PYGZpc{}} \PYG{n}{count}\PYG{p}{)}
\end{Verbatim}
