[R] Need in formatting data for circos plot

pooja sinha pj@|nh@07 @end|ng |rom gm@||@com
Tue Oct 5 14:19:31 CEST 2021


Hi All,

I have gene expression data with differential fold change value and the
file looks like as below:
Chrom start_pos end_pos value
14 20482867 20496901 2.713009346
4 123712710 123718202 -2.20797815
13 80883384 80896042 1.646405782
16 48842551 48844461 -1.636002557
17 28399094 28517527 1.033066311
9 31846044 31913462 -1.738549101
1 45311538 45349706 -1.360867536
I wrote a code in R but it is giving error so I need help in trouble
shooting:
library(circlize)
library(gtools)
library(dplyr)
circos.initializeWithIdeogram(species = "mm10")
circos.par("track.height"=0.20)

circos.genomicTrackPlotRegion(data = db_tr,ylim = C(-7, 7), numeric.column
= 4,
                              panel.fun = function(region,value,...) {
                                cond <- value[,1] < 0.0
                                circos.genomicPoints(region[cond,],
value[cond,], pch = ".", cex = 0.1,
                                                     col = "khaki4")
                                circos.genomicPoints(region[!cond,],
value[!cond,], pch = ".", cex = 0.1,
                                                     col = "indianred")
                              })
Error is : Error in C(-7, 7) : object not interpretable as a factor

Please help as I am new to circos plot and tried a lot. The file is also
attached here.

Thanks,
Puja


More information about the R-help mailing list