Skip to content

Commit

Permalink
Fix spatialdata filtering based on anndata object
Browse files Browse the repository at this point in the history
  • Loading branch information
cavenel committed Oct 25, 2024
1 parent 2f5bc32 commit 0626461
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/quality_controls.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ sc.pl.violin(adata, ['pct_counts_mt', 'pct_counts_ribo', 'pct_counts_hb'],
```{python}
del sdata.tables["table"]
sdata.tables["table"] = adata
# Filtering spatialdata elements based on the anndata elements:
matched_element, _ = spatialdata.match_element_to_table(sdata, sample_id, "table")
sdata[sample_id] = matched_element[sample_id]
sdata.write(os.path.join(artifact_dir, output_sdata))
```

Expand Down

0 comments on commit 0626461

Please sign in to comment.