Does anyone have any experience extracting unmapped reads from BAM file and saving them in a new BAM file using Rsamtools (or any other R/Bioconductor package) ?
I am analysing paired-end RNAseq data processed by Rsubread package.
If you could provide some generic code to address this problem it would be greatly appreciated.
What have you tried?