Quickstart

Installation

Polaris is developed and tested on Linux machines with python3.9 and relies on several libraries including pytorch, scipy, etc. We ​**strongly recommend** that you install Polaris in a virtual environment.

We suggest users using conda to create a virtual environment for it (It should also work without using conda, i.e. with pip). You can run the command snippets below to install Polaris:

git clone https://github.com/ai4nucleome/Polaris.git
cd Polaris
conda create -n polaris python=3.9
conda activate polaris

Install Polaris:

./setup.sh

It will automatically download Polaris model’s weights from Hugging Face and install Polaris.

You can also download model’s weights file manually from there and put it in Polaris/polaris/model and change the file name to sft_loop.pt.

The installation requires network access to download libraries. Usually, the installation will finish within 3 minutes. The installation time is longer if network access is slow and/or unstable.

Quick Usage

See Jupyter Notebook CLI walkthrough and the CLI Reference for more information.

Polaris takes submatrices of contact map as input and outputs predicted loops.

polaris loop pred -i [input mcool file] -o [output path of annotated loops]

Output format:

It contains tab separated fields as follows:

Field

Detail

Chr1/Chr2

chromosome names

Start1/Start2

start genomic coordinates

End1/End2

end genomic coordinates (i.e. End1=Start1+resol)

Score

Polaris’s loop score [0~1]