ShowSNPDensityPlot | R Documentation |
Function of showing SNP density at chromosome level
ShowSNPDensityPlot( densityData, binSize, densityColorBar = c("grey", "darkgreen", "yellow", "red"), chromSet = c(1:22), withchr = FALSE )
densityData |
the raw density data generated from vcftools |
binSize |
the bin size set while generating density data |
densityColorBar |
vector Specific the color bar for plotting density plot (generally four colors) |
chromSet |
vector Filtered chrom set which you want to plot (it must be matched with the CHROM column in densityData) |
withchr |
logical If the chromsome labels of density plot is prefixed with "chr". Note: it cannot work when the filtered chrom set contain other uncommon chrom symbols (e.g. NC0*, etc) |
A ggplot2 object for SNP density plot
library(handyFunctions) data(SNV_1MB_density_data) ShowSNPDensityPlot(SNV_1MB_density_data, binSize = 1e6, chromSet = c(38:1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.