CellexalVR
1.1.0
A virtual reality platform for the exploration and analysis of single-cell gene expression data
|
Class to handle the communication between the REST-ful scarf api and CellexalVR. The api is a flask app that gets http requests and sends back data in json format. The cellexal-scarf web api can be found here: https://github.com/sonejilab/scarf_for_cellexalvr/ More...
Public Member Functions | |
void | SetZarrLoc (string loc) |
void | LoadPreprocessedData (string label, string layoutKey="RNA_UMAP") |
IEnumerator | LoadPreprocessedDataCouroutine (string label, string layoutKey) |
Load data into CellexalVR that has been preprocessed in scarf. More... | |
void | InitServer () |
Initializes the flask app that runs the api. Start in a seperate thread. More... | |
IEnumerator | GetDatasetsCoroutine () |
Retrieves the scarf datasets in the data folder. More... | |
IEnumerator | ConvertToZarrCoroutine (string dataLabel, string rawData) |
Convert h5 raw data to zarr format. More... | |
IEnumerator | StageDataCoroutine (string dataLabel) |
Prepares the scarf object to work with. More... | |
IEnumerator | MarkHVGSCoroutine (string topN, VisualElement running, VisualElement done) |
Calls the scarf backend function to marks highly variable genes in the staged data. More... | |
IEnumerator | MakeNeighborhoodGraphCoroutine (string featureKey, VisualElement running, VisualElement done) |
Calls the scarf function to create a neighborhood graph. More... | |
IEnumerator | RunClusteringCoroutine (string resolution, VisualElement running, VisualElement done) |
Calls the scarf function to do clustering. Requires the neighborhood graph to be made. More... | |
IEnumerator | RunUMAPCoroutine (string nEpochs, VisualElement running, VisualElement done) |
Calls the scarf function to create a umap. Requires the neighborhood graph to be made. More... | |
IEnumerator | GetFeatureNames () |
Calls the scarf function to retrieve the feature names present in the dataset. This can be gene names or other features. More... | |
IEnumerator | GetCellValues (string valueKey) |
Retrieves the cell values for a specific feature key. This can be a gene or some other feature present in your dataset. More... | |
IEnumerator | ColorByClusters (string clusterName) |
Retrieves the cell values for the clustering and then colors the graphs accordingly. More... | |
IEnumerator | ColorByGene (string geneName) |
Retrieves the cell values for the given gene or other feature and then colors the graphs accordingly. More... | |
IEnumerator | RunMarkerSearch (string groupKey, float threshold) |
Find marker genes in the dataset. More... | |
IEnumerator | GetMarkers (string groupKey) |
Retrieves the marker genes. Requires RunMarkerSearch to have been run or have been marked in the dataset in pre-processing. More... | |
void | CloseServer () |
void | LoadData (string dataset, string key) |
Load the dataset into CellexalVR which creates the graph object. More... | |
Public Attributes | |
string[] | datasets |
string[] | geneNames |
string[] | markers |
float[] | cellValues |
bool | scarfActive |
bool | reqPending |
string[] | consoleLines = new string[5] { "\n", "\n ", "\n ", "\n ", "\n " } |
Static Public Attributes | |
static ScarfManager | instance |
static StringBuilder | procOutput = null |
static StringBuilder | procOutput2 = null |
Class to handle the communication between the REST-ful scarf api and CellexalVR. The api is a flask app that gets http requests and sends back data in json format. The cellexal-scarf web api can be found here: https://github.com/sonejilab/scarf_for_cellexalvr/
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.ColorByClusters | ( | string | clusterName | ) |
Retrieves the cell values for the clustering and then colors the graphs accordingly.
clusterName | The name of the clustering label e.g. RNA_leiden_cluster. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.ColorByGene | ( | string | geneName | ) |
Retrieves the cell values for the given gene or other feature and then colors the graphs accordingly.
geneName | The name of the gene or feature to color by. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.ConvertToZarrCoroutine | ( | string | dataLabel, |
string | rawData | ||
) |
Convert h5 raw data to zarr format.
dataLabel | What you want to call the resulting data folder. |
rawData | The name of the raw data file. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.GetCellValues | ( | string | valueKey | ) |
Retrieves the cell values for a specific feature key. This can be a gene or some other feature present in your dataset.
valueKey | The name of the feature. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.GetDatasetsCoroutine | ( | ) |
Retrieves the scarf datasets in the data folder.
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.GetFeatureNames | ( | ) |
Calls the scarf function to retrieve the feature names present in the dataset. This can be gene names or other features.
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.GetMarkers | ( | string | groupKey | ) |
Retrieves the marker genes. Requires RunMarkerSearch to have been run or have been marked in the dataset in pre-processing.
groupKey | The key used to separate the cells into groups. For example RNA_leiden clusters. |
void CellexalVR.AnalysisLogic.ScarfManager.InitServer | ( | ) |
Initializes the flask app that runs the api. Start in a seperate thread.
void CellexalVR.AnalysisLogic.ScarfManager.LoadData | ( | string | dataset, |
string | key | ||
) |
Load the dataset into CellexalVR which creates the graph object.
dataset | |
key |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.LoadPreprocessedDataCouroutine | ( | string | label, |
string | layoutKey | ||
) |
Load data into CellexalVR that has been preprocessed in scarf.
label | Name of the dataset folder. |
layoutKey | Name of the value you wish to plot. For example if you have made a umap based on RNA data it is usually called RNA_UMAP. Or whatever else you have named it when pre-processing the data. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.MakeNeighborhoodGraphCoroutine | ( | string | featureKey, |
VisualElement | running, | ||
VisualElement | done | ||
) |
Calls the scarf function to create a neighborhood graph.
featureKey | The feature key in the scarf object to use to create the graph. E.g. hvgs (if you have marked hvgs that is.) |
running | For the user interface icons animation. |
done | For the user interface icons animation. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.MarkHVGSCoroutine | ( | string | topN, |
VisualElement | running, | ||
VisualElement | done | ||
) |
Calls the scarf backend function to marks highly variable genes in the staged data.
topN | Number of genes. |
running | For the user interface icons animation. |
done | For the user interface icons animation. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.RunClusteringCoroutine | ( | string | resolution, |
VisualElement | running, | ||
VisualElement | done | ||
) |
Calls the scarf function to do clustering. Requires the neighborhood graph to be made.
resolution | Resolution of clustering. Corresponding to the argument with the same name in the scarf clustering function. |
running | For the user interface icons animation. |
done | For the user interface icons animation. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.RunMarkerSearch | ( | string | groupKey, |
float | threshold | ||
) |
Find marker genes in the dataset.
groupKey | The key used to separate the cells into groups. For example RNA_leiden clusters. |
threshold | Threshold to use for a gene correlation. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.RunUMAPCoroutine | ( | string | nEpochs, |
VisualElement | running, | ||
VisualElement | done | ||
) |
Calls the scarf function to create a umap. Requires the neighborhood graph to be made.
nEpochs | Number of epochs to run. |
running | For the user interface icons animation. |
done | For the user interface icons animation. |
IEnumerator CellexalVR.AnalysisLogic.ScarfManager.StageDataCoroutine | ( | string | dataLabel | ) |
Prepares the scarf object to work with.
dataLabel |