CellexalVR  1.1.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. More...

Inheritance diagram for CellexalVR.AnalysisLogic.HeatmapGenerator:

Public Member Functions

void LoadHeatmap (string heatmapName, string fromSelectionFile="")
 
void InitColors ()
 Initializes expressionColors with the colors in the config file. More...
 
void CreateHeatmap ()
 
void CreateHeatmap (string heatmapName="")
 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 (Selection selection, string filepath, Heatmap heatmap, bool newHeatmap=true)
 Builds the heatmap texture. More...
 
void BuildTexture (Heatmap heatmap, bool newHeatmap=true)
 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, bool newHeatmap=true)
 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 CreateHeatmapPNGScarf (Heatmap heatmap, Dictionary< string, List< Tuple< string, float >>> valueDictionary, Dictionary< string, int > genePositions, Dictionary< string, int > cellsPosition, string heatmapFilePath)
 
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
 
GameObject heatmapTexturePrefab
 
Texture2D heatmapTexture
 
int selectionNr
 
int heatmapsCreated = 0
 
SolidBrush[] expressionColors
 
SelectionManager selectionManager
 
Vector3[] startPositions
 

Properties

bool GeneratingHeatmaps [get]
 

Detailed Description

A generator for 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,
bool  newHeatmap = true 
)

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 ( Selection  selection,
string  filepath,
Heatmap  heatmap,
bool  newHeatmap = true 
)

Builds the heatmap texture.

Parameters
selectionThe selection that the heatmap was created from.
filepathA path to the file containing the gene names

◆ BuildTextureCoroutine()

IEnumerator CellexalVR.AnalysisLogic.HeatmapGenerator.BuildTextureCoroutine ( Heatmap  heatmap,
bool  newHeatmap = true 
)

Coroutine that starts a thread and generates the heatmap.

Parameters
heatmap

◆ CreateHeatmap()

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

Creates a new heatmap using the last confirmed selection.

Parameters
heatmapNameIf 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.

Parameters
heatmapThe heatmap to save.
heatmapFilePathThe filepath where to save the heatmap.

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