This is a test version of Biostars. For the public version, visit https://www.biostars.org.
MinION: To remove reads that mapped towards a custom database

Hi all,

I am very new on bioinformatics. I will be running MinION in the near future and I have a question which I still couldn't figure out the solution. As part of the post sequencing analysis of the MinION data, I wish to remove parts of the reads that have been mapped/assigned to a custom database (in this case will be the host genome data) so that I am left with the non-host reads for further analysis. Any idea which software can do so?

Thank you very much in advance!

Lim

next-gen

1 answer

You will need at least two package. An aligner (minimap2) to align the data initially. Then samtools to retrieve reads that do not map to your custom database. In first two commands 4 threads are being used (-t and -@).

$ minimap2 -x map-ont -t 4 -a -o data_out.sam your_ref.fasta data_input.fastq
$ samtools sort -@ 4 -o data_out_sorted.bam data_out.sam
$ samtools view -f 4 G_data_out_sorted.bam | samtools bam2fq - > unmapped.fastq

Log in to answer this question.