Entering edit mode
3.8 years ago
S AR
▴
80
I have plotted the sars-cov genes in the first circle and now I want to add the base coverage of 6 samples in the inner circles but I'm unable to add multi tracks for the coverage from 6 samples. My code is below that will make 2 circles one is plotting whole chromosome of COVID and the inner circle is the genes in this chromosome:
Library(circos)
df = data.frame(
+ name = c("ORF1a","ORF1b", "S", "ORF3a", "E", "M", "ORF6", "ORF7ab", "ORF8", "N", "ORF10"),
+ start = c(265, 13467, 21562, 25392, 26244, 26522, 27201, 27393, 27893, 28273, 29557),
+ end = c(13468, 21555, 25384, 26220, 26472, 27191, 27387, 27887, 28259, 29533, 29674))
> col_text <- "black"
> circos.par("track.height"=0.85,gap.degree=5,cell.padding=c(0,0,0,0))
> circos.genomicInitialize(df, tickLabelsStartFromZero = FALSE, major.by = 1000,axis.labels.cex = 0.35*par("cex"))
circos.track(ylim=c(0,1),panel.fun=function(x,y) {
+ chr=CELL_META$sector.index
+ xlim=CELL_META$xlim
+ ylim=CELL_META$ylim
+ circos.text(mean(xlim),mean(ylim),chr,cex=0.5,col=col_text,
+ facing="bending.inside",niceFacing=TRUE)
+ },bg.col = c("#FF000040", "#00FF0040", "#0000FF40","#FF0000", "#800000", "#FFFF00","#808000", "#00FF00", "#008000","#00FFFF", "#008080"),bg.border=F,track.height=0.06)
Now how to add base coverage on each genomic positions? I have histogram for each base :
ncov basePos Depth
ncov 1 0
ncov 2 255
ncov 3 10
ncov 4 350
ncov 5 12
.
.
.
.
.
.
.
ncov 225860 1001
I have this coverage file for each 6 samples
My plot currently looks like this: Plot.png
Any help will be really appreciated.
Thanks SAR