Averaging dataTracks in Gviz
1
0
Entering edit mode
3.5 years ago
gdeniz ▴ 20

Hi,

I would like to average (and maybe also additional operations such as subtraction) 2 or more DataTracks and plot the result using the Gviz (https://bioconductor.org/packages/release/bioc/html/Gviz.html) package.

Say I have:

chr="chr2"
gen="mm10"
from=1000
to=5000

dTrep1 <- DataTrack(range = path/to/rep1.bw, genome = gen, 
             name = "bigWig",chromosome = chr)
dTrep2 <- DataTrack(range = path/to/rep2.bw, genome = gen, 
             name = "bigWig",chromosome = chr)

Instead of:

plotTracks(list(dTrep1,dTrep2),type="polygon",from=from,to=to)

I would like to:

plotTracks(mean(dTrep1,dTrep2),type="polygon",from=from,to=to)

Or:

plotTracks(dTrep1-dTrep2,type="polygon",from=from,to=to)

See also posted at: https://support.bioconductor.org/p/9137211/

Thanks.

R Gviz • 1.1k views
ADD COMMENT
2
Entering edit mode
2.8 years ago
gdeniz ▴ 20

Answer to myself, I switched to using Trackplot (https://github.com/PoisonAlien/trackplot) and experience great support by dev.

ADD COMMENT

Login before adding your answer.

Traffic: 2125 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