trackViewer icon indicating copy to clipboard operation
trackViewer copied to clipboard

how can i modify and/or remove the lower legend? or overwrite?

Open storySG opened this issue 1 year ago • 2 comments

Screen Shot 2023-07-03 at 19 19 38

I wanted to plot all the exons of a gene. But I don't want them to be labeled below as exon1, exon2, etc... I just want to have one orange bar with the label "TP53".

EDIT: to clarify, i have the features as a simple GRanges object where i subset the exons of choice but it uses the names of each range as the legend (and GRanges requires unique names)

storySG avatar Jul 03 '23 17:07 storySG

maybe this is already implemented but if there was a similar meta data column like: $label.parameter.draw <- FALSE that could be applied to the features GRanges object that would be ideal!

storySG avatar Jul 03 '23 17:07 storySG

Hi,

Thank you for trying trackViewer to plot your data. I update the development trackViewer to meet your request.

You can try:

BiocManager::install("jianhong/trackViewer")
lolliplot(sample.gr, unname(features)) ## to remove the feature legends
names(features) <- rep("TP53", length(features))
lolliplot(sample.gr, features) ## only show the legends label as "TP53"

FYI, by removing the feature names, the feature legends will be removed.

jianhong avatar Jul 05 '23 17:07 jianhong