Hello,
I have an alignment bam file, and I would like to retrieve all the bases aligning to that specific location in the genome. For example, if I am interested in position X in the genome, I would like to extract all the nucleotides that are aligning to that position X from my alignment file
Hello rsafavi,
why do you like to do this and how should your desired output look like?
The procedure would be to get all reads that overlap the desired position using
samtools view
. Due to the mapping position given for each read, one can than find the base on the location with respect to the CIGAR value.fin swimmer