HelenaLC / CATALYST

Cytometry dATa anALYsis Tools
66 stars 30 forks source link

How to remove certain markers/channels after clustering with CATALYST::filterSCE? #365

Closed denvercal1234GitHub closed 11 months ago

denvercal1234GitHub commented 11 months ago

Hi there,

Thank you for the package.

I had performed clustering and dimensionality reduction on my sce object and now proceed with differential expression analysis.

Would you mind advising me how to delete certain channel/markers (i.e., rows of the rowData) from my sce object with CATALYST::filterSCE?

The reason is otherwise some rows within rowData(sce) are actually not true markers but rather just some metadata I added previously, and if I don't remove them, they will be considered as markers in the differential testing.

I tried, but not sure if there is other ways to do it.

F37_sce <- filterSCE(F37_sce, !(channel_name %in% Non_marker_labels_toRemove_vector))

Thank you.

HelenaLC commented 11 months ago

This issue isn't related to CATALYST, but has to do with basic SingleCellExperiment data handling. You can subset markers (rows) the same way as for any array-like object, e.g., data.frame or matrix, i.e., via sce[..., ] where ... is a logical, integer or character vector specifying which rows to keep. Please consult SingleCellExperiment and/or SummarizedExperiment's documentation to familiarize yourself with basic data handling for these classes.