CLI Reference

Quick reference

polaris COMMAND [ARGS]...

Command

polaris loop

Loop annotation commands.

polaris util

Analysis and visualization utilities.


polaris loop

Annotate loops from input .mcool file.

Choose a subcommand to predict loops directly or obtain loop score file first.

polaris loop COMMAND [ARGS]...

Commands

  • pred
  • score
  • scorelf
  • pool

polaris loop pred

This is the simplest approach, allowing to directly predict loops in a single step

polaris loop pred -i [input.mcool] -o [save_path.bedpe] [options]

Required Options

-i, --input:

Path to a .mcool contact map file.

-o, --output:

Path to the .bedpe file where the predicted loops will be saved.

Options

-b, --batchsize <int>

Default: 128

Batch size for processing data. Adjust this based on available memory.

-C, --cpu <boolean>

Default: False

Use CPU for computation. Set to True to force CPU usage.

-G, --gpu <text>

Default: None

Comma-separated GPU indices to use. If not specified, GPUs will be auto-selected.

-c, --chrom <text>

Default: None

Comma-separated list of chromosomes for loop calling. If not specified, all autosomes and chromosome X will be annotated.

-nw, --workers <int>

Default: 16

Number of CPU threads to use. Adjust for optimal performance on your system.

-md, --max_distance <int>

Default: 3000000

Maximum genomic distance (in base pairs) between contact pairs to consider.

-r, --resol <int>

Default: 5000

Resolution of the input contact map.

-dc, --distance_cutoff <int>

Default: 5

Distance cutoff (in bins) for local density calculation. Larger values may account for more dispersed loops.

-t, --threshold <float>

Default: 0.6

Minimum loopScore threshold to consider a pixel as a loop candidate. Smaller values for more loops (Minimum value: 0.5).

-s, --sparsity <float>

Default: 0.9

Allowed sparsity value of submatrices to send to model.

-R, --radius <int>

Default: 2

Radius for KDTree to remove outliers (in bins). Use larger values for sparser datasets.

-d, --mindelta <float>

Default: 5

Minimum distance allowed between two predicted loops.

--raw <boolean>

Default: False

Use raw matrix [‘count’] or balanced matrix [‘balanced’].

--help

Display help information about this command and exit.


polaris loop score

Calculate the loop score for each pixel in the input contact map.

polaris loop score -i [input.mcool] -o [loopscore.bedpe] [options]

Required Options

-i, --input:

Path to the input Hi-C contact map file.

-o, --output:

Path to the .bedpe file where the loop scores will be saved.

Options

-b, --batchsize <int>

Default: 128

Batch size for processing data. Adjust this based on available memory.

-C, --cpu <boolean>

Default: False

Use CPU for computation. Set to True to force CPU usage.

-G, --gpu <text>

Default: None

Comma-separated GPU indices to use. If not specified, GPUs will be auto-selected.

-c, --chrom <text>

Default: None

Comma-separated list of chromosomes for loop candidate scoring. If not specified, all autosomes and chromosome X will be annotated.

-nw, --workers <int>

Default: 16

Number of CPU threads to use. Adjust for optimal performance on your system.

-md, --max_distance <int>

Default: 3000000

Maximum genomic distance (in base pairs) between contact pairs to consider.

-r, --resol <int>

Default: 5000

Resolution of the Hi-C contact map (in base pairs).

-t, --threshold <float>

Default: 0.6

Minimum loopScore threshold to consider a pixel as a loop candidate. Smaller values for more loops (Minimum value: 0.5).

-s, --sparsity <float>

Default: 0.9

Allowed sparsity value of submatrices to send to model.

--raw <boolean>

Default: False

Use raw matrix [‘count’] or balanced matrix [‘balanced’].

--help

Display help information about this command and exit.


polaris loop pool

Identify loops from loop candidates by clustering.

polaris loop pool -i [loopscore.bedpe] -o [loops.bedpe] [options]

Required Options

-i, --candidates:

Path to the input loop candidates file.

-o, --output:

Path to the .bedpe file where the final loops will be saved.

Options

-dc, --distance_cutoff <int>

Default: 5

Distance cutoff (in bins) for local density calculation. Larger values may account for more dispersed loops.

-t, --threshold <float>

Default: 0.6

Minimum loopScore threshold to consider a loop candidate as a valid loop.

-r, --resol <int>

Default: 5000

Resolution of the Hi-C contact map (in base pairs).

-R, --radius <int>

Default: 2

Radius for KDTree to remove outliers (in bins). Use larger values for sparser datasets.

-d, --mindelta <float>

Default: 5

Minimum distance allowed between two predicted loops.

--help

Display help information about this command and exit.

polaris util

Utilities for analysis and visualization with .mcool files.

polaris util COMMAND [ARGS]...

Commands

  • cool2bcool
  • pileup
  • depth

polaris util cool2bcool

The cool2bcool utility converts a .mcool file to a .bcool file. The .bcool file is compatible with .mcool files but requires less storage space.

polaris util cool2bcool [OPTIONS] MCOOL BCOOL

Required Arguments

MCOOL:

Path to the input .mcool file.

BCOOL:

Path of the .bcool file to save.

Options

-u <INTEGER>

Default: 3000000

Distance upper bound in base pairs.

--resol <TEXT>

Default: None

Comma-separated resolutions for the output. If not specified, the resolutions of input file will be used.

--help

Display help information about this command and exit.

polaris util pileup

The pileup utility generates 2D pileup contact maps around given foci.

polaris util pileup [OPTIONS] FOCI MCOOL

Required Arguments

FOCI:

Path to the .bedpe file in the same format as Polaris output, containing loop loci.

MCOOL:

Path of the .mcool file.

Options

-w <INTEGER>

Default: 10

Window size in bins: (2w+1)x(2w+1).

--savefig <TEXT>

Default: FOCI_pileup.png

Path to save pileup plot.

--p2ll <BOOLEAN>

Default: False

Compute p2ll value.

--mindistance <INTEGER>

Default: 2w+1

Minimum distance in bins to skip, only for bedpe foci.

--maxdistance <INTEGER>

Default: 1e9

Maximum distance in bins to skip, only for bedpe foci.

--resol <INTEGER>

Default: 5000

Resolution.

--oe <BOOLEAN>

Default: True

Use O/E normalized contact map or not.

--help

Display help information about this command and exit.

polaris util depth

The depth utility calculates intra-chromosomal contacts with bin distance >= mindis.

polaris util depth -i [MCOOL] -r [RESOL]

Required Arguments

-i, --input:

Path to a .mcool contact map file.

-r, --resol <int>

Resolution of the input contact map.

Options

--exclude-self <boolean>

Whether exclude bin_diff=0 contacts

-c, --chrom <text>

Default: None

Comma-separated list of chromosomes for loop calling. If not specified, all autosomes and chromosome X will be annotated.

-md, --mindis <int>

Default: 0

Min genomic distance in bins [0].

--help

Display help information about this command and exit.