carmonalab / UCell

Gene set scoring for single-cell data
GNU General Public License v3.0
135 stars 16 forks source link

Using markers coming from RNA and ADT #29

Closed CoenzymeQ10 closed 1 year ago

CoenzymeQ10 commented 1 year ago

Hello! I wanted to know if there is a way for me to use get a UCell score while using signature markers from both RNA and ADT? I can't seem to find ADT markers examples in the documentation for UCell.

mass-a commented 1 year ago

Hello! yes you should be able to apply UCell on ADT counts by specifying assay = "ADT" to the UCell functions.

Because the dimensionality of the ADT data is going to be a lot smaller than the RNA (probably up to a few hundred protein tags), you will need to adjust the maxRank parameter. This parameter tells UCell how many variables to consider for ranking (any rank > maxRank is considered a zero). For ADT data, the total number of tags divided by two is normally a reasonable choice: maxRank <- nrow(obj@assays$ADT)/2

You can find one example here (scroll to the part where it uses the ADT assay): https://carmonalab.github.io/scGate.demo/scGate.CITE-seq.html#purify-b-cells

-m

CoenzymeQ10 commented 1 year ago

Thank you for sharing this example about ADT usage! I was actually wondering it I would be able to simultaneously use ADT and RNA in the same UCell run - e.g. use markers that come from both the ADT and RNA in the list. At the moment, the hacky way I've tried to do this is by merging the ADT and RNA matrices into one, making a new assay called "adt_rna" and setting that assay as the default assay for Ucell to call.

Is there a more principle way to do this? If the work around is okay, would I need to adjust any other parameters in the function?

Thanks again!

mass-a commented 1 year ago

I am not sure that merging the two assays is a great idea, they probably have very different distributions of values and unequal numbers of detected genes/proteins.

Would it make sense to calculate a UCell_RNA score based on gene signatures and the RNA assay, a UCell_ADT score based on surface protein signatures and the ADT assay, and then combine the two scores for each cell (e.g. per-cell average)? this would also allow you to calculate correlations between the two scores, and assess whether the signatures work well on the two assays.

-m

CoenzymeQ10 commented 1 year ago

Thanks for this helpful answer. Do you recommend averaging (linear or geometric?) of the score to combined the scores or is there another way to combine the scores that make sense based on the score calculation method.

mass-a commented 1 year ago

A simple arithmetic mean of the two signature scores per cell should do the job. It could also be a weighted mean, if you have different relative confidence in the ADT and RNA readouts.