Menu

#42 window-pi calculation

v1.0_(example)
closed
nobody
None
1
2013-02-26
2013-02-25
Hilary
No

Hi Adam,
Please can you explain how the window-pi calculation works, and what it means intuitively? I dare say there is a simple formula but I can't find it anywhere. I thought it was a simple average of the pi values for all variable sites within that window, but clearly it isn't, and I can't see how it's incorporating invariant sites.
Sorry for the confusion!
Cheers,
Hilary

Related

Bugs: #42

Discussion

  • Adam Auton

    Adam Auton - 2013-02-25

    Not really a bug-report... :-)

    Pi is also known as nucleotide diversity, and is the estimate of the average number of differences between a pair of chromosomes. In a window, there will be lots of sites where the chromosomes match, and hence you need to account for those sites in the calculation. If useful, you can inspect the source code for the calculation. It's in the function 'output_windowed_nucleotide_diversity' in vcf_file_output.cpp .

     
  • Adam Auton

    Adam Auton - 2013-02-25
    • status: open --> closed
     
  • Adam Auton

    Adam Auton - 2013-02-26

    I've made a change to the version in the SVN. Please check out and see if this fixes your issue.

    Thanks,

    Adam

     

Log in to post a comment.