New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating plots.R for multi_mapping #12
Merged
jdblischak
merged 6 commits into
abbvie-external:main
from
curadomr:multimodel_multimapping
Sep 23, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5ddc246
Updating plots.R for multi_mapping
curadomr f534f57
Update on multimapping functionality
curadomr 3c2c67e
File to be included together with latest commit
curadomr 8168666
Documentation files to be added together with latest commit
curadomr d70efb5
Missing "defaults" to "default" from mapping objs
curadomr e6817aa
Multimapping checks
curadomr File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -360,12 +360,38 @@ expect_error_xl( | |
info = "A single missing value would still be unique. Error if it is found" | ||
) | ||
|
||
resultsDefault <- list( | ||
default = list( | ||
t1 = data.frame( | ||
x = c("a", "b", "c"), | ||
y = rnorm(3), | ||
stringsAsFactors = FALSE | ||
) | ||
) | ||
) | ||
|
||
expect_error_xl( | ||
addResults(study, results = resultsDefault), | ||
'The results cannot be shared using the modelID \"default\"' | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great test! |
||
|
||
# checkEnrichments ------------------------------------------------------------- | ||
|
||
expect_error_xl( | ||
addEnrichments(study, enrichments = NULL) | ||
) | ||
|
||
enrichmentDefault <- list( | ||
default = list( | ||
t1 = NULL | ||
) | ||
) | ||
|
||
expect_error_xl( | ||
addEnrichments(study, enrichments = enrichmentDefault), | ||
"The enrichments cannot be shared using the modelID \"default\"" | ||
) | ||
|
||
# checkMetaFeatures ------------------------------------------------------------ | ||
|
||
expect_error_xl( | ||
|
@@ -456,15 +482,15 @@ expect_error_xl( | |
tempMapping <- list(data.frame(model_01 = c("feature_01", "feature_02"), | ||
model_02 = c("feature_01", "feature_02"), | ||
stringsAsFactors = FALSE)) | ||
names(tempMapping) <- "defaults" | ||
names(tempMapping) <- "default" | ||
expect_silent_xl( | ||
addMapping(study, mapping = tempMapping) | ||
) | ||
|
||
tempMapping <- list(data.frame(model_01 = c("feature_01", "feature_02"), | ||
model_02 = c("feature_01", NA), | ||
stringsAsFactors = FALSE)) | ||
names(tempMapping) <- "defaults" | ||
names(tempMapping) <- "default" | ||
expect_silent_xl( | ||
addMapping(study, mapping = tempMapping) | ||
) | ||
|
@@ -478,12 +504,11 @@ expect_error_xl( | |
"The elements of list \"mapping\" must be named" | ||
) | ||
|
||
|
||
# check mapping with one model having only NAs | ||
tempMapping <- list(data.frame(model_01 = c("feature_01", "feature_02"), | ||
model_02 = c(NA, NA), | ||
stringsAsFactors = FALSE)) | ||
names(tempMapping) <- "defaults" | ||
names(tempMapping) <- "default" | ||
expect_error_xl( | ||
addMapping(study, mapping = tempMapping), | ||
"mapping object requires at least one feature per model" | ||
|
@@ -492,7 +517,7 @@ expect_error_xl( | |
# check mapping with one single element | ||
tempMapping <- list(data.frame(model_01 = c("feature_01", "feature_02"), | ||
stringsAsFactors = FALSE)) | ||
names(tempMapping) <- "defaults" | ||
names(tempMapping) <- "default" | ||
expect_error_xl( | ||
addMapping(study, mapping = tempMapping), | ||
"mapping object requires at least two models and one feature" | ||
|
@@ -502,7 +527,7 @@ expect_error_xl( | |
tempMapping <- list(data.frame(model_01 = c("feature_01", "feature_02", NA, NA), | ||
model_02 = c(NA, NA, "feature_05", "feature_06"), | ||
stringsAsFactors = FALSE)) | ||
names(tempMapping) <- "defaults" | ||
names(tempMapping) <- "default" | ||
expect_error_xl( | ||
addMapping(study, mapping = tempMapping), | ||
"does not present any feature mapped to another model" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!