Skip to content

Commit

Permalink
BugFix: Incorrect warning message.
Browse files Browse the repository at this point in the history
BugFix: Incorrect warning message about number of genes being present in expression matrix when calculating recovery (based on #57).
  • Loading branch information
bramvds committed Mar 8, 2019
1 parent 1b14095 commit d9a2106
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyscenic/recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def enrichment4cells(rnk_mtx: pd.DataFrame, regulon: Type[GeneSignature], auc_th
names=["Cell", "Regulon"])

rnk = rnk_mtx.iloc[:,rnk_mtx.columns.isin(regulon.genes)]
if rnk.empty or float(len(rnk))/len(regulon) < 0.80:
if rnk.empty or float(len(rnk.columns))/len(regulon) < 0.80:
LOGGER.warning("Less than 80% of the genes in {} are present in the expression matrix.".format(regulon.name))
return pd.DataFrame(index=index, data={"AUC": np.zeros(shape=(rnk_mtx.shape[0]), dtype=np.float64)})
else:
Expand Down

0 comments on commit d9a2106

Please sign in to comment.