How to create a mutation frequency comparison plot?
1
I was wondering if there were any packages on could use to generate a plot similar to the one below (preferably in R). I have similar data with P-value and statistical testing already completed. Image source
R
data-visualization
plot
• 701 views
You can make this with just ggplot. It would be two geom_point
, a geom_linerange
, and three geom_text
layers.
For a rough code scaffold.
ggplot(aes(y=gene_name)) +
geom_linerange(aes(xmin=min_value_column, xmax=max_value_column)) +
geom_point(aes(x=triangle_point_column), shape=17, color="red") +
geom_point(aes(x=circle_point_column)) +
geom_text(aes(x=min_value_column, label=min_value_column), nudge_x=-1, nudge_y=1) +
geom_text(aes(x=max_value_column, label=max_value_column), nudge_x=1, nudge_y=1) +
geom_text(aes(x=(min_value_column + max_value_column) / 2, label=significance_astericks_column), nudge_y=1)
Login before adding your answer.
Traffic: 1749 users visited in the last hour
That's awesome thank you. Found out after a bit of researching that this is called a
Cleveland Dot Plot
if anyone else comes across this.