Question: How to add lines to the circos.track plot if the gene is present
0
gravatar for nkuo
11 months ago by
nkuo20
nkuo20 wrote:

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

circosplot R • 378 views
ADD COMMENTlink modified 11 months ago • written 11 months ago by nkuo20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1287 users visited in the last hour