View source: R/CADD_MAF_Plot.R
CADD_MAF_Plot | R Documentation |
CADD-MAF plot.
CADD_MAF_Plot(
df_popviz,
df_private = NULL,
selectedMutTypes = c(Frameshift = "frameshift", Inframe = "missense", Inframe =
"inframe_deletion"),
homOnly = F,
color_by = "MutType",
shape_by = NULL,
facet_by = NULL,
msc = 3.33,
minAF = 10^-6
)
df_popviz |
A data.frame which has the following columns: HOM, AF, CADD, MutType, and optionally, MutLabel |
df_private |
(Optional) A data.frame which has the following columns: HOM, CADD, MutType, and MutLabel |
selectedMutTypes |
A named characters that will be internally used to define the factor levels. |
homOnly |
Logical. Whether only homozygous variants (HOM>=1) should be plotted. |
color_by |
A string indicating the variable name to be used for coloring. |
shape_by |
A string indicating the variable name to be used for formatting the shape of the points. |
facet_by |
A string or a pair of strings indicating the column names of variables to be used for facetting. |
msc |
Minimal significance cutoff. Can be identified using PopViz[http://shiva.rockefeller.edu/PopViz/]. |
minAF |
The minimal allele frequency. Private variants will be plotted based on this number. |
## Not run:
df_popviz <- data.table::fread("PopViz_Table_PDCD1_MSC99_AR.txt", check.names=T) %>%
dplyr::mutate(MutType=CONSEQUENCE, MutLabel=NA_character_)
df_private <- readr::read_csv("JL5657.V4.2.csv") %>%
dplyr::filter(gene=="PDCD1"&ID=="rs373081859") %>%
dplyr::transmute(HOM=1, AF=NA, CADD=CADD_Phred_V1.3, MutType="frameshift", MutLabel="T36Hfs*70")
plt <- CADD_MAF_Plot(
df_popviz,
df_private,
selectedMutTypes=c(
"Frameshift"="frameshift",
"Inframe"="missense",
"Inframe"="inframe_deletion"
),
homOnly=F,
color_by="MutType",
facet_by="HomType",
msc=3.3313,
minAF=10^-6
) +
scale_color_manual(values=c("firebrick3")) +
scale_fill_manual(values=c("firebrick3","Medium Turquoise","dimgrey"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.