CellexalVR is a virtual reality platform for the visualisation and analysis of single-cell gene expression data.
Analysing data in virtual reality provides a fully immersive environment where the user can visualise and interact with the data without restriction, with a focus on data visibility, collaboration and cell selection.
You can read more about this project at our website. You can read more about how to use CellexalVR in our manual.
You can download a compiled version of CellexalVR for Windows 10 from our website.
There are a few things that must be done if you are planning to run CellexalVR for the first time.
devtools::install_github("sonejilab/cellexalvrr")
in an R terminal. This requires the devtools
package, you can install it with install.packages("devtools")
.Data
where CellexalVR is installed.Data
folder.Data
folder.Rscript.exe
in the text box, or adjust the text between the RscriptFilePath
tags in the Config/config.xml
file to where you installed R. It should look something like <RscriptFilePath>C:\Program Files\R\R-3.6.0\bin\x64\Rscript.exe</RscriptFilePath>
.
The folder structure should then be
CellexalVR
|- Config
| |- config.xml
|
|- Data
| |- data_set_1
| | |- (data files)
| |
| |- data_set_2
| |- (data files)
|
|- CellexalVR.exe
For any given commit, you can check the ProjectVersion.txt file for which Unity version was used.
The Unity project contains 3 scenes that CellexalVR uses. The Assets/Launcher.unity scene is what the user sees when they start CellexalVR. It contains the menus for choosing single-user, multi-user or the tutorial. The Assets/IntroTutorialScene.unity scene is the tutorial, it is for the most part a stripped down version of the main scene, Assets/CellexalVR_Main_Scene.unity. The main scene is where the interesting things happen.
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 GameManager and ServerCoordinator classes. These use the Photon Engine to send packages over the internet. The GameManager 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 ServerCoordinator 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 graphpoints 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 folder structure when it comes to prefabs, materials and scripts is hopefully somewhat intuitive. The Assets/Prefabs, Assets/Materials and Assets/Images folders all have a similar set of folders in them like Graphs
, Heatmaps
, Menu
and so on. The Assets/Scripts is organised after which namespace scripts are in. All scripts written by us are in the CellexalVR
namespace and its subsequent nested namespaces.
If you lose your config.xml there is a sample one at Assets/StreamingAssets/sample_config.xml. If you run CellexalVR without a config.xml
file, the sample one will be copied to Config/config.xml
.
This software uses code of FFmpeg licensed under the LGPLv2.1 and its source can be downloaded here.