BioNextflow icon indicating copy to clipboard operation
BioNextflow copied to clipboard

Allow saving unmapped reads in minimap2 output

Open alexamlie opened this issue 1 year ago • 1 comments

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

alexamlie avatar Mar 15 '23 18:03 alexamlie

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

lucacozzuto avatar Jul 12 '23 10:07 lucacozzuto