This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to add lines to the circos.track plot if the gene is present

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

0 answers

No answers yet.

Log in to answer this question.