tidyseurat icon indicating copy to clipboard operation
tidyseurat copied to clipboard

tidyseurat::aggregate_cells doesn't pull all meta.data columns of Seurat object?

Open denvercal1234GitHub opened this issue 1 year ago • 4 comments

Hi there,

Thanks for a great tool.

tidyseurat::aggregate_cells only pull some but not all metadata columns of the original Seurat object.

Would you mind taking a look?

Thank you again.

seuratObj %>% tidyseurat::aggregate_cells(.sample = c(Leiden39PCRes1p2_clusterID_2024Jan09), assays = "SCT", slot = "data", aggregation_function=Matrix::rowSums) |> filter(.feature %in% gene_vector) -> seuratObj_Data

> ncol(seuratObj_Data)
[1] 25
> ncol([email protected])
[1] 92

denvercal1234GitHub avatar Jan 09 '24 16:01 denvercal1234GitHub

Hello,

Only metadata columns relative to samples and features are pulled. the ones about cells do not fit bulk data anymore.

@william-hutchison could you please add a message to the aggregate_cells of tidyseurat and tidySCE communicating this?

Only for tidyseurat also add a second message that says that you can then use tidySE to convert to SE with the code ..

Please @denvercal1234GitHub confirm that such message is very understandable by you. Otherwise please propose an alternative.

stemangiola avatar Jan 09 '24 21:01 stemangiola

The comment that tidyseurat::aggregate_cells only pull sample-level and feature-level metadata columns but not cell-level columns" makes sense.

But, I am confused about the conversion to SE using tidySE? What is it for?

Thank you both.

denvercal1234GitHub avatar Jan 10 '24 09:01 denvercal1234GitHub

actually is tidybulk::as_SummarizedExperiment

you want SE if you do bulk analyses for example. many tools including tidybulk accept SE

stemangiola avatar Jan 10 '24 09:01 stemangiola

I see. tidybulk is to analyze bulk-RNAseq data and not scRNAseq data.

denvercal1234GitHub avatar Jan 10 '24 10:01 denvercal1234GitHub