Hi,
I am trying to get the similar plot below for my data. I have VCF file from GBS analysis. How can I draw this plot from VCF file. Thanks.
Hi,
I am trying to get the similar plot below for my data. I have VCF file from GBS analysis. How can I draw this plot from VCF file. Thanks.
A similar plot can be generated with CMplot if you have data in such format.
Here's a way to get a text file containing counts of variants per 1Mb bin across hg38
(replace with your assembly of choice):
$ fetchChromSizes hg38 \
| awk -vOFS="\t" '{ print $1, "0", $2; } \
| grep -vE '*_*' \
| sort-bed - \
| bedops --chop 1000000 - \
| bedmap --echo --count --delim '\t' - <(vcf2bed < variants.vcf) \
> answer.txt
Once you have answer.txt
, you can bring that into R to make a density plot with ggplot2
.
I have an example Rscript from a previous question, which demonstrates use of geom_tile
for making an ideogram-like figure similar to what is in your question:
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Do you have a preferred language? What analysis environments are you familiar with?
please post example data.