Skip to content
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

89 gsora and gsea. #92

Merged
merged 32 commits into from
Apr 9, 2024
Merged

Conversation

jmitchell81
Copy link
Collaborator

  • getPatternHallmarks changed to getPatternGeneSets
  • getPatternGeneSets can conduct gene set enrichment analysis, ranking features by pattern amplitude, or gene set overrepresentation analysis, for occurrence of gene sets within pattern marker lists.
  • removes usage of msigdbr to query the hallmark gene sets. Gene set inputs are now provided as lists.
  • function to plot the gene set test result updated to plot either enrichment or overrepresentation under the same framework, change the title to reflect which test was used, and change the p-value threshold used to decide which gene sets are rendered on the plot.
  • implements unit tests for the capability to generate gene set test results for enrichment and overrepresentation tests on the GIST data and tests the capability to generate a ggplot object from the plotting function for both test types.

Carries over overrepresentation test from getPatternHallmark
tests enrichment of gene set when ordering genes by pattern amplitude.
Tested gene sets were chosen arbitrarily as the features with the 5 lowest and highest numbers in their names. Prior tests use expect_no_error, which is not a function in my currently installed version of testhat. I will check for updates when I have internet again.
There was a fair amount of overzealous commenting from when I was first learning how to make ggplots.
Saves time and computing by not needing to rerun CoGAPS
I found that the base expect_error function can be used to test for no errors if the expected output is NA in the case there is no error.
with update of testthat to v3.2.1, I am able to use the expect_no_error function
A line will be drawn corresponding to the point on the x-axis that corresponds to an adjusted p-value of 0.05. Also accounts for pulling the data.frame used to plot the waterfall plot if a list containing one enrichment data frame is provided.
Tests that a ggplot is rendered and that the title of the plot reflects if method "overrepresentation" or "enrichment" was used.
Only the data frames inside the patterngeneset list are necessary to generate the waterfall plots. Therefore, the object arguments have been removed.
@dimalvovs dimalvovs self-requested a review April 8, 2024 13:43
@dimalvovs dimalvovs changed the title 89 gsora and gsea 89 gsora and gsea. Apr 8, 2024
@@ -20,15 +20,15 @@ export(getFeatureLoadings)
export(getMeanChiSq)
export(getOriginalParameters)
export(getParam)
export(getPatternHallmarks)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renaming needs to be done in also in /vignettes/CoGAPs.rmd to allow the package to build.
stopping review here as the R CMD build . fails

Replacement of getPatternHallmarks in vignettes now that the function had changed names. Currently uses a placeholder example of testing two hallmark gene sets known to be enriched in pattern 7. The full gene sets are written in the code executed and should be replaced with a direct query of the gene sets from online or a hosted gene set in the package. I would avoid reuse of msigdbr because dependancy on this unstable package was the impetus for these changes in the first place.
Uses the same parameters for patternMarkers as was used in the CoGAPS analysis of the PDAC atlas.
Copy link
Contributor

@dimalvovs dimalvovs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jmitchell81 for adding tests as well as examples to the vignette. LGTM.

@dimalvovs dimalvovs merged commit 1f66cc3 into FertigLab:master Apr 9, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants