Entering edit mode
Dear all,
My goal is to extract from all reads (mapped and unmapped) a part of a sequence that aligns to a specific area in the genome.
I can do this by using this excellent command from Genomic Alignments.
please find the file in here https://1drv.ms/u/s!ArOzUuixE-mggfxdOGO9Hvpp90-qTA?e=ExC5hI
stack <- stackStringsFromBam("alignment.sorted.bam",
param=GRanges("Reference_barcodes:54-78"))
stack
One sequence in the bam file is considered unmapped, but I see it maps well in the designated [54-78]. How can I retrieve the unmapped sequences from the bam file?