Hi BEAN developers,
I think I found a possible issue with bean create-screen after the recent addition of -b/--X-bcmatch.
When I run:
bean create-screen
-e edit.counts.csv
-b var_mini_counts.csv
var_mini_guides.csv
sample_list_survival.csv
var_mini_counts.csv
the generated .h5ad contains both edits and X_bcmatch layers, but both layers appear to contain the same data from var_mini_counts.csv.
I suspect the issue is in perturb_tools/_readwrite/_funcs/_read_screen_from_csvs.py, inside read_csvs(). When layers_filenames_dict contains multiple layer files, the code appears to read each file in a loop but stores the result in the same variable, layer_df. Later, when constructing the final layers_dict, this last layer_df may be reused for all layer keys. As a result, if both "edits" and "X_bcmatch" are provided, both layers end up containing the data from the last loaded file, which in my case is X_bcmatch.
Hi BEAN developers,
I think I found a possible issue with
bean create-screenafter the recent addition of-b/--X-bcmatch.When I run:
bean create-screen
-e edit.counts.csv
-b var_mini_counts.csv
var_mini_guides.csv
sample_list_survival.csv
var_mini_counts.csv
the generated .h5ad contains both edits and X_bcmatch layers, but both layers appear to contain the same data from var_mini_counts.csv.
I suspect the issue is in
perturb_tools/_readwrite/_funcs/_read_screen_from_csvs.py, insideread_csvs(). Whenlayers_filenames_dictcontains multiple layer files, the code appears to read each file in a loop but stores the result in the same variable,layer_df. Later, when constructing the finallayers_dict, this lastlayer_dfmay be reused for all layer keys. As a result, if both"edits"and"X_bcmatch"are provided, both layers end up containing the data from the last loaded file, which in my case isX_bcmatch.