Hello!!
I have been trying to figure out how can I calculate the number of SNPs using sliding windows? I have a list with three columns: Scaffold"\t"Scaffold_Length"\t"Number_SNPs (per scaffold)
Scaffold_28 70818817 894731
Scaffold_3 5123947 57985
Scaffold_13 4491039 67622
Scaffold_12 3793473 51663
Scaffold_23 3593776 31841
Scaffold_11 3547442 63973
Scaffold_26 2720936 36018
Scaffold_16 2719413 24318
Scaffold_27 1987753 53938
Scaffold_24 1647859 18408
Scaffold_9 1630703 15792
Scaffold_32 1545880 21094
. . .
Based on the second column, I want to use sliding windows (500kbp) and calculate how many SNPs are there into each sliding windows. I performed: bedtools makewindows, but I have not figured out how to count and sum the SNP density.
Thanks a lots for your help!!