This tutorial assumes you have used Circos before and you have programming experience. Experience in Perl is highly desired.
This tutorial is written with reference to the Circos Quick Guide tutorial.
Every block in Circos configuration file is converted to an object in CircosAPI. The objects in CircosAPI contains the parameters you can put in the blocks. Therefore, there are subtle differences between the original configuration file and the configuration generated via this API.
There are several methods you can create your configuration file using CircosAPI.
You can set your default parameters for the following blocks in the JSON file (found in /defaults):
I highly recommend you to use single quote for the values as you may be passing values as valid Perl function during the course of making the graphics.
Passing a value to only karyotype ('hg19'
) for Base
will initialize other parameters such as chromosomes_unit
to their default values. Please refer to Base and others for their respective default values and the parameters that you are required to pass values to it.
The other parameters in Ideogram, Spacing and Image blocks will take the values from the JSON file (defaults.json). This example JSON file is the minimal you should have.
CircosAPI allows you to set your default parameters to your configuration via a JSON file that is found in the /defaults directory.
The defaults.json looks like this.
So you can change the values in this file.
Circos parses the .conf file to generate the graphics. Therefore you need to convert this Perl script to .conf. To do so, the last line in script.pl you saw above do just that.
However, you need to run this script in the command line.
This command creates a .conf file based on the script.pl.
After you get your .conf file, just do like what you have been doing with your .conf files previously.