We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9031f99 commit aa934f8Copy full SHA for aa934f8
1 file changed
malariagen_data/anoph/genome_features.py
@@ -372,6 +372,11 @@ def canonical_transcript(
372
# Normalize input: strip whitespace
373
gene_normalized = gene.strip()
374
375
+ # Reject empty identifiers after normalization to avoid ambiguous matches
376
+ if not gene_normalized:
377
+ raise ValueError(
378
+ "Gene identifier is empty after stripping whitespace; please provide a valid gene ID or name."
379
+ )
380
# Try exact ID match first (case-sensitive)
381
debug(f"Attempting ID match for '{gene_normalized}'")
382
gene_id_match = df_genes[df_genes["ID"].str.strip() == gene_normalized]
0 commit comments