File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning][].
22
22
23
23
- Update template to v0.5.0 ([ #608 ] ( https://github.com/scverse/scirpy/pull/608/ ) , [ #606 ] ( https://github.com/scverse/scirpy/pull/606/ ) )
24
24
25
+ ### Documentation
26
+
27
+ - Fix code snippet for merging AIRR data into unimodal AnnData in "data structure" section ([ #620 ] ( https://github.com/scverse/scirpy/pull/620/ ) )
28
+
25
29
## v0.22.0
26
30
27
31
### Fixes
Original file line number Diff line number Diff line change @@ -177,9 +177,9 @@ Here is one way how the AIRR data can be merged into an AnnData object that alre
177
177
# Map each cell barcode to its respective numeric index (assumes obs_names are unique)
178
178
barcode2idx = {barcode: i for i, barcode in enumerate (adata_airr.obs_names)}
179
179
# Generate a slice for the awkward array that retrieves the corresponding row
180
- # from `adata_airr` for each barcode in `adata_gex`. `-1` will generate all
181
- # "None"s for barcodes that are not in `adata_airr`
182
- idx = [barcode2idx.get(barcode, - 1 ) for barcode in adata_gex.obs_names]
180
+ # from `adata_airr` for each barcode in `adata_gex`.
181
+ # "None" will be used for barcodes that are not in `adata_airr`
182
+ idx = [barcode2idx.get(barcode, None ) for barcode in adata_gex.obs_names]
183
183
adata_gex.obsm[" airr" ] = adata_airr.obsm[" airr" ][idx]
184
184
185
185
You can’t perform that action at this time.
0 commit comments