Plots the cTWAS result for a single locus
make_locusplot(
finemap_res,
region_id,
weights,
ens_db,
R_snp_gene = NULL,
R_gene = NULL,
locus_range = NULL,
focal_gene = NULL,
filter_genetrack_biotype = "protein_coding",
highlight_pval = NULL,
highlight_pip = 0.8,
highlight_pos = NULL,
label_QTLs = TRUE,
point.sizes = c(1.5, 3.5),
point.alpha = c(0.4, 0.7),
point.shapes = c(16, 15),
label.text.size = 2.5,
legend.text.size = 10,
legend.position = "top",
panel.heights = c(4, 4, 1, 4)
)
a data frame of cTWAS finemapping result
region ID to be plotted
a list of weights
Ensembl database
SNP-gene correlation matrix of the region. If both R_snp_gene and R_gene are available, color data points with correlations with the focal gene.
gene-gene correlation matrix of the region
a vector of start and end positions to define the region boundary to be plotted. If NULL, the entire region will be plotted (with 100 bp flanks on both sides).
the focal gene name. If NULL, choose the gene with the highest PIP.
biotype to be displayed in gene tracks. By default, limits to protein coding genes. If NULL, display all possible ones.
pvalue to highlight with a horizontal line
PIP to highlight with a horizontal line
genomic positions to highlight with vertical lines
If TRUE, label SNP IDs in the QTL panel.
size values for SNP and gene data points in the scatter plots
alpha values for SNP and gene data points in the scatter plots
shapes values for data points of different types in the scatter plots
Font size for gene and SNP label text
Font size for legend text
position to put legends. If "none", no legends will be shown.
Relative heights of the panels.