How to create a mutation frequency comparison plot?
1
0
Entering edit mode
12 months ago
saipra003 ▴ 10

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

enter image description here

R data-visualization plot • 687 views
ADD COMMENT
2
Entering edit mode
12 months ago

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)
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1885 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6