Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to adjust the length of tracks' title region. #67

Open
Han-26 opened this issue Sep 22, 2022 · 0 comments
Open

Unable to adjust the length of tracks' title region. #67

Han-26 opened this issue Sep 22, 2022 · 0 comments

Comments

@Han-26
Copy link

Han-26 commented Sep 22, 2022

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?

image

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant