I have long reads aligned with MiniMap2 in the form of SAM file. I want to get my unmapped reads into a file called
unmapped.fastq.gz and my aligned reads into a file called
How can I do this?
I thought I could use BBTools
reformat.sh but I realized that I have to run this twice. Is there a tool that can do it all in one go instead of reading through the SAM file twice?