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.