Combining dataTracks in Gviz by averaging or subtraction
0
0
Entering edit mode
gdeniz • 0
@gdeniz-15682
Last seen 4 months ago
United States

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)

Thanks for your help.

Gviz • 189 views
ADD COMMENT

Login before adding your answer.

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