Challenge

You’ve learnt how to made a volcano plot of your RNA-seq results in this course and you can now create static plots that you can include in your paper. However, you’d like to also be able to interactively explore the plot to see what genes the points represent.

The aim of this challenge is to generate an interactive volcano plot of the luminal RNA-seq results, similar to below, using the cool plotly package.

Steps

  • To make the interactive plot you will need to load both the tidyverse and the plotly packages.
  • Then first make a static volcano plot for the limma-voom_luminalpregnant-luminallactate.tsv.gz file, as you did previously in the volcanoplot tutorial. You can colour the Up, Down and Not signif genes as before but there is no need to add labels (no need to use geom_text or geom_text_repel).
  • Then take a look at the help for the ggplotly function, especially the tooltip argument (and Google) and see if you can make the volcano plot interactive.
  • Email the instructor your code.
LS0tCnRpdGxlOiAiSW50cm9kdWN0aW9uIHRvIFI6IFdlZWsgNCBQcmFjdGljZSIKYXV0aG9yOiAiTWFyaWEgRG95bGUiCmRhdGU6ICJgciBmb3JtYXQoU3lzLnRpbWUoKSwgJyVkICVCICVZJylgIgpvdXRwdXQ6IAogIGh0bWxfbm90ZWJvb2s6CiAgICB0b2M6IHllcwogICAgdG9jX2Zsb2F0OiB5ZXMKICAgIHRvY19kZXB0aDogMgpzdWJ0aXRsZTogSW50ZXJhY3RpdmUgdm9sY2FubyBwbG90IGNoYWxsZW5nZQotLS0KCiMjIyMgQ2hhbGxlbmdlCgpZb3UndmUgbGVhcm50IGhvdyB0byBtYWRlIGEgdm9sY2FubyBwbG90IG9mIHlvdXIgUk5BLXNlcSByZXN1bHRzIGluIHRoaXMgY291cnNlIGFuZCB5b3UgY2FuIG5vdyBjcmVhdGUgc3RhdGljIHBsb3RzIHRoYXQgeW91IGNhbiBpbmNsdWRlIGluIHlvdXIgcGFwZXIuIEhvd2V2ZXIsIHlvdSdkIGxpa2UgdG8gYWxzbyBiZSBhYmxlIHRvIGludGVyYWN0aXZlbHkgZXhwbG9yZSB0aGUgcGxvdCB0byBzZWUgd2hhdCBnZW5lcyB0aGUgcG9pbnRzIHJlcHJlc2VudC4KClRoZSBhaW0gb2YgdGhpcyBjaGFsbGVu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