genetracks | R Documentation |
Plot gene annotation tracks from ensembldb
data.
genetracks(
locus,
filter_gene_name = NULL,
filter_gene_biotype = NULL,
border = FALSE,
cex.axis = 0.9,
cex.lab = 1,
cex.text = 0.7,
gene_col = ifelse(showExons, "blue4", "skyblue"),
exon_col = "blue4",
exon_border = "blue4",
showExons = TRUE,
maxrows = NULL,
text_pos = "top",
xticks = TRUE,
xlab = NULL,
highlight = NULL,
highlight_col = "red",
blanks = c("fill", "hide"),
showRecomb = TRUE,
align = TRUE
)
locus |
Object of class 'locus' generated by |
filter_gene_name |
Vector of gene names to display. |
filter_gene_biotype |
Vector of gene biotypes to be filtered. Use
|
border |
Logical whether a bounding box is plotted. |
cex.axis |
Specifies font size for axis numbering. |
cex.lab |
Specifies font size for axis titles. |
cex.text |
Font size for gene text. |
gene_col |
Colour for gene lines. |
exon_col |
Fill colour for exons. |
exon_border |
Border line colour outlining exons (or genes if
|
showExons |
Logical whether to show exons or simply show whole gene as a
rectangle. If |
maxrows |
Specifies maximum number of rows to display in gene annotation panel. |
text_pos |
Character value of either 'top' or 'left' specifying placement of gene name labels. |
xticks |
Logical whether x axis ticks and numbers are plotted. |
xlab |
Title for x axis. Defaults to chromosome |
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: |
showRecomb |
Logical controls alignment of right margin if recombination data present. |
align |
Logical whether to set |
This function is called by locus_plot()
. It can be used to plot the gene
annotation tracks on their own. It uses base graphics, so layout()
can be
used to position adjacent plots above or below.
gene_col
, exon_col
and exon_border
set colours for all genes, while
highlight
and highlight_col
can optionally be used together to highlight
specific genes of interest. For full control over every single gene, users
can add columns gene_col
, exon_col
and exon_border
to the TX
object
within the 'locus' object. Columns added to TX
override their equivalent
arguments.
No return value.
if(require(EnsDb.Hsapiens.v75)) {
data(SLE_gwas_sub)
loc <- locus(SLE_gwas_sub, gene = 'UBE2L3', flank = 1e5,
ens_db = "EnsDb.Hsapiens.v75")
genetracks(loc)
## Limit the number of tracks
genetracks(loc, maxrows = 4)
## Filter by gene biotype
genetracks(loc, filter_gene_biotype = 'protein_coding')
## Customise colours
genetracks(loc, gene_col = 'grey', exon_col = 'orange',
exon_border = 'darkgrey')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.