CellexalVR  1.1.0
A virtual reality platform for the exploration and analysis of single-cell gene expression data
CellexalVR.AnalysisLogic.CellManager Class Reference

This class represent a manager that holds all the cells. More...

Inheritance diagram for CellexalVR.AnalysisLogic.CellManager:

Public Member Functions

Cell AddCell (string label)
 Attempts to add a cell to the dictionary More...
 
Cell GetCell (string label)
 Finds cell and returns it. More...
 
Cell[] GetCells ()
 Returns all cells. More...
 
Cell[] GetCells (int group)
 Returns cell that belong to a certain selection group. More...
 
Cell[] GetCells (int group, Cell[] subSelection)
 Returns cell that belong to a certain selection group within a certain sub selection of cells. More...
 
int GetNumberOfCells ()
 
void HighlightCells (Cell[] cellsToHighlight, bool highlight)
 
void HighlightAttribute (string attribute)
 Highlights an attribute in all graphs. More...
 
void HighlightGroup (Selection selection, int group)
 Highlights a group from a selection in all graphs. More...
 
void ResetHighlight ()
 Resets any highlighting in all graphs. More...
 
void CreateNewSelection (string graphName, string[] cellnames, int[] groups, Dictionary< int, Color > groupingColors=null)
 Creates a new selection. More...
 
void ColorGraphsByGene (string geneName)
 
void ColorGraphsByGene (string geneName, bool triggerEvent=true)
 Colors all GraphPoints in all current Graphs based on their expression of a gene. More...
 
void ColorGraphsByGene (string geneName, GraphManager.GeneExpressionColoringMethods coloringMethod, bool triggerEvent=true)
 Colors all GraphPoints in all current Graphs based on their expression of a gene. More...
 
void QueryTopGenes (SQLite.QueryTopGenesRankingMode mode)
 Queries the database for all genes and sorts them based on the chosen mode. More...
 
void AddToPrunedGenes (string[] genesToAdd)
 Used by the database to tell the cellmanager which genes were actually in the database. More...
 
void DeleteCells ()
 Removes all cells. More...
 
void ColorByAttribute (string attributeType, bool color, bool subGraph=false, int colIndex=0)
 Color all cells that belong to a certain attribute. More...
 
void ColorAllClusters (float[] cellClusters, bool color)
 Used by ScarfManager. Adds or removes cells to the current selection. More...
 
void ColorByGene (float[] values)
 Used be ScarfManager. Colors the graphs based off the colors in values . Indices are cellnames More...
 
void SendToSelection ()
 Adds the currently selected attributes as a selection. More...
 
void ColorByAttributeExpression (BooleanExpression.Expr expr)
 Color all cells based on an expression of attributes More...
 
void AddAttribute (string cellname, string attributeType, int group)
 Adds an attribute to a cell. More...
 
IEnumerable< string > GetAttributes (string cellname)
 Get all attributes that a cell belongs to. More...
 
IEnumerable< string > GetAttributes (Cell cell)
 Get all attributes that a cell belongs to. More...
 
void ColorByIndex (string name)
 Color all graphpoints according to a column in the index.facs file. More...
 
void ColorClusters (string path)
 
void ColorByNumericalAttribute (string name)
 
List< CellSubSet (BooleanExpression.Expr expr)
 Returns a subset of all cells in the dataset based on a boolean expression. More...
 

Public Attributes

ReferenceManager referenceManager
 
Dictionary< string, GameObject > convexHulls = new Dictionary<string, GameObject>()
 
List< string > cellNames = new List<string>()
 

Properties

List< string > AttributesNames [get, set]
 
Dictionary< string, HashSet< Cell > > Attributes [get, set]
 
string[] Facs [get, set]
 
string[] Facs_values [get, set]
 
string[] NumericalAttributes [get, set]
 
float LowestExpression [get]
 
float HighestExpression [get]
 
Dictionary< string, Tuple< float, float > > FacsRanges [get]
 Lowest and highest range of facs measurements. Tuple<T1, T2>.Item1 is the lowest value and Tuple<T1, T2>.Item2 is the highest. More...
 
Dictionary< string, Tuple< float, float > > NumericalAttributeRanges [get]
 

Detailed Description

This class represent a manager that holds all the cells.

Member Function Documentation

◆ AddAttribute()

void CellexalVR.AnalysisLogic.CellManager.AddAttribute ( string  cellname,
string  attributeType,
int  group 
)

Adds an attribute to a cell.

Parameters
cellnameThe cells name.
attributeTypeThe attribute type / name
groupThe attribute value

◆ AddCell()

Cell CellexalVR.AnalysisLogic.CellManager.AddCell ( string  label)

Attempts to add a cell to the dictionary

Parameters
labelThe cell's name
Returns
Returns a reference to the added cell

◆ AddToPrunedGenes()

void CellexalVR.AnalysisLogic.CellManager.AddToPrunedGenes ( string[]  genesToAdd)

Used by the database to tell the cellmanager which genes were actually in the database.

Parameters
genesToAddAn array of genes that was in the database.

◆ ColorAllClusters()

void CellexalVR.AnalysisLogic.CellManager.ColorAllClusters ( float[]  cellClusters,
bool  color 
)

Used by ScarfManager. Adds or removes cells to the current selection.

Parameters
cellClustersAn array mapping a cellname (index) to a cluster.
colorTrue if the cells in cellClusters should be added to the current the selection, false if they should be removed."/>

◆ ColorByAttribute()

void CellexalVR.AnalysisLogic.CellManager.ColorByAttribute ( string  attributeType,
bool  color,
bool  subGraph = false,
int  colIndex = 0 
)

Color all cells that belong to a certain attribute.

Parameters
attributeTypeThe name of the attribute.
colorTrue if the graphpoints should be colored to the attribute's color, false if they should be white.

◆ ColorByAttributeExpression()

void CellexalVR.AnalysisLogic.CellManager.ColorByAttributeExpression ( BooleanExpression.Expr  expr)

Color all cells based on an expression of attributes

Parameters
exprThe root of the tree representing a boolean expression of attributes.

◆ ColorByGene()

void CellexalVR.AnalysisLogic.CellManager.ColorByGene ( float[]  values)

Used be ScarfManager. Colors the graphs based off the colors in values . Indices are cellnames

Parameters
valuesAn array of floats mapping cellnames (indices) to an expression value.

◆ ColorByIndex()

void CellexalVR.AnalysisLogic.CellManager.ColorByIndex ( string  name)

Color all graphpoints according to a column in the index.facs file.

◆ ColorGraphsByGene() [1/2]

void CellexalVR.AnalysisLogic.CellManager.ColorGraphsByGene ( string  geneName,
bool  triggerEvent = true 
)

Colors all GraphPoints in all current Graphs based on their expression of a gene.

Parameters
geneNameThe name of the gene.

◆ ColorGraphsByGene() [2/2]

void CellexalVR.AnalysisLogic.CellManager.ColorGraphsByGene ( string  geneName,
GraphManager.GeneExpressionColoringMethods  coloringMethod,
bool  triggerEvent = true 
)

Colors all GraphPoints in all current Graphs based on their expression of a gene.

Parameters
geneNameThe name of the gene.

◆ CreateNewSelection()

void CellexalVR.AnalysisLogic.CellManager.CreateNewSelection ( string  graphName,
string[]  cellnames,
int[]  groups,
Dictionary< int, Color >  groupingColors = null 
)

Creates a new selection.

Parameters
graphNameThe graph that the selection originated from.
cellnamesAn array of all the cell names (the graphpoint labels).
groupsAn array of all colors that the cells should have.
groupingColorsOptional parameter, used if a custom color scheme should be used. Maps groups to colors.

◆ DeleteCells()

void CellexalVR.AnalysisLogic.CellManager.DeleteCells ( )

Removes all cells.

◆ GetAttributes() [1/2]

IEnumerable<string> CellexalVR.AnalysisLogic.CellManager.GetAttributes ( Cell  cell)

Get all attributes that a cell belongs to.

Parameters
cellThe cell to get attributes for.
Returns
An IEnumerable<string> containing all attributes the cell belongs to.

◆ GetAttributes() [2/2]

IEnumerable<string> CellexalVR.AnalysisLogic.CellManager.GetAttributes ( string  cellname)

Get all attributes that a cell belongs to.

Parameters
cellnameThe cell to get attributes for.
Returns
An IEnumerable<string> containing all attributes the cell belongs to.

◆ GetCell()

Cell CellexalVR.AnalysisLogic.CellManager.GetCell ( string  label)

Finds cell and returns it.

Parameters
labelThe label(id) of the cell.
Returns

◆ GetCells() [1/3]

Cell [] CellexalVR.AnalysisLogic.CellManager.GetCells ( )

Returns all cells.

Returns

◆ GetCells() [2/3]

Cell [] CellexalVR.AnalysisLogic.CellManager.GetCells ( int  group)

Returns cell that belong to a certain selection group.

Parameters
group
Returns

◆ GetCells() [3/3]

Cell [] CellexalVR.AnalysisLogic.CellManager.GetCells ( int  group,
Cell[]  subSelection 
)

Returns cell that belong to a certain selection group within a certain sub selection of cells.

Parameters
groupThe cells beloning to this particular group will be returned.
subSelectionThe subselection of cells to select from.
Returns

◆ HighlightAttribute()

void CellexalVR.AnalysisLogic.CellManager.HighlightAttribute ( string  attribute)

Highlights an attribute in all graphs.

Parameters
attributeThe attribute to highlight

◆ HighlightGroup()

void CellexalVR.AnalysisLogic.CellManager.HighlightGroup ( Selection  selection,
int  group 
)

Highlights a group from a selection in all graphs.

Parameters
selectionThe selection to color by.
groupThe group to color by.

◆ QueryTopGenes()

void CellexalVR.AnalysisLogic.CellManager.QueryTopGenes ( SQLite.QueryTopGenesRankingMode  mode)

Queries the database for all genes and sorts them based on the chosen mode.

Parameters
modeThe chosen mode. SQLite.QueryTopGenesRankingMode

◆ ResetHighlight()

void CellexalVR.AnalysisLogic.CellManager.ResetHighlight ( )

Resets any highlighting in all graphs.

◆ SendToSelection()

void CellexalVR.AnalysisLogic.CellManager.SendToSelection ( )

Adds the currently selected attributes as a selection.

◆ SubSet()

List<Cell> CellexalVR.AnalysisLogic.CellManager.SubSet ( BooleanExpression.Expr  expr)

Returns a subset of all cells in the dataset based on a boolean expression.

Property Documentation

◆ FacsRanges

Dictionary<string, Tuple<float, float> > CellexalVR.AnalysisLogic.CellManager.FacsRanges
get

Lowest and highest range of facs measurements. Tuple<T1, T2>.Item1 is the lowest value and Tuple<T1, T2>.Item2 is the highest.


The documentation for this class was generated from the following file: