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

Represents a graph consisting of multiple GraphPoints. More...

Inheritance diagram for CellexalVR.AnalysisObjects.Graph:

Classes

class  GraphPoint
 A graph point represents a point in the graphs as well as one cell in the dimension reduced data. More...
 
class  OctreeNode
 Private class to represent one node in the octree used for collision detection More...
 

Public Member Functions

Vector3 ScaleCoordinates (Vector3 coords)
 Scales one Vector3 of coordinates from the original scale to the graph's desired scale. More...
 
void OnDrawGizmos ()
 
IEnumerator CreateGraphSkeleton (bool empty=false)
 Method to greate lines between nodes in the octree. This gives a sort of skeleton representation of the graph. More...
 
void SetInfoText ()
 Tells this graph that all graphpoints are added to this graph and we can update the info text. More...
 
void SetInfoTextVisible (bool visible)
 Set this graph's info panel visible or not visible. More...
 
void SetAxesVisible (bool visible)
 Set this graph's axes visible or not visible. More...
 
void ResetPosition ()
 
void ResetSizeAndRotation ()
 
void ResetColors (bool resetGroup=true)
 Resets the color of all graphpoints in this graph to white. More...
 
void ToggleGraphPoints ()
 Toggles all graphpoint cluster gameobjects active/inactive. More...
 
Color GetGraphPointColor (GraphPoint gp)
 
void Party ()
 
void ClearTopExprCircles ()
 Clears the circles from previous colouring so it doesn't stack. More...
 
void ColorGraphPointGeneExpression (GraphPoint graphPoint, int i, bool outline)
 Recolors a single graphpoint. More...
 
void ColorGraphPointSelectionColor (GraphPoint graphPoint, int i, bool outline)
 Colors one graph point based on one of the selection colors. More...
 
void HighlightGraphPoint (GraphPoint graphPoint, bool active)
 
void ResetGraphPointColor (GraphPoint graphPoint)
 Resets the color of the graph point back to its default. More...
 
GraphPoint FindGraphPoint (string label)
 Finds a graph point by its name. More...
 
void ColorByGeneExpression (ArrayList expressions)
 Color all graphpoints in this graph with the expression of some gene. More...
 
List< GraphPointMinkowskiDetection (Vector3 selectionToolPos, Vector3 selectionToolBoundsCenter, Vector3 selectionToolBoundsExtents, int group)
 Finds all GraphPoint that are inside the selection tool. This is done by traversing the generated Octree and dismissing subtrees using Minkowski differences. Ultimately, raycasting is used to find collisions because the selection tool is not a box. More...
 

Public Attributes

GameObject skeletonPrefab
 
GameObject emptySkeletonPrefab
 
Material skeletonMaterial
 
Material lineMaterial
 
GameObject movingOutlineCircle
 
GameObject convexHull
 
GraphManager graphManager
 
TextMeshPro graphNameText
 
TextMeshPro graphInfoText
 
TextMeshPro graphNrText
 
GameObject axes
 
GameObject annotationsParent
 
string[] axisNames = new string[3]
 
bool GraphActive = true
 
Dictionary< string, GraphPointpoints = new Dictionary<string, GraphPoint>()
 
Dictionary< string, GraphPointsubSelectionPoints = new Dictionary<string, GraphPoint>()
 
List< Vector3 > pointsPositions
 
ReferenceManager referenceManager
 
List< GameObject > graphPointClusters = new List<GameObject>()
 
int textureWidth
 
int textureHeight
 
Texture2D texture
 
Vector3 minCoordValues = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue)
 
Vector3 maxCoordValues = new Vector3(float.MinValue, float.MinValue, float.MinValue)
 
List< GameObject > topExprCircles = new List<GameObject>()
 
Vector3 diffCoordValues
 
float longestAxis
 
Vector3 scaledOffset
 
int nbrOfClusters
 
VelocityParticleEmitter velocityParticleEmitter
 
GameObject lineParent
 
bool hasVelocityInfo
 
bool graphPointsInactive = false
 
OctreeNode octreeRoot
 

Properties

List< GameObject > CTCGraphs [get, set]
 
string GraphName [get, set]
 
string FolderName [get, set]
 
int GraphNumber [get, set]
 

Detailed Description

Represents a graph consisting of multiple GraphPoints.

Member Function Documentation

◆ ClearTopExprCircles()

void CellexalVR.AnalysisObjects.Graph.ClearTopExprCircles ( )

Clears the circles from previous colouring so it doesn't stack.

◆ ColorByGeneExpression()

void CellexalVR.AnalysisObjects.Graph.ColorByGeneExpression ( ArrayList  expressions)

Color all graphpoints in this graph with the expression of some gene.

Parameters
expressionsAn arraylist with CellExpressionPair.

◆ ColorGraphPointGeneExpression()

void CellexalVR.AnalysisObjects.Graph.ColorGraphPointGeneExpression ( GraphPoint  graphPoint,
int  i,
bool  outline 
)

Recolors a single graphpoint.

Parameters
graphPointThe graphpoint to recolor.
colorThe graphpoint's new color.

◆ ColorGraphPointSelectionColor()

void CellexalVR.AnalysisObjects.Graph.ColorGraphPointSelectionColor ( GraphPoint  graphPoint,
int  i,
bool  outline 
)

Colors one graph point based on one of the selection colors.

Parameters
graphPointThe graph point to color.
iAn integer betweeen 0 and the number of selection colors.
outlineTrue if the graph point should get an outline as well, false otherwise.

◆ CreateGraphSkeleton()

IEnumerator CellexalVR.AnalysisObjects.Graph.CreateGraphSkeleton ( bool  empty = false)

Method to greate lines between nodes in the octree. This gives a sort of skeleton representation of the graph.

◆ FindGraphPoint()

GraphPoint CellexalVR.AnalysisObjects.Graph.FindGraphPoint ( string  label)

Finds a graph point by its name.

Parameters
labelThe name of the graph point
Returns
The graph point, or null if was not found.

◆ MinkowskiDetection()

List<GraphPoint> CellexalVR.AnalysisObjects.Graph.MinkowskiDetection ( Vector3  selectionToolPos,
Vector3  selectionToolBoundsCenter,
Vector3  selectionToolBoundsExtents,
int  group 
)

Finds all GraphPoint that are inside the selection tool. This is done by traversing the generated Octree and dismissing subtrees using Minkowski differences. Ultimately, raycasting is used to find collisions because the selection tool is not a box.

Parameters
selectionToolPosThe selection tool's position in world space.
selectionToolBoundsCenterThe selection tool's bounding box's center in world space.
selectionToolBoundsExtentsThe selection tool's bounding box's extents in world space.
groupThe group that the selection tool is set to color the graphpoints by.
Returns
A List<CombinedGraphPoint> with all GraphPoint that are inside the selecion tool.

◆ ResetColors()

void CellexalVR.AnalysisObjects.Graph.ResetColors ( bool  resetGroup = true)

Resets the color of all graphpoints in this graph to white.

◆ ResetGraphPointColor()

void CellexalVR.AnalysisObjects.Graph.ResetGraphPointColor ( GraphPoint  graphPoint)

Resets the color of the graph point back to its default.

Parameters
graphPointThe graphpoint to recolor.

◆ ScaleCoordinates()

Vector3 CellexalVR.AnalysisObjects.Graph.ScaleCoordinates ( Vector3  coords)

Scales one Vector3 of coordinates from the original scale to the graph's desired scale.

Parameters
coordsThe coordinates to scale.
Returns
A scaled Vector3.

◆ SetAxesVisible()

void CellexalVR.AnalysisObjects.Graph.SetAxesVisible ( bool  visible)

Set this graph's axes visible or not visible.

Parameters
visibleTrue for visible, false for invisible

◆ SetInfoText()

void CellexalVR.AnalysisObjects.Graph.SetInfoText ( )

Tells this graph that all graphpoints are added to this graph and we can update the info text.

◆ SetInfoTextVisible()

void CellexalVR.AnalysisObjects.Graph.SetInfoTextVisible ( bool  visible)

Set this graph's info panel visible or not visible.

Parameters
visibleTrue for visible, false for invisible

◆ ToggleGraphPoints()

void CellexalVR.AnalysisObjects.Graph.ToggleGraphPoints ( )

Toggles all graphpoint cluster gameobjects active/inactive.


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