1. Circos version
This tutorial is tested working with Circos version 0.69-6
Please check your current version using the below command;
All the input files used in this tutorial and the final output files are included in the myplot.tar.gz file available at this link.
2.1. Create a folder for your plot (example ‘myplot’).
2.2. Within the ‘myplot’ folder, create a karyotype file (in plain text) with contents describing your genomes chromosomes, contigs etc. In this tutorial we are creating a file named ‘karyotype.microbe.txt’, with the following contents, describing a bacterial genome with single chromosome and its start - end position.
Check out this circos documentation for more info on karyotypes.
3.1. Within the ‘myplot’ folder, create an ideogram file (in plain text) with contents describing how you want to represent (show) your chromosome that is described in your karyotype (#2.2). In this tutorial we are creating an ideogram file named ‘ideogram.conf’, with the following contents (screenshot below), describing various ideogram formats like spacing, thickness, label etc.
Check out this circos documentation for more info on ideograms
4.1. In the ‘myplot’ folder, create a plain text file, with following contents (shown in below screenshot) and save it as ‘circos.conf’. This is the main circos configuration file that would generate your image, when passed to the circos program. At the minimum, this configuration file specifies the following;
The name and location of the karyotype file
The name and location of the ideogram file
The name and location of the colors, image and housekeeping configuration files
Check out this circos documentation link for more info on describing this configuration file.
5. First plot
5.1. With circos.conf, karyotype.microbe.txt and ideogram.conf in the myplot folder, start a shell terminal, change to the myplot directory and run the circos program using the below command;
circos -conf circos.conf
5.2. If everything goes well, you will see the messages as shown in the above screenshot. The myplot folder will now have your image created and stored as circos.png and circos.svg.
6. Add Ticks
6.1. To add ticks and the corresponding labels, create a ticks.conf text file in the myplot directory and include it in the circos.conf file. The ticks.conf specifies three ticks in this tutorial, along with the fourth tick adding the suffix ‘kb’ to the label. The first tick is not labeled. Run the circos with this updated circos.conf file to generate the following updated image (part of the image shown below)...
Check out this circos documentation link for more info on ticks and labels
7. Add tiles
7.1. Create a text file with following contents, describing different regions of the chromosome you would like to highlight. Save the file as ‘microbe.tile.txt’, in the myplot folder;
7.2. Update the circos.conf file by including a plots block, describing how to plot the tiles and their colors, as shown below;
7.3. Running the circos with the updated plots block will produce the below image;
8. Add tile labels
8.1. Create a microbe.labels.txt file in the myplot folder, with contents defining labels for the previously described tiles, as shown below;
8.2. Update the circos.conf file with the below plot block to add labels to the tiles.
type = text
file = microbe.labels.txt
color = black
r1 = 0.83r+200p
r0 = 0.83r
label_size = 50p
label_font = bold
label_parallel = yes
label_center = yes
padding = 1p
rpadding = 1p
label_snuggle = yes
max_snuggle_distance = 2r
snuggle_sampling = 1
snuggle_tolerance = 0.25r
snuggle_link_overlap_test = yes
snuggle_link_overlap_tolerance = 2p
snuggle_refine = yes
8.3. Run circos with the updated circos.conf file to generate the below image;
Check out this circos documentation link for more info on tiles.
9. Data track 1
9.1. Place your cleaned data file, ‘GSE67221_MukB_22deg_20r_WTCTRL_peaks.txt’, in this tutorial, in the myplot folder.
9.2. Update the circos.conf file by including the below plot block, to plot the peaks data as histograms;
9.3. Run circos with the updated circos.conf file, to generate the image with data histogram
10. Data track 2
10.1. Include the below plot block in the circos.conf file, to add another track of data (‘GSE67221_MatP_37deg_20r_WTCTRL_peaks.txt’) to the previous image;
10.2. Run circos with the updated circos.conf file to generate the below final image;
Check out this circos documentation for more info on plots.