Skip to content

Commit

Permalink
v2.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippSpahn committed Dec 9, 2020
1 parent 9b9cca0 commit 0fcb13d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Scripts/PrintStatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

def PrintStatus_Header():
print('**************************************************')
print('Launching PinAPL-Py v2.911')
print('P. Spahn et al., UC San Diego (10/2020)')
print('Launching PinAPL-Py v2.9.2')
print('P. Spahn et al., UC San Diego (12/2020)')
print('**************************************************')

def PrintStatus_SubHeader(msg):
Expand Down
31 changes: 16 additions & 15 deletions Scripts/RankGenes_SigmaFC.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ def SigmaFC_Permutation(P):
N0 = list(sg_table['control mean']);
pi = 0
for j in range(k):
y = np.log10((Nx[j]+delta)/(N0[j]+delta)) # log fold-change
if y < FCmin:
u = np.exp(Lambda*(y-FCmin))
else:
u = 1
# compute fold-change weight (discontinued)
# y = np.log10((Nx[j]+delta)/(N0[j]+delta)) # log fold-change
# if y < FCmin:
# u = np.exp(Lambda*(y-FCmin))
# else:
u = 1
pi_j = u * np.log10((Nx[j]+delta)/(N0[j]+delta))
pi = pi + pi_j
#Pi = w[k]*pi # only w = id supported
Expand All @@ -59,9 +60,9 @@ def compute_SigmaFC(sgRNAList):
alpha_g = config['alpha_g']
ScreenType = config['ScreenType']
num_cores = multiprocessing.cpu_count()
global Lambda; Lambda = -np.log(0.1) # deprecation rate
global FCmin; # deprecation cutoff (log10 fold change). Set to 0 for no deprecation
FCmin = config['FCmin_SigmaFC']
# global Lambda; Lambda = -np.log(0.1) # deprecation rate
# global FCmin; # deprecation cutoff (log10 fold change). DISCONTINUED
# FCmin = config['FCmin_SigmaFC']
global w; # reward function for numbers of signif. sgRNAs
w = config['w_SigmaFC']

Expand Down Expand Up @@ -110,13 +111,13 @@ def compute_SigmaFC(sgRNAList):
Nx = list(sg_table['counts'])
N0 = list(sg_table['control mean'])
pi = 0
for j in range(k):
# compute fold-change weight
y = np.log10((Nx[j]+delta)/(N0[j]+delta)) # log fold-change
if y < FCmin:
u = np.exp(Lambda*(y-FCmin))
else:
u = 1
for j in range(k):
# compute fold-change weight (discontinued)
# y = np.log10((Nx[j]+delta)/(N0[j]+delta)) # log fold-change
# if y < FCmin:
# u = np.exp(Lambda*(y-FCmin))
# else:
u = 1
pi_j = u * np.log10((Nx[j]+delta)/(N0[j]+delta))
pi = pi + pi_j
else:
Expand Down

0 comments on commit 0fcb13d

Please sign in to comment.