Adding legends to sushi plots produced using plotBed function
1
0
Entering edit mode
@dimitris-polychronopoulos-9192
Last seen 7.4 years ago
United Kingdom

Dear all,

I am using the vignette of sushi (which i find it really useful) to visualize genomic regions in bed format using the plotBed function. Could you please help me with adding a legend in the produced plot (currently i am using Sushicolors(7))? I have seen in the vignette that there is a function called addlegend but the help page says that "This function adds a legend to Sushi plots that have a colorby function (e.g. plotHic, plotGenes, and plotBedpe)". Any advice with the plotBed function?

Example code below:

plotBed(beddata = zeb2cnes,chrom=chrom,chromstart = chromstart,chromend = chromend, row='supplied',palettes = list(SushiColors(7)),type="density")

labelgenome(chrom,chromstart,chromend,n=50, scale="Mb",edgeblankfraction=0.20,cex.axis=.75)

Many thanks in advance.

Dimitris

 

sushi plotBed • 1.3k views
ADD COMMENT
1
Entering edit mode
dphansti ▴ 10
@dphansti-8015
Last seen 8.7 years ago
United States

It depends on what you want the legend to be.  addlegend adds a heatmap style legend.  All it requires is a range (e.g. c(0,100) ) and a color palette.  This might not be appropriate for the type of plot you are generating.

You are probably best off by just using the "legend" function and making the legend yourself.

Cheers,

Doug

ADD COMMENT

Login before adding your answer.

Traffic: 660 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6