AlexsLemonade / scpcaTools

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Use AddMetaData #241

Closed jashapiro closed 1 year ago

jashapiro commented 1 year ago

Closes #239

This ended up a pretty small fix: I used the AddMetaData Seurat function rather than adding directly to the slot. I think we actually were adding the wrong slot anyway: we had been using var.features, whereas I think the correct slot was meta.features all along. Which can be accessed with just object[[assay]][[]] as I do in the tests now.

I think I could have used object[[assay]][[]] <- rowdata, but this seemed safer.

I tested with both Seurat 4.4 and 5.0, and both seemed to work on my machine.