Very minor changes to elaborate in a few places

This commit is contained in:
Sidney Bell
2018-08-07 07:42:45 -07:00
parent 16d7fac88e
commit 12c52a55f7
+10 -10
View File
@@ -60,23 +60,23 @@ _For help with the scanpy engine_
### Scanpy ### Scanpy
To prepare you data you will need to format your data into AnnData format using scanpy and calculate PCA and nearest neighbors and save in h5ad format. To prepare your data you will need to format your data into AnnData format using scanpy and calculate PCA and nearest neighbors and save in h5ad format.
1. [Load data into scanpy](https://scanpy.readthedocs.io/en/latest/api/index.html#exporting) 1. [Load data into scanpy](https://scanpy.readthedocs.io/en/latest/api/index.html#reading)
- Ensure that `obs`'s index is the cell names - Ensure that `obs`'s index is the cell names: `print(data.obs_names)` should show your cell indices. If it shows gene names, you may need to just call `data.transpose()`.
2. Calculate PCA 2. Calculate PCA
sc.pp.pca(data) sc.pp.pca(data) ## sc is scanpy.api
3. Calculate nearest neighbors (depending on layout algorithm) 3. Calculate nearest neighbors (depending on layout algorithm)
``` ```
# For umap layout algorithm # For umap layout algorithm, you need to use the "umap" method for neighbors
sc.pp.neighbors(data, method="umap", metric="euclidean", use_rep="X_pca") sc.pp.neighbors(data, method="umap", metric="euclidean", use_rep="X_pca")
# For tsne layout algorithm # For tsne layout algorithm, you can use either "umap" or "gauss"; we recommend "gauss"
sc.pp.neighbors(data, method="gauss", metric="euclidean", use_rep="X_pca") sc.pp.neighbors(data, method="gauss", metric="euclidean", use_rep="X_pca")
``` ```
@@ -93,9 +93,9 @@ To prepare you data you will need to format your data into AnnData format using
- The config file is a JSON format file with information on the metadata associated with the cells. The key is the column name in obs. The value is an object - The config file is a JSON format file with information on the metadata associated with the cells. The key is the column name in obs. The value is an object
``` ```
type: string, int, or float (what type the values are), type: string, int, or float (what type the values are),
variabletype: categorical or continuous (categorical values are displayed as checkboxes, continuous values are displayed as a histogram) variabletype: categorical or continuous (categorical values are displayed as checkboxes, continuous values are displayed as a histogram)
displayname: (what the heading should be displayed as) displayname: (what the heading should be displayed as)
include: True/False (whether to display values on web interface) include: True/False (whether to display values on web interface)
``` ```
``` ```