This is a test version of Biostars. For the public version, visit https://www.biostars.org.
remove mitochondrial reads using Bowtie2

I am trying to align a set of paired end fastq filres to hg38 reference genome, before alignment I need to remove reads that map to chrM. I would also like to remove reads that map to alpha satellite repeats, Alu repeats, ribosomal DNA repeats,... . I read bowtie2 manual but I'm not sure how to remove repeats and mitochondrial reads. May anyone help me with this ?

so far I used this command with very sensitive options :

 bowtie2 -k 1  -D 20 -R 3 -N 0 -L 20 -i S,1,0.50  -x my_index -1 mate1.fastq -2 mate2.fastq
alignment

You cannot do that before alignment, you have to know where a read fits the best before filtering it out or not. For mitochondrial hits you can use samtools to remove reads falling into chrM. For all other kind of repeat events, I believe they will be considered as multimapped. Take a look at samtools flags

2 answers

You can up front make a BED file with the coordinates you allow alignment for, then pipe run the SAM or BAM file through samtools view and use this BED file you made as -L.

Only output alignments overlapping the input BED FILE [null].

I would certainly give a try to BBSplit for this end

Log in to answer this question.