Description Usage Arguments Details Value Examples
Label points in the ggman plot.
1 2 | ggmanLabel(ggmanPlot, labelDfm, snp = "snp", label = "label",
type = "label", ...)
|
ggmanPlot |
A ggplot layer of class 'ggman'; see |
labelDfm |
A data frame object with the SNPs and the labels; |
snp |
Name of the column containing the markers; |
label |
Name of the column containing the labels; It can be the snp column itself. |
type |
type of label; either "label" or "text"; see details section |
... |
other arguments applicable to |
This function adds a layer of textual annotation using geom_label_repel
(if type = "label") or
geom_text_repel
(if type = "text").
A labelled Manhattan Plot
1 2 3 4 5 6 7 8 9 10 11 12 13 | #label type annotations
p1 <- ggman(toy.gwas, snp = "snp", bp = "bp", chrom = "chrom",
pvalue = "pvalue")
#subset significant snps
toy.gwas.sig <- toy.gwas[-log10(toy.gwas$pvalue)>8,]
ggmanLabel(p1, labelDfm = toy.gwas.sig, snp = "snp", label = "snp")
#text type annotations
ggmanLabel(p1, labelDfm = toy.gwas.sig, snp = "snp", label = "snp", type = "text")
#change the colour and size of labels
ggmanLabel(p1, labelDfm = toy.gwas.sig, snp = "snp", label = "snp", colour = "black", size = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.