Skip to content

Commit

Permalink
Added support for single sample gsva
Browse files Browse the repository at this point in the history
  • Loading branch information
PauBadiaM committed Aug 8, 2024
1 parent 1f12c5b commit e7b9d44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion decoupler/method_gsva.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ def gsva(mat, net, kcdf=False, maxdiff=True, absrnk=False, verbose=False):
if issparse(mat):
mat = mat.toarray()
# Get feature Density
mat = density(mat, kcdf=kcdf)
if mat.shape[0] > 1:
mat = density(mat, kcdf=kcdf)
else:
mat = mat.astype(float)
ord, rst = order_rankstat(mat)

# Run GSVA for each feature set
Expand Down

0 comments on commit e7b9d44

Please sign in to comment.