In hopes of getting more tools to play with my BAM file, I took the plunge to install Ubuntu on my W-10. I also installed all of the tools mentioned in a handy guide provided by RandyH (https://docs.google.com/document/d/1Yg4oRDCIQr5RoTZqECPYFDZxoxN-hggXKxy9BVDQpnY/edit#). My process was not exactly the same as he had mentioned, and I tweaked it by googling the steps(eg by using chocolatey to install lxrunoffline), but I think the end result is the same. I did install samtools using conda (using a post from him on this forum), but had to face an issue which was ultimately solved by downgrading openssl to version 1.0
I was reading more about samtools for the purpose of creating an index file for my BAM file, since IGV and Tablet BAM browsers say that Index File is older than BAM file.
However the page at http://quinlanlab.org/tutorials/samtools/samtools.html mentions about sorting the BAM file first before generating an Index. When I check the order using the command on the page, I get an output, but I am not sure what I need to be looking at to check whether the order is correct, or a re-sorting is needed.
Could someone please take a look at the output and tell whether I need to re-sort the file before attempting to re-index or not? Since I am from a medical background, and have very less experience of using command prompt, please forgive any basic mistakes I may be making. I have uploaded the screenshots.
https://img.techpowerup.org/200707/3.jpg
From the 1st screenshot, I suspect you're using the wrong fasta reference .
Furthermore, the command
samtools view -H your.bam | head
should show you if the sort-order iscoordinate
I've uploaded the result which i get after the command, but i am unsure what numbers represent the coordinates?
Also, the log file of the error which I get in Tablet is here: https://img.techpowerup.org/200707/tablet.jpg
I use a hg-19 fasta file that I downloaded from broadinstitute.org https://img.techpowerup.org/200707/hg-19-fasta.jpg which works fine in IGV. The folder also contains the hg-19 fasta.fai and hg-19fasta.gz.gzi files. Even the BAM opens fine in IGV. However even WGSExtract gives the same notification as Tablet, i.e. Index file is older than BAM File. https://img.techpowerup.org/200707/wgs-extract.jpg
I had upgraded my Sample from 4x to 30x coverage, so maybe Dante forgot to update my bam.bai file.
Thats why I was trying to create a new Index file using samtools.