DEXSeq: DEXSeqHTML, plotDEXSeq and interaction tests
1
0
Entering edit mode
Joseph Bundy ▴ 20
@joseph-bundy-9123
Last seen 4.8 years ago
United States

Hello all,

Following the advice in this post: C: DEXSeq and Independent filtering , I have been using DEXSeq to analyze mouse samples of different biological sex and age. I specified the sex:time interaction in the design formula and the testForDEU() function seems to have progressed without incident.  However, when attempting to use the DEXSeqHTML() and or plotDEXSeq() functions to visualize results, I am getting errors.  Here's some basic info about my analysis:

> sampleTable
      genotype timepoint sex
1071D       wt        1m   f
1071E       wt        1m   f
1071G       wt        1m   f
1071H       wt        1m   f
1071I       wt        1m   f
1071P       wt        1m   m
1071Q       wt        1m   m
1071X       wt        1m   m
1072B       wt        1m   m
1071T       wt        1m   m
1050B       wt        2m   f
1050C       wt        2m   f
1052C       wt        2m   f
1052I       wt        2m   f
1053D       wt        2m   f
1050Q       wt        2m   m
1052O       wt        2m   m
1053K       wt        2m   m
1053L       wt        2m   m
1053M       wt        2m   m
1057A       wt        4m   f
1057B       wt        4m   f
1057D       wt        4m   f
1056E       wt        4m   f
1066D       wt        4m   f
1048H       wt        4m   m
1048I       wt        4m   m
1048K       wt        4m   m
1056G       wt        4m   m
1056H       wt        4m   m

>dxd = DEXSeqDataSetFromHTSeq(
+ countFiles,
+ sampleData=sampleTable,
+ design = ~sample + exon + sex:exon + timepoint:exon + timepoint:sex:exon,
+   flattenedfile = flattenedFile)
>dxd = estimateSizeFactors(dxd)
>dxd = estimateDispersions(dxd, BPPARAM = BPPARAM)
>dxd = testForDEU(dxd, reducedModel <- ~sample + exon + sex:exon + timepoint:exon)

> colors <- brewer.pal(6, "Set2")
> DEXSeqHTML(file = file,path = comparison, dxr1, FDR=0.05 , color = colors)
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
2: In MulticoreParam(workers = 1) :
  MulticoreParam not supported on Windows. Use SnowParam instead.
3: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
4: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
5: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
6: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
7: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
8: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
9: closing unused connection 8 (all/files/ENSMUSG00000006782expression.html)
10: closing unused connection 7 (all/files/ENSMUSG00000006390expression.html)
11: closing unused connection 6 (all/files/ENSMUSG00000003402expression.html)
12: closing unused connection 5 (all/files/ENSMUSG00000003355expression.html)
13: closing unused connection 4 (all/files/ENSMUSG00000001786expression.html)
14: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
15: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
16: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
17: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
18: closing unused connection 6 (all/files/ENSMUSG00000017390expression.html)
19: closing unused connection 5 (all/files/ENSMUSG00000013523expression.html)
20: closing unused connection 4 (all/files/ENSMUSG00000008206expression.html)
21: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
22: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
23: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
24: closing unused connection 5 (all/files/ENSMUSG00000020315expression.html)
25: closing unused connection 4 (all/files/ENSMUSG00000019843expression.html)
26: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
27: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
28: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
29: closing unused connection 8 (all/files/ENSMUSG00000021794expression.html)
30: closing unused connection 5 (all/files/ENSMUSG00000021451expression.html)
31: closing unused connection 4 (all/files/ENSMUSG00000020435expression.html)
32: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
33: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
34: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
35: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
36: closing unused connection 8 (all/files/ENSMUSG00000023272expression.html)
37: closing unused connection 5 (all/files/ENSMUSG00000022822expression.html)
38: closing unused connection 4 (all/files/ENSMUSG00000022514expression.html)
39: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
40: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
41: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
42: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
43: closing unused connection 5 (all/files/ENSMUSG00000025408expression.html)
44: closing unused connection 4 (all/files/ENSMUSG00000025372expression.html)
45: In plotDEXSeq(object, geneID = gene, FDR = FDR, lwd = 2,  ... :
  glm fit failed for gene ENSMUSG00000025733+ENSMUSG00000093593+ENSMUSG00000025735+ENSMUSG00000073434
46: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
47: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
48: In plotDEXSeq(object, geneID = gene, FDR = FDR, lwd = 2,  ... :
  glm fit failed for gene ENSMUSG00000025733+ENSMUSG00000093593+ENSMUSG00000025735+ENSMUSG00000073434
49: In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'
50: In plotDEXSeq(object, geneID = gene, FDR = FDR, lwd = 2,  ... :
  glm fit failed for gene ENSMUSG00000025733+ENSMUSG00000093593+ENSMUSG00000025735+ENSMUSG00000073434
Warning message:
closing unused connection 4 (all/files/ENSMUSG00000090118expression.html) 

The plotDEXSeq() function also gives an error:

> plotDEXSeq( dxr1, "ENSMUSG00000028879", expression=FALSE, splicing=TRUE)
Error in eval(expr, envir, enclos) : object 'condition' not found
In addition: Warning message:
In is.na(x) : is.na() applied to non-(list or vector) of type 'NULL'

The plotDEXseq error suggests to me that at least one of the columns in the sampleData *must* be named "condition".  The plotDEXSeq function has an argument called "fitExpToVar" which defaults to "condition". The description of this argument is:
   
"A variable contained in the sample annotation of the DEXSeqDataSet, the expression values will be fitted to this variable using the formula count ~ fitExpToVar * exon."

But I have two factors used in the analysis... "sex" and "timepoint". Should I simply make a 3rd "group" factor which contains all combinations of "sex" and "timepoint" and add it to the sampleData object, or do the referenced columns need to actually be ones used in the design formula?

I have run several DEXSeq analyses with doing pairwise comparisons on these data without incident - so I'm fairly confident that my issue is with the structure of this analysis and not with package installation, etc.  

Thanks in advance,

Joseph Bundy
Graduate Student
Florida State University
 

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] RColorBrewer_1.1-2         DEXSeq_1.16.2              DESeq2_1.10.0              RcppArmadillo_0.5.400.2.0 
 [5] Rcpp_0.12.0                SummarizedExperiment_1.0.1 GenomicRanges_1.22.1       GenomeInfoDb_1.6.1        
 [9] IRanges_2.4.4              S4Vectors_0.8.3            Biobase_2.30.0             BiocGenerics_0.16.1       
[13] BiocParallel_1.4.0         BiocInstaller_1.20.1       RevoUtilsMath_3.2.2 
dexseq • 1.6k views
ADD COMMENT
2
Entering edit mode
Alejandro Reyes ★ 1.9k
@alejandro-reyes-5124
Last seen 7 months ago
Novartis Institutes for BioMedical Rese…

Thanks for your detailed report!

You are right, the fitExpToVar value needs to be a column name of colData(dxd)! I have implemented informative error messages in the latest versions (both release and devel) of DEXSeq.

The easiest would be to add a third column in your colData(dxd) concatenating the two variables. Unfortunately, the "colData<-" method was not implemented in DEXSeq, but I have just implemented this method in the latest release (version 1.16.3). You could either add this column when generating your DEXSeqDataSet object and rerun your analysis. Alternatively, install the 1.16.3 version of DEXSeq and do something like:

colData(dxd)$mix <- paste0(colData(dxd)$timepoint, colData(dxd)$sex)

And then specify fitExpToVar="mix" in plotDEXseq and DEXSeqHTML

Best regards,

Alejandro

ADD COMMENT
0
Entering edit mode

Thanks Alejandro!

ADD REPLY

Login before adding your answer.

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