Nanopore · Plotting

Per base sequence content and quality (end of reads)

After my earlier posts investigating the sequence content and quality at the start of Oxford Nanopore sequencing reads, I also wanted to include some code to look at the end of reads. These functions are part of the unfinished tool nanoQC, in which I want to replicate some of the plots made by FastQC.

Creating the same plots as shown earlier was rather trivial since this involves just reversing the lists of quality scores and nucleotides. However, I also wanted to include all 4 plots together in one figure, and I spent a few hours to figure out how to deal with the legend. The secret sauce consists of creating an additional ax object where you want the legend, add the legend there and then make the additional ax object invisible, as suggested in this stackoverflow answer.

These plots show that also the end shows a lower quality and biased nucleotide composition, although to a lesser extent compared to the begin of the read. This is again a good argument in favour of using the headcrop and tailcrop options in NanoFilt.

The full code can be found on GitHub (which will receive further updates) and (frozen) at the bottom of this post.

PerBaseSequenceContentQuality.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s