Entering edit mode
Looks like you got something working!
I think you aren't getting quite what you want here. The minOverlap
parameter to dba.peakset only is applied if you are adding a consensus
peakset; you can't use it and Retrieve the peakset in a single step.
The easiest way to get all the peaks that are in at least four
peaksets is as follows:
> bedfilelist2 = dba(sampleSheet="bedfilelist2.csv",…) # read
in samplesheet
> bedfilelist2 = dba(bedfilelist2, minOverlap=4) # re-compute binding
> bedpeakset = dba.peakset(bedfilelist2, bRetrieve=T)
Then bedpeakset is a GRanges object with the overlapping peaks,
including the ranges and seqnames (chromosomes).
Cheers-
Rory
From: 高文超-中山大学
<gwc19880401@163.com<mailto:gwc19880401@163.com>>
Date: Fri, 14 Mar 2014 11:24:11 +0800
To: Rory Stark
<rory.stark@cruk.cam.ac.uk<mailto:rory.stark@cruk.cam.ac.uk>>
Subject: Have I extracted the right data with DiffBind?
Dear Stark,
I have 17 peaksets wiht four examples in the mail attachments. I want
to extract ranges shared by at least 4 of the 17 peaksets. And then I
run the following code under "DiffBind" package:
>bedfilelist2=dba(sampleSheet="bedfilelist2.csv",attributes=DBA_ID,con
fig="config.csv",bAddCallerConsensus=FALSE, bRemoveM=TRUE,
bRemoveRandom=TRUE,bCorPlot=FALSE)
>bedpeakset=dba.peakset(bedfilelist2,minOverlap=4,bRetrieve=TRUE)
>write.table(bedpeakset@ranges,"overlapdata.txt",sep="\t<mailto:bedpea kset@ranges,="">")
>write.table(bedpeakset@seqnames,"seqnames.txt",sep="\t<mailto:bedpeak set@seqnames,="">")
The "overlapdata.txt" file provided me of range information and the
"seqnames.txt" file provided me of chromosome information of the
ranges, is it right?
Thanks for your help!
Cheers,
Gao WenChao
Sun Yat-sen University
[[alternative HTML version deleted]]