Skip to content

Commit

Permalink
fix request_PPI() function
Browse files Browse the repository at this point in the history
  • Loading branch information
nargesr committed Mar 15, 2024
1 parent b0007b6 commit c81a0ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PyWGCNA/wgcna.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def goodGenesFun(datExpr, weights=None, useSamples=None, useGenes=None, minFract
# TODO:colWeightedVars
var = np.var(datExpr, w=weights)

var[np.isnan(var)] = 0
var[pd.isnull(var)] = 0
nNAsGenes = datExpr.loc[gg, useSamples].isna().sum(axis=1)
gg[gg] = np.logical_and(np.logical_and(nNAsGenes < (1 - minFraction) * nSamples, var > tol ** 2),
nSamples - nNAsGenes >= minNSamples)
Expand Down Expand Up @@ -3544,8 +3544,8 @@ def request_PPI_subset(params,
for line in response.text.strip().split("\n"):
l = line.strip().split("\t")

res = res.append({'gene1': l[2], 'gene2': l[3], 'score': l[5]},
ignore_index=True)
tmp = pd.DataFrame({'gene1': l[2], 'gene2': l[3], 'score': l[5]}, index=[0])
res = pd.concat([res, tmp], ignore_index=True)

sleep(1)

Expand Down

0 comments on commit c81a0ee

Please sign in to comment.