Hi,
I have amplicon sequencing data, which was trimmend and then aligned to my reference. Now I would like to access the sequence of every read, which was aligned to a short genomic region on one chromosome of my reference. So the region of interest is 630
to 640
on chromosome reference
and I want the sequence of every read within this region.
I wanted to use samtools mileup,but it only gives me nucleotide resolution abundance unfortunatly and samtools view "ref:630-640" only gives me full length reads originating somewhere within the region. Is there maybe a tool for this purpose availible?
Whatever you want to do, i'm sure it can be done with pysam, but I'm not quite sure what you want? What is wrong with what samtools view is doing?
I used
samtools view
to get the reads which overlap with my region of interest, but I then had to crop the sequences within the bam files, so that I always get the variation of the epitop of interrest within the reads. At the end, I usedsam2pairwise
, as cmdcolin suggested, and used the annotation within the output with the annotation of the alignment, to acces the respecitve sequences.