morris-lab/CellTagR

Best way to subset CellTag object

Closed this issue · 2 comments

Hello,

I would like to subset my CellTag object to contain only cells that pass certain RNA QC thresholds. When I try to subset the CellTag object to contain only a list of cells, I repeatedly receive the error object of type 'S4' is not subsettable.

I would like to subset using the whitelisted.data slot. If it is not possible to subset the entire CellTag object, do you recommend a way to subset the whitelisted.data matrix, which would then be compatible with downstream clonecalling analyses?

Thank you!

Hi, we do not have builtin functionality for subsetting objects. However, you can subset the bam.parse.rslt table to your desired cell barcodes and re-run processing steps starting from Section 4: Quantify the CellTag UMI Counts and Generate UMI Count Matrices.

Please do not forget to reset existing CellTag matrices to NULL before re-running processing steps:
celltag.obj@metric.filtered.count <- as(matrix(NA, 0, 0), "dgCMatrix")

Thank you, your solution worked nicely!