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

Represents the selection tool that can be used to select multiple GraphPoints. More...

Inheritance diagram for CellexalVR.AnalysisLogic.SelectionManager:

Classes

struct  HistoryListInfo
 Helper struct for remembering history when selecting graphpoints. More...
 

Public Member Functions

Selection FindSelectionByNameOrId (string nameOrId)
 Attempts to find a selection by a name or id. More...
 
void RemoveGraphpointFromSelection (Graph.GraphPoint graphPoint)
 Removes a graph point from the current selection. More...
 
void RemoveGraphpointFromSelection (string graphName, string graphpointLabel)
 Removes a graph point from the current selection, given the graph's and graph point's labels. More...
 
void AddGraphpointToSelection (Graph.GraphPoint graphPoint, int newGroup, bool hapticFeedback)
 Adds a graphpoint to the current selection, and changes its color. More...
 
void AddGraphpointToSelection (Graph.GraphPoint graphPoint, int newGroup, bool hapticFeedback, Color color)
 Adds a graphpoint to the current selection, and changes its color. More...
 
void AddGraphPointsToSelection (IEnumerable< Graph.GraphPoint > points, int group)
 Adds a collection of graph points to the current selection. More...
 
void DoClientSelectAdd (string graphName, string label, int newGroup, Color color)
 If selecting from client then graphpoint to be added needs to be found by searching since it has not collided with selection tool. More...
 
void DoClientSelectAdd (string graphName, string label, int newGroup, Color color, bool cube)
 Same as above but this function is called when coluring the cubes between same cells in different graphs. More...
 
void GoBackOneStepInHistory ()
 Goes back one step in the history of selecting cells. More...
 
void GoForwardOneStepInHistory ()
 Go forward one step in the history of selecting cells. More...
 
void GoBackOneColorInHistory ()
 Go back in history until the color changes. This unselects all the last cells that have the same color. More...
 
void GoForwardOneColorInHistory ()
 Go forward in history until the color changes. This re-selects all the last cells that have the same color. More...
 
void ConfirmSelectionForBigFolder ()
 
void ConfirmSelectionConsole ()
 Confirms a selection and dumps the relevant data to a .txt file. More...
 
void ConfirmSelection ()
 Confirms the current selection, ending the selection process and saving the selection to disk. More...
 
void AddSelection (Selection selection)
 Adds a new selection, that was not created through selecting and using ConfirmSelection. More...
 
void UpdateRObjectGrouping (Selection selection)
 Updates the R objects groupings. More...
 
void SelectAll ()
 Selects all points in to current group. If filter is active it queues all points for evaluation. More...
 
Selection GetLastSelection ()
 Gets the last selection that was confirmed. More...
 
void Clear ()
 Removes all points from the current selection, and clears the selection history. More...
 
int GetCurrentSelectionSize ()
 Get the current (not yet confirmed) selection. More...
 
void CancelSelection ()
 Unselects anything selected. More...
 
Selection LoadSelectionFromDisk (string path)
 Loads a Selection from the disk, if the Selection is already loaded, the loaded object is returned. More...
 
void UnloadOldestSelection (Selection newestSelection)
 
void AssertGroupMasksExist (Graph graph)
 Checks if the first selection that was made this session has group masks for a given graph. This does not check if those group masks are correct, only if some group masks exists for a given graph. If no group masks seem to exist, this function calls Selection.SaveGroupMasksToDisk(Graph) for each graph that seems to be missing group masks. More...
 
void RecolorSelectionPoints ()
 Helper function to recolour only the points that are in the current selection. More...
 
Color GetColor (int index)
 Gets a selection colors. More...
 

Public Attributes

List< HistoryListInfoselectionHistory = new List<HistoryListInfo>()
 

Properties

string DataDir [get, set]
 
bool RObjectUpdating [get]
 

Detailed Description

Represents the selection tool that can be used to select multiple GraphPoints.

Member Function Documentation

◆ AddGraphPointsToSelection()

void CellexalVR.AnalysisLogic.SelectionManager.AddGraphPointsToSelection ( IEnumerable< Graph.GraphPoint points,
int  group 
)

Adds a collection of graph points to the current selection.

Parameters
pointsThe graph points to add.
groupThe group to assign the graph points.

◆ AddGraphpointToSelection() [1/2]

void CellexalVR.AnalysisLogic.SelectionManager.AddGraphpointToSelection ( Graph.GraphPoint  graphPoint,
int  newGroup,
bool  hapticFeedback 
)

Adds a graphpoint to the current selection, and changes its color.

◆ AddGraphpointToSelection() [2/2]

void CellexalVR.AnalysisLogic.SelectionManager.AddGraphpointToSelection ( Graph.GraphPoint  graphPoint,
int  newGroup,
bool  hapticFeedback,
Color  color 
)

Adds a graphpoint to the current selection, and changes its color.

◆ AddSelection()

void CellexalVR.AnalysisLogic.SelectionManager.AddSelection ( Selection  selection)

Adds a new selection, that was not created through selecting and using ConfirmSelection.

Parameters
selectionThe selection to add.

◆ AssertGroupMasksExist()

void CellexalVR.AnalysisLogic.SelectionManager.AssertGroupMasksExist ( Graph  graph)

Checks if the first selection that was made this session has group masks for a given graph. This does not check if those group masks are correct, only if some group masks exists for a given graph. If no group masks seem to exist, this function calls Selection.SaveGroupMasksToDisk(Graph) for each graph that seems to be missing group masks.

Parameters
graph

◆ CancelSelection()

void CellexalVR.AnalysisLogic.SelectionManager.CancelSelection ( )

Unselects anything selected.

◆ Clear()

void CellexalVR.AnalysisLogic.SelectionManager.Clear ( )

Removes all points from the current selection, and clears the selection history.

◆ ConfirmSelection()

void CellexalVR.AnalysisLogic.SelectionManager.ConfirmSelection ( )

Confirms the current selection, ending the selection process and saving the selection to disk.

◆ ConfirmSelectionConsole()

void CellexalVR.AnalysisLogic.SelectionManager.ConfirmSelectionConsole ( )

Confirms a selection and dumps the relevant data to a .txt file.

◆ DoClientSelectAdd() [1/2]

void CellexalVR.AnalysisLogic.SelectionManager.DoClientSelectAdd ( string  graphName,
string  label,
int  newGroup,
Color  color 
)

If selecting from client then graphpoint to be added needs to be found by searching since it has not collided with selection tool.

Parameters
graphNameThe name of the graph that the point is in.
labelThe label of the cell (graphpoint)
newGroupThe group which the cell is to be added to.
colorColour that the graphpoint should be coloured by.

◆ DoClientSelectAdd() [2/2]

void CellexalVR.AnalysisLogic.SelectionManager.DoClientSelectAdd ( string  graphName,
string  label,
int  newGroup,
Color  color,
bool  cube 
)

Same as above but this function is called when coluring the cubes between same cells in different graphs.

Parameters
graphName
label
newGroup
color
cubeIf a cube should be coloured as well as the graphpoint.

◆ FindSelectionByNameOrId()

Selection CellexalVR.AnalysisLogic.SelectionManager.FindSelectionByNameOrId ( string  nameOrId)

Attempts to find a selection by a name or id.

Parameters
nameOrIdThe name or id to look for.
Returns
A selection matching the name or id, or null if no suitable selection was found.

◆ GetColor()

Color CellexalVR.AnalysisLogic.SelectionManager.GetColor ( int  index)

Gets a selection colors.

Parameters
indexThe index of the color. Indices outside the range of the array colors will be corrected with remainder division.

◆ GetCurrentSelectionSize()

int CellexalVR.AnalysisLogic.SelectionManager.GetCurrentSelectionSize ( )

Get the current (not yet confirmed) selection.

Returns
A List of all graphpoints currently selected.

◆ GetLastSelection()

Selection CellexalVR.AnalysisLogic.SelectionManager.GetLastSelection ( )

Gets the last selection that was confirmed.

Returns
An object of class Selection. Or null if no selections have been made this session.

◆ GoBackOneColorInHistory()

void CellexalVR.AnalysisLogic.SelectionManager.GoBackOneColorInHistory ( )

Go back in history until the color changes. This unselects all the last cells that have the same color.

If the user selects 2 cells as red then 3 cells as blue and then 4 cells as red, in that order, the 4 last red cells would be unselected when calling this method.

◆ GoBackOneStepInHistory()

void CellexalVR.AnalysisLogic.SelectionManager.GoBackOneStepInHistory ( )

Goes back one step in the history of selecting cells.

◆ GoForwardOneColorInHistory()

void CellexalVR.AnalysisLogic.SelectionManager.GoForwardOneColorInHistory ( )

Go forward in history until the color changes. This re-selects all the last cells that have the same color.

◆ GoForwardOneStepInHistory()

void CellexalVR.AnalysisLogic.SelectionManager.GoForwardOneStepInHistory ( )

Go forward one step in the history of selecting cells.

◆ LoadSelectionFromDisk()

Selection CellexalVR.AnalysisLogic.SelectionManager.LoadSelectionFromDisk ( string  path)

Loads a Selection from the disk, if the Selection is already loaded, the loaded object is returned.

Parameters
pathThe path to the Selection. May point to either the selection.txt file or the selection's directory.
Returns
A Selection generated from the given path, or null if the path does not point to a valid Selection.

◆ RecolorSelectionPoints()

void CellexalVR.AnalysisLogic.SelectionManager.RecolorSelectionPoints ( )

Helper function to recolour only the points that are in the current selection.

◆ RemoveGraphpointFromSelection() [1/2]

void CellexalVR.AnalysisLogic.SelectionManager.RemoveGraphpointFromSelection ( Graph.GraphPoint  graphPoint)

Removes a graph point from the current selection.

Parameters
graphPointThe graph point to remove.

◆ RemoveGraphpointFromSelection() [2/2]

void CellexalVR.AnalysisLogic.SelectionManager.RemoveGraphpointFromSelection ( string  graphName,
string  graphpointLabel 
)

Removes a graph point from the current selection, given the graph's and graph point's labels.

Parameters
graphNameThe label of graph that contains the graph point.
graphpointLabelThe graph point's label.

◆ SelectAll()

void CellexalVR.AnalysisLogic.SelectionManager.SelectAll ( )

Selects all points in to current group. If filter is active it queues all points for evaluation.

◆ UpdateRObjectGrouping()

void CellexalVR.AnalysisLogic.SelectionManager.UpdateRObjectGrouping ( Selection  selection)

Updates the R objects groupings.

Parameters
selectionThe selection to update the R object with.

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