I have a .bam
file generated by the aligner minimap2
(included in the EPI2ME online service from Oxford Nanopore; I am using the MinION for sequencing).
I sorted it and indexed it using samtools
:
samtools sort align.bam
samtools index sort.bam
I then dragged and dropped sort.bam
in IGV. It seemed to load it fine, but I cannot see any of my reads... They are supposed to mostly align to one gene, I can find the reference gene, but no sign of any reads there.
Additional troubleshooting I have tried so far:
- I think
minimap2
is using hg38 while the default reference in IGV is hg19. So I also tried loading the hg38 in IGV as reference (Genomes
>Load genomes from server
), but still cannot see anything in the expected region. - I have converted my
.bam
file in.sam
(with:samtools view test.bam -o test.sam
) so I could scroll through it. I think all looks good, and most of the reads do mention my gene of interest. Does the.sam
file include any chr:position I could use to figure out where to look in IGV?
Any ideas?
did you try to zoom into one region where the reads are mapped ? did you check some reads are mapped in your gene ? with
samtools view in.bam "chrom:start-end"
?Yes I did try zooming in the position where the reads should be.
And I tried (the gene is around chr20:4,700,000):
samtools view sort.bam chr20:4,000,000-5,000,000
But got:
Any idea what is happening?
Also, is there a command to output a list of all the positions on the reference genome where my reads are mapped? I looked quickly in the
samtools
manual, but could not find anything. I think it'd be useful to understand what is happening in my case, as I do not have a ton of reads and most of them should map to a small 1kb region of the genome (around chr20:4,700,000).Could you show us the output of
samtools idxstats
of your sorted bam file?Here it is.
samtools idxstats sort.bam
And so on.
PRNP, which is the gene to which most of my reads should align to, is:
Which is the correct number of reads aligned to the gene (it is reported by EPI2ME/minimap2, the online alignment service Nanopore is providing).