Skip to content

Append samples #105

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

Merged
merged 3 commits into from
Jul 11, 2025
Merged

Append samples #105

merged 3 commits into from
Jul 11, 2025

Conversation

stemangiola
Copy link
Collaborator

No description provided.

…e bind_rows in favor of append_samples. Update documentation and tests accordingly.
…n dplyr_methods.R, and delete the corresponding Rd file. Update examples to be hidden from documentation.
@stemangiola stemangiola requested a review from Copilot July 10, 2025 11:32
Copy link

@Copilot 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 introduces a new append_samples() method for combining SummarizedExperiment objects by samples, deprecates the existing bind_rows() method in favor of the new API, and updates related documentation, tests, and examples.

  • Soft-deprecate bind_rows.SummarizedExperiment() and add a lifecycle warning pointing to append_samples().
  • Implement append_samples.SummarizedExperiment(), add its Rd file, and update the vignette with usage examples.
  • Remove the old bind_rows.Rd, update tests to target append_samples(), bump package version to 1.19.5 and update dependencies.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
R/dplyr_methods.R Added append_samples.SummarizedExperiment(), deprecation warning in bind_rows
man/append_samples.Rd New documentation for append_samples()
man/bind_rows.Rd Removed deprecated bind_rows documentation
tests/testthat/test-dplyr_methods.R Switched tests to append_samples() and basic result assertions
vignettes/introduction.Rmd Added vignette section demonstrating append_samples()
inst/NEWS.rd News entry deprecating bind_rows() in favor of append_samples()
DESCRIPTION Bumped version to 1.19.5, updated ttservice dependency
NAMESPACE Exported append_samples S3 method and updated imports
Comments suppressed due to low confidence (3)

tests/testthat/test-dplyr_methods.R:13

  • Add a test case for a scenario where append_samples() produces duplicated sample names to verify that a warning is issued and that colnames() are made unique as intended.
    expect_true(inherits(pasilla_bind, "SummarizedExperiment"))

R/dplyr_methods.R:88

  • [nitpick] The variable name tts is ambiguous. Rename it to a more descriptive name like se_list or experiments to improve readability.
    tts <- flatten_if(list(x, ...), is_spliced)

colnames(new_obj) <- unique_colnames

# Change also all assays colnames
assays(new_obj) <- assays(new_obj)@listData |> lapply(function(.x) {
Copy link
Preview

Copilot AI Jul 10, 2025

Choose a reason for hiding this comment

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

Directly accessing the @listData slot is discouraged. Instead, consider using assays(new_obj) as a SimpleList and applying lapply() over its elements, then reassigning via SimpleList() to avoid relying on internal slots.

Suggested change
assays(new_obj) <- assays(new_obj)@listData |> lapply(function(.x) {
assays(new_obj) <- lapply(assays(new_obj), function(.x) {

Copilot uses AI. Check for mistakes.

@stemangiola stemangiola merged commit b0c95b8 into master Jul 11, 2025
5 of 15 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.

1 participant