Skip to content

Comments

[r] add print method for dim reductions#115

Merged
immanuelazn merged 2 commits intoia/lsi-iterativefrom
ia/dim-reduction-print-method
Apr 15, 2025
Merged

[r] add print method for dim reductions#115
immanuelazn merged 2 commits intoia/lsi-iterativefrom
ia/dim-reduction-print-method

Conversation

@immanuelazn
Copy link
Owner

@immanuelazn immanuelazn commented Apr 14, 2025

User description

Check out reference pages for IterativeLSI() and LSI() to have a better clue of what these look like.

I took a generally simple approach for a print method, and am only providing cell embedding sizes, feature names, and param names in fitted_params. Styling is relatively similar to what was provided with IterableMatrix and IterableFragment objects. I tried to do some wrapping so each line only outputs 5 objects at a time. I might replace this with the tibble::str_wrap() method since it seems to be a little bit more elegant.


PR Type

Enhancement, Documentation


Description

  • Added a print method for DimReduction objects.

  • Enhanced examples in LSI and IterativeLSI documentation.

  • Updated namespace to include print.DimReduction S3 method.


Changes walkthrough 📝

Relevant files
Configuration changes
NAMESPACE
Register `print.DimReduction` in namespace.                           

r/NAMESPACE

  • Added print.DimReduction as an S3 method.
+1/-0     
Enhancement
singlecell_utils.R
Add `print.DimReduction` method for formatted output.       

r/R/singlecell_utils.R

  • Implemented print.DimReduction method for better object display.
  • Added formatted output for embeddings, features, and parameters.
  • +28/-1   
    Documentation
    IterativeLSI.Rd
    Update `IterativeLSI` documentation with examples.             

    r/man/IterativeLSI.Rd

  • Enhanced examples with dim_reduction output display.
  • Improved documentation formatting.
  • +2/-1     
    LSI.Rd
    Update `LSI` documentation with examples.                               

    r/man/LSI.Rd

  • Enhanced examples with lsi_result output display.
  • Improved documentation formatting.
  • +1/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Repository owner deleted a comment from qodo-code-review bot Apr 14, 2025
    Repository owner deleted a comment from qodo-code-review bot Apr 14, 2025
    @immanuelazn immanuelazn merged commit 88f9c20 into ia/lsi-iterative Apr 15, 2025
    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