DESeq2 time course using fitted splines
1
0
Entering edit mode
@2289c15f
Last seen 3 months ago
Germany

Hello, I am analyzing timecourse data of aging thymus samples. 29 samples, 11 different age groups. I am fitting splines for each gene and running LRT. Is there a more reliable way to tell how many degrees of freedom fit better (df = 4 vs df = 5), other than visually looking at the fitted splines for individual genes?

Also, are the LFC and lfcSE values at all useful for interpretation when fitting a non-linear model?

#The code I'm using
dds_df4 <- DESeqDataSetFromMatrix(countData = counts,
                                  colData = coldata,
                                  design = ~ ns(age, df = 4) + sex)

keep <- rowSums(counts(dds_df4 )) >= 10
dds_df4 <- dds_df4 [keep,]

dds_df4 <- DESeq(dds_df4 , test="LRT", reduced = ~ sex)

#(Thank you Mike)

sessionInfo( )
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22621)

Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: Europe/Berlin
tzcode source: internal

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

loaded via a namespace (and not attached):
 [1] utf8_1.2.3                  generics_0.1.3              bitops_1.0-7               
 [4] DESeq2_1.40.1               lattice_0.21-8              digest_0.6.31              
 [7] magrittr_2.0.3              evaluate_0.21               grid_4.3.0                 
[10] fastmap_1.1.1               Matrix_1.5-4                GenomeInfoDb_1.36.0        
[13] fansi_1.0.4                 scales_1.2.1                codetools_0.2-19           
[16] cli_3.6.1                   rlang_1.1.1                 crayon_1.5.2               
[19] XVector_0.40.0              Biobase_2.60.0              munsell_0.5.0              
[22] yaml_2.3.7                  DelayedArray_0.26.3         S4Arrays_1.0.4             
[25] tools_4.3.0                 parallel_4.3.0              BiocParallel_1.34.2        
[28] dplyr_1.1.2                 colorspace_2.1-0            ggplot2_3.4.2              
[31] locfit_1.5-9.7              GenomeInfoDbData_1.2.10     SummarizedExperiment_1.30.2
[34] BiocGenerics_0.46.0         vctrs_0.6.2                 R6_2.5.1                   
[37] matrixStats_1.0.0           stats4_4.3.0                lifecycle_1.0.3            
[40] zlibbioc_1.46.0             S4Vectors_0.38.1            IRanges_2.34.0             
[43] pkgconfig_2.0.3             pillar_1.9.0                gtable_0.3.3               
[46] glue_1.6.2                  Rcpp_1.0.10                 xfun_0.39                  
[49] tibble_3.2.1                GenomicRanges_1.52.0        tidyselect_1.2.0           
[52] knitr_1.43                  rstudioapi_0.14             MatrixGenerics_1.12.2      
[55] htmltools_0.5.5             rmarkdown_2.22              compiler_4.3.0             
[58] RCurl_1.98-1.12
RNASeqData TimeCourse DESeq2 timecoursedata • 834 views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 9 hours ago
United States

I usually use visual inspection.

Also, are the LFC and lfcSE values at all useful for interpretation when fitting a non-linear model?

For splines the LFC (the estimated coefficients) are not interpretable or meaningful.

I recently posted some code for helping to draw the resulting curves:

ADD COMMENT

Login before adding your answer.

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