Overview

This is the API documentation for CircosAPI.

Notes

Values in brackets [] are the default values assigned to the attributes.

Value in parentheses () are the possible values can be assigned to the respective attributes.

Boolean (BOOL) attributes should be set as either yes or no, not Perl’s 1 or 0.


CObject parent class

The base class of all objects in CircosAPI. It has methods that retrieve the attributes that the object possesses and print their values out as required of Circos configuration files.

You will not need to use this class explicitly at any point of time.

Methods

update(attrs_hash)
Update the attributes with the values passed in as attrs_hash.

DataTrack

DataTrack is the parent class for all data tracks that have rules. Plot, Highlight and Link inherit from this class. Therefore you will not need to use this class explicitly.

Attributes

file

STRING

The path name of the data file associated with the data track

rules

ARRAYREF

An array that contains all the rules associated with the data track

Methods

addRule(array_of_Rule)
Add a Rule instance or an array of Rule instances into the rules attribute. Applicable for Plot, Highlight and Link instances only

CircosAPI

This is the class that hold all the blocks. You have to initialize this object in order to add other objects to it.

Attributes

base

Base

ideogram

Ideogram

image

Image

ticks

Ticks

plots

ARRAYREF

highlights

ARRAYREF

links

ARRAYREF

Methods

addPlot(Plot)

Add a Plot instance (or an array of Plot) into the plots array

addLink(Link)

Add a Link instance (or an array of Link)into the links array

addHighlight(Hightlight)

Add a Highlight instance (or an array of Highlight) into the highlights array

compile()

Takes no argument but return a STRING. This method converts the instances stored to Circos configuration file format as a string


Base

ThisBase class writes all the attributes that are not enclosed in any blocks in the configuration files.

Attributes

karyotype required

STRING (hg16, hg17, hg18, hg19, mm9, rn4, yeast, dm3-lowres, dm3-hires)

The karyotype of your choice will be converted to the path as denoted in karyotypes.json. If you want to change the path of these karyotypes, you can look for karyotypes.json in the defaults directory.

chromosomes_units required

INTEGER [1000000]

chromosomes

STRING

chromosomes_display_default

BOOL [yes]

chromosomes_scale

chromosomes_reverse

chromosomes_color

show_ticks

show_tick_labels


Image

Image class is for the image block in Circos configuration file, i.e

<image>...</image>

Attributes

dir

STRING [.]

file

STRING [circos.png]

png

BOOL [yes]

dir

BOOL [yes]

radius

STRING [1500p]

angle_offset

INTEGER [-90]

background

STRING [white]

angle_orientation

STRING []

auto_alpha_colors

BOOL [yes]

auto_alpha_steps

INTEGER [5]


Ideogram

Ideogram class is for the ideogram block in Circos configuration file, i.e

<ideogram>...</ideogram>

Attributes

show

BOOL [yes]

radius

STRING

thickness

STRING

fill

BOOL

stroke_color

STRING

stroke_thickness

STRING

show_bands

BOOL

fill_bands

BOOL

band_transparency

INTEGER

band_stroke_thickness

STRING

band_stroke_color

STRING

show_label

BOOL

label_radius

STRING

label_size

INTEGER

label_font

STRING [default] (default, bold, condensed)

label_parallel

BOOL

label_with_tag

BOOL

label_case

STRING (upper, lower)

label_format

STRING

axis_break

BOOL

axis_break_style

INTEGER (1,2)

axis_break_at_edge

BOOL

spacing

Spacing

break_style

BreakStyle


Spacing

Spacing is one of the components of Ideogram

Spacing creates a

<spacing>...</spacing>
within Ideogram

Attributes

pairwises
ARRAYREF for Pairwise

default

STRING

break

STRING


Pairwise

Pairwise is one of the components of Spacing

Pairwise creates a

<pairwise pair1 pair2>...</pairwise>
You need to specify at least pair1 in order for the block to be fully defined.

Attributes

pair1

STRING

pair2

STRING

spacing

STRING


Ticks

Ticks creates a

<ticks>...</ticks>
in the configuration file

Attributes

radius

STRING

multipier

STRING

format

STRING

thickness

STRING

color

STRING

tick

ARRAYREF

Methods

addTick(Tick)
Add a Tick or an array of Tick into ticks

Tick

Tick is one of the components of Ticks

Tick creates a

<tick>...</tick>
in Ticks.

Attributes

spacing

STRING

chromosomes

STRING

size

STRING

thickness

STRING

color

STRING

show_label

BOOL

label_size

STRING

label_offset

STRING

format

STRING


Plot inherit from DataTrack

Plot creates a

<plot>...</plot>
block. Therefore you need to push this instance into plots of your CircosAPI instance via its addPlot method.

  # Example: $c is your CircosAPI instance, $p is your Plot instance
  $c->addPlot($p)

Attributes

t

STRING

t is actually type in Circos configuration. type is a keyword in Perl and therefore, it cannot be used as an attribute. Use t instead. However, it will be printed out as type when you compile the code.

file

STRING

rules

ARRAYREF

Push a Rule instance into this array via the addRule method.

Methods

Refer to DataTrack for methods


Highlight inherit from DataTrack

Highlight creates a

<highlight>...</highlight>
block. Therefore you need to push this instance into highlights of your CircosAPI instance via its addHighlight method.

  # Example: $c is your CircosAPI instance, $h is your Highlight instance
  $c->addHighlight($h)

Attributes

file

STRING

rules

ARRAYREF

Push a Rule instance into this array via the addRule method.

Methods

Refer to DataTrack for methods

Rule

Rule is one of the components of Plot, Link and Highlight

It creates a

<rule>...</rule>

Rule can be added to any Plot, Link or Highlight via their method addRule

  # Example: $t is your Plot instance, $r is your Rule instance
  $t->addRule($r)

Attributes

importance

INTEGER

condition

STRING

params

HASHREF

params is a hash that stores all key-value pairs. Only the keys and their values will be printed out in the respective blocks; params will not be printed.


Axes

<axes>...</axes>

Attributes

show

STRING

spacing

STRING

color

STRING

thickness

INTEGER

position

STRING

position_skip

STRING

axis

ARRAYREF

Methods

addAxis(Axis)
Add an Axis or an array of Axis into the axis array

Axis

<Axis>...</Axis>

Attributes

show

STRING

spacing

STRING

color

STRING

thickness

INTEGER

position

STRING

position_skip

STRING

axis

ARRAYREF


Backgrounds

Attributes

show

STRING

Methods

addBackground(Background)
Add an Background or an array of Background into the axis array

Background

Background creates a

<background>...</background>
in Backgrounds

Attributes

y0

STRING

y1

STRING

color

STRING