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

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

Public Member Functions

void MakeAllPointsCullable (bool toggle)
 Sets green channel of points so culling will be activated in the shader. This means that inside the culling cube the points will not be visible. More...
 
void DeleteGraph (string tag)
 Used to delete a graph. Starts the minimizing animation and then deletes the object. More...
 
Vector3 ScaleCoordinates (Vector3 coords)
 Scales one Vector3 of coordinates from the original scale to the graph's desired scale. More...
 
async void 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 ToggleInfoText ()
 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 ()
 Moves this graph back to its original location. More...
 
void ResetSizeAndRotation ()
 Resets this graph's scale and rotation back to its original values. More...
 
void ResetColors (bool resetGroup=true)
 Resets the color of all graphpoints in this graph to white. More...
 
void ColorBySelection (Selection selection)
 Colors this graph by a selection. GraphPoints that are not in this selection are not changed. More...
 
void ColorSelectionGroup (Selection selection, int group)
 Colors this graph by one group of a selection. More...
 
void HighlightAttribute (string attribute)
 Highlights, all graphpoints that belong to an attribute. More...
 
void HighlightSelectionGroup (Selection selection, int group)
 Highlights a group from a Selection. More...
 
void ResetHighlight ()
 Resets all highlighted graphpoints, retaining their colour but un-highlighting them. More...
 
void ToggleGraphPoints ()
 Toggles all graphpoint cluster gameobjects active/inactive. More...
 
Color GetGraphPointColor (GraphPoint point)
 Gets the color of a graph point. More...
 
void Party ()
 
void ClearTopExprCircles ()
 Clears the circles from previous colouring so it doesn't stack. More...
 
void ColorGraphPointGeneExpression (GraphPoint graphPoint, int i)
 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 ColorGraphPointsSelectionColor (IEnumerable< GraphPoint > points, int i, bool outline)
 Colors a collection of graphpoints by one of the selection colors. More...
 
void MakeAllPointsTransparent (bool toggle)
 Sets the green channel of the point so transparency will be activated in the shader. More...
 
void MakePointUnCullable (GraphPoint graphPoint, bool culling)
 Sets blue channel of point so culling will be deactivated in the shader. This means that inside the culling cube the poins will still be visible. 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...
 
void ColorByAttribute (string attribute, bool color)
 Color, or un-color, all graphpoints that belong to an attribute. More...
 
void CopyAttributeMasks (Graph graph)
 Copies the attribute mask data from another graph and reformats it to this graph's meshs' clustering. 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...
 
List< GraphPointMinkowskiDetection (Vector3 sphereCenter, float radius, int group=-1)
 Finds all GraphPoint that are inside a sphere. More...
 

Public Attributes

GameObject skeletonPrefab
 
GameObject emptySkeletonPrefab
 
Material lineMaterial
 
GameObject movingOutlineCircle
 
GameObject convexHull
 
List< GameObject > ctcGraphs = new List<GameObject>()
 
GraphManager graphManager
 
GameObject infoParent
 
TextMeshPro graphNameText
 
TextMeshPro graphInfoText
 
TextMeshPro graphNrText
 
LegendManager legendManager
 
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>()
 
ReferenceManager referenceManager
 
int lodGroups
 
bool scaled
 
Dictionary< int, List< GameObject > > lodGroupClusters = new Dictionary<int, List<GameObject>>()
 
List< GameObject > lodGroupParents = new List<GameObject>()
 
int textureWidth
 
int textureHeight
 
Texture2D texture
 
Dictionary< string, Texture2D > attributeMasks = new Dictionary<string, Texture2D>()
 
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

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.

◆ ColorByAttribute()

void CellexalVR.AnalysisObjects.Graph.ColorByAttribute ( string  attribute,
bool  color 
)

Color, or un-color, all graphpoints that belong to an attribute.

Parameters
attributeThe name of the attribute, should be in the full format e.g. "<c>type@attribute</c>".
colorTrue if graphpoints belonging should be colored, false if un-coloring.

◆ 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.

◆ ColorBySelection()

void CellexalVR.AnalysisObjects.Graph.ColorBySelection ( Selection  selection)

Colors this graph by a selection. GraphPoints that are not in this selection are not changed.

Parameters
selectionThe selection to color by.

◆ ColorGraphPointGeneExpression()

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

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.

◆ ColorGraphPointsSelectionColor()

void CellexalVR.AnalysisObjects.Graph.ColorGraphPointsSelectionColor ( IEnumerable< GraphPoint points,
int  i,
bool  outline 
)

Colors a collection of graphpoints by one of the selection colors.

Parameters
pointsThe points 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.

◆ ColorSelectionGroup()

void CellexalVR.AnalysisObjects.Graph.ColorSelectionGroup ( Selection  selection,
int  group 
)

Colors this graph by one group of a selection.

Parameters
selectionThe selection containing the group to color by.
groupThe group's id, as defined by Selection.groups.

◆ CopyAttributeMasks()

void CellexalVR.AnalysisObjects.Graph.CopyAttributeMasks ( Graph  graph)

Copies the attribute mask data from another graph and reformats it to this graph's meshs' clustering.

Parameters
graphThe graph to coopy from.

◆ CreateGraphSkeleton()

async void 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.

◆ DeleteGraph()

void CellexalVR.AnalysisObjects.Graph.DeleteGraph ( string  tag)

Used to delete a graph. Starts the minimizing animation and then deletes the object.

Parameters
tag

◆ 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.

◆ GetGraphPointColor()

Color CellexalVR.AnalysisObjects.Graph.GetGraphPointColor ( GraphPoint  point)

Gets the color of a graph point.

Parameters
pointThe graph point.
Returns
The color from GraphGenerator.graphPointColors that the point is currently using.

◆ HighlightAttribute()

void CellexalVR.AnalysisObjects.Graph.HighlightAttribute ( string  attribute)

Highlights, all graphpoints that belong to an attribute.

Parameters
attributeThe name of the attribute, should be in the full format "<c>type@attribute</c>".

◆ HighlightSelectionGroup()

void CellexalVR.AnalysisObjects.Graph.HighlightSelectionGroup ( Selection  selection,
int  group 
)

Highlights a group from a Selection.

Parameters
selectionThe selection containing the group.
groupThe group's number, as defined in Selection.groups.

◆ MakeAllPointsCullable()

void CellexalVR.AnalysisObjects.Graph.MakeAllPointsCullable ( bool  toggle)

Sets green channel of points so culling will be activated in the shader. This means that inside the culling cube the points will not be visible.

Parameters
toggle

◆ MakeAllPointsTransparent()

void CellexalVR.AnalysisObjects.Graph.MakeAllPointsTransparent ( bool  toggle)

Sets the green channel of the point so transparency will be activated in the shader.

Parameters
toggleTrue to make points transparent, false to make points opaque.

◆ MakePointUnCullable()

void CellexalVR.AnalysisObjects.Graph.MakePointUnCullable ( GraphPoint  graphPoint,
bool  culling 
)

Sets blue channel of point so culling will be deactivated in the shader. This means that inside the culling cube the poins will still be visible.

◆ MinkowskiDetection() [1/2]

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.

◆ MinkowskiDetection() [2/2]

List<GraphPoint> CellexalVR.AnalysisObjects.Graph.MinkowskiDetection ( Vector3  sphereCenter,
float  radius,
int  group = -1 
)

Finds all GraphPoint that are inside a sphere.

Parameters
sphereCenterThe sphere's center, in local coordinates.
radiusThe sphere's radius.
groupThe group to assign the found points. Points already in this group will be ignored, unless -1 is passed as this argument.
Returns
A list of all GraphPoint that are inside the sphere.

◆ ResetColors()

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

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

◆ ResetHighlight()

void CellexalVR.AnalysisObjects.Graph.ResetHighlight ( )

Resets all highlighted graphpoints, retaining their colour but un-highlighting them.

◆ ResetPosition()

void CellexalVR.AnalysisObjects.Graph.ResetPosition ( )

Moves this graph back to its original location.

◆ ResetSizeAndRotation()

void CellexalVR.AnalysisObjects.Graph.ResetSizeAndRotation ( )

Resets this graph's scale and rotation back to its original values.

◆ 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.

Summertweriking

◆ 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.

◆ ToggleGraphPoints()

void CellexalVR.AnalysisObjects.Graph.ToggleGraphPoints ( )

Toggles all graphpoint cluster gameobjects active/inactive.

◆ ToggleInfoText()

void CellexalVR.AnalysisObjects.Graph.ToggleInfoText ( )

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

Parameters
visibleTrue for visible, false for invisible

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