Skip to content

Conversation

@rajinder4489
Copy link
Collaborator

Added detailed description for functions and examples
@ktrns @andpet0101 have a look

@andpet0101 andpet0101 requested a review from Copilot September 25, 2025 06:47
Copy link

Copilot AI left a 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) {
Copy link

Copilot AI Sep 25, 2025

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.

Copilot uses AI. Check for mistakes.
#' deg_result <- DegsRunTest(contrast)
#' DegsVolcanoPlot(deg_result, n_label = 10, font_size = 12)
#' }
DegsVolcanoPlot = function(deg_result, n_label=5, font_size=11) {
Copy link

Copilot AI Sep 25, 2025

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.

Copilot uses AI. Check for mistakes.
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*}."))
Copy link

Copilot AI Sep 25, 2025

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'.

Copilot uses AI. Check for mistakes.
}

#' Returns an empty Enrichr results table.
# '
Copy link

Copilot AI Sep 25, 2025

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.

Suggested change
# '
#'

Copilot uses AI. Check for mistakes.
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