Skip to content

Commit

Permalink
fix: throw error for empty gene lists in enrich
Browse files Browse the repository at this point in the history
  • Loading branch information
quasi-deus committed Sep 11, 2024
1 parent db4517a commit 1d0b4c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gseapy/enrichr.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ def parse_genelists(self) -> str:
for gene in f:
genes.append(gene.strip())

if not genes:
raise ValueError("Gene list cannot be empty")

self._isezid = all(map(self._is_entrez_id, genes))
if self._isezid:
self._gls = set(map(int, genes))
Expand Down

0 comments on commit 1d0b4c4

Please sign in to comment.