Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Fix small issue: index should be accessed from metadata_subset
Browse files Browse the repository at this point in the history
  • Loading branch information
dweemx committed Aug 27, 2020
1 parent a4e596d commit 1c8aca5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/bin/sc_h5ad_annotate_by_cell_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
metadata.index.isin(adata.obs.index.values))
]
# Check if all elements from the metadata subset are present in the given input file (h5ad file)
if np.sum(np.isin(adata.obs.index, metadata_subset)) != len(adata.obs):
if np.sum(np.isin(adata.obs.index, metadata_subset.index)) != len(adata.obs):
raise Exception(f"Make sure the sample IDs inferred from the data files (e.g.: {args.sample_id}) exist in the column {args.sample_column_name} of the following metadata file ({args.cell_meta_data_file_path.name}) you provided in params.sc.cell_annotate.cellMetaDataFilePath.")

# Annotate
Expand Down

0 comments on commit 1c8aca5

Please sign in to comment.