Skip to content

Commit 8b96b00

Browse files
chore: Merge branch 'syncweaver' of github.com:NIDAP-Community/MOSuite-plot-pca-2D into syncweaver
2 parents 55465e4 + 9bc3ac3 commit 8b96b00

12 files changed

Lines changed: 260 additions & 66 deletions

File tree

‎.codeocean/app-panel.json‎

Lines changed: 72 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,73 @@
1212
}
1313
],
1414
"categories": [
15-
{
16-
"id": "7Rr6IxOMDucKMImp",
17-
"name": "Input Data Parameters",
18-
"description": "Options for defining input data",
19-
"icon": "📁"
20-
},
2115
{
2216
"id": "EzTg1ivlFDHEy9PI",
2317
"name": "Basic",
24-
"icon": "📂"
18+
"icon": "\ud83d\udcc2"
2519
},
2620
{
2721
"id": "FvI4Z2eb9sjL47Jt",
2822
"name": "Visualization",
2923
"description": "Visualization and plotting options",
30-
"icon": "📊"
24+
"icon": "\ud83d\udcca"
25+
},
26+
{
27+
"id": "7Rr6IxOMDucKMImp",
28+
"name": "Advanced",
29+
"description": "Advanced input data options",
30+
"icon": "\ud83d\udcc1"
3131
}
3232
],
3333
"parameters": [
3434
{
3535
"id": "count_type_id",
36-
"category": "FvI4Z2eb9sjL47Jt",
36+
"category": "EzTg1ivlFDHEy9PI",
3737
"name": "Count type",
3838
"param_name": "count_type",
3939
"description": "Type of counts to use (e.g., filt, norm)",
40+
"type": "list",
41+
"value_type": "string",
42+
"default_value": "filt",
43+
"extra_data": [
44+
"raw",
45+
"clean",
46+
"filt",
47+
"norm"
48+
]
49+
},
50+
{
51+
"id": "group_colname_id",
52+
"category": "EzTg1ivlFDHEy9PI",
53+
"name": "Group column name",
54+
"param_name": "group_colname",
55+
"description": "Column name for sample groups",
56+
"type": "text",
57+
"value_type": "string",
58+
"default_value": "Group"
59+
},
60+
{
61+
"id": "label_colname_id",
62+
"category": "EzTg1ivlFDHEy9PI",
63+
"name": "Label column name",
64+
"param_name": "label_colname",
65+
"description": "Column name for sample labels",
4066
"type": "text",
4167
"value_type": "string",
42-
"default_value": "filt"
68+
"default_value": "Label"
4369
},
4470
{
4571
"id": "sub_count_type_id",
46-
"category": "FvI4Z2eb9sjL47Jt",
72+
"category": "7Rr6IxOMDucKMImp",
4773
"name": "Sub count type",
4874
"param_name": "sub_count_type",
4975
"description": "Sub count type if count_type is a list",
5076
"type": "text",
5177
"value_type": "string"
5278
},
53-
{
54-
"id": "feature_id_colname_id",
55-
"category": "FvI4Z2eb9sjL47Jt",
56-
"name": "Feature ID column name",
57-
"param_name": "feature_id_colname",
58-
"description": "Column name for feature IDs",
59-
"type": "text",
60-
"value_type": "string"
61-
},
6279
{
6380
"id": "sample_id_colname_id",
64-
"category": "FvI4Z2eb9sjL47Jt",
81+
"category": "EzTg1ivlFDHEy9PI",
6582
"name": "Sample ID column name",
6683
"param_name": "sample_id_colname",
6784
"description": "Column name for sample IDs",
@@ -77,45 +94,40 @@
7794
"type": "text",
7895
"value_type": "string"
7996
},
80-
{
81-
"id": "group_colname_id",
82-
"category": "7Rr6IxOMDucKMImp",
83-
"name": "Group column name",
84-
"param_name": "group_colname",
85-
"description": "Column name for sample groups",
86-
"type": "text",
87-
"value_type": "string",
88-
"default_value": "Group"
89-
},
90-
{
91-
"id": "label_colname_id",
92-
"category": "7Rr6IxOMDucKMImp",
93-
"name": "Label column name",
94-
"param_name": "label_colname",
95-
"description": "Column name for sample labels",
96-
"type": "text",
97-
"value_type": "string",
98-
"default_value": "Label"
99-
},
10097
{
10198
"id": "principal_components_id",
102-
"category": "EzTg1ivlFDHEy9PI",
99+
"category": "7Rr6IxOMDucKMImp",
103100
"name": "Principal components",
104101
"param_name": "principal_components",
105102
"description": "Principal components to plot (comma-separated, e.g., 1,2)",
106103
"type": "text",
107104
"value_type": "string",
108105
"default_value": "1,2"
109106
},
107+
{
108+
"id": "feature_id_colname_id",
109+
"category": "7Rr6IxOMDucKMImp",
110+
"name": "Feature ID column name",
111+
"param_name": "feature_id_colname",
112+
"description": "Column name for feature IDs",
113+
"type": "text",
114+
"value_type": "string"
115+
},
110116
{
111117
"id": "legend_position_id",
112118
"category": "FvI4Z2eb9sjL47Jt",
113119
"name": "Legend position",
114120
"param_name": "legend_position",
115121
"description": "Position of the legend",
116-
"type": "text",
122+
"type": "list",
117123
"value_type": "string",
118-
"default_value": "top"
124+
"default_value": "top",
125+
"extra_data": [
126+
"top",
127+
"bottom",
128+
"left",
129+
"right"
130+
]
119131
},
120132
{
121133
"id": "point_size_id",
@@ -125,17 +137,21 @@
125137
"description": "Size of points in plot",
126138
"type": "text",
127139
"value_type": "string",
128-
"default_value": "1"
140+
"default_value": "3"
129141
},
130142
{
131143
"id": "add_label_id",
132144
"category": "FvI4Z2eb9sjL47Jt",
133145
"name": "Add labels",
134146
"param_name": "add_label",
135147
"description": "Whether to add labels to points",
136-
"type": "text",
148+
"type": "list",
137149
"value_type": "string",
138-
"default_value": "TRUE"
150+
"default_value": "TRUE",
151+
"extra_data": [
152+
"TRUE",
153+
"FALSE"
154+
]
139155
},
140156
{
141157
"id": "label_font_size_id",
@@ -173,16 +189,21 @@
173189
"name": "Interactive plots",
174190
"param_name": "interactive_plots",
175191
"description": "Whether to create interactive plots",
176-
"type": "text",
192+
"type": "list",
177193
"value_type": "string",
178-
"default_value": "FALSE"
194+
"default_value": "FALSE",
195+
"extra_data": [
196+
"TRUE",
197+
"FALSE"
198+
]
179199
},
180200
{
181201
"id": "color_values_id",
182202
"category": "FvI4Z2eb9sjL47Jt",
183203
"name": "Color values",
184204
"param_name": "color_values",
185-
"description": "Comma-separated color values for groups",
205+
"description": "Comma-separated group colors. Defaults to the MOSuite palette.",
206+
"help_text": "Use color names or hex codes. Supplied colors are used first; if there are more groups than colors, additional colors are generated from the MOSuite palette, with random colors only if that palette is too short.",
186207
"type": "text",
187208
"value_type": "string",
188209
"default_value": "#5954d6,#e1562c,#b80058,#00c6f8,#d163e6,#00a76c,#ff9287,#008cf9,#006e00,#796880,#FFA500,#878500"
@@ -193,4 +214,4 @@
193214
"file_name": "figures/pca/pca_2D.png"
194215
}
195216
]
196-
}
217+
}

‎.codeocean/environment.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"version": 1,
3-
"base_image": "codeocean/mosuite:v0.3.0",
4-
"post_install": true,
3+
"base_image": "codeocean/mosuite-minimal:v0.3.2",
54
"options": {
65
"registry_host_arg": true,
76
"git_ask_pass": true,

‎CHANGELOG.md‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Code Ocean capsule - MOSuite - plot 2D PCA
22

3+
## Development version
4+
5+
- Align the PCA color defaults with MOSuite package defaults (#2, @phoman14).
6+
- Document that color palettes fall back to random colors only when too few colors are provided (#2, @phoman14).
7+
- Improved the Code Ocean parameter UI for the plot pca 2D capsule (#1, @phoman14).
8+
- Use MOSuite v0.3.2. (#3, @kelly-sovacool)
9+
310
## v2.0
411

512
- Use MOSuite v0.3.0
@@ -9,4 +16,4 @@
916

1017
Initial release
1118

12-
<https://poc-nci.codeocean.io/capsule/8095429/tree/v1> `bd6ca75`
19+
<https://poc-nci.codeocean.io/capsule/8095429/tree/v1> `bd6ca75`

‎SECURITY.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# NCI Standard Public Repository Security Policy
2+
3+
## Maintained Versions
4+
5+
Actively maintained versions of contained software will vary from repository to repository, or may not be relevant at all.
6+
The developers of this repository will update this section if any actively maintained versions of the software need to be publicly disclosed. Otherwise, contact the developers directly for any version information.
7+
8+
## Vulnerability Disclosure:
9+
10+
### Option 1: HHS Vulnerability Disclosure
11+
12+
Follow the instructions listed in the [HHS vulnerability disclosure policy](https://www.hhs.gov/vulnerability-disclosure-policy/index.html).
13+
14+
### Option 2: Private Vulnerability Report
15+
16+
1. Click on the **Security and quality** tab of this repository.
17+
2. Locate the **Report a vulnerability** button. If the button is not on the **Security and quality** landing page, look under the **Advisories** section in the side bar.
18+
3. Click the **Report a vulnerability** button and submit the form. The developers will receive a notification of your submission.
19+

‎code/MOSuite/inst/extdata/galaxy/galaxy.R‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ update_function_template <- function(
135135
arg_name <- template[[arg_type]][[i]]$key
136136
if (arg_name %in% names(func_meta$args)) {
137137
arg_meta <- template[[arg_type]][[i]]
138-
arg_meta$description <- safe_rd_to_md(func_meta$args[[arg_name]]$description)
138+
arg_meta$description <- safe_rd_to_md(
139+
func_meta$args[[arg_name]]$description
140+
)
139141
arg_meta$defaultValue <- func_meta$args[[arg_name]]$defaultValue
140142
args_in_template <- c(args_in_template, arg_name)
141143
new_template[[arg_type]][[

‎code/main.R‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ parser$add_argument(
6565
parser$add_argument(
6666
"--point_size",
6767
type = "double",
68-
default = 1,
68+
default = 3,
6969
help = "Size of points in plot"
7070
)
7171
parser$add_argument(
@@ -102,7 +102,7 @@ parser$add_argument(
102102
"--color_values",
103103
type = "character",
104104
default = "#5954d6,#e1562c,#b80058,#00c6f8,#d163e6,#00a76c,#ff9287,#008cf9,#006e00,#796880,#FFA500,#878500",
105-
help = "Comma-separated color values"
105+
help = "Comma-separated group colors. Defaults to the MOSuite palette. Extra group colors are generated when needed."
106106
)
107107

108108
args <- parser$parse_args()

‎environment/Dockerfile‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# hash:sha256:16a54343c83446772895fc0c0b1e88a6dbd136fee70bcacffff7886f30541b82
1+
# hash:sha256:1cdaa95e13fff441e379b92105346562d0c6d704231dc19f198eec619b9b7511
22
ARG REGISTRY_HOST
3-
FROM $REGISTRY_HOST/codeocean/mosuite:v0.3.0
3+
FROM $REGISTRY_HOST/codeocean/mosuite-minimal:v0.3.2
44

55
ARG DEBIAN_FRONTEND=noninteractive
66
ARG GIT_ASKPASS
7-
COPY git-askpass /
8-
9-
COPY postInstall /
10-
RUN --mount=type=secret,id=secrets . /run/secrets/secrets \
11-
&& /postInstall
7+
COPY git-ask-pass /

‎environment/postInstall‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎tests/test-setup.R‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
testthat::test_that("test setup has expected capsule files", {
2+
repo_root <- normalizePath(file.path(testthat::test_path(), "..", ".."))
3+
4+
testthat::expect_true(file.exists(file.path(repo_root, "code", "main.R")))
5+
testthat::expect_true(file.exists(file.path(repo_root, "code", "run")))
6+
testthat::expect_true(file.exists(file.path(
7+
repo_root,
8+
".codeocean",
9+
"app-panel.json"
10+
)))
11+
})

‎tests/testthat.R‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
library(testthat)
2+
3+
test_dir(file.path("tests", "testthat"))

0 commit comments

Comments
 (0)