Hello, I am a beginner and trying to understand samtools.
I have no problem getting samtools to do what I want, I have trouble interpreting the results and the different fields in the format. For instance when I say:
samtools view file.bam chr20:628200-628400
Why do I get a value with position values equal to : 628004-628107?
This is obviously not in my specified range so why did it come up?
Second question, the "length" column in samtools is not equal to the actual length of my sequence. It can range anywhere from -202 and 173, but my reads are all 100bp.
Any ideas?
I am ever grateful because this has been driving me totally insane.
Thank you!
Please show us a few reads printed from
samtools view file.bam chr20:628200-628400
. I want to see the chromosomes and the flags.The length is the distance between the two reads . Negative is reverse is mapped before the Forward.
This is the command that I give it below and following that is the output:
Also, could you elaborate on what you mean by the length is the distance between two reads? Because one read begins at 628004 and the next begins at 628033. The distance between those two reads is not 202 or 177 which is what the length value is for both of those reads...