kevinblighe / EnhancedVolcano

Publication-ready volcano plots with enhanced colouring and labeling
399 stars 81 forks source link

Change toptable$Sig to Sig to avoid ggplot warning #57

Closed eturkes closed 4 years ago

eturkes commented 4 years ago

In newer versions of ggplot2 (I tested on 3.3.2, R 4.0.2) using $ in aes() results in a warning (https://github.com/tidyverse/ggplot2/issues/2693), specifically, "Warning: Use of toptable$Sig is discouraged. Use Sig instead." I changed factor(Sig) to toptable$Sig in the last commit to allow legendDropLevels to work. Changing this to simply Sig appears to be the most idiomatic way, the warning is removed and all functionality appears to be retained.

kevinblighe commented 4 years ago

Hey @eturkes - thanks fore that! I have implemented these changes!