Skip to content

Commit 242aa73

Browse files
author
Kim
committed
Fixation of Bug (reported by Kai)
1 parent b85f06a commit 242aa73

17 files changed

+5
-5
lines changed

Deconvolution/BLADE.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def grad_Nu(Y, SigmaY, Nu, Omega, Beta, Mu0, Alpha0, Beta0, Kappa0, Ngene, Ncell
180180
NuExp = np.sum(Nu, 0)/Nsample
181181

182182
Diff = np.zeros((Ngene, Ncell))
183-
ExpBetaN = Beta0 + Nsample*(Nsample+3)/2*np.square(Omega) + \
183+
ExpBetaN = Beta0 + (Nsample-1)/2*np.square(Omega) + \
184184
Kappa0*Nsample/(2*(Kappa0 + Nsample)) * (np.square(Omega)/Nsample + np.square(NuExp - Mu0))
185185

186186
for i in range(Nsample):
@@ -278,13 +278,13 @@ def grad_Omega(Y, SigmaY, Nu, Omega, Beta, Mu0, Alpha0, Beta0, Kappa0, Ngene, Nc
278278
# gradient of PX (first term)
279279
AlphaN = Alpha0 + Nsample * 0.5
280280
NuExp = np.sum(Nu, 0)/Nsample
281-
ExpBetaN = Beta0 + Nsample*(Nsample+3)/2*np.square(Omega) + \
281+
ExpBetaN = Beta0 + (Nsample-1)/2*np.square(Omega) + \
282282
Kappa0*Nsample/(2*(Kappa0 + Nsample)) * (np.square(Omega)/Nsample + np.square(NuExp - Mu0))
283283

284284
for i in range(Nsample):
285285
ExpBetaN = ExpBetaN + 0.5*np.square(Nu[i,:,:] - NuExp)
286286

287-
Nominator = - AlphaN * Nsample*(Nsample+3)*Omega + Kappa0 /(Kappa0 + Nsample) * Omega
287+
Nominator = - AlphaN * (Nsample-1)*Omega + Kappa0 /(Kappa0 + Nsample) * Omega
288288
grad_PX = Nominator / ExpBetaN
289289

290290

@@ -565,7 +565,7 @@ def Estep_PX(Mu0, Nu, Omega, Alpha0, Beta0, Kappa0, Ncell, Nsample):
565565
NuExp = np.sum(Nu, 0)/Nsample # expected Nu, Ngene by Ncell
566566
AlphaN = Alpha0 + 0.5*Nsample # Posterior Alpha
567567

568-
ExpBetaN = Beta0 + Nsample*(Nsample+3)/2*np.square(Omega) + \
568+
ExpBetaN = Beta0 + (Nsample-1)/2*np.square(Omega) + \
569569
Kappa0*Nsample/(2*(Kappa0 + Nsample)) * (np.square(Omega)/Nsample + np.square(NuExp - Mu0))
570570

571571
for i in range(Nsample):

LICENSE

100644100755
File mode changed.

PGFdeconvolution/LogNormalvsNB_TCGA.R

100644100755
File mode changed.

PGFdeconvolution/LogNormalvsNB_TCGA.html

100644100755
File mode changed.

PGFdeconvolution/README.md

100644100755
File mode changed.

PGFdeconvolution/TCGA-MESO.RData

100644100755
File mode changed.

PGFdeconvolution/TCGA-SARC.RData

100644100755
File mode changed.

PGFdeconvolution/install.R

100644100755
File mode changed.

PGFdeconvolution/source_estmusigmadist2.R

100644100755
File mode changed.

README.md

100644100755
File mode changed.

Singularity

100644100755
File mode changed.

data/.keep

100644100755
File mode changed.

environment.yml

100644100755
File mode changed.

framework.png

100644100755
File mode changed.

jupyter/BLADE - Demo script.ipynb

100644100755
File mode changed.

logo_final_small.png

100644100755
File mode changed.

setup.py

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="BLADE-Deconvolution",
8-
version="0.0.5",
8+
version="0.0.6",
99
author="Yongsoo Kim",
1010
author_email="anoyaro84@gmail.com",
1111
description="BLADE (Bayesian Log-normAl DEconvolution)",

0 commit comments

Comments
 (0)