trackViewer
trackViewer copied to clipboard
Lolliplot plus with the coverage without geneTrack
Hi, Thank you for developing a beautiful package.
I am trying to make the Lolliplot and bigwig the coverage data like below (paste screenshots).
I know there are some examples in Vignette like below, but this plot uses the genetrack() function.
I want to make a plot by
features <- GRanges("chr1", IRanges(c(1, 501, 1001), width=c(120, 400, 405), names=paste0("block", 1:3)))
Are there any methods to make the plot? Thanks in advance.
I did not understand your question. Do you mean you want to plot the lollipops on the other side of coverages?
I want to combine these two plots.
Could you tell me why this does not fit your requirement?
I need to replace the following part of that script with something because I want a customized track. Thanks for your help.
gene <- geneTrack(get("HSPA8", org.Hs.egSYMBOL2EG), TxDb.Hsapiens.UCSC.hg19.knownGene)[[1]]
From: JIANHONG OU @.> Sent: Thursday, February 8, 2024 8:02:04 AM To: jianhong/trackViewer @.> Cc: h20gg702 @.>; Author @.> Subject: Re: [jianhong/trackViewer] Lolliplot plus with the coverage without geneTrack (Issue #35)
Could you tell me why thishttps://bioconductor.org/packages/release/bioc/vignettes/trackViewer/inst/doc/lollipopPlot.html#Plot_the_lollipop_plot_with_the_coverage_and_annotation_tracks does not fit your requirement?
— Reply to this email directly, view it on GitHubhttps://github.com/jianhong/trackViewer/issues/35#issuecomment-1934439010, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A47IUUMUKROLRBMGPHHEGKDYSTZHZAVCNFSM6AAAAABC6Z24EGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZUGQZTSMBRGA. You are receiving this because you authored the thread.Message ID: @.***>
I updated the package to plot something like this
with the customized geneTrack eg
dat <- gene$dat
mcols(dat) <- NULL
dat <- subsetByOverlaps(dat, gr)
dat$feature <- 'exon' # feature is required
dat$featureID <- paste0('name', seq_along(dat)) # treat each as single exon gene
dat$color <- sample(seq.int(7), length(dat), replace = TRUE) # set the color
dat$height <- sample(c(0.5, 1, 2), length(dat), replace = TRUE) # set the height
dat$hide_label <- TRUE # do not add labels to the block
gene <- new('track', dat=dat, dat2=SNPs, type='gene', name='a name')
optSty <- optimizeStyle(trackList(fox2, gene), theme="col")
trackList <- optSty$tracks
viewerStyle <- optSty$style
vp <- viewTracks(trackList, gr=gr, viewerStyle=viewerStyle)
Try to install the devel version to repeat the plot by BiocManager::install('jianhong/trackViewer')
. The version number is >= 1.39.10.
Thanks for the awsome update! I just wondering if you could show the legend like figure below.
Also, this is not related to this thread..., but in the figure below, is there any function that shows the legend? which color indicates what?
For legend is difficult because I don't have a good idea to locate them.
For the second question, the first element of color will fill dat and the second element of color will fill dat2. Please Note that the signal is accumulated by operation +
.
For legend is difficult because I don't have a good idea to locate them. For the second question, the first element of color will fill dat and the second element of color will fill dat2. Please Note that the signal is accumulated by operation
+
.
I see. Thank you for developing this awsome package!