Filter Fastq file by seq
1
1
Entering edit mode
5.8 years ago
ta_awwad ▴ 350

Dear All: Does anyone know an efficient tool or script that removes certain reads with from Fastq file when it matches specific sequence? this means : if the reads contain my sequence so the entire read should be completely removed from the FASTQ file.

Many many thanks

NGS Python R Bioconductor • 3.0k views
ADD COMMENT
1
Entering edit mode
ADD REPLY
6
Entering edit mode
5.8 years ago

Use seqkit grep:

$ zcat input.fq.gz | seqkit grep -v -s -i -p aggcg

This will remove all reads containing "aggcg".

ADD COMMENT
0
Entering edit mode

thank you so much .. is there any option to remove the read of the same fragment from both paired-end FASTQ?

ADD REPLY
1
Entering edit mode

You could use repair.sh from BBtools to remove the corresponding paired read after removing your reads of interest in one of the files:

$ repair.sh in=input_1.fq.gz in2=input_2.fq.gz out=out_1.fq.gz out2=out_2.fq.gz
ADD REPLY
0
Entering edit mode

this is awesome .. thank you so much

ADD REPLY

Login before adding your answer.

Traffic: 2392 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6