Skip to content

Commit

Permalink
updated docs for run_umap API change
Browse files Browse the repository at this point in the history
  • Loading branch information
parashardhapola committed Jul 30, 2021
1 parent a8fb23f commit d414eb1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/source/vignettes/basic_tutorial_scATACseq.mdnb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Non-linear dimension reduction using UMAP and tSNE are performed in the same way
<!-- #endregion -->

```python
ds.run_umap(fit_n_epochs=250, min_dist=0.5, parallel=True)
ds.run_umap(n_epochs=250, min_dist=0.5, parallel=True)
```

```python
Expand Down
2 changes: 1 addition & 1 deletion docs/source/vignettes/basic_tutorial_scRNAseq.mdnb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ ds.make_graph(feat_key='hvgs', k=11, dims=15, n_centroids=100)
Next we run UMAP on the graph calculated above. Here we will not provide which cell key or feature key to be used, because we want the UMAP to run on all the cells that were not filtered out and with the feature key used to calculate the latest graph. We can provide the parameter values for the UMAP algorithm here.

```python
ds.run_umap(fit_n_epochs=250, spread=5, min_dist=1, parallel=True)
ds.run_umap(n_epochs=250, spread=5, min_dist=1, parallel=True)
```

The UMAP results are saved in the cell metadata table as seen below in columns: **RNA_UMAP1** and **RNA_UMAP2**
Expand Down
2 changes: 1 addition & 1 deletion docs/source/vignettes/data_projection.mdnb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Scarf introduces Unified UMAPs, a strategy to embed target cells onto the refere

```python
ds_ctrl.run_unified_umap(target_names=['stim'], ini_embed_with='RNA_UMAP', target_weight=1,
use_k=5, fit_n_epochs=100, tx_n_epochs=10)
use_k=5, n_epochs=100)
```

Since the results of unified embedding contain 'foreign' cells, `plot_layout` function cannot be used to visualize all the cells. A specialized method, `plot_unified_layout` takes care of this issue. The following example shows co-embedded control (reference) and stimulated (target) PBMCs.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/vignettes/merging_datasets.mdnb
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ ds.make_graph(feat_key='hvgs', k=21, dims=25, n_centroids=100)
Calculating UMAP embedding of cells:

```python
ds.run_umap(fit_n_epochs=250, spread=5, min_dist=1, parallel=True)
ds.run_umap(n_epochs=250, spread=5, min_dist=1, parallel=True)
```

```python
Expand Down Expand Up @@ -185,7 +185,7 @@ ds.make_graph(feat_key='hvgs', k=21, dims=25, n_centroids=100, pca_cell_key='is_
We run UMAP as usual, but the UMAP embeddings are saved in a new cell attribute column so as to not overwrite the previous UMAP values. The new column will be called `RNA_pUMAP`; 'RNA' is automatically prepend because the assay name is `RNA`

```python
ds.run_umap(fit_n_epochs=250, spread=5, min_dist=1, parallel=True, label='pUMAP')
ds.run_umap(n_epochs=250, spread=5, min_dist=1, parallel=True, label='pUMAP')
```

Visualize the new UMAP
Expand Down
4 changes: 2 additions & 2 deletions docs/source/vignettes/multiple_modalities.mdnb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Now we process the RNA assay to perform feature selection, create KNN graph, run
```python
ds.mark_hvgs(min_cells=20, top_n=500, min_mean=-3, max_mean=2, max_var=6)
ds.make_graph(feat_key='hvgs', k=11, dims=15, n_centroids=100)
ds.run_umap(fit_n_epochs=250, spread=5, min_dist=1, parallel=True)
ds.run_umap(n_epochs=250, spread=5, min_dist=1, parallel=True)
ds.run_leiden_clustering(resolution=1)
```

Expand Down Expand Up @@ -153,7 +153,7 @@ ds.make_graph(from_assay='ADT', feat_key='I', k=11, dims=11, n_centroids=100)
UMAP and clustering can be run on ADT assay by simply setting `from_assay` parameter value to 'ADT':

```python
ds.run_umap(from_assay='ADT', fit_n_epochs=250, spread=5, min_dist=1, parallel=True)
ds.run_umap(from_assay='ADT', n_epochs=250, spread=5, min_dist=1, parallel=True)
ds.run_leiden_clustering(from_assay='ADT', resolution=1)
```

Expand Down

0 comments on commit d414eb1

Please sign in to comment.