CellexalVR  0.13.0
A virtual reality platform for the exploration and analysis of single-cell gene expression data
CellexalVR Documentation


Read more about CellexalVR or watch videos on the website. Over there you can also find a manual of how to use it as well as a more detailed guide on the underlying structure of the program and how to add/modify things. All the code can be found and downloaded at the github page.

General project and script structure

When you open the main scene, there will only be one gameobject with one script attached to it: the SceneBuilder. This script is only responsible for building the main scene. Go ahead and press "Auto-populate gameobjects" if all the fields in the inspector are not already filled in. Then press "Build scene" to build the main scene. After this you may remove the SceneBuilder from the scene. It is located in the Assets/Prefabs folder in case you need it again.
The VR headset and controllers are located under the [VRTK]3.3 gameobject. We use VRTK for most of the interaction logic in CellexalVR and SteamVR for the hardware communication. The script aliases for the controllers are located under the [VRTK_Scripts] gameobject.
The InputReader gameobject holds the InputReader script, which reads the data from the CellexalVR R package and calls the appropriate functions to create graphs and transcription factor networks and so on. It also holds the ReferenceManager, a script that just holds references to other scripts to make them easier to access.
The Generators and Managers gameobjects hold children with the different generators and managers respectively. The generators are responsible for generating things such as graphs, heatmaps and transcription factor networks. The managers then handle operations that concern all objects of their respective type.
All buttons on the main menu (attached to the MenuHolder gameobject) derives from the CellexalButton script. This script holds the rudimentary functionality that such as swapping the button's sprite when it is hovered.
All the different keyboards in CellexalVR derive from the base class KeyboardHandler.
The RScriptRunner class contains the functions that call the external R scripts in the CellexalVR R package to generate heatmaps, transcription factor networks and more. This class is not deriving from MonoBehaviour and is thus not attached to a gameobject in the scene.
The multi-user functionality is split between the MultiuserMessageSender and MultiuserMessageReciever classes. These use the Photon Engine to send packages over the internet. The MultiuserMessageSender contains many functions that inform all other connected clients that something happened on their end, and the same thing should happen in all other clients' sessions and the MultiuserMessageReciever contains the function that repeats the same thing for a client.
There is a CellManager class that holds a list of Cell objects. The idea here was that if you have multiple graphs, they would each contain graph points that represents the same cells. An operation that concern a cell should affect all graphs, and thus that functionality was written in this class.
The values of all gene expressions are stored in an sqlite3 database. This database contains all non-zero expression values of all cells and all genes. The SQLiter gameobject contains the SQLite script that handles the queries that are sent to the database.

The scripts are organised after which namespace they are in. All scripts written by us are in the CellexalVR namespace and its subsequent nested namespaces.