trackViewer icon indicating copy to clipboard operation
trackViewer copied to clipboard

Lolliplot plus with the coverage without geneTrack

Open h20gg702 opened this issue 1 year ago • 8 comments

Hi, Thank you for developing a beautiful package. I am trying to make the Lolliplot and bigwig the coverage data like below (paste screenshots). スクリーンショット 2024-02-07 17 17 47 I know there are some examples in Vignette like below, but this plot uses the genetrack() function. スクリーンショット 2024-02-07 17 20 36 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))) スクリーンショット 2024-02-07 17 22 33

Are there any methods to make the plot? Thanks in advance.

h20gg702 avatar Feb 08 '24 01:02 h20gg702

I did not understand your question. Do you mean you want to plot the lollipops on the other side of coverages?

jianhong avatar Feb 08 '24 13:02 jianhong

I want to combine these two plots. スクリーンショット 2024-02-07 17 15 34 スクリーンショット 2024-02-07 17 16 16

h20gg702 avatar Feb 08 '24 15:02 h20gg702

Could you tell me why this does not fit your requirement?

jianhong avatar Feb 08 '24 16:02 jianhong

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: @.***>

h20gg702 avatar Feb 08 '24 16:02 h20gg702

I updated the package to plot something like this image 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.

jianhong avatar Feb 08 '24 18:02 jianhong

Thanks for the awsome update! I just wondering if you could show the legend like figure below. スクリーンショット 2024-02-08 12 00 53

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? スクリーンショット 2024-02-08 12 04 06

h20gg702 avatar Feb 08 '24 20:02 h20gg702

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 +.

jianhong avatar Feb 08 '24 20:02 jianhong

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!

h20gg702 avatar Feb 08 '24 23:02 h20gg702