Skip to content

Commit

Permalink
Fixation of Bug (reported by Kai)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim committed May 4, 2021
1 parent b85f06a commit 242aa73
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Deconvolution/BLADE.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def grad_Nu(Y, SigmaY, Nu, Omega, Beta, Mu0, Alpha0, Beta0, Kappa0, Ngene, Ncell
NuExp = np.sum(Nu, 0)/Nsample

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

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

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

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


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

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

for i in range(Nsample):
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified PGFdeconvolution/LogNormalvsNB_TCGA.R
100644 → 100755
Empty file.
Empty file modified PGFdeconvolution/LogNormalvsNB_TCGA.html
100644 → 100755
Empty file.
Empty file modified PGFdeconvolution/README.md
100644 → 100755
Empty file.
Empty file modified PGFdeconvolution/TCGA-MESO.RData
100644 → 100755
Empty file.
Empty file modified PGFdeconvolution/TCGA-SARC.RData
100644 → 100755
Empty file.
Empty file modified PGFdeconvolution/install.R
100644 → 100755
Empty file.
Empty file modified PGFdeconvolution/source_estmusigmadist2.R
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified Singularity
100644 → 100755
Empty file.
Empty file modified data/.keep
100644 → 100755
Empty file.
Empty file modified environment.yml
100644 → 100755
Empty file.
Empty file modified framework.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified jupyter/BLADE - Demo script.ipynb
100644 → 100755
Empty file.
Empty file modified logo_final_small.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion setup.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="BLADE-Deconvolution",
version="0.0.5",
version="0.0.6",
author="Yongsoo Kim",
author_email="[email protected]",
description="BLADE (Bayesian Log-normAl DEconvolution)",
Expand Down

0 comments on commit 242aa73

Please sign in to comment.