-
Notifications
You must be signed in to change notification settings - Fork 0
Function help added #55
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds comprehensive function documentation for two main files in the package, with detailed descriptions, parameter explanations, and examples. The documentation follows modern R documentation standards with @importFrom directives and proper formatting.
- Adds detailed function documentation with descriptions, parameters, return values, and examples
- Includes proper @importFrom statements for package dependencies
- Adds executable code examples (some wrapped in \dontrun{} for safety)
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| R/functions_degs.R | Comprehensive documentation for differential expression analysis functions, ORA/GSEA functions, and utility functions |
| R/functions_analysis.R | Complete documentation for matrix operations, normalization, dimensionality reduction, and integration functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| #' deg_result <- DegsRunTest(contrast) | ||
| #' DegsScatterPlot(deg_result, n_label = 10, font_size = 12) | ||
| #' } | ||
| DegsScatterPlot = function(deg_result, n_label=5, font_size=11) { |
Copilot
AI
Sep 25, 2025
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.
The function signature has changed to include a new parameter n_label but the function body still references hardcoded values for top DEGs (line 2072). The parameter should be used consistently throughout the function implementation.
| #' deg_result <- DegsRunTest(contrast) | ||
| #' DegsVolcanoPlot(deg_result, n_label = 10, font_size = 12) | ||
| #' } | ||
| DegsVolcanoPlot = function(deg_result, n_label=5, font_size=11) { |
Copilot
AI
Sep 25, 2025
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.
Similar to DegsScatterPlot, the function signature includes n_label parameter but the function body may still use hardcoded values. Ensure the parameter is properly utilized in the implementation.
| valid_feature_selection_methods = c("vst", "scran") | ||
| assertthat::assert_that(feature_selection_method %in% valid_feature_selection_methods, | ||
| msg=FormatString("Variable features method must must be one of: {valid_feature_selection_methods*}.")) | ||
| msg=FormatString("Variable features method must be one of: {valid_feature_selection_methods*}.")) |
Copilot
AI
Sep 25, 2025
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.
There is a duplicated word 'must' in the error message. It should read 'Variable features method must be one of:' instead of 'must must be'.
R/functions_degs.R
Outdated
| } | ||
|
|
||
| #' Returns an empty Enrichr results table. | ||
| # ' |
Copilot
AI
Sep 25, 2025
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.
There is an extra comment line with '# '' that should be '#'' to maintain consistent roxygen2 documentation formatting.
| # ' | |
| #' |
Added detailed description for functions and examples
@ktrns @andpet0101 have a look