How to add lines to the circos.track plot if the gene is present
0
0
Entering edit mode
6.3 years ago
nkuo ▴ 30

Hi guys, I am very new to R and I am trying to create a bacterial chromosome circos plot with different lineage

I am able to use circos plot to create the layer using following code

           library(circlize)

           rv_tables = read.table('final.tsv', header = T, sep = '\t')

           df = data.frame( name  = rv_tables$Chromsome, start = c(rv_tables$start), end = c(rv_tables$stop))
           circos.genomicInitialize(df)

the rv_tables looks like this

   chromosome  gene  start  stop  lineage1  lineage2  lineage 3

      ch1      gene1    1     10      1         1        1

      ch1      gene2    11    20      0         1        1

      ch1      gene3    21    30      1         0        1

then add track for each lineage with following code:

          circos.track(ylim = c(0, 1), bg.border = "black",  bg.col='#FF000040', panel.fun = function(x,y) {  (what to put)   }, track.height = 0.125)

but now I want to show that genes are present/absence in each track (lineage), with 1 as present and 0 as not present, how do I do that within the circos.track to make that happen

thank you

R CircosPlot • 1.3k views
ADD COMMENT

Login before adding your answer.

Traffic: 1526 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6