<p>To change the maximum number of genes in <code>RCircos</code>, we could modified the <code>char.width</code> according to this <a href="https://www.biostars.org/p/80175/#285205" rel="nofollow noreferrer">link</a>.
The actual value in a RCircos session could be modified with get and reset methods for plot parameters.</p>
<pre class="lang-r prettyprint-override"><code>params &lt;- RCircos.Get.Plot.Parameters() #<span class="math-container">$char.width
params$</span>char.width &lt;- 100 #default 500
RCircos.Reset.Plot.Parameters(params)

#the maxLabels are updated accordingly
RCircos.Get.Gene.Name.Plot.Parameters()
</code></pre>

CC BY-SA 4.0
2020-07-23T00:12:10.457Z
2020-07-23T00:12:10.457Z
Ryan SY Kwan
<p>Just want to add that apart from params$char.width, we can also use</p>
<pre><code>params<span class="math-container">$text.size
params$</span>text.size &lt;- 0.2 #default 0.4
params$base.per.unit &lt; 50000 #imp #default value = 30000
</code></pre>

CC BY-SA 4.0
2020-07-24T14:32:07.450Z
2020-07-24T14:32:07.450Z
Priya
<p>I am using Rcircos to make a chromosome ideogram plot for my gene list (n = 45). However, I am getting this error:</p>
<pre><code> Not all labels will be plotted.
 Type RCircos.Get.Gene.Name.Plot.Parameters()
 to see the number of labels for each chromosome. 
</code></pre>
<p>I am using the below-given script and what to know is there any way to fit all my genes in the chromosome ideogram plot</p>
<pre><code> library(RCircos)
 data(UCSC.HG19.Human.CytoBandIdeogram)
 RCircos.Set.Core.Components(
 cyto.info=UCSC.HG19.Human.CytoBandIdeogram, 
 chr.exclude = NULL, 
 tracks.inside = 10, tracks.outside = 0) 
 
 #Making a plot with RCircos
 out.file &lt;- &quot;RCircos_IF.pdf&quot;;
 pdf(file=out.file, height=8, width=8, compress=TRUE);
 RCircos.Set.Plot.Area();
 par(mai=c(0.25, 0.25, 0.25, 0.25));
 plot.new();
 plot.window(c(-2.5,2.5), c(-2.5, 2.5));

 # plot chromosome ideogram
 RCircos.Set.Plot.Area();
 RCircos.Chromosome.Ideogram.Plot() 
 gene.lable.data = read.table (&quot;IF.txt&quot;, sep=&quot;\t&quot;, header=T, row.names = 1) # IF.txt is my input file
 RCircos.Gene.Connector.Plot(gene.lable.data, track.num = 1, side = &quot;in&quot;);
 track.num &lt;- 2;
 RCircos.Gene.Name.Plot(gene.lable.data,name.col = 4, track.num)

 dev.off()
</code></pre>
<p>My input file looks like</p>
<pre><code>    Chromosome  chromStart  chromEnd    Gene.name
    1   chr1    150363091   150476566   RPRD2
    2   chr1    150549369   150560937   ADAMTSL4
    3   chr1    91949371    92014426    BRDT
    4   chr1    31365625    31376850    FABP3
    5   chr1    150960583   150975004   CERS2
</code></pre>

<r><circos>
How to fit all genes (labels) in chromosome ideogram plot made by RCircos package?
# How to fit all genes (labels) in chromosome ideogram plot made by RCircos package?

(Asked by: username_0 on 2020-07-20)

I am using Rcircos to make a chromosome ideogram plot for my gene list (n = 45). However, I am getting this error:
 Not all labels will be plotted.
 Type RCircos.Get.Gene.Name.Plot.Parameters()
 to see the number of labels for each chromosome. 

I am using the below-given script and what to know is there any way to fit all my genes in the chromosome ideogram plot
 library(RCircos)
 data(UCSC.HG19.Human.CytoBandIdeogram)
 RCircos.Set.Core.Components(
 cyto.info=UCSC.HG19.Human.CytoBandIdeogram, 
 chr.exclude = NULL, 
 tracks.inside = 10, tracks.outside = 0) 
 
 #Making a plot with RCircos
 out.file <- "RCircos_IF.pdf";
 pdf(file=out.file, height=8, width=8, compress=TRUE);
 RCircos.Set.Plot.Area();
 par(mai=c(0.25, 0.25, 0.25, 0.25));
 plot.new();
 plot.window(c(-2.5,2.5), c(-2.5, 2.5));

 # plot chromosome ideogram
 RCircos.Set.Plot.Area();
 RCircos.Chromosome.Ideogram.Plot() 
 gene.lable.data = read.table ("IF.txt", sep="\t", header=T, row.names = 1) # IF.txt is my input file
 RCircos.Gene.Connector.Plot(gene.lable.data, track.num = 1, side = "in");
 track.num <- 2;
 RCircos.Gene.Name.Plot(gene.lable.data,name.col = 4, track.num)

 dev.off()

My input file looks like
    Chromosome  chromStart  chromEnd    Gene.name
    1   chr1    150363091   150476566   RPRD2
    2   chr1    150549369   150560937   ADAMTSL4
    3   chr1    91949371    92014426    BRDT
    4   chr1    31365625    31376850    FABP3
    5   chr1    150960583   150975004   CERS2

**Tags:** r, circos

---

## 2 answers

### Answer by username_1 on 2020-07-23. Score: 2 | Accepted answer

To change the maximum number of genes in RCircos, we could modified the char.width according to this link.
The actual value in a RCircos session could be modified with get and reset methods for plot parameters.
params <- RCircos.Get.Plot.Parameters() #$char.width
params$char.width <- 100 #default 500
RCircos.Reset.Plot.Parameters(params)

#the maxLabels are updated accordingly
RCircos.Get.Gene.Name.Plot.Parameters()


---

### Answer by username_0 on 2020-07-24. Score: 0

Just want to add that apart from params$char.width, we can also use
params$text.size
params$text.size <- 0.2 #default 0.4
params$base.per.unit < 50000 #imp #default value = 30000


---

