Dba.Peakset does not work
1
0
Entering edit mode
fusion.slope ▴ 10
@fusionslope-12296
Last seen 6.0 years ago

Hello,

am trying to import bed files from MACS2 peak calling with dba.peakset function. I have 3 files and i would like to import in this way:

 

mESC <- dba.peakset(NULL,peaks="/home/tandrean/Desktop/Gadd45-TKO/4.test_peaks.narrowPeak",
                    peak.caller="bed", peak.format= "narrow",sampID="Gadd45.TKO.1",tissue="mESC",
                    factor="ER",condition="TKO",replicate=1)
mESC <- dba.peakset(NULL,
                    peaks="/home/tandrean/Desktop/Gadd45-TKO/5.test_peaks.narrowPeak",
                    peak.caller="bed", peak.format= "narrow", sampID="Gadd45.TKO.2",tissue="mESC",
                    factor="ER",condition="TKO",replicate=2)
mESC <- dba.peakset(NULL,
                    peaks="/home/tandrean/Desktop/Gadd45-TKO/6.test_peaks.narrowPeak",
                    peak.caller="bed", peak.format= "narrow", sampID="Gadd45.TKO.3",tissue="mESC",
                    factor="ER",condition="TKO",replicate=3)

mESC

 

output: 

1 Samples, 40377 sites in matrix:
            ID Tissue Factor Condition Treatment Replicate Caller Intervals
1 Gadd45.TKO.3   mESC     ER       TKO                   3    bed     40377
 

Now i would like to merge the peak with dba.peakset like this:

 

mESC.consensus <- dba.peakset(mESC,1:3, minOverlap=3, bRetrieve=TRUE)

 

I have an error at this step:

Error in pv$peaks[[i]] : subscript out of bounds

 

Any Help? What am I doing wrong?

Thanks

 

diffbind dba.peakset • 1.1k views
ADD COMMENT
2
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 4 weeks ago
Cambridge, UK

As you can see, the DBA object mESC contains only one peakset. This is because you aren't passing in mESC to subsequent calls to dba.peakset() after the first call (repeating NULL instead). Your code should look like:

> mESC <- dba.peakset(NULL,
                      peaks="/home/tandrean/Desktop/Gadd45-TKO/4.test_peaks.narrowPeak",
                      peak.caller="bed", peak.format= "narrow",
                      sampID="Gadd45.TKO.1",tissue="mESC",
                      factor="ER",condition="TKO",replicate=1)
> mESC <- dba.peakset(mESC,
                      peaks="/home/tandrean/Desktop/Gadd45-TKO/5.test_peaks.narrowPeak",
                      peak.caller="bed", peak.format= "narrow",
                      sampID="Gadd45.TKO.2",tissue="mESC",
                      factor="ER",condition="TKO",replicate=2)
> mESC <- dba.peakset(mESC,
                      peaks="/home/tandrean/Desktop/Gadd45-TKO/6.test_peaks.narrowPeak",
                      peak.caller="bed", peak.format= "narrow",
                      sampID="Gadd45.TKO.3",tissue="mESC",
                      factor="ER",condition="TKO",replicate=3)

> mESC

Cheers-

Rory

ADD COMMENT

Login before adding your answer.

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