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

A generator for heatmaps. Creates the colors that are later used when generating heatmaps More...

Inheritance diagram for CellexalVR.AnalysisLogic.HeatmapGenerator:

Public Member Functions

void InitColors ()
 Initializes expressionColors with the colors in the config file. More...
 
void CreateHeatmap ()
 
void CreateHeatmap (string name="")
 Creates a new heatmap using the last confirmed selection. More...
 
void DeleteHeatmap (string heatmapName)
 Removes one heatmap. More...
 
Heatmap FindHeatmap (string heatmapName)
 Finds a heatmap. More...
 
void HighLightGene (string geneName)
 Highlights gene in genelist in all the heatmaps if it is there. More...
 
void BuildTexture (List< Graph.GraphPoint > selection, string filepath, Heatmap heatmap)
 Builds the heatmap texture. More...
 
void BuildTexture (Heatmap heatmap)
 Builds a heatmap texture based on already known groupwidths and attribute widths. More...
 
void BuildTexture (Cell[] newCells, string[] newGenes, List< Tuple< int, float, int >> newGroupWidths, Heatmap heatmap)
 Builds this heatmaps texture using the supplied cells and genes. More...
 
IEnumerator BuildTextureCoroutine (Heatmap heatmap)
 Coroutine that starts a thread and generates the heatmap. More...
 
void CreateHeatmapPNG (Heatmap heatmap, ArrayList result, Dictionary< string, int > genePositions, Dictionary< string, int > cellsPosition, Dictionary< string, string > geneIds, string heatmapFilePath)
 Helper method that is run as a thread in BuildTextureCoroutine(List<Tuple<int, float, int>>, List<Tuple<int, float, int>>, Heatmap). More...
 
void SavePNGtoDisk (Heatmap heatmap, string heatmapFilePath)
 If the heatmap is to be saved for logging purposes (when the user presses save heatmap) the background color should be white and text colour black for easier reading on a computer screen. So only the genelist and widths are redrawn. More...
 
void AddHeatmapToList (Heatmap heatmap)
 

Public Attributes

ReferenceManager referenceManager
 
GameObject heatmapPrefab
 
Texture2D heatmapTexture
 
int selectionNr
 
int heatmapsCreated = 0
 
SolidBrush[] expressionColors
 
SelectionManager selectionManager
 

Properties

bool GeneratingHeatmaps [get]
 
UnityEngine.Color HighlightMarkerColor [get]
 
UnityEngine.Color ConfirmMarkerColor [get]
 

Detailed Description

A generator for heatmaps. Creates the colors that are later used when generating heatmaps

Member Function Documentation

◆ BuildTexture() [1/3]

void CellexalVR.AnalysisLogic.HeatmapGenerator.BuildTexture ( Cell[]  newCells,
string[]  newGenes,
List< Tuple< int, float, int >>  newGroupWidths,
Heatmap  heatmap 
)

Builds this heatmaps texture using the supplied cells and genes.

Parameters
newCellsThe cells that the heatmap should contain.
newGenesThe genes that the heatmap should contain.
newGroupWidthsThe grouping information.

◆ BuildTexture() [2/3]

void CellexalVR.AnalysisLogic.HeatmapGenerator.BuildTexture ( Heatmap  heatmap)

Builds a heatmap texture based on already known groupwidths and attribute widths.

Parameters
heatmapThe heatmap to attach the texture to.

◆ BuildTexture() [3/3]

void CellexalVR.AnalysisLogic.HeatmapGenerator.BuildTexture ( List< Graph.GraphPoint selection,
string  filepath,
Heatmap  heatmap 
)

Builds the heatmap texture.

Parameters
selectionAn array containing the GraphPoint that are in the heatmap
filepathA path to the file containing the gene names

◆ BuildTextureCoroutine()

IEnumerator CellexalVR.AnalysisLogic.HeatmapGenerator.BuildTextureCoroutine ( Heatmap  heatmap)

Coroutine that starts a thread and generates the heatmap.

Parameters
heatmap

◆ CreateHeatmap()

void CellexalVR.AnalysisLogic.HeatmapGenerator.CreateHeatmap ( string  name = "")

Creates a new heatmap using the last confirmed selection.

Parameters
nameIf created via multiplayer. Name it the same as on other client.

◆ CreateHeatmapPNG()

void CellexalVR.AnalysisLogic.HeatmapGenerator.CreateHeatmapPNG ( Heatmap  heatmap,
ArrayList  result,
Dictionary< string, int >  genePositions,
Dictionary< string, int >  cellsPosition,
Dictionary< string, string >  geneIds,
string  heatmapFilePath 
)

Helper method that is run as a thread in BuildTextureCoroutine(List<Tuple<int, float, int>>, List<Tuple<int, float, int>>, Heatmap).

◆ DeleteHeatmap()

void CellexalVR.AnalysisLogic.HeatmapGenerator.DeleteHeatmap ( string  heatmapName)

Removes one heatmap.

Parameters
heatmapNameThe heatmap's name.

◆ FindHeatmap()

Heatmap CellexalVR.AnalysisLogic.HeatmapGenerator.FindHeatmap ( string  heatmapName)

Finds a heatmap.

Parameters
heatmapNameThe heatmap's name.
Returns
The heatmap, or null if no heatmap by that name exists.

◆ HighLightGene()

void CellexalVR.AnalysisLogic.HeatmapGenerator.HighLightGene ( string  geneName)

Highlights gene in genelist in all the heatmaps if it is there.

Parameters
geneNameName of the gene to be highlighted.

◆ InitColors()

void CellexalVR.AnalysisLogic.HeatmapGenerator.InitColors ( )

Initializes expressionColors with the colors in the config file.

◆ SavePNGtoDisk()

void CellexalVR.AnalysisLogic.HeatmapGenerator.SavePNGtoDisk ( Heatmap  heatmap,
string  heatmapFilePath 
)

If the heatmap is to be saved for logging purposes (when the user presses save heatmap) the background color should be white and text colour black for easier reading on a computer screen. So only the genelist and widths are redrawn.


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