DiffBind time course
1
0
Entering edit mode
enricoferrero ▴ 660
@enricoferrero-6037
Last seen 3.0 years ago
Switzerland
Hi, Is there a way to use DiffBind to analyse time course data? I have sample and control replicates at five different time points and I would like to know which sites show differential binding over time. At the moment I'm doing multiple pairwise comparisons (i.e: sample at 24h vs control at 24h) and I'm trying to understand if it's possible at all and, if yes, what parameters I should pass to dba.contrast() and dba.analyze(). Thanks! -- Enrico Ferrero
DiffBind • 2.0k views
ADD COMMENT
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 5 weeks ago
Cambridge, UK
Hello Enrico- You can do some more advanced modelling using DiffBind, but to really get the full power of the GLMs, you probably want to extract the binding matrix and/or the edgeR/DESEq2 objects and run the appropriate RNA-seq package directly. Within DiffBind, you can use the "block" parameter in dba.contrast to indicate the metadata field that has the timepoint. So if the sample/control distinction is indicated as the Treatment and the timepoint info is in the Condition, you can say: > DBA = dba.contrast(DBA,categories=DBA_TREATMENT, block=DBA_CONDITION) > DBA = dba.analyze(DBA) # for default edgeR analysis This will model the data as [~Condition + Treatment] and give you the effects of the treatment consistent across timepoints. There are other models you may want to fit, (eg [~Condition * Treatment]); for this you would need to run edgeR (or DESeq/DESeq2) independently -- their respective vignettes give examples of analyzing time series data. -Rory On 09/08/2014 12:02, Enrico Ferrero <enricoferrero86 at="" gmail.com=""> wrote: > >--------------------------------------------------------------------- - > >Message: 1 >Date: Mon, 8 Sep 2014 12:01:57 +0100 >From: Enrico Ferrero <enricoferrero86 at="" gmail.com=""> >To: "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> >Subject: [BioC] DiffBind time course >Message-ID: > <cao22hxcaqm_61p7uh4kskkm13yfn5g5hp7fzs32+cbgtnnpzdw at="" mail.gmail.com=""> >Content-Type: text/plain; charset=UTF-8 > >Hi, > >Is there a way to use DiffBind to analyse time course data? >I have sample and control replicates at five different time points and >I would like to know which sites show differential binding over time. > >At the moment I'm doing multiple pairwise comparisons (i.e: sample at >24h vs control at 24h) and I'm trying to understand if it's possible >at all and, if yes, what parameters I should pass to dba.contrast() >and dba.analyze(). > >Thanks! > >-- >Enrico Ferrero
ADD COMMENT
0
Entering edit mode
Hi Rory, Many thanks for the explanation. At first sight, using a blocking factor should probably do the job - I hadn't though about it. For future reference, how and at what step I can extract the binding matrix or edgeR/DESeq2 objects to continue the analysis with those packages? Thanks! Best, On 9 September 2014 14:43, Rory Stark <rory.stark at="" cruk.cam.ac.uk=""> wrote: > Hello Enrico- > > You can do some more advanced modelling using DiffBind, but to really get > the full power of the GLMs, you probably want to extract the binding > matrix and/or the edgeR/DESEq2 objects and run the appropriate RNA- seq > package directly. > > Within DiffBind, you can use the "block" parameter in dba.contrast to > indicate the metadata field that has the timepoint. So if the > sample/control distinction is indicated as the Treatment and the timepoint > info is in the Condition, you can say: > >> DBA = dba.contrast(DBA,categories=DBA_TREATMENT, block=DBA_CONDITION) >> DBA = dba.analyze(DBA) # for default edgeR analysis > > This will model the data as [~Condition + Treatment] and give you the > effects of the treatment consistent across timepoints. There are other > models you may want to fit, (eg [~Condition * Treatment]); for this you > would need to run edgeR (or DESeq/DESeq2) independently -- their > respective vignettes give examples of analyzing time series data. > > -Rory > > On 09/08/2014 12:02, Enrico Ferrero <enricoferrero86 at="" gmail.com=""> wrote: > >> >>-------------------------------------------------------------------- -- >> >>Message: 1 >>Date: Mon, 8 Sep 2014 12:01:57 +0100 >>From: Enrico Ferrero <enricoferrero86 at="" gmail.com=""> >>To: "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> >>Subject: [BioC] DiffBind time course >>Message-ID: >> <cao22hxcaqm_61p7uh4kskkm13yfn5g5hp7fzs32+cbgtnnpzdw at="" mail.gmail.com=""> >>Content-Type: text/plain; charset=UTF-8 >> >>Hi, >> >>Is there a way to use DiffBind to analyse time course data? >>I have sample and control replicates at five different time points and >>I would like to know which sites show differential binding over time. >> >>At the moment I'm doing multiple pairwise comparisons (i.e: sample at >>24h vs control at 24h) and I'm trying to understand if it's possible >>at all and, if yes, what parameters I should pass to dba.contrast() >>and dba.analyze(). >> >>Thanks! >> >>-- >>Enrico Ferrero > -- Enrico Ferrero
ADD REPLY
0
Entering edit mode
You can get the binding matrix after the call to dba.count, but you should make sure to set the "score" to either DBA_SCORE_READS or DBA_SCORE_READS_MINUS. If you've already counted and don't want to do it again, you can change the score and then retrieve the binding matrix: > DBA = dba.count(DBA,peaks=NULL,score=DBA_SCORE_READS) > bindingMatrix = dba.peakset(DBA, bRetrieve=TRUE) This will return the binding matrix as a GRanges object, with the read counts in the metadata. It may be easier to work with a dataframe: > bindingMatrix = dba.peakset(DBA, bRetrieve=TRUE, DataType=DBA_DATA_FRAME) In which case the count matrix is: > counts = bindingMatrix[,4:ncol(bindingMatrix)] As for retrieving the actual edgeR and DESeq object, the final section int he vignette describes where they are after a call to dba.analyze(). Cheers- Rory On 09/09/2014 15:29, "Enrico Ferrero" <enricoferrero86 at="" gmail.com=""> wrote: >Hi Rory, > >Many thanks for the explanation. At first sight, using a blocking >factor should probably do the job - I hadn't though about it. >For future reference, how and at what step I can extract the binding >matrix or edgeR/DESeq2 objects to continue the analysis with those >packages? > >Thanks! >Best, > > >On 9 September 2014 14:43, Rory Stark <rory.stark at="" cruk.cam.ac.uk=""> wrote: >> Hello Enrico- >> >> You can do some more advanced modelling using DiffBind, but to really >>get >> the full power of the GLMs, you probably want to extract the binding >> matrix and/or the edgeR/DESEq2 objects and run the appropriate RNA- seq >> package directly. >> >> Within DiffBind, you can use the "block" parameter in dba.contrast to >> indicate the metadata field that has the timepoint. So if the >> sample/control distinction is indicated as the Treatment and the >>timepoint >> info is in the Condition, you can say: >> >>> DBA = dba.contrast(DBA,categories=DBA_TREATMENT, block=DBA_CONDITION) >>> DBA = dba.analyze(DBA) # for default edgeR analysis >> >> This will model the data as [~Condition + Treatment] and give you the >> effects of the treatment consistent across timepoints. There are other >> models you may want to fit, (eg [~Condition * Treatment]); for this you >> would need to run edgeR (or DESeq/DESeq2) independently -- their >> respective vignettes give examples of analyzing time series data. >> >> -Rory >> >> On 09/08/2014 12:02, Enrico Ferrero <enricoferrero86 at="" gmail.com=""> wrote: >> >>> >>>------------------------------------------------------------------- --- >>> >>>Message: 1 >>>Date: Mon, 8 Sep 2014 12:01:57 +0100 >>>From: Enrico Ferrero <enricoferrero86 at="" gmail.com=""> >>>To: "bioconductor at r-project.org" <bioconductor at="" r-project.org=""> >>>Subject: [BioC] DiffBind time course >>>Message-ID: >>> >>><cao22hxcaqm_61p7uh4kskkm13yfn5g5hp7fzs32+cbgtnnpzdw at="" mail.gmail.com=""> >>>Content-Type: text/plain; charset=UTF-8 >>> >>>Hi, >>> >>>Is there a way to use DiffBind to analyse time course data? >>>I have sample and control replicates at five different time points and >>>I would like to know which sites show differential binding over time. >>> >>>At the moment I'm doing multiple pairwise comparisons (i.e: sample at >>>24h vs control at 24h) and I'm trying to understand if it's possible >>>at all and, if yes, what parameters I should pass to dba.contrast() >>>and dba.analyze(). >>> >>>Thanks! >>> >>>-- >>>Enrico Ferrero >> > > > >-- >Enrico Ferrero
ADD REPLY
0
Entering edit mode

Dear Rory, 

Thank you for this response, I have found it to be very useful in an analysis I am doing, however I have a quick question:

This will model the data as [~Condition + Treatment] and give you the effects of the treatment consistent across timepoints.

I may have misinterpreted this, but if I performed this analysis with a block, that would show me the differences between my conditions any time-point? So if I found eg 600 sites when performing that analysis across a time-course, would I be expecting to see at least those 600 sites if I did a pair-wise comparison from one time-point in that analysis? I have performed that same analysis and see far fewer sites in a pairwise comparison than what I was seeing for the [condition + treatment].

Sorry if I have misinterpreted, and any clarification would be greatly appreciated. 

Kind regards, 
Andrew

ADD REPLY

Login before adding your answer.

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