Description Usage Arguments Details Examples
Plot LOD statistics calculated by [mediation_scan()] against index using ggplot2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ggplot_mediation_scan(x, col = "firebrick4", cex = 1,
xlab = index_name, ylab = "Conditioned LOD", col_target = "blue",
gap = 25)
## S3 method for class 'mediation_scan'
autoplot(x, ...)
## S3 method for class 'mediation_scan'
plot(x, ...)
mediation_scan(target, mediator, driver, annotation, covar = NULL,
intcovar = NULL, kinship = NULL, method = c("double-lod-diff",
"ignore", "lod-diff"), fitFunction = fitDefault, facet_name = "chr",
index_name = "pos", verbose = TRUE)
|
x |
mediation object |
col |
color of points (default "firebrick4") |
cex |
character expansion (default 2) |
xlab, ylab |
X and Y axis label (default 'index_name' and "Conditioned LOD") |
col_target |
color for target LOD line |
gap |
gap between facets (default '25') |
target |
A numeric vector with gene/protein expression |
mediator |
A matrix, each column is one gene/protein's expression |
driver |
A matrix, haplotype probabilities at QTL we try to mediate |
annotation |
A data frame with mediators' annotation with columns 'facet_name' and 'index_name' |
covar |
A matrix with additive covariates |
intcovar |
A matrix of covariate interacting with driver |
kinship |
kinship object |
method |
A method to handle missing cases |
fitFunction |
function to fit models |
facet_name |
name of facet column (default 'chr') |
index_name |
name of index column (default 'pos') |
verbose |
If TRUE display information about the progress |
For a given QTL haplotype probabilities 'driver“ and target 'target', the function sequentially tries to add each column of 'mediator' matrix as a covariate and calculates LOD statistic. The low LOD value indicates 'driver' and 'target' are conditionally independent given 'mediator', i.e. 'mediator' is a mediator of causal relationship from 'driver' to 'target'.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(Tmem68)
target <- Tmem68$target
m <- match("Tmem68", Tmem68$annotation$symbol)
med_scan <- mediation_scan(target = target,
mediator = Tmem68$mediator,
driver = Tmem68$qtl.geno,
annotation = Tmem68$annotation,
covar = Tmem68$covar,
method = "double-lod-diff")
ggplot2::autoplot(med_scan)
ggplot2::autoplot(subset(med_scan, "4")) +
ggplot2::geom_vline(xintercept = Tmem68$annotation[m,"pos"], linetype = "dashed")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.