============
Gettings started
============
STARE is a framework that combines two tasks, which can also work independently:
- score enhancer-gene interactions with the Activity-By-Contact (ABC) model
- derive TF affinities for regions
For the ABC scoring it only needs annotated candidate enhancer and their activity, and optionally chromatin contact data. STARE can combine the ABC-interactions with the TF affinities in regions to summarise TF affinities on gene level, which allows for a variety of further downstream analyses. Alternatively to using ABC-scored interactions, STARE can also summarise all regions within a defined window, which then doesn't even need a measurement of activity in your regions. If this sounds interesting to you, here's how you get started.
***************
Installing STARE
***************
**Installation with Bioconda**
We wrapped STARE into a Bioconda package which should ease the installation. You can find instructions to set up Bioconda `here `_, and more details on the `package's website `_. Once Bioconda is set up you can install STARE either inside or outside of a conda environment::
conda install stare-abc
Note that if installed with Bioconda, you can call the functions directly, without the preceding "./" or "./Code/".
**Manual installation**
The following tools/libraries must be installed in advance (if not using bioconda):
- `bedtools `_ Please make sure to add the bedtools installation to your path
- openmp for parallel computing; unfortunately, the installation is system-dependent and we didn't yet find a one-size-fits-all solution. MacOS usually also requires llvm.
- `Boost C++ Library `_
- `CMake `_ if you want to use it for compilation, otherwise you need g++.
Once you got all of the above installed, you can clone the GitHub repository::
git clone https://github.com/SchulzLab/STARE.git
or download the source code and unzip it.
*Compilation with CMake*
The (theoretically) easier way for compilation is to use CMake. To do so, navigate into the /Code directory, and configure the project::
cmake .
If that worked fine you can build the project, which should compile everything for you::
cmake --build .
*Compilation with predefined commands*
If you don't want to use CMake, there's the option to run scripts with compilation commands for MacOS and Linux based on g++. There are two scripts in **/Code**: *compile_STARE_macOS.sh* and *compile_STARE_Linux.sh* which should compile the C++ scripts for your platform if you run them. The paths are relative, you can call them from any directory::
./Code/compile_STARE_macOS.sh
or::
./Code/compile_STARE_Linux.sh
*************
Get started and test runs
*************
The following schema should give you an overview of STARE's function and what settings you can tune to run it properly on your data.
.. image:: ../Figures/STARE_FlowBig.png
:alt: STARE_overview
:target: https://github.com/SchulzLab/STARE/blob/main/Figures/STARE_FlowBig.pdf
If you want to test your installation and try out some examples, we have the *Code/runTestCases.sh* script for you. It serves the following purposes:
- It gives examples on how to run STARE and which flags to use. To get inspiration have a look at the individual test commands. The list of tests is not exhaustive, you can of course combine the options in a different way.
- It also compares the output of its test runs against pre-computed results in terms of content and quantity to make sure that the installation worked correctly (**/Test/Test_Controls/**). It will tell you with a subtle ERROR message if something went wrong. Test_V16 doesn't have a control, because its output is system-dependent.
- You can see examples of how the input files are formatted in **/Test/Test_Data/**.
To call the tests, you need to give the path to the **/Test/** directory, if you used bioconda for installation you will need to download that folder and you can call the script directly. You'll also have to give a path to where the output should be written to::
./Code/runTestCases.sh -i -o