Entering edit mode
ferbecneu
•
0
@ferbecneu-16188
Last seen 4.2 years ago
Hi, I want to subset alignments in chromosome 7 from a BAM file and write a new BAM of only chr7 alignments.
I made this:
seq3<-"HF6_1_1fragmm9.bam"
seq3reads<-readGAlignments(seq3)
seq3chr7 <- seq3reads[seqnames(seq3reads) == 'chr7']
But I dont know how can I export seq3chr7 as a BAM file, can it be done?
Thank you very much!