Description Usage Arguments Details Author(s) Examples
View source: R/plot_distributions.r
Plot 1D distributions of variants in cases and controls Plots histogram, density and/or stripchart
1 2 3 4 5 | plot_distributions(
case_residues,
control_residues,
type = c("histogram", "density", "stripchart")
)
|
case_residues |
vector of case-variant amino acid residue positions |
control_residues |
vector of control-variant amino acid residue positions |
type |
type of plots to plot |
The function takes a vector of case and control missense-variant residue positions and plots their linear positions for comparison. If multiple plot types are selected (as is default) then they are stacked on top of each other in one plot.
Adam Waring - adam.waring@msdtc.ox.ac.uk
1 2 3 4 5 6 7 8 9 10 11 | # The essential inputs are case_residues and control_residues
nresidues = 1000 # length of the protein
probs = rexp(nresidues)^2
case_probs = probs * rep(c(1, 3, 1), c(200, 200, 600))
control_probs = probs * rep(c(2, 1, 2), c(200, 200, 600))
case_residues = sample(1:nresidues, 100, rep=T, case_probs)
control_residues = sample(1:nresidues, 100, rep=T, control_probs)
plot_distributions(case_residues, control_residues)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.