Skip to content

Setting up

Luke Zappia edited this page Jan 12, 2021 · 3 revisions

This page describes how to set up the scRNA-tools repository in order to contribute to the database.

Note: These instructions (and the scRNA-tools app more generally) have been designed to for Unix-based systems. It is possible to use the app on Windows but it can be more difficult. Where possible we recommend using a Unix-based system including MacOS and Windows Subsytem Linux (WSL). If you choose to use Windows please use a terminal that understands BASH commands such as the Git Bash terminal that was likely installed with git.

0 - Dependencies

The dependencies required to contribute to scRNA-tools are R, git and a GitHub account. Details on setting these up can be found at the following links:

The scRNA-tools app is written using the R language but no knowledge of R is required to use it. All the R package dependencies will be installed as part of a later step in this setup. Basic knowledge of git is required to contribute, mostly basic commands such as add, commit, push and pull. If you are not comfortable using git you can still contribute but filling in the submission form on the scRNA-tools website (https://www.scrna-tools.org/submit).

Make sure R is in your path

The scRNA-tools app requires R to be available from the command line. You can check this by running R --version. On Unix-based systems this should be the case but is usually not on Windows. If you see and error when running the previous command find where R is installed and add it to the PATH using a command like: export PATH=$PATH:/c/Program\ Files/R/R-3.6.1/bin (example for Windows using Git Bash) You will need to do this every time you use the app or permanently modify your PATH to include R by adding this command to your .bashrc file.

1 - Fork and clone

Once you have the dependencies installed the first step is to fork and clone the the scRNA-tools repository. Forking creates your own personal copy of the repository on GitHub. To fork the repository go to https://github.com/scRNA-tools/scRNA-tools and click the "Fork" button in the top right corner.

Once you have your own fork you need to copy it to your local computer in order to make changes. This is done using the git clone command. Go to the GitHub page for your new fork and click the green "Clone or download" button and copy the link shown. On you local computer then run the git clone command which will look something like this (where YOUR_USERNAME is your GitHub username):

git clone git@github.com:YOUR_USERNAME/scRNA-tools.git
Cloning into 'scRNA-tools'...
remote: Enumerating objects: 35, done.
remote: Counting objects: 100% (35/35), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 12108 (delta 14), reused 18 (delta 8), pack-reused 12073
Receiving objects: 100% (12108/12108), 7.06 MiB | 1.48 MiB/s, done.
Resolving deltas: 100% (10466/10466), done.

2 - Setup

The next step is to run the setup.sh script. This script will install the R dependencies required for the app and set some git settings to make contributing easier. If you have any problems with this step please submit a GitHub issue to let us know.

cd scRNA-tools
bash setup.sh

If everything has worked correctly you should be able to see the help for the app by running the following command:

./scrnatools --help

If the setup fails when installing R dependencies (usually on Windows) then the simplest solution is often to install them using RStudio. Open RStudio and select File > New Project... > Existing Directory and navigate to your scRNA-tools directory. After the project has opened run renv::restore(). Once the initial install is complete everything else should work from the command line.

3 - Contribute to the database!

Now you have everything set up you can contribute to the scRNA-tools database! Please have a look at the other pages on this wiki for details about how to add new tools or update existing entries. We also encourage the community to submit improvements to the website or app.