SNP/kb in chromosome wise
1
0
Entering edit mode
4 months ago
adarsh ▴ 60

Hi,

I need to calculate the SNPs per kb for my rice samples. I have separated out SNPs from the main vcf file as a separate vcf.

Previously I have generated SNP density plot using CMPlot R Package, where I have given 1 Mb window size (10e6). This was able to give the number SNPs per Mb for each chromosome. However when I tried the same tool for my current analysis (SNPs per 1Kb), it is not working, as it is not creating 1 Kb windows as intended.

What could be the possible reason? Is there any alternate method to get this SNPs per Kb and then generate an SNP density plot like the one generated using CMPlot?

Please help

Thanks

Variant SNP Calling • 475 views
ADD COMMENT
2
Entering edit mode
4 months ago

number of variants per 1Mb, assuming the vcf is ordered on chrom/pos:

bedtools makewindows  -g ref.fasta.fai -w 1000000 | LC_ALL=C sort -t $'\t' -k1,1 -k2,2n | bedtools intersect -a - -b in.vcf.gz  -c  -sorted
ADD COMMENT

Login before adding your answer.

Traffic: 3588 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6