Description Usage Arguments Value
View source: R/snp_density_plot.R
Plot SNP density form SNP genotyping map file, the default map file in Plink format. The density will calculate by number of SNPs per Mb.
1 2 3 4 5 6 7 8 9 10 11 12 13 | plot_snp_density(
map,
max_chr = 29,
top_density = 72,
low_density = 33,
color_top = "yellow",
color_low = "blue",
color_mid = "red",
legend_position = c(0.9, 0.1),
x_label = "Physical distance (Mb)",
y_label = "Number of SNPs per Mb",
ncol_1 = 5
)
|
map |
Four columns are mandatory in the order of Chr, SNP, CM, Position. No header requires |
max_chr |
The maximum Chromosome present in SNP density plot. Default value = 29 |
top_density |
Threshold of higher density region, integer number, unit in SNPs/Mb. Default value = 72, suggest setting as the value of Mean + SD of SNP density. |
low_density |
Threshold of lower density region, integer number, unit in SNPs/Mb. Default value = 33suggest setting as the value of Mean - SD of SNP density. |
color_top |
Point color of higher density SNPs |
color_low |
Point color of lower density SNPs |
color_mid |
Point color of middle regions density SNPS |
legend_position |
Vectors, default values are c(0.9, 0.1), indicate left bottom corner |
x_label |
Default label is "Physical distance (Mb)" |
y_label |
Default label is "Number of SNPs per Mb" |
ncol_1 |
Customize the number of column in final plot, default value is 5. |
SNP density plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.