Question: trimming nano pore reads based on quality score.
0
gravatar for KVC_bioinfo
10 days ago by
KVC_bioinfo200
PA, USA
KVC_bioinfo200 wrote:

Hello all,

I am trying to trim the nanopore sequences based on the quality of the reads. The Oxford nanopore technology mentions read below a quality score of 9 are considered to be the bad ones.

I have found This tool to do it. Has someone used it before? or is there any other way to do it?

trim nanopore • 147 views
ADD COMMENTlink modified 10 days ago by WouterDeCoster23k • written 10 days ago by KVC_bioinfo200

I have started using the tool I mentioned above:

python /path/to/NanoFilt.py /path/to/fastq/trim.fastq -q 9 > trim_qu.fastq

I constantly get:

usage: NanoFilt.py [-h] [-v] [-l LENGTH] [-q QUALITY] [--minGC MINGC]
                   [--maxGC MAXGC] [--headcrop HEADCROP] [--tailcrop TAILCROP]
                   [-s SUMMARY] [--readtype {1D,2D,1D2}]
ADD REPLYlink modified 10 days ago by genomax37k • written 10 days ago by KVC_bioinfo200
1

Try moving -q 9 before file name. Some programs are sensitive to order of input options.

ADD REPLYlink written 10 days ago by genomax37k

yes tried. gives same error

ADD REPLYlink written 10 days ago by KVC_bioinfo200
2

Can you try?

cat /path/to/fastq/trim.fastq | python /path/to/NanoFilt.py  -q 9 > trim_qu.fastq
ADD REPLYlink modified 10 days ago • written 10 days ago by genomax37k
2
gravatar for WouterDeCoster
10 days ago by
Belgium
WouterDeCoster23k wrote:

Hm I'm not sure if you mean trimming or filtering. What you are doing is filtering: removing reads below the quality cutoff. Trimming nucleotides from the read ends is also possible using NanoFilt.

Regarding the command you are trying to use I would suggest to have a look at the documentation on GitHub, Pypi, the blog post or use NanoFilt --help

I added examples on how to use NanoFilt to all of these. If you have suggestions on how to improve the documentation I would like to hear those, but right now it looks like you haven't read it.

Anyway, genomax is right, NanoFilt reads from stdin and writes to stdout. This makes it compatible with any compression type and allows you to sandwich it between for example decompression and an aligner. If installed correctly there is no need to add ".py" or the full path to the script.

I would suggest, if possible, to use a complimentary albacore summary file for filtering. That will speed up things significantly. Right now, calculating the average read quality is pretty slow, but I will look into this...

I don't think I agree that all reads with score below 9 are garbage. This definitely depends on your application.

ADD COMMENTlink modified 10 days ago • written 10 days ago by WouterDeCoster23k

Nanofilt works great for me. Thanks for the suggestion.

About the quality score of 9: I read that in the review paper of Nanopore sequencing.

ADD REPLYlink written 7 days ago by KVC_bioinfo200
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1661 users visited in the last hour