This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DEXSeq multiple time points

Dear all,

we try to analyze a time series with DEXSeq (DEXSeq_1.12.1). We have 4 time points and at each time point we have 3 replicates, so in total 12 samples.

But we don't know how to design the fullModel and the reducedModel?

Or with other words, we want do similar comparisons as with the --time-series flag of cuffdiff.

Thanks for your help.

tps<-c("TP5","TP10","TP15","TP20")
sampleTable = data.frame(
      row.names =  c( paste(sep=".",tps[1],c(1,2,3)),  paste(sep=".",tps[2],c(1,2,3)) ,
                      paste(sep=".",tps[3],c(1,2,3)),  paste(sep=".",tps[4],c(1,2,3)) ),
      condition = c(rep(tps[1],3),rep(tps[2],3),rep(tps[3],3),rep(tps[4],3) )
    )

dxd2<-DEXSeq::DEXSeqDataSetFromHTSeq(
      countfiles=countfiles, sampleData=sampleTable,
      design= ~ sample + exon + condition:exon, flattenedfile=flattenedfile )

BPPARAM <- MulticoreParam(workers = 32)
    dxd2 = DEXSeq::estimateSizeFactors( dxd2 )
    dxd2 = DEXSeq::estimateDispersions( dxd2, BPPARAM=BPPARAM)
    dxd2 = DEXSeq::testForDEU( dxd2, BPPARAM=BPPARAM)
    dxd2 = DEXSeq::estimateExonFoldChanges(dxd2, BPPARAM=BPPARAM,)
    dxr2 = DEXSeq::DEXSeqResults( dxd2 )
dexseq r time-series exon rna-seq

Do you want to compare the individual time points against each other or just see if time has an effect? In the latter case, the reduced model is ~1. In the former case, it'd make more sense to uses contrasts (not sure if DEXseq supports that), though you can always subset (this isn't ideal, but if it's the only option...).

Thanks for your fast reply.

  1. We want to compare the time points. Currently, we compare:

    T5 vs T10, T10 vs T15,and T15 vs T20.

    Here, we make the three comparisons individual ( with individual normalization), but do you think it would be better to make an "overall" normalization ( calculating the library sizes ones) and afterwards the three comparisons?

  2. How should we define the contrasts if we decide to use DESeq or edgeR for detecting differentially expressed genes?

1. In theory, fitting the entire model at once should provide better results.

2. Assuming a base level of T5, then T5 vs anything doesn't need a contrast, T10 vs T15 would be c(0,1,-1,0) and T15 vs T20 would be c(0,0,1,-1). In edgeR you wouldn't specify an intercept (~0+time), in deseq2 you can leave it in.

0 answers

No answers yet.

Log in to answer this question.