cellxgene (pronounced "cell-by-gene") is an easy to use single cell data exploration tool that allows one to manually define clusters and run differential expression from an interactive webpage. The only input required for cellxgene is a single "h5ad" file, which is a compressed object containing all the data necessary to analyze a single cell data set. With the addition of a single parameter, the Parse Biosciences' pipeline can produce an h5ad file ready to use with cellxgene.
Requirements
The instructions for installing cellxgene are for local (i.e. desktop or laptop) computers running MacOS or Linux that have a chromium based browser installed (e.g. Google Chrome, Opera, etc.), but please note the h5ad file is generated wherever split-pipe
is installed. Windows users will have to launch cellxgene from a WSL (Windows Subsytem for Linux) session. More information on how to setup WSL can be found on Microsoft's support site. The only other requirement for cellxgene is a python installation (version 3.6 or greater).
h5ad file location
For each sample, the h5ad file will show up in the DGE folder as anndata.h5ad
. In this example "all-sample" is the only sample.
Note: Prior to v1.1.0, "count_matrix.mtx" was named "DGE.mtx"
├── all-sample
├── DGE_filtered
├── count_matrix.mtx
├── anndata.h5ad
├── cell_metadata.csv
└── genes.csv
Note: Prior to pipeline v1.1.0, "all-sample" was named "all-well".
If your pipeline output folder is on a remote computer, you can transfer the h5ad file to your local machine using the bash command scp
. Here's an example scp
command for aws ec2 users :
scp -i "~/my-key.pem" \
ubuntu@18.236.74.168:/newvolume/analysis/all-sample/DGE_filtered/anndata.h5ad \
/home/user/
Where my-key.pem
is your aws key, ubuntu
is your user name, and 18.236.74.168
is the public (not private) ip address obtained on your ec2 instance summary page. The public IP address changes every time you restart your aws instance. Also, please note that the file path /home/user/
in the second argument is the destination folder on your local machine.
Installing and running cellxgene
Assuming the user already has python installed on their local computer, cellxgene can be installed using pip:
pip install cellxgene
Next, launch the cellxgene session using the following command:
cellxgene launch anndata.h5ad
Finally, there should be a dialog that prompts the user to open the link in a browser:
[cellxgene] Launching! Please go to http://localhost:5005 in your browser.
That's it! further information on cellxgene can be found on the documentation homepage and GitHub.