A while ago I have done a training on NextGen analysis. Recently I am trying to do the same analysis for the same Genome sequence on a different machine but now when i compare the flagstat results from samtools of the merged files they are different.
Methods: I used BWA for the alignment -q 20 to get .sai files > then convert these to .sam files using bwa sampe > later i convert these to .bam files using samtools /samtools view -bS | /samtools sort -. So my question is what went wrong ? is it normal that i get different results each time i do an alignment ? if so why I am getting a less properly paired in my recent analysis.
Please edit your question to make it shorter. It is way too long and unreadable. Also please only ask one question per post.
Please post both command lines that created the two sam files. There is a good chance that you have generated different alignments either based on different builds or different inputs.
Hi Istvan and thanks for the editing. The top flagstat result were generated from a script that the instructor provided back then (I do not have it now since it's their script) that been said I wrote the steps on notes and followed the bwa manual. Regarding the input I brought my own data to work on using external harddisk (zipped files). We did download the same tools on my machine and the machine provided back then. However, I am not sure what build was the script pointing at (it might be different).
I meant the bottom results were generated from a script they provided to speed up the process of generating the results but during the training I used the same pipeline I was trained on.
Running bwa twice with identical input will produce identical results.
The answer to your question is that you are most likely using different inputs than what you have used during the original training.
... or you've been using two different versions of bwa.