AlexsLemonade / OpenScPCA-analysis

An open, collaborative project to analyze data from the Single-cell Pediatric Cancer Atlas (ScPCA) Portal
Other
5 stars 14 forks source link

Extract PC matrix within clustering function (2/2) #759

Closed sjspielman closed 1 week ago

sjspielman commented 2 weeks ago

Closes #754

This PR does the second half of #754 and allows calculate_clusters() to take a single-cell object instead of only a matrix. I'm opening this as a draft because I couldn't pick between two ways of doing this..so I implemented them both. Which general approach should we go with (noting it might be a little bit "why not both"!)?

sjspielman commented 2 weeks ago

I think you may have overcomplicated things!

Me?!

But in all seriousness, yes. What you have suggested is more or less my first commit, so I'll just revert and get back on track there!

jashapiro commented 2 weeks ago
  • While writing docs for it though, it felt odd strange to describe the default pc_name argument behavior in the clustering function when the extract function was actually defining those defaults.

Just write something like "optional pc_name argument passed to extract_pc_matrix"

sjspielman commented 2 weeks ago

Should be ready for a real look now. Note that I ended up exporting extract_pc_matrix (so I also wrote some quick examples) since we refer to it in the calculate_cluster docs now.