wwylab / DeMixT

GNU General Public License v3.0
32 stars 14 forks source link

Hessian matrix for repeated calls to DeMixT #15

Closed d-laub closed 3 years ago

d-laub commented 3 years ago

Hi,

I am trying to run DeMixT multiple times from the same notebook, following a workflow very similar to that of Fig. S11.

image

I noticed that a Hessian is calculated and saved from my first call to DeMixT and then reused for my second call. I just wanted to be sure that the Hessian doesn't need to be recalculated and this is the intended behavior for my use case.

# Get deconvoluted tumor expression using normal samples & stromal-like tumor samples
res.step1 <- DeMixT(data.Y = skcm_se[, skcm_se$Stromal_score > 0 & skcm_se$Immune_score < -2],
                    data.N1 = gtex_se,
                    niter = 30, nthread = 4
                   )

# Save deconvoluted tumor expression
skcm_Xstromal_se = skcm_se[, skcm_se$Stromal_score > 0 & skcm_se$Immune_score < -2]
assays(skcm_Xstromal_se)$skcm = res.step1$ExprT

# Get deconvoluted immune expression using normal samples, purified tumor samples,
# and immune-infiltrated tumor samples
res.step2 <- DeMixT(data.Y = skcm_se[, skcm_se$Immune_score > 1700],
                    data.N1 = gtex_se,
                    data.N2 = skcm_Xstromal_se,
                    niter = 30, nthread = 32 # switched to higher compute node
                   )
# Step 1: Estimation of Proportions
# File for Hessian matrix has existed
# ...

Lastly, I think I grasp the motivations behind partitioning the tumor samples into stromal and immune-like groups. However, it was unclear to me how the ESTIMATE score cutoffs were chosen.

Thank you!

David

ShaolongCao commented 3 years ago

Yes. Save and reuse Hessian matrix for two-component deconvolution is the default option. The ESTIMATE score cutoffs in the pipeline were chosen based on our observations of overall distribution of ESTIMATE score in TCGA HNSC samples. It is cancer-specific cutoff. I suggest you need to look at your data and determine your own cutoffs. The goal of this step is to find samples with relative high tumor proportions.

d-laub commented 3 years ago

Thank you for the clarification!