Error in circos plot

Hi there,

I was unable to use the circus plot function after I updated the mixOmics package to 6.19.1. It used to work well on the old version.

This is the code I used:
circosPlot(sgccda.res, cutoff = 0.5, line = TRUE,
color.blocks= c(‘darkorchid’, ‘brown1’, ‘lightgreen’),
color.cor = c(“chocolate3”,“grey20”), size.labels = 1.5)

The sgccda.res is from the block.splsda() function. It contains 1 component from 3 blocks, and my outcome Y has 2 levels. I can extract the selected features and the weights in each block. The plotDiablo() function and plotLoadings() function worked well, but I can’t draw the circos plot.

The error message is here:
Error in if (pix.n < 2) { : missing value where TRUE/FALSE needed

Can anyone help with this issue? Many thanks!

I am unable to replicate your error on mixOmics 6.19.4 so maybe first try updating the package and your R version.

I can see where the issue is occurring, such that either w1 or w2 is NA/NULL within the function drawIdeogram() (see here for the code). In other words, one of the input indices when the arcs are being drawn is missing.

Unfortunately, there is little I can do. There is a wide range of causes which I cannot determine without the data. My suggestion would be to look at the sample names and confirm that they are homogeneous across all blocks. Also ensure theyre in the same order.

If you’re familar with the use of breakpoints in RStudio, I’d explore the dat.c and dat.v objects in drawIdeogram(). Keep an eye out for NAs.

Best of luck. Let me know how you go.