Skip to content

Commit ceae04b

Browse files
authored
Edit vignettes and helpfiles (#144)
* Check if target_dir has been passed as an argument * Rewriting vignettes * Updates NEWS * Add spacing to tables in helpfiles
1 parent 62a82ba commit ceae04b

14 files changed

+145
-93
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
- Corrected Bioconductor package dependency (#136)
1010

11+
### DOCUMENTATION
12+
13+
- Edited vignettes for better reading (#143)
14+
- Added friendlier error messages to functions that require target_dir
15+
1116
# shinyExprPortal 1.0.1
1217

1318
- Plots not shown when no groups are selected in overlay module (#131)

R/create_config.R

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
#' @importFrom cli cli_h1 cli_h2 cli_h3 cli_text cli_ol cli_alert_danger
2525
#' cli_alert cli_alert_success cli_alert_info cli_abort
2626
create_config_wizard <- function(target_dir) {
27+
if (missing(target_dir)) {
28+
stop(" The target_dir argument must be passed to the function. This is
29+
the folder where your files have been placed.")
30+
}
2731
if (!interactive()) {
2832
stop("create_config must be run in an interactive terminal")
2933
}
@@ -129,7 +133,9 @@ the package website for a complete module configuration guide.")
129133

130134
cli::cli_text("If you have a separate file with metadata separate from the
131135
measures, enter the name of the file. Leave it blank if you
132-
don't have one.")
136+
don't have one. The metadata file should have one row per
137+
subject, in the samer order of the measures and no
138+
identifier columns.")
133139

134140
metadata_file <- readline("Enter name of sample metadata file:")
135141

@@ -236,6 +242,7 @@ the package website for a complete module configuration guide.")
236242
cli::cli_alert_success("Done!")
237243
}
238244

245+
if (continue_yn == "y") {
239246
cli::cli_h3("Correlation modules")
240247

241248
cli::cli_text("The correlation modules will be set up to include all
@@ -343,6 +350,7 @@ the package website for a complete module configuration guide.")
343350
cli::cli_alert("Creating {.file config.yaml} file in {.file {target_dir}}")
344351
yaml::write_yaml(config, file.path(target_dir, "config.yaml"))
345352
cli::cli_alert_success("Done!")
353+
}
346354
Sys.sleep(1)
347355
cli::cli_alert("Creating {.file app.R} file in {.file {target_dir}}")
348356
app_r <- file(file_path(target_dir, "app.R"))
@@ -382,6 +390,9 @@ the package website for a complete module configuration guide.")
382390
#' @export
383391
create_config_template <-
384392
function(target_dir, filename = "config.yaml") {
393+
if (missing(target_dir)) {
394+
stop("target_dir must be passed as an argument to the function")
395+
}
385396
config <- list(
386397
name = "REPLACE_WITH_PROJECT_NAME",
387398
logo = "PROJECT_LOGO.png",

inst/helpfiles/cohortOverview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Cohort overview
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module shows a map of temporal trajectories for a selected measure over time. Each patient is represented by a small line, and the lines are ordered in a left-to-right, top-bottom manner. The measures shown over time are defined by the authors of the study shared in this portal.
46

57
<table>

inst/helpfiles/compareTrajGroups.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Compare trajectories of groups
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module displays scatterplots with the expression of a selected gene and a selected observed measure over time. Each scatterplot contains a subset of samples/patients that is defined by the study authors. This module is useful to see how expression changes over time relative to a measure such as disease activity.
46

57
<table>

inst/helpfiles/degDetails.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Detailed results of differential expression analysis
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module displays volcano plots and tables of results of differential expression models that have been precomputed and loaded by the study authors.
46

57
<table>

inst/helpfiles/geneModulesHeatmap.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Gene modules heatmap
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module displays heatmaps and scatterplots of modules/clusters/groups of genes. The heatmaps show the expression, while the scatterplots (if defined by the study authors) show observed measures and the average module expression for each sample.
46

57
<table>
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
### Gene projection overlay
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module displays two scatterplots of a precomputed 2D projection of genes. The objective of the module is to allow the exploration of the relationship between the genes using a dimensionality reduction method and an expression overlay. In the overlay, the color of each projected gene is the average expression of the samples selected on the sidebar.
46

5-
<table><colgroup><col style="width: 50%"/><col style="width: 60%"/></colgroup><tbody><tr> <td><img width="75%" src="geneProjectionOverlay-subset.png"></td> <td>On the sidebar, you can select the subset of samples that will be used to compute the average expression in the overlay.</td></tr><tr> <td><img width="75%" src="geneProjectionOverlay-options.png"></td> <td>The checkboxes allow you to select gene groups to hide from the scatterplot.</td></tr><tr> <td><img width="100%" src="geneProjectionOverlay-plot.png"></td> <td>In the scatterplot, you can click on a single point to highlight that group of genes. All other groups will be displayed in gray. Once you click on a group, you can also click on the buttons below the scatterplots to view the genes that are in that group and the heatmap with the expression of the genes. Please note that if the groups are too big the heatmap may become unreadable.</td></tr></tbody></table>
7+
<table>
8+
<colgroup>
9+
<col style="width: 50%"/>
10+
<col style="width: 60%"/>
11+
</colgroup>
12+
<tbody>
13+
<tr>
14+
<td><img width="75%" src="geneProjectionOverlay-subset.png"></td>
15+
<td>On the sidebar, you can select the subset of samples that will be used to compute the average expression in the overlay.</td>
16+
</tr>
17+
<tr>
18+
<td><img width="75%" src="geneProjectionOverlay-options.png"></td>
19+
<td>The checkboxes allow you to select gene groups to hide from the scatterplot.</td>
20+
</tr>
21+
<tr>
22+
<td><img width="100%" src="geneProjectionOverlay-plot.png"></td>
23+
<td>In the scatterplot, you can click on a single point to highlight that group of genes. All other groups will be displayed in gray. Once you click on a group, you can also click on the buttons below the scatterplots to view the genes that are in that group and the heatmap with the expression of the genes. Please note that if the groups are too big the heatmap may become unreadable.</td>
24+
</tr>
25+
26+
</tbody>
27+
</table>
628

729
Module name in configuration file: *geneModulesHeatmap*

inst/helpfiles/multiMeasureCorr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Correlations between all genes and multiple measures
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module allows you to explore the relationship between the expression of all genes and sets of measures through correlation, with results displayed on a heatmap.
46

57
<table>

inst/helpfiles/singleGeneCorr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Correlations between single gene and measures
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module allows you to explore the relationship between the expression of a single gene and various observed measures through scatterplots and correlation measures.
46

57
<table>

inst/helpfiles/singleMeasureCorr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Correlations between single measure and all genes
2-
2+
<style>
3+
td { padding: 5px; border-spacing: 5px; }
4+
</style>
35
This module allows you to explore the relationship between the expression of all genes and a single observed measure through correlation.
46

57
<table>

0 commit comments

Comments
 (0)