<jupyter_start><jupyter_text>Part 7 of Tick Marks, Grids and Labels: Relative TicksThis page is primarily based on the following page at the Circos documentation site:- [7. Relative Ticks](????????????)That page is found as part number 4 of the ??? part ['Tick Marks, Grids and Labels' section](http://circos.ca/documentation/tutorials/quick_start/) of [the larger set of Circos tutorials](http://circos.ca/documentation/tutorials/).Go back to Part 6 by clicking [here &8592;](TickMarks_Part6.ipynb).----4 --- Tick Marks, Grids and Labels==================================7. Relative Ticks-----------------::: {menu4}[[Lesson](/documentation/tutorials/ticks_and_labels/relative_ticks/lesson){.clean}]{.active}[Images](/documentation/tutorials/ticks_and_labels/relative_ticks/images){.normal}[Configuration](/documentation/tutorials/ticks_and_labels/relative_ticks/configuration){.normal}:::Ticks can be spaced and/or labeled in relative units, with respect tothe length of the ideogram to which they belong. Up to now, you\'ve seenhow to label and space ticks in absolute distances (e.g. every 10 Mb),and this tutorial shows you how to space your ticks in relativedistances (e.g. every 1% along ideogram).There are two independent relative tick settings: relative spacing andrelative labels. Relative spacing is used to set the tick period to berelative to the ideogram (e.g. every 1%). Relative labels are used toformat the label of the tick to be relative to the length of theideogram. These two settings are independent. You can have ticks spacedrelatively, but labeled by their absolute position, and vice versa. Relative SpacingTo space ticks relatively, use the rspacing and spacing\_type parameterin the block. For example, to place ticks every 1% along the ideogram, ```inispacing_type = relativerspacing     = 0.01......``` Note that relative spacing parameters do not collide with absolutespacing, which is defined by the \"spacing\" parameter. This means thatyou can have both \"spacing\" and \"rspacing\" defined, and then togglebetween relative and absolute spacing by defining the value ofspacing\_type. ```ini this tick is relatively spacedspacing      = 10urspacing     = 0.01spacing_type = relative...``` ```ini this tick is absolutely spacedspacing      = 10urspacing     = 0.01spacing_type = absolute......``` Since each tick definition is independent, you can mix relatively spacedticks with absolutely spaced ticks. For example, you can have ticksevery 10Mb and every 10% if you like. ```ini these ticks are every 1Mb (assumes chromosome_units=1000000)spacing      = 1uspacing_type = absolute...``` ```ini these ticks are every 1% of ideogram rspacing     = 0.01spacing_type = relative......``` In the first example image, there are three layers of ticks: absolutespacing every 1Mb, relative spacing every 0.01 and relative spacingevery 0.1. Notice that the labels for each tick layer are absolute. Thisworks well for absolutely spaced ticks, but looks awkward for relativelyspaced ticks (e.g. first tick in relative layer 0.1 is \"24\"). Relative LabelsWhen ticks are relatively spaced (e.g. every 1%), it makes more sensethat their labels are relative too (e.g. appear as 1% rather than thecorresponding absolute amount, such as 24.72 for chr1). To set the ticklabel to be relative, use the label\_relative and rmultiplier settings. ```inispacing_type   = relativerspacing       = 0.01label_relative = yesformat         = %.2f...``` You can define a relative multiplier for the label so that relativelabels like \"0.07\" can be displayed as \"7\". ```inispacing_type   = relativerspacing       = 0.01label_relative = yesformat         = %.2f  labels will be 0.01 0.02 0.03 ......``` With these settings, the tick labels will read 0.01, 0.02, \... 0.99.The \"rmultiplier\" works just like \"multiplier\", but is reserved forlabels of relatively spaced ticks. If rmultiplier was set to 100, thetick labels would be 1.00, 2.00, \... 99.00. For example, to have ticksevery 1% labeled 1%, 2%, \... 99%, use ```inispacing_type   = relativerspacing       = 0.01label_relative = yesrmultiplier    = 100  labels will be 1 2 3 4 ... format         = %d``` By adding a suffix, you can construct labels such as \"6%\" or \"2/10\". ```inispacing_type   = relativerspacing       = 0.01label_relative = yesrmultiplier    = 100 format         = %dsuffix         = %   labels will be 1% 2% 3% ... ``` ```inispacing_type   = relativerspacing       = 0.1label_relative = yesrmultiplier    = 10 format         = %dsuffix         = "/10"  labels will be 1/10 2/10 3/10 ...```  relative ticks - relative to chromsomes or ideogramsIf a chromosome is represented by a single ideogram in its entirety,then the default relative tick settings, which are relative tochromosome size, are appropriate.However, if you are displaying a fraction of a chromosome, or aresplitting it up into multiple ideograms, you may wish to make tick marksrelative to the ideogram and not the chromosome. To do this, set therdivisor. ```inispacing_type   = relativerspacing       = 0.1rdivisor       = ideogram``` With this block, ticks will be spaced every 1/10th of the ideogram theybelong to.---- Generating the plot produced by this example codeThe following two cells will generate the plot. The first cell adjusts the current working directory.<jupyter_code>%cd ../circos-tutorials-0.67/tutorials/4/7/
%%bash
../../../../circos-0.69-6/bin/circos -conf circos.conf<jupyter_output>debuggroup summary 0.37s welcome to circos v0.69-6 31 July 2017 on Perl 5.022000
debuggroup summary 0.38s current working directory /home/jovyan/circos-tutorials-0.67/tutorials/4/7
debuggroup summary 0.38s command ../../../../circos-0.69-6/bin/circos -conf circos.conf
debuggroup summary 0.38s loading configuration from file circos.conf
debuggroup summary 0.38s found conf file circos.conf
debuggroup summary 0.54s debug will appear for these features: output,summary
debuggroup summary 0.54s bitmap output image ./circos.png
debuggroup summary 0.54s SVG output image ./circos.svg
debuggroup summary 0.54s parsing karyotype and organizing ideograms
debuggroup summary 0.67s karyotype has 24 chromosomes of total size 3,095,677,436
debuggroup summary 0.67s applying global and local scaling
debuggroup summary 0.67s allocating image, colors and brushes
debuggroup summary 2.75s drawing 1 ideograms of total size 249,250,622
debuggroup summary 2.75s drawing highlights and ideograms
debuggroup output [...]<jupyter_text>View the plot in this page using the following cell.<jupyter_code>from IPython.display import Image
Image("circos.png")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09806879903439952, 'fraction_numerical': 0.038322269161134584, 'mean_word_length': 4.075803981623277, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '227752', 'license': 'MIT', 'n_tokens_mistral': 2066, 'n_tokens_neox': 1788, 'n_words': 792, 'path': 'notebooks/TickMarks_Part7.ipynb', 'repo_name': 'fomightez/cbr-accompmatz', 'size': '6628'}