File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
src/abc_atlas_access/abc_atlas_cache Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 33import pandas as pd
44import numpy as np
55import anndata
6+ import warnings
67from abc_atlas_access .abc_atlas_cache .abc_project_cache import AbcProjectCache
78
89
@@ -50,6 +51,14 @@ def get_gene_data(
5051 # Create a mask for the requested genes.
5152 gene_mask = np .isin (all_genes .gene_symbol , selected_genes )
5253 gene_filtered = all_genes [gene_mask ]
54+ if len (gene_filtered ) > len (selected_genes ):
55+ msg = (
56+ f"You asked for { len (selected_genes )} genes, but "
57+ f"get_gene_data is selecting { len (gene_filtered )} ; "
58+ "probably some of the gene symbols you specified are "
59+ "associated with more than one gene"
60+ )
61+ warnings .warn (msg )
5362
5463 # wait to create output dataframe until we have read in the
5564 # first chunk and know the dtype we need
You can’t perform that action at this time.
0 commit comments