@@ -163,9 +163,8 @@ Thanks to the modularity of the `tidybulk` workflow, that can multiplex
163163different methods, we can easily compare the p-values across methods.
164164
165165``` r
166- airway | >
167- rowData() | >
168- as_tibble() | >
166+ airway | >
167+ pivot_transcript() | >
169168 select(
170169 ql__PValue ,
171170 lr_robust__PValue ,
@@ -190,7 +189,7 @@ different methods, we can easily compare the p-values across methods.
190189
191190``` r
192191# Summary statistics
193- airway | > rowData() | > as_tibble () | > select(contains(" ql|lr_robust|voom|voom_weights|deseq2" )) | > select(contains(" logFC" )) | >
192+ airway | > pivot_transcript () | > select(contains(" ql|lr_robust|voom|voom_weights|deseq2" )) | > select(contains(" logFC" )) | >
194193summarise(across(everything(), list (min = min , median = median , max = max ), na.rm = TRUE ))
195194```
196195
@@ -218,8 +217,7 @@ library(GGally)
218217
219218``` r
220219airway | >
221- rowData() | >
222- as_tibble() | >
220+ pivot_transcript() | >
223221 select(ql__PValue , lr_robust__PValue , voom__P.Value , voom_weights__P.Value , deseq2__pvalue ) | >
224222 ggpairs(columns = 1 : 5 ) +
225223 scale_x_continuous(trans = tidybulk :: log10_reverse_trans()) +
@@ -235,8 +233,7 @@ airway |>
235233``` r
236234library(GGally )
237235airway | >
238- rowData() | >
239- as_tibble() | >
236+ pivot_transcript() | >
240237 select(ql__logFC , lr_robust__logFC , voom__logFC , voom_weights__logFC , deseq2__log2FoldChange ) | >
241238 ggpairs(columns = 1 : 5 ) +
242239 my_theme +
@@ -250,14 +247,14 @@ airway |>
250247
251248It is important to check the quality of the fit. All methods produce a
252249fit object that can be used for quality control. The fit object produced
253- by each underlying method are stored in as attributes of the
254- ` airway_mini ` object. We can use them for example to perform quality
250+ by each underlying method is stored as an attribute of the
251+ ` airway_mini ` object. We can use them, for example, to perform quality
255252control of the fit.
256253
257254#### For edgeR
258255
259256Plot the biological coefficient of variation (BCV) trend. This plot is
260- helpful to understant the dispersion of the data.
257+ helpful in understanding the dispersion of the data.
261258
262259``` r
263260library(edgeR )
@@ -294,7 +291,7 @@ metadata(airway)$tidybulk$DESeq2_object |>
294291
295292![ ] ( README_files/figure-gfm/differential-expression-DESeq2-object-1.png ) <!-- -->
296293
297- Plot the log-fold change vs mean plot.
294+ Plot the log-fold change vs the mean plot.
298295
299296``` r
300297library(DESeq2 )
@@ -309,17 +306,16 @@ metadata(airway)$tidybulk$DESeq2_object |>
309306### Volcano Plots for Each Method
310307
311308Visualising the significance and effect size of the differential
312- expression results as a volcano plots we appreciate that some methods
313- have much lower p-values distributions than other methods, for the same
309+ expression results as a volcano plot, we appreciate that some methods
310+ have much lower p-value distributions than other methods, for the same
314311model and data.
315312
316313``` r
317314# Create volcano plots
318315airway | >
319316
320317 # Select the columns we want to plot
321- rowData() | >
322- as_tibble(rownames = " .feature" ) | >
318+ pivot_transcript() | >
323319 select(
324320 .feature ,
325321 ql__logFC , ql__PValue ,
0 commit comments