R/plot.R
plot_extended_dataset.Rd
Draw Manhattan-style locus plots for p-values in each dataset, gene annotations, a scatter plot of z-scores, and a table of coloc summary statistics.
plot_extended_dataset(
dataset1,
dataset2,
x,
first_highlight_list = NULL,
second_highlight_list = NULL,
first_index_snp = NULL,
second_index_snp = NULL,
first_trait = "Trait 1",
second_trait = "Trait 2",
snp_label = "snp",
ld_label = NULL,
show_ld = FALSE,
locus_plot_ylim = NULL,
ens_db = "EnsDb.Hsapiens.v86"
)
object of class coloc_abf
returned by coloc.abf()
character vector of snps to highlight in the first dataset;
'index'
can be passed to highlight the most significant SNP
character vector of snps to highlight in the second dataset;
'index'
can be passed to highlight the most significant SNP
snp to designate as index snp in the first dataset for the purpose of LD visualisation
snp to designate as index snp in the second dataset for the purpose of LD visualisation
label for the first trait
label for the second trait
label for the snp column
label for the LD column
logical, whether to show LD in the locus plots
numeric vector of length 2 specifying the y-axis limits for the locus plots on the -log10 scale
character string specifying Ensembl database package from which to get gene positions. Current (at time of writing this documentation!) sensible values are "EnsDb.Hsapiens.v86" for build 38 and "EnsDb.Hsapiens.v75" for build 37.
a coloc dataset
a gtable object
Plot a pair of coloc datasets in an extended format
This function expects that the first two elements of the coloc
dataset list d contain summary statistics. Columns labelled 'chromosome',
'position', and 'p' (p-values) are expected in each dataset. The packages locuszoomr
and one of EnsDb.Hsapiens.v86
or EnsDb.Hsapiens.v75
are required
for this function. One of the EnsDb.Hsapiens
libraries containing the Ensembl database
specified by ens_db must be loaded prior to use (see the example). EnsDb.Hsapiens.v86
is the default database (GRCh38/hg19); for GRCh37/hg19, use EnsDb.Hsapiens.v75.