satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.26k stars 905 forks source link

getting back the original count matrix after integration #9014

Closed Huimin721 closed 3 months ago

Huimin721 commented 3 months ago

Dear team,

Thank you so much for developing this outstanding tool. After the update, I noticed that the count matrix is split into counts.1, counts.2, and so on, in object[["RNA"]]@layers. To revert to the original count matrix, should I:

  1. Combine the counts.1, counts.2, etc., in sequence of the numbers
  2. Set the column names of the combined matrix to the names of Idents(object)

Is this correct? Additionally, what would you recommend as the best method to retrieve the original full count matrix and the full normalized count matrix?

Thank you for your assistance, and please let me know if any part of my question is unclear.

Best regards, Huimin

zskylarli commented 3 months ago

Hi - to obtain the full counts matrix, please run JoinLayers as we demonstrate in our Seurat v5 commands list. If the object does not have data.1, data.2 etc., you can rerun NormalizeData to obtain the normalized counts matrix after joining the layers. Please let me know if you run into further issues!