Slide 1

Slide 1 text

RNAseq: A five course meal #DIBSI2019 Rayna M. Harris @raynamharris 1

Slide 2

Slide 2 text

Rayna M. Harris Postdoctoral scholar at UC Davis Scientist, Educator, Community Builder, Translator 2

Slide 3

Slide 3 text

Special thanks to the Data Intensive Biology Lab and the Birds, Brain, & Banter Lab http://calisilab.ucdavis.edu/ http://ivory.idyll.org/lab/ 3

Slide 4

Slide 4 text

I learned R and RNAseq in communities of practice The University of Texas at Austin, University California, Davis, Data Carpentry, Software Carpentry, The Carpentries-es, @cienciaPR @RLadiesGlobal @RLadiesBA @r4ds_es #DISBI2018 4

Slide 5

Slide 5 text

Who reads books? 5

Slide 6

Slide 6 text

Read R for Data Science 6

Slide 7

Slide 7 text

R 4 Data Science workflow https://r4ds.had.co.nz/ 7

Slide 8

Slide 8 text

Data science as a five course meal 8

Slide 9

Slide 9 text

Data snacks prevent “hanger” Appetizer 9

Slide 10

Slide 10 text

Data snacks and source code `library()` `source()` `data()` Substantial, complex, noteworthy, valuable Provides insights into what follows 10

Slide 11

Slide 11 text

Soup & salad, tidy then transform Salad Soup 11

Slide 12

Slide 12 text

Data wrangling Appetizer Salad Soup Wrangle 12

Slide 13

Slide 13 text

Data wrangling Simultaneously fun and painful Learn from your mistakes Write good documentation Write tests 13

Slide 14

Slide 14 text

The tidyverse and scientific python are your data wrangling friends 14

Slide 15

Slide 15 text

The DESeq2 salad http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html 15

Slide 16

Slide 16 text

DESeq2 colData and counts https://biojupies.cloud/notebook/AHnOIzJEq 16

Slide 17

Slide 17 text

ncol(counts) == nrow(colData) https://biojupies.cloud/notebook/AHnOIzJEq 17

Slide 18

Slide 18 text

Summarized experiment soup http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#differential-expression-analysis 18

Slide 19

Slide 19 text

“You can’t have any pudding if you don’t eat yer meat. How can you have any pudding if you don’t eat yer meat?” Pink Floyd Dessert 19

Slide 20

Slide 20 text

“Communication breakdown, it’s always the same I’m having a nervous breakdown, drive me insane.” Led Zeppelin Nuts 20

Slide 21

Slide 21 text

Procrastigraphing: excessive creation of data visualizations Communicate Nuts Dessert 21

Slide 22

Slide 22 text

Modeling is challenging. So many choices. Main course 22

Slide 23

Slide 23 text

If you were at a banquet, would you order? A. Lobster B. Steak C. Lobster and steak D. Other E. Lobster, steak, and other 23

Slide 24

Slide 24 text

If you were an RNAseq workflow, would you use: A. R B. Python C. R and Python D. Other E. An R/Python/other mix 24

Slide 25

Slide 25 text

FlavoRs of differential gene expression models library("DESeq2") dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ condition) results(dds, contrast=c("condition","B","A")) http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#differential-expression-analysis 25

Slide 26

Slide 26 text

Strategies for a well-balanced RNAseq analysis R and/or Python or other library() data() counts dds colData Rmarkdown Jupyter GitHub pages ~ condition Wrangle Explore ggplot() matplotlib Communicate 26

Slide 27

Slide 27 text

BioJupies for instant RNA-seq visualizations in the cloud https://biojupies.cloud/notebook/AHnOIzJEq https://twitter.com/i/status/1062745599538282498 27

Slide 28

Slide 28 text

https://biojupies.cloud/notebook/AHnOIzJEq Quickly assess sample quality and variation 28

Slide 29

Slide 29 text

https://biojupies.cloud/notebook/AHnOIzJEq Quickly view results of gene ontology enrichment analyses 29

Slide 30

Slide 30 text

https://biojupies.cloud/notebook/AHnOIzJEq Quickly explore patterns of differential gene expression 30

Slide 31

Slide 31 text

https://biojupies.cloud/notebook/AHnOIzJEq But how many dots are red and blue? ? ? 31

Slide 32

Slide 32 text

https://biojupies.cloud/notebook/AHnOIzJEq But, what if I want to view many volcano plots? 32

Slide 33

Slide 33 text

Convert .Rmd files to GitHub pages to communicate results https://macmanes-lab.github.io/austinCORT/ 33

Slide 34

Slide 34 text

Open source options for programming 34

Slide 35

Slide 35 text

My progress: from a novice with data and tools https://github.com/raynamharris/DissociationTest Harris, Kao, Alarcón, Hofmann, Fenton 2017 https://www.biorxiv.org/content/10.1101/153585v1 35

Slide 36

Slide 36 text

To a practitioner with reproducible workflows https://github.com/raynamharris/DissociationTest Harris, Kao, Alarcón, Hofmann, Fenton 2019 https://onlinelibrary.wiley.com/doi/10.1002/hipo.23095 36

Slide 37

Slide 37 text

Onward to experiments with many factors https://github.com/macmanes-lab/DoveParentsRNAseq/ Made for a poster at the Society for Behavioral Neuroendocrinology 37

Slide 38

Slide 38 text

Identify time-like changes in specific genes https://github.com/macmanes-lab/DoveParentsRNAseq/ 38

Slide 39

Slide 39 text

Find meaningful principle components of variation https://github.com/macmanes-lab/DoveParentsRNAseq/ 39

Slide 40

Slide 40 text

Create functions to run all pairwise comparisons `contrast = c(“treatment”, “varB”, “varA”)` https://github.com/macmanes-lab/DoveParentsRNAseq/ 40

Slide 41

Slide 41 text

The risk of unintentional p-hacking http://www.stat.columbia.edu/~gelman/research/unpublished/p_hacking.pdf 41

Slide 42

Slide 42 text

The risk of unintentional p-hacking http://www.stat.columbia.edu/~gelman/research/unpublished/p_hacking.pdf 42

Slide 43

Slide 43 text

Exploratory analyses vs. model testing Explore 43

Slide 44

Slide 44 text

60% 20% 20% training set query set testing set Should we be analyzing all the data all the time? 44

Slide 45

Slide 45 text

“Soup to nuts: setting up a new RNAseq analysis”Titus 45

Slide 46

Slide 46 text

“A five course meal is an excellent analogy!”Rayna Appetizer Soup & Salad Dessert Nuts Main course :) 46

Slide 47

Slide 47 text

Framework for understanding RNAseq workflows R and/or Python or other library() data() counts dds colData ggplot() matplotlib Rmarkdown Jupyter GitHub pages ~ condition 47

Slide 48

Slide 48 text

Strategies for creating healthy RNAseq workflows R and/or Python or other library() data() counts dds colData ggplot() matplotlib Rmarkdown Jupyter GitHub pages ~ condition Communicate Wrangle Explore Model 48

Slide 49

Slide 49 text

What questions do you have? @raynamharris 49