meichendong / SCDC

SCDC
42 stars 9 forks source link

SCDC_prop_subcl_marker returns for some cell types proportion prediction several times #30

Closed nickhir closed 2 years ago

nickhir commented 2 years ago

Hello,

I am using your package to deconvolute my bulk RNA seq data. I wanted to try out the SCDC_prop_subcl_marker function, because I have closely related cell types, so I grouped some of these celltypes together in higher level "superclusters".

When I run the deconvolution step using this command:

tree_guided <- SCDC_prop_subcl_marker(bulk.eset = bulk, 
                                                                   sc.eset = sc_qc$sc.eset.qc, 
                                                                   ct.varname = "cell_type", 
                                                                   fl.varname = "supercluster",
                                                                   sample = "sample_name",
                                                                   ct.sub = unique(sc_qc$sc.eset.qc$cell_type),
                                                                   ct.fl.sub = unique(sc_qc$sc.eset.qc$supercluster),
                                                                   select.marker=T)

It runs without a problem. However, when I inspect the predicted proportion, I noticed, that some cell types are recorded twice or even 3 times in different columns that are named exactly the same. For the duplicated cell types, all values are 0 except for one column, where there are the "real" values. If I use the normal deconvolution without tree guidance (SCDC_prop) and leave everything else unchanged, it works exactly as expected and I get predictions for the cell types that I am interested in and nothing is duplicated.

Any insights why this might happen?

nickhir commented 2 years ago

In case somebody observed something similar. For me the problem occurred, because some cell types from cell_type were assigned to different elements of supercluster. If I fixed this, everything worked as intended.