Skip to content

Commit 32d7b80

Browse files
committed
feat: added log statement and hint to user that an empty dataframe indicates an incorrect taxon id
Signed-off-by: Josh Loecker <joshloecker@icloud.com>
1 parent 9597584 commit 32d7b80

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

main/como/rnaseq_gen.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ async def _build_matrix_results(
168168
"""
169169
matrix.dropna(subset="ensembl_gene_id", inplace=True)
170170
conversion = await ensembl_to_gene_id_and_symbol(ids=matrix["ensembl_gene_id"].tolist(), taxon=taxon)
171+
172+
# If any one column was
173+
if any(conversion[col].eq("-").all() for col in conversion.columns):
174+
logger.critical(f"Conversion of Ensembl Gene IDs to Entrez IDs and Gene Symbols was empty - is '{taxon}' the correct taxon ID for this data?")
175+
171176
conversion["ensembl_gene_id"] = conversion["ensembl_gene_id"].str.split(",")
172177
conversion = conversion.explode("ensembl_gene_id")
173178
conversion.reset_index(inplace=True, drop=True)

0 commit comments

Comments
 (0)