Plotting Snps Over Contigs-Sliding Window
1
1
Entering edit mode
11.6 years ago
jackuser1979 ▴ 890

I have VCF file format with SNPs predicted. I would like to plot these SNPs/contig wise through sliding window. Is there any script or R package available already?

r • 4.1k views
ADD COMMENT
4
Entering edit mode
11.6 years ago

You can use the ZOO package in [R]. I also have an R script to do it (It is C under the hood).

Here is the github link:

https://github.com/jewmanchue/ZevRTricks

genomicwindowmean.R <- the [r] script

mean_window.c <- the accompanying C program

For your purpose you would need to edit line 29 to make it a count rather than an average.

ADD COMMENT
0
Entering edit mode

Thanks. I will look into ZOO package. If possible can you share your script?

ADD REPLY

Login before adding your answer.

Traffic: 2750 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