Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: not enough space for calls at track index #377

Open
evoJDG opened this issue Aug 29, 2023 · 0 comments
Open

Error: not enough space for calls at track index #377

evoJDG opened this issue Aug 29, 2023 · 0 comments

Comments

@evoJDG
Copy link

evoJDG commented Aug 29, 2023

Hello. Love the package, it makes beautiful plots.

I saw that this error was previously addressed in issue #260 but the advice does not solve it for me.

I am trying to plot the position of genes on multiple chromosomes. I am currently looping through each chromosome using circos.genomicTrackPlotRegion and to set the region and circos.lines to add the lines. I have >6000 genes in total on 29 chromosomes.

It produces the error Error: not enough space for cells at track index '9'. The index number where it breaks depends on the number and size of the chromosomes. I guess this is to do with the number of lines not fitting in the space for a cell, but reducing the track height does not work, even if it is so small (0.01) that the lines are not really useful. I have tried various combinations of y values, y limits and track heights, but can't find one that plots successfully. Do you have any suggestions?

Thanks.
James

Code:

YLIM=1

circos.clear()
circos.initializeWithIdeogram(df_plot)

loop through

for (i in unique(df_plot$shrt_chrom) ) {

subset for each chromosome

df <- df_plot[ , ] %>%
filter(shrt_chrom == i)

add tracks

circos.genomicTrackPlotRegion(df, ylim = c(0, YLIM),
bg.border = NA,
track.height = 0.1, # have tried various heights, even 0.01 does not work
panel.fun = function(region, value, ...) {
col = value$colour # specified in df
circos.lines(x = df$start,
y=df$y,
type = 'h',
col = "grey",
sector.index = i,
track.index = 2 )
},
cell.padding = c(0, 0, 0, 0)
)

Sample data attached. Let me know if you need more to recreate the error.

Circlize_Question_SampleData.xlsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant