Skip to content

Commit 23c4169

Browse files
committed
update vignette following example data update
1 parent 6ab8b77 commit 23c4169

7 files changed

Lines changed: 55 additions & 49 deletions

File tree

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
^\.Rproj\.user$
55
^\.github$
66
^_pkgdown\.yml$
7+
^data-raw$
78
^docs$
89
^pkgdown$
910
^vignettes/\.quarto$

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
.Rhistory
33
.Rproj.user
44
.Ruserdata
5+
data-raw/
6+
inst/extdata/20260319_DIAPlasmaProteomics_SpectronautProteinReport.csv
57
inst/extdata/Toy_Scaffold_Data_old.xls
68
inst/extdata/Toy_Spectronaut_Data_old.csv
79
man/figures/workflow.pptx
8-
R/gen_data.R
910
vignettes/analyze_ma.csv
1011
vignettes/analyze_modt.csv
1112
vignettes/analyze_t.csv

vignettes/analysis.qmd

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ If you specify `ref = "A"`, then the result includes two comparisons: "B-A" and
6262

6363

6464
```{r}
65-
anlys_t <- analyze.t(dataImput, ref = "50pmol", adjust.method = "none",
65+
anlys_t <- analyze.t(dataImput, ref = "50fmol", adjust.method = "none",
6666
saveRes = TRUE)
6767
```
6868

@@ -75,21 +75,21 @@ with the same value in all samples. In this case, the p-value of t-test returns
7575

7676

7777
```{r echo=FALSE}
78-
cat("$`100pmol-50pmol`\n")
78+
cat("$`100fmol-50fmol`\n")
7979
```
8080
<div style="overflow-x: auto;">
8181
```{r echo=FALSE}
82-
knitr::kable(anlys_t$`100pmol-50pmol`)
82+
knitr::kable(anlys_t$`100fmol-50fmol`)
8383
```
8484
</div>
8585

8686

8787
```{r echo=FALSE}
88-
cat("$`200pmol-50pmol`\n")
88+
cat("$`200fmol-50fmol`\n")
8989
```
9090
<div style="overflow-x: auto;">
9191
```{r echo=FALSE}
92-
knitr::kable(anlys_t$`200pmol-50pmol`)
92+
knitr::kable(anlys_t$`200fmol-50fmol`)
9393
```
9494
</div>
9595

@@ -154,7 +154,7 @@ The default value `"none"` indicates that no correction is applied.
154154

155155

156156
```{r}
157-
anlys_modt <- analyze.mod_t(dataImput, ref = "50pmol", adjust.method = "none",
157+
anlys_modt <- analyze.mod_t(dataImput, ref = "50fmol", adjust.method = "none",
158158
saveRes = TRUE)
159159
```
160160

@@ -175,21 +175,21 @@ it merely serves to alert users to its occurrence. </div>
175175

176176

177177
```{r echo=FALSE}
178-
cat("$`100pmol-50pmol`\n")
178+
cat("$`100fmol-50fmol`\n")
179179
```
180180
<div style="overflow-x: auto;">
181181
```{r echo=FALSE}
182-
knitr::kable(anlys_modt$`100pmol-50pmol`)
182+
knitr::kable(anlys_modt$`100fmol-50fmol`)
183183
```
184184
</div>
185185

186186

187187
```{r echo=FALSE}
188-
cat("$`200pmol-50pmol`\n")
188+
cat("$`200fmol-50fmol`\n")
189189
```
190190
<div style="overflow-x: auto;">
191191
```{r echo=FALSE}
192-
knitr::kable(anlys_modt$`200pmol-50pmol`)
192+
knitr::kable(anlys_modt$`200fmol-50fmol`)
193193
```
194194
</div>
195195

@@ -212,7 +212,7 @@ in the current dataset to calculate variance.
212212

213213

214214
```{r warning=FALSE}
215-
anlys_wilcox <- analyze.wilcox(dataImput, ref = "50pmol", adjust.method = "none",
215+
anlys_wilcox <- analyze.wilcox(dataImput, ref = "50fmol", adjust.method = "none",
216216
saveRes = TRUE)
217217
```
218218

@@ -227,21 +227,21 @@ same value, the corresponding p-value returns NaN. </div>
227227

228228

229229
```{r echo=FALSE}
230-
cat("$`100pmol-50pmol`\n")
230+
cat("$`100fmol-50fmol`\n")
231231
```
232232
<div style="overflow-x: auto;">
233233
```{r echo=FALSE}
234-
knitr::kable(anlys_wilcox$`100pmol-50pmol`)
234+
knitr::kable(anlys_wilcox$`100fmol-50fmol`)
235235
```
236236
</div>
237237

238238

239239
```{r echo=FALSE}
240-
cat("$`200pmol-50pmol`\n")
240+
cat("$`200fmol-50fmol`\n")
241241
```
242242
<div style="overflow-x: auto;">
243243
```{r echo=FALSE}
244-
knitr::kable(anlys_wilcox$`200pmol-50pmol`)
244+
knitr::kable(anlys_wilcox$`200fmol-50fmol`)
245245
```
246246
</div>
247247

@@ -265,26 +265,26 @@ the same.
265265

266266

267267
```{r}
268-
anlys_ma <- analyze.ma(dataImput, ref = "50pmol", saveRes = TRUE)
268+
anlys_ma <- analyze.ma(dataImput, ref = "50fmol", saveRes = TRUE)
269269
```
270270

271271

272272
```{r echo=FALSE}
273-
cat("$`100pmol-50pmol`\n")
273+
cat("$`100fmol-50fmol`\n")
274274
```
275275
<div style="overflow-x: auto;">
276276
```{r echo=FALSE}
277-
knitr::kable(anlys_ma$`100pmol-50pmol`)
277+
knitr::kable(anlys_ma$`100fmol-50fmol`)
278278
```
279279
</div>
280280

281281

282282
```{r echo=FALSE}
283-
cat("$`200pmol-50pmol`\n")
283+
cat("$`200fmol-50fmol`\n")
284284
```
285285
<div style="overflow-x: auto;">
286286
```{r echo=FALSE}
287-
knitr::kable(anlys_ma$`200pmol-50pmol`)
287+
knitr::kable(anlys_ma$`200fmol-50fmol`)
288288
```
289289
</div>
290290

vignettes/cust_vis.qmd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ dataFilt <- filterNA(dataNorm, minProp = 0.51, by = "cond", saveRm = TRUE)
4848
## imputation
4949
dataImput <- impute.min_local(dataFilt)
5050
## analysis
51-
anlys_modt <- analyze.mod_t(dataImput, ref = "50pmol")
52-
anlys_ma <- analyze.ma(dataImput, ref = "50pmol")
51+
anlys_modt <- analyze.mod_t(dataImput, ref = "50fmol")
52+
anlys_ma <- analyze.ma(dataImput, ref = "50fmol")
5353
```
5454

5555

@@ -58,7 +58,7 @@ anlys_ma <- analyze.ma(dataImput, ref = "50pmol")
5858

5959
```{r}
6060
## default volcano
61-
visualize.volcano(anlys_modt$`100pmol-50pmol`, P.thres = 0.05, F.thres = 1)
61+
visualize.volcano(anlys_modt$`100fmol-50fmol`, P.thres = 0.05, F.thres = 1)
6262
```
6363

6464

@@ -70,7 +70,7 @@ the volcano plot with gene or protein names, using additional information.
7070

7171

7272
```{r message=FALSE}
73-
volcano <- visualize.volcano(anlys_modt$`100pmol-50pmol`,
73+
volcano <- visualize.volcano(anlys_modt$`100fmol-50fmol`,
7474
P.thres = 0.05, F.thres = 1)
7575
7676
## change labels of proteins
@@ -92,7 +92,7 @@ different significance levels in the output plot.
9292

9393

9494
```{r}
95-
volcano <- visualize.volcano(anlys_modt$`100pmol-50pmol`,
95+
volcano <- visualize.volcano(anlys_modt$`100fmol-50fmol`,
9696
P.thres = 0.05, F.thres = 1)
9797
9898
library(ggplot2)
@@ -113,7 +113,7 @@ look of the plot, including the background, gridlines, and text.
113113

114114

115115
```{r}
116-
volcano <- visualize.volcano(anlys_modt$`100pmol-50pmol`,
116+
volcano <- visualize.volcano(anlys_modt$`100fmol-50fmol`,
117117
P.thres = 0.05, F.thres = 1)
118118
119119
library(ggplot2)
@@ -127,7 +127,7 @@ volcano + theme_classic()
127127

128128
```{r}
129129
## default MA
130-
visualize.ma(anlys_ma$`100pmol-50pmol`, M.thres = 0.5)
130+
visualize.ma(anlys_ma$`100fmol-50fmol`, M.thres = 0.5)
131131
```
132132

133133

@@ -139,7 +139,7 @@ names, follow these steps:
139139

140140

141141
```{r message=FALSE}
142-
ma <- visualize.ma(anlys_ma$`100pmol-50pmol`, M.thres = 0.5)
142+
ma <- visualize.ma(anlys_ma$`100fmol-50fmol`, M.thres = 0.5)
143143
144144
## change labels of proteins
145145
library(dplyr)
@@ -160,7 +160,7 @@ modify the colors in the plot:
160160

161161

162162
```{r}
163-
ma <- visualize.ma(anlys_ma$`100pmol-50pmol`, M.thres = 0.5)
163+
ma <- visualize.ma(anlys_ma$`100fmol-50fmol`, M.thres = 0.5)
164164
165165
library(ggplot2)
166166
new <- ggplot_build(ma)
@@ -179,7 +179,7 @@ ggplot2's theme functions.
179179

180180

181181
```{r}
182-
ma <- visualize.ma(anlys_ma$`100pmol-50pmol`, M.thres = 0.5)
182+
ma <- visualize.ma(anlys_ma$`100fmol-50fmol`, M.thres = 0.5)
183183
184184
library(ggplot2)
185185
## use a minimal theme

vignettes/preprocessing.qmd

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ You still need to use the function `transform()`. </div>
4040

4141

4242
```{r}
43-
## if the raw data is in an .Rdata file
44-
load("../inst/extdata/Toy_Spectronaut_Data.RData")
43+
## if the raw data is in an R data file
44+
data("Toy_Spectronaut_Data")
4545
dataSet <- preprocessing(dataSet = Toy_Spectronaut_Data,
4646
filterNaN = TRUE, filterUnique = 2,
4747
replaceBlank = TRUE, saveRm = TRUE)
@@ -74,9 +74,11 @@ The steps below describe the operations performed during preprocessing.
7474
specify the `fileName` to read the raw data file into R.
7575

7676

77-
+ If the raw data is stored as an `.RData` file
78-
[Toy_Spectronaut_Data.RData](https://github.com/uconn-scs/msDiaLogue/blob/main/inst/extdata/Toy_Spectronaut_Data.RData),
79-
first load the data file directly, then specify the `dataSet` in the function.
77+
+ If the raw data is stored in an R data file (e.g.,
78+
[Toy_Spectronaut_Data.rda](https://github.com/uconn-scs/msDiaLogue/blob/main/data/Toy_Spectronaut_Data.rda)
79+
or a `.RData` file),
80+
first load the data file directly, then specify the loaded object as
81+
the `dataSet` argument.
8082

8183

8284
### 2. Filters out identified proteins that exhibit `NaN` quantitative values

vignettes/scaffold.qmd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ Scaffold data is called `preprocessing_scaffold()`, given in the code box below.
170170
[Toy_Scaffold_Data.xls](https://github.com/uconn-scs/msDiaLogue/blob/main/inst/extdata/Toy_Scaffold_Data.xls),
171171
specify the `fileName` to read the raw data file into R.
172172

173-
+ If the raw data is stored as an `.RData` file
174-
[Toy_Scaffold_Data.RData](https://github.com/uconn-scs/msDiaLogue/blob/main/inst/extdata/Toy_Scaffold_Data.RData),
175-
first load the data file directly, then specify the `dataSet` in the function.
173+
+ If the raw data is stored in an R data file (e.g.,
174+
[Toy_Scaffold_Data.rda](https://github.com/uconn-scs/msDiaLogue/blob/main/data/Toy_Scaffold_Data.rda)
175+
or a `.RData` file),
176+
first load the data file directly, then specify the loaded object as
177+
the `dataSet` argument.
176178

177179

178180
<div class="note">
@@ -197,7 +199,7 @@ dataSet <- preprocessing_scaffold(fileName = "../inst/extdata/Toy_Scaffold_Data.
197199

198200
```{r}
199201
## if the raw data is in an .Rdata file
200-
load("../inst/extdata/Toy_Scaffold_Data.RData")
202+
data("Toy_Scaffold_Data")
201203
dataSet <- preprocessing_scaffold(dataSet = Toy_Scaffold_Data,
202204
zeroNA = TRUE, oneNA = TRUE)
203205
```

vignettes/visualization.qmd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ dataImput <- impute.min_local(dataFilt)
5353
## summarization
5454
dataSumm <- summarize(dataImput, saveSumm = TRUE)
5555
## analysis: MA
56-
anlys_ma <- analyze.ma(dataImput, ref = "50pmol")
56+
anlys_ma <- analyze.ma(dataImput, ref = "50fmol")
5757
## analysis: Empirical Bayes moderated t-test
58-
anlys_modt <- analyze.mod_t(dataImput, ref = "50pmol", adjust.method = "none")
58+
anlys_modt <- analyze.mod_t(dataImput, ref = "50fmol", adjust.method = "none")
5959
## analysis: PCA
6060
anlys_pca <- analyze.pca(dataImput, center = TRUE, scale = TRUE)
6161
## analysis: PLS-DA
@@ -170,7 +170,7 @@ visualize.heatmap(dataSet, pkg = "ggplot2",
170170

171171

172172
```{r}
173-
visualize.ma(anlys_ma$`100pmol-50pmol`, M.thres = 1)
173+
visualize.ma(anlys_ma$`100fmol-50fmol`, M.thres = 1)
174174
```
175175

176176

@@ -266,7 +266,7 @@ visualize.target(dataImput, type = "bar", facet = FALSE,
266266

267267

268268
```{r}
269-
visualize.test(anlys_modt$`100pmol-50pmol`)
269+
visualize.test(anlys_modt$`100fmol-50fmol`)
270270
```
271271

272272

@@ -304,8 +304,8 @@ visualize.upset(dataSet)
304304
```
305305

306306

307-
This plot reveals that 42 proteins are shared by 50pmol, 100pmol, and 200pmol,
308-
while only 3 proteins are shared by 100 pmol and 200pmol, but not with 50pmol.
307+
This plot reveals that 42 proteins are shared by 50fmol, 100fmol, and 200fmol,
308+
while only 3 proteins are shared by 100fmol and 200fmol, but not with 50fmol.
309309

310310

311311
## Venn plot
@@ -328,8 +328,8 @@ representing sets in Venn plot information will be saved as a `.csv` file named
328328
*venn_information.csv* in the current working directory.
329329

330330

331-
In the example above, 50pmol, 100pmol, and 200pmol groups share 42 proteins.
332-
Notably, 3 proteins are exclusively found in the 100pmol and 200pmol groups.
331+
In the example above, 50fmol, 100fmol, and 200fmol groups share 42 proteins.
332+
Notably, 3 proteins are exclusively found in the 100fmol and 200fmol groups.
333333

334334

335335
## Volcano plot
@@ -339,7 +339,7 @@ Notably, 3 proteins are exclusively found in the 100pmol and 200pmol groups.
339339

340340

341341
```{r}
342-
visualize.volcano(anlys_modt$`100pmol-50pmol`, P.thres = 0.05, F.thres = 1)
342+
visualize.volcano(anlys_modt$`100fmol-50fmol`, P.thres = 0.05, F.thres = 1)
343343
```
344344

345345

0 commit comments

Comments
 (0)