biocorecrg / BioNextflow

A collection of modules and sub-workflows for Nextflow
GNU General Public License v3.0
25 stars 3 forks source link

Allow saving unmapped reads in minimap2 output #16

Open alexamlie opened 1 year ago

alexamlie commented 1 year ago

Hi,

I was wondering if there could be an option to include unmapped reads in the output of minimap2? It is currently hardcoded in the samtools view command (the -F4 argument), line 42 of minimap2.nf:

minimap2 -t ${task.cpus} -a ${params.EXTRAPARS} ${reference} ${fastq_file} | samtools view -@ ${task.cpus} -F4 -hSb - > ${idfile}.bam

But sometimes it is useful to look at the unmapped reads; I am using this in MOP2 and I suspect it is why the MultiQC report always shows 100% mapping!

Thanks, Alex

lucacozzuto commented 1 year ago

we can add another process without that parameter. I think that parameter was there to avoid problems with downstream tools but is a good idea to no have it hardcoded