Read trimming and filtering using NanoFilt
Trimming parts of a sequence can improve your data. Additionally, it can be beneficial to remove short read especially for whole genome sequencing projects. As usual there are many different tools to approach read trimming/fitlering. As mentioned, a common tool for Illumina data is Trimmomatic. In this tutorial we will use the open-source tool NanoFilt to further trim and filter our MinION reads.
Create directory for your NanoFilt output called nanofilt in the trimming_practical folder, change into it and
- remove all sequences shorter than 500 nucleotides (option -l)
- trim the first 10 nucleotides off all reads (option –headcrop)
mkdir ~/course_data/practicals/trimming_practical/nanofilt cd ~/course_data/practicals/trimming_practical/nanofilt NanoFilt –l 500 --headcrop 10 < ../porechop/porechopped.fastq \ > ./nanofilt_trimmed.fastq
NanoFilt does not provide options for input or output files. Therefore we will use the two redirect operators “>” and “<“ to
- redirect the file porechopped.fastq into NanoFilt (operator <)
- then redirect the output of NanoFilt into the file nanofilt_trimmed.fastq (>).