Skip to content

Commit 13645ea

Browse files
authored
Merge pull request #338 from AlexsLemonade/allyhawkins/scanpy-compatibility-updates
Updates to AnnData contents based on new scanpy compatibility
2 parents 391982b + fc2ccc8 commit 13645ea

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

docs/getting_started.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ Dimensionality reduction results can be accessed in the `AnnData` objects using
146146

147147
```python
148148
# principal component analysis results
149-
processed_adata.obsm["X_PCA"]
149+
processed_adata.obsm["X_pca"]
150150

151151
# UMAP results
152-
processed_adata.obsm["X_UMAP"]
152+
processed_adata.obsm["X_umap"]
153153
```
154154

155155
See below for more resources on dimensionality reduction:
@@ -179,6 +179,8 @@ This list can be accessed using the following command in the `AnnData` objects:
179179
processed_adata.uns["highly_variable_genes"]
180180
```
181181

182+
Additionally, the `AnnData` objects contain a column in the `.var` slot, `"highly_variable"`, indicating whether or not a gene is found in the list of highly variable genes.
183+
182184
### Clustering
183185

184186
Cluster assignments obtained from [Graph-based clustering](http://bioconductor.org/books/3.16/OSCA.basic/clustering.html#clustering-graph) is also available in the processed objects.

docs/merged_objects.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,15 +394,15 @@ Additional experiment metadata is available in the {ref}`metadata TSV file inclu
394394

395395
### AnnData dimensionality reduction results
396396

397-
The merged `AnnData` object contains a slot `.obsm` with both principal component analysis (`X_PCA`) and UMAP (`X_UMAP`) results.
397+
The merged `AnnData` object contains a slot `.obsm` with both principal component analysis (`X_pca`) and UMAP (`X_umap`) results.
398398

399399
For information on how PCA and UMAP results were calculated see the {ref}`section on processed gene expression data <processing_information:Processed gene expression data>`.
400400

401401
The following command can be used to access the PCA and UMAP results:
402402

403403
```python
404-
merged_adata_object.obsm["X_PCA"] # pca results
405-
merged_adata_object.obsm["X_UMAP"] # umap results
404+
merged_adata_object.obsm["X_pca"] # pca results
405+
merged_adata_object.obsm["X_umap"] # umap results
406406
```
407407

408408

docs/sce_file_contents.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ The `AnnData` object also includes the following additional gene-level metadata
427427
| Column name | Contents |
428428
| ------------- | ---------------------------------------------------------------- |
429429
| `is_feature_filtered` | Boolean indicating if the gene or feature is filtered out in the normalized matrix but is present in the raw matrix |
430+
| `highly_variable` | Boolean indicating if the gene or feature is found in the highly variable gene list determined using `scran::modelGeneVar` and `scran::getTopHVGs`. Only present for `processed` objects |
430431

431432

432433
### AnnData experiment metadata
@@ -447,20 +448,21 @@ The `AnnData` object also includes the following additional items in the `.uns`
447448
| Item name | Contents |
448449
| ------------- | ---------------------------------------------------------------- |
449450
| `schema_version` | CZI schema version used for `AnnData` formatting |
451+
| `pca` | A dictionary object containing the parameters and variance weights associated with the PCA matrix found in `.obsm["X_pca"]`. Only available for processed objects |
450452

451453

452454
### AnnData dimensionality reduction results
453455

454-
The H5AD file containing the processed `AnnData` object (`_processed_rna.h5ad`) contains a slot `.obsm` with both principal component analysis (`X_PCA`) and UMAP (`X_UMAP`) results.
456+
The H5AD file containing the processed `AnnData` object (`_processed_rna.h5ad`) contains a slot `.obsm` with both principal component analysis (`X_pca`) and UMAP (`X_umap`) results stored as a `numpy.ndarray`.
455457
For all other H5AD files, the `.obsm` slot will be empty as no dimensionality reduction was performed.
456458

457459
For information on how PCA and UMAP results were calculated see the {ref}`section on processed gene expression data <processing_information:Processed gene expression data>`.
458460

459461
The following command can be used to access the PCA and UMAP results:
460462

461463
```python
462-
adata_object.obsm["X_PCA"] # pca results
463-
adata_object.obsm["X_UMAP"] # umap results
464+
adata_object.obsm["X_pca"] # pca results
465+
adata_object.obsm["X_umap"] # umap results
464466
```
465467

466468
### Additional AnnData components for CITE-seq libraries (with ADT tags)

0 commit comments

Comments
 (0)