locus_plot | R Documentation |
Genomic locus plot similar to locuszoom.
locus_plot(
loc,
filter_gene_name = NULL,
filter_gene_biotype = NULL,
xlab = NULL,
cex = 1,
cex.axis = 0.9,
cex.lab = 1,
cex.text = 0.7,
use_layout = TRUE,
heights = c(3, 2),
showExons = TRUE,
maxrows = 7,
xticks = "bottom",
border = FALSE,
gene_col = ifelse(showExons, "blue4", "skyblue"),
exon_col = "blue4",
exon_border = "blue4",
text_pos = "top",
highlight = NULL,
highlight_col = "red",
blanks = "fill",
recomb_col = "blue",
...
)
loc |
Object of class 'locus' to use for plot. See |
filter_gene_name |
Vector of gene names to display. |
filter_gene_biotype |
Vector of gene biotypes to be filtered. Use
|
xlab |
x axis title. |
cex |
Specifies size for points. |
cex.axis |
Specifies font size for axis numbering. |
cex.lab |
Specifies font size for axis titles. |
cex.text |
Font size for gene text. |
use_layout |
Logical whether |
heights |
Ratio of top to bottom plot. See layout. |
showExons |
Logical whether to show exons or simply show whole gene as a rectangle |
maxrows |
Specifies maximum number of rows to display in gene annotation panel. |
xticks |
Character value of either 'top' or 'bottom' specifying whether x axis ticks and numbers are plotted on top or bottom plot window. |
border |
Logical whether a bounding box is plotted around upper and lower plots. |
gene_col |
Colour for gene lines. |
exon_col |
Fill colour for exons. |
exon_border |
Border line colour outlining exons (or genes if
|
text_pos |
Character value of either 'top' or 'left' specifying placement of gene name labels. |
highlight |
Vector of genes to highlight. |
highlight_col |
Single colour or vector of colours for highlighted genes. |
blanks |
Controls handling of genes with blank names: |
recomb_col |
Colour for recombination rate line if recombination rate
data is present. Set to |
... |
Other arguments passed to |
This is an R version of locuszoom for generating publication ready Manhattan
plots of gene loci. It references Ensembl databases for annotating genes
and exons. Use locus()
first to generate an object of class 'locus' for
plotting. LDlink web server can be queried using function link_LD()
to
retrieve linkage disequilibrium (LD) information on the index SNP.
Arguments to control plotting of the gene tracks are passed onto
genetracks()
and for the scatter plot are passed via ...
to
scatter_plot()
. See the documentation for each of these functions for
details.
No return value.
locus()
scatter_plot()
genetracks()
if(require(EnsDb.Hsapiens.v75)) {
data(SLE_gwas_sub)
loc <- locus(SLE_gwas_sub, gene = 'UBE2L3', flank = 1e5,
ens_db = "EnsDb.Hsapiens.v75")
locus_plot(loc)
## Use embedded LD information in column `r2`
loc2 <- locus(SLE_gwas_sub, gene = 'IRF5', flank = c(7e4, 2e5), LD = "r2",
ens_db = "EnsDb.Hsapiens.v75")
## Add label for index SNP
locus_plot(loc2, labels = "index")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.