Peiyao-Z / zero-count-analysis

MIT License
1 stars 0 forks source link

An attempt to replicate results #2

Open onahman opened 2 years ago

onahman commented 2 years ago

Hi, Inside the file convert_tmp.R : dat1 = readRDS(paste0("./",i,"_sum.rds")) I cannot find where this file is saved.

Could you elaborate on the the running flow? How this file is generated? I made few attempts using the 10X_MK data, but I received different results than what was published. (trying to get the ratios like in figure 3 A) Thanks you for the great work and help!

Peiyao-Z commented 2 years ago

Hi @onahman ,

Thak you for your interest. The process is as follows:

  1. We removed genes with no expression across location and locations with no genes expressed.
  2. We modeled each gene with Poisson, NB, ZIP and ZINB model with total count as offset.
  3. For NB model, we futher check if there are warning appear meaning the algorithm did not converge. We considered using GEE to get the mean and variance and obtained over-dispersed parameter and other estimated values based on those.(check_AIC_offset.R)
  4. In convert_tmp.R. we replaced the estimate values in step 1 with those in step 2 if there's warning appear when simply using NB mode.

I hope this answer your quesion and sorry for the late reply!

Peiyao

mingyudu commented 1 year ago

Hi,

I wonder which file/function is for the step 2. Thanks!

Peiyao-Z commented 1 year ago

Hi @mingyudu,

Step 2 utilized function gene-wise_offset.R. Let me know if you have other questions!

Best, Peiyao

mingyudu commented 1 year ago

Hi, Thanks for your timely reply.

Also, in check_AIC_offset.R, what's the difference between the function lik and compare? The function lik has already generated the output 'mom_vsP' and 'mom_vsZINB' and the function compare generated them again. Are they the same?

Peiyao-Z commented 1 year ago

Hi @mingyudu ,

Yes they are the same. I'll update the code. Thanks for pointing this out!

Best, Peiyao