Repository navigation
Conversation
mergeDifexp() now returns list(matrix, metadata) instead of a bare matrix. `metadata` is a data frame with one row per matrix column, in column order and with the column names as row names: signature_name, the database signature_id (NA for supplied objects), every scalar field of each signature's metadata (vector fields collapsed with "; ", nested lists such as `others` left out) and n_features, the non-NA count of that column. It plays the role of a SummarizedExperiment's colData while staying plain base R so it survives export outside R. To know which database id each fetched signature came from, fetchCompareSignatures() now also returns `ids`, and resolveCompareSignatureList() gains `with_ids = TRUE` to pass them on. compareSignatures() is unchanged. Closes #282 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #282
What changed
mergeDifexp()returnslist(matrix, metadata)instead of a bare matrix.metadatais a data frame with one row per matrix column (same order, row names = column names) holdingsignature_name, the databasesignature_id(NAfor supplied objects), every scalar metadata field of the signatures (vector fields such askeywordscollapsed with"; ", nested lists such asothersleft out) andn_features. It plays the role of a SummarizedExperiment'scolDatawithout the Bioconductor dependency, so the pair stays usable outside R. Callers that used the result as a matrix need$matrix; nothing outside the function's own tests did yet.To carry the database ids,
fetchCompareSignatures()also returnsidsandresolveCompareSignatureList()gainswith_ids = TRUE.compareSignatures()is unchanged.How it was verified
The roxygen example on the bundled signatures prints:
New tests cover: list shape, one metadata row per column in column order with matching row names, scalar fields and types, vector collapse, nested-list drop,
NAfor a field missing from one signature,n_featuresunder union and intersect, dropped signatures absent from the table, andsignature_idfilled for fetched vsNAfor supplied signatures.Checklist
Closes #NNNis filled in aboveNEWS.mdhas a bullet for this change, or the PR is labelledno-changelog🤖 Generated with Claude Code