Discard/remove reads from fastq files by IDs (txt file)

Dear All,

I try to remove/discard (NOT extract a subset) reads from FASTQ files with IDs. I have a .txt file with IDs I want to remove (1 line = 1 ID).
Miniconda3 and Qiime2 are installed, but I do not find the right command to do that.

Can someone help me with that issue ?

Thank you in advance

Hi @sbarvaux, welcome to :qiime2:!

The general documentation is here. But more specifically check out the filtering tutorials.



Hi SoilRotifer !

Thank you for your reply !
Actually, I am quiet new in bioinformatic stuffs, and I’ve already seen that filtering tutorial before asking my question, but it is like theses tutorials are used to filter (keep) some sequences and not really used to delete them from a file.
Moreover, I have fastq files and text files, I do not really understand how to apply any of these tutorials on my format files.
In other words, I am looking for a similar command to the filter_fasta.py function of QIIME1 ( I can not download it …).

Hi @sbarvaux,

Actually, you can use these commands to keep or remove (delete) features, samples, etc... as referenced throughout the filtering tutorial page.

I mis-read your initial post, and then realized you were looking to filter fastq and not fasta. So, I pinged my wonderful :qiime2: colleagues for help and they referred me to qiime demux filter-samples. It may not be exactly what you are looking for, as this command simply removes samples of fastq files based on the Sample ID and not sequence / feature ID.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.