Open Han-26 opened 2 years ago
Hello, I use Gviz to plot tracks but it can't show the title completely and the title region is too wide. I couldn't find any parameters to adjust the length of title regions or the coordinate of titles. Could you please help me to solve this?
chr=unique(t_gene_methP$chr) start=min(t_gene_methP$start) end=max(t_gene_methP$end) cpgI=GRanges(seqnames = Rle(t_gene_methP$chr),ranges = IRanges(start=t_gene_methP$start,end=t_gene_methP$end),betas=t_gene_methP[,4:ncol(t_gene_methP)]) iTrack <- IdeogramTrack(chromosome = chr,genome = "hg38",col="red",fontsize=10) gTrack <- GenomeAxisTrack(range = cpgI,fontsize=6,exponent = 1) aTrack <- AnnotationTrack(cpgI, name = "CpG",background.title = "#FFFEDB",fill="orange",just.group="right") dTrack_box<-DataTrack(range = cpgI,genome = "hg38",chromosome = chr,name = "DNA Methylation", groups=factor(cGrp),missingAsZero=F,na.rm=T, type=c("boxplot"),col=c("light blue","light green",'light pink'), box.width=10,box.ratio=0.5,cex.legend=0.5,cex=0.2 ) #plot plotTracks(list(iTrack,gTrack,dTrack_box,aTrack,grtrack),sizes = c(0.3,0.5,1.5,0.2,0.5), extend.right = 10,extend.left = 10,main = paste0(geneN," on RRBS"),cex.main = 1, margin = 1,lwd.border.title=0.2, collapseTranscripts = TRUE, #labelPos = "below", showTitle = TRUE, from = start,to = end
Hello, I use Gviz to plot tracks but it can't show the title completely and the title region is too wide. I couldn't find any parameters to adjust the length of title regions or the coordinate of titles. Could you please help me to solve this?