Thanks, the code is working now but it is not plotting in the colorwise manner ie, khaki4 and indian red. Maybe I need to work more. If you have any clue then please let me know.
Thanks again, Puja On Tue, Oct 5, 2021 at 9:19 AM PIKAL Petr <petr.pi...@precheza.cz> wrote: > Hm, > > Maybe if you change > > C(-7, 7) > Error in C(-7, 7) : object not interpretable as a factor > > to > > > c(-7, 7) > [1] -7 7 > > Cheers > Petr > > > S pozdravem | Best Regards > RNDr. Petr PIKAL > Vedoucí Výzkumu a vývoje | Research Manager > PRECHEZA a.s. > nábř. Dr. Edvarda Beneše 1170/24 | 750 02 Přerov | Czech Republic > Tel: +420 581 252 256 | GSM: +420 724 008 364 > petr.pi...@precheza.cz | www.precheza.cz > Osobní údaje: Informace o zpracování a ochraně osobních údajů obchodních > partnerů PRECHEZA a.s. jsou zveřejněny na: > https://www.precheza.cz/zasady-ochrany-osobnich-udaju/ | Information about > processing and protection of business partner's personal data are available > on website: > https://www.precheza.cz/en/personal-data-protection-principles/ > Důvěrnost: Tento e-mail a jakékoliv k němu připojené dokumenty jsou důvěrné > a podléhají tomuto právně závaznému prohlášení o vyloučení odpovědnosti: > https://www.precheza.cz/01-dovetek/ | This email and any documents > attached > to it may be confidential and are subject to the legally binding > disclaimer: > https://www.precheza.cz/en/01-disclaimer/ > > > -----Original Message----- > > From: R-help <r-help-boun...@r-project.org> On Behalf Of pooja sinha > > Sent: Tuesday, October 5, 2021 2:20 PM > > To: r-help mailing list <r-help@r-project.org> > > Subject: [R] Need in formatting data for circos plot > > > > 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 > > ______________________________________________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting- > > guide.html > > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.