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

Represents a graph that is created between to graphs when using cell to cell tracking. A selection is made in one graph and the respective points are found in another. This graph is created where each points position is in the middle of the two corresponding points. Lines goes from points in one graph through this graph and finally to the other graph. Graphpoints in this graph behave just as in normal graphs and can be recoloured in every way. More...

Inheritance diagram for CellexalVR.AnalysisObjects.GraphBetweenGraphs:

Public Member Functions

void CreateGraphBetweenGraphs (Selection points, Graph newGraph, Graph fromGraph, Graph toGraph)
 Draws lines between graphpoints representing the same cell in to different graphs (i.e share the same label). More...
 
IEnumerator ClusterLines (int clusterSize=10, float neighbourDistance=0.10f, float kernelBandwidth=2.0f, bool bundle=false)
 Main function for clustering the lines. If many lines are present it is convenient to cluster them together for better visibility and less lag. Start by clustering the two graphs using mean shift clustering. Assign points to the clusters and then check if many points in a cluster in one graph goes to the same cluster in the other. These are points that should be bundles together. Points that do not cluster in both graphs are not bundled but rendered normally. More...
 
List< Vector3 > MeanShiftClustering (List< Graph.GraphPoint > points, int iterations=3, float neighbourDistance=0.05f, float kernelBandwidth=2.5f)
 Mean shift clustering to find clusters with high density. Read more about it here https://en.wikipedia.org/wiki/Mean_shift. With some modifications to suit the needs of this application. More...
 
Vector3 CalculateClusterHull (HashSet< Graph.GraphPoint > cluster, Vector3 centroid)
 
LineBetweenTwoPoints AddLine (Graph from, Graph to, Graph.GraphPoint point)
 Adds line that goes from a point in one graph to respective point in another. More...
 
void TogglePointClusterColliders (bool b, string exception)
 
void RemoveLines ()
 Removes all LineBetweenTwoPoints that are connected to this graph. More...
 
void RemoveClusters ()
 
void RemoveGraph ()
 
PointCluster GetCluster (int id)
 

Public Attributes

Graph graph1
 
ReferenceManager referenceManager
 
GameObject lineBetweenTwoGraphPointsPrefab
 
GameObject pointClusterPrefab
 
GameObject clusterDebugBox
 

Detailed Description

Represents a graph that is created between to graphs when using cell to cell tracking. A selection is made in one graph and the respective points are found in another. This graph is created where each points position is in the middle of the two corresponding points. Lines goes from points in one graph through this graph and finally to the other graph. Graphpoints in this graph behave just as in normal graphs and can be recoloured in every way.

Member Function Documentation

◆ AddLine()

LineBetweenTwoPoints CellexalVR.AnalysisObjects.GraphBetweenGraphs.AddLine ( Graph  from,
Graph  to,
Graph.GraphPoint  point 
)

Adds line that goes from a point in one graph to respective point in another.

Parameters
fromGraph that lines goes from.
toGraph that line goes to.
pointThe graphpoint that line goes between.

◆ ClusterLines()

IEnumerator CellexalVR.AnalysisObjects.GraphBetweenGraphs.ClusterLines ( int  clusterSize = 10,
float  neighbourDistance = 0.10f,
float  kernelBandwidth = 2.0f,
bool  bundle = false 
)

Main function for clustering the lines. If many lines are present it is convenient to cluster them together for better visibility and less lag. Start by clustering the two graphs using mean shift clustering. Assign points to the clusters and then check if many points in a cluster in one graph goes to the same cluster in the other. These are points that should be bundles together. Points that do not cluster in both graphs are not bundled but rendered normally.

Parameters
pointsThe selection points.
fromGraphTHe graph the points were selected from. The lines goes FROM one graph TO another.
toGraphThe other graph.
clusterSizeTo be considered a cluster and for the points to be bundled there has to be this many points.
neighbourDistanceThe distance to other points to be considered in the same cluster.

◆ CreateGraphBetweenGraphs()

void CellexalVR.AnalysisObjects.GraphBetweenGraphs.CreateGraphBetweenGraphs ( Selection  points,
Graph  newGraph,
Graph  fromGraph,
Graph  toGraph 
)

Draws lines between graphpoints representing the same cell in to different graphs (i.e share the same label).

Parameters
pointsThe graphpoints to draw the lines from.

///

Parameters
newGraphNew graph containing the points between the two graphs.

///

Parameters
fromGraphThe graph the lines go from.

///

Parameters
toGraphThe graph to draw lines to.

◆ MeanShiftClustering()

List<Vector3> CellexalVR.AnalysisObjects.GraphBetweenGraphs.MeanShiftClustering ( List< Graph.GraphPoint points,
int  iterations = 3,
float  neighbourDistance = 0.05f,
float  kernelBandwidth = 2.5f 
)

Mean shift clustering to find clusters with high density. Read more about it here https://en.wikipedia.org/wiki/Mean_shift. With some modifications to suit the needs of this application.

Parameters
points
iterations
neighbourDistance
kernelBandwidth
Returns

◆ RemoveLines()

void CellexalVR.AnalysisObjects.GraphBetweenGraphs.RemoveLines ( )

Removes all LineBetweenTwoPoints that are connected to this graph.


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