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

Represents a gene expression histogram that is showed beside a graph. More...

Inheritance diagram for CellexalVR.AnalysisObjects.GeneExpressionHistogram:
CellexalVR.AnalysisObjects.EnvironmentTab CellexalVR.Interaction.CellexalRaycastable

Classes

class  HistogramData
 Holds all data needed to recreate a histogram. Can be used in CreateHistogram(HistogramData). More...
 

Public Types

enum  YAxisMode { Linear, Logarithmic }
 

Public Member Functions

void ClearLegend ()
 Clears the legend of all current data. More...
 
void UpdateAlphaThreshold (float val)
 
void CreateHistogram (string geneName, int[] bins, string xAxisMaxLabel, YAxisMode barHeightMode, int skip=0)
 Creates a new histogram with the specifed barheights. More...
 
void RecreateHistogram ()
 Recreates the current histogram. Should be used after DesiredYAxisMode or TallestBarsToSkip have been changed. More...
 
void RecreateAllHistograms ()
 Recreates all histograms, Should be used after the number of expressions colors change. More...
 
void SwitchToTab (int index)
 Switches to another previously generated histogram. More...
 
void DeactivateHighlightArea ()
 Deactivates the highlight area and its accompanying text. More...
 
void DeactivateSelectedArea ()
 Deactivates the selected highlight area and its accompanying text. More...
 
void MoveHighlightArea (int minX, int maxX)
 Moves and resizes the highlight area to span between two bars. More...
 
void MoveSelectedArea (int minX, int maxX)
 Moves and resizes the selected highlight area to span between two bars. More...
 
override void OnRaycastHit (RaycastHit hitInfo, CellexalRaycast raycaster)
 Called by CellexalRaycast.Update every frame that a raycast hit this target. More...
 
Vector3 WorldToRelativeHistogramPos (Vector3 worldPos)
 Projects and converts a world coordinate to local coordinates More...
 
- Public Member Functions inherited from CellexalVR.AnalysisObjects.EnvironmentTab
void SetTabActive (bool active)
 Enables or disables the content gameobject of this tab. More...
 
- Public Member Functions inherited from CellexalVR.Interaction.CellexalRaycastable
virtual void OnRaycastEnter ()
 Called on the first frame that this CellexalRaycastable is hit by a CellexalRaycast. More...
 
virtual void OnRaycastExit ()
 Called on the first frame that this CellexalRaycastable is not hit by a CellexalRaycast anymore. More...
 

Public Attributes

ReferenceManager referenceManager
 
GameObject histogramParent
 
TextMeshPro geneNameLabel
 
TextMeshPro yAxisMaxLabel
 
TextMeshPro xAxisMaxLabel
 
TextMeshPro yAxisLabel
 
GameObject barPrefab
 
GameObject highlightArea
 
TextMeshPro highlightAreaInfoText
 
GameObject selectedArea
 
TextMeshPro selectedAreaInfoText
 
GameObject cutOffBarTopShape
 
TextMeshPro filterTextLabel
 
List< HistogramTabButtontabButtons = new List<HistogramTabButton>(10)
 
- Public Attributes inherited from CellexalVR.AnalysisObjects.EnvironmentTab
EnvironmentTabButton tabButton
 
GameObject contentParent
 
EnvironmentMenuWithTabs parentMenu
 
- Public Attributes inherited from CellexalVR.Interaction.CellexalRaycastable
UnityEvent OnActivate
 
UnityEvent RaycastEnter
 
UnityEvent RaycastExit
 
bool canBePushedAndPulled = true
 
bool active = true
 

Properties

Vector3 HistogramMinPos [get]
 Local position of the lower left corner of the histogram in the LegendManager local pos. More...
 
Vector3 HistogramMaxPos [get]
 Local position of the upper right corner of the histogram. More...
 
int NumberOfBars [get]
 
int TallestBarsToSkip [get, set]
 The number of tallest bars to skip when scaling the Y axis. Call RecreateHistogram after changing this. More...
 
YAxisMode DesiredYAxisMode [get, set]
 The desired Y axis scaling mode. Call RecreateHistogram after changing this. More...
 

Detailed Description

Represents a gene expression histogram that is showed beside a graph.

Member Function Documentation

◆ ClearLegend()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.ClearLegend ( )

Clears the legend of all current data.

◆ CreateHistogram()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.CreateHistogram ( string  geneName,
int[]  bins,
string  xAxisMaxLabel,
YAxisMode  barHeightMode,
int  skip = 0 
)

Creates a new histogram with the specifed barheights.

Parameters
geneNameThe name of the gene
binsAn array of ints that represents the heights of the bars.
xAxisMaxLabelThe label at the max value of the x-axis
barHeightModeThe Y axis mode to use.
skipThe number of tallest bars to cut, so the n:th tallest bar uses up all of the y axis.

◆ DeactivateHighlightArea()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.DeactivateHighlightArea ( )

Deactivates the highlight area and its accompanying text.

◆ DeactivateSelectedArea()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.DeactivateSelectedArea ( )

Deactivates the selected highlight area and its accompanying text.

◆ MoveHighlightArea()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.MoveHighlightArea ( int  minX,
int  maxX 
)

Moves and resizes the highlight area to span between two bars.

Parameters
minXThe index of the left bar
maxXThe index of the right bar

◆ MoveSelectedArea()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.MoveSelectedArea ( int  minX,
int  maxX 
)

Moves and resizes the selected highlight area to span between two bars.

Parameters
minXThe index of the left bar
maxXThe index of the right bar

◆ OnRaycastHit()

override void CellexalVR.AnalysisObjects.GeneExpressionHistogram.OnRaycastHit ( RaycastHit  hitInfo,
CellexalRaycast  raycaster 
)
virtual

Called by CellexalRaycast.Update every frame that a raycast hit this target.

Parameters
hitInfoThe RaycastHit from the Physics.Raycast call.
raycasterThe CellexalRaycast that made the Physics.Raycast call.

Reimplemented from CellexalVR.Interaction.CellexalRaycastable.

◆ RecreateAllHistograms()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.RecreateAllHistograms ( )

Recreates all histograms, Should be used after the number of expressions colors change.

◆ RecreateHistogram()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.RecreateHistogram ( )

Recreates the current histogram. Should be used after DesiredYAxisMode or TallestBarsToSkip have been changed.

◆ SwitchToTab()

void CellexalVR.AnalysisObjects.GeneExpressionHistogram.SwitchToTab ( int  index)

Switches to another previously generated histogram.

Parameters
indexThe tab to switch to.

◆ WorldToRelativeHistogramPos()

Vector3 CellexalVR.AnalysisObjects.GeneExpressionHistogram.WorldToRelativeHistogramPos ( Vector3  worldPos)

Projects and converts a world coordinate to local coordinates

Parameters
worldPos
Returns

Property Documentation

◆ DesiredYAxisMode

YAxisMode CellexalVR.AnalysisObjects.GeneExpressionHistogram.DesiredYAxisMode
getset

The desired Y axis scaling mode. Call RecreateHistogram after changing this.

◆ HistogramMaxPos

Vector3 CellexalVR.AnalysisObjects.GeneExpressionHistogram.HistogramMaxPos
get

Local position of the upper right corner of the histogram.

◆ HistogramMinPos

Vector3 CellexalVR.AnalysisObjects.GeneExpressionHistogram.HistogramMinPos
get

Local position of the lower left corner of the histogram in the LegendManager local pos.

◆ TallestBarsToSkip

int CellexalVR.AnalysisObjects.GeneExpressionHistogram.TallestBarsToSkip
getset

The number of tallest bars to skip when scaling the Y axis. Call RecreateHistogram after changing this.


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