Model matrix not full rank
1
0
Entering edit mode
sally_b86 • 0
@sally_b86-13975
Last seen 6.1 years ago

Dear Michael, 

In the following coldata I'm obtaining Model matrix not full rank error. I can't remove the batch effect, I want to take it into consideration. As I concluded its replicates and batch that are a linear combination, when I try the same design without one of them it works normally. And I can't remove the replicate effect as well. Any suggestions?

 

Thank you.

colData: 

  replicate surgeon batch time
Ctl.1 R7 Bruno a t0
Ctl.2 R8 Bruno a t0
Ctl.3 R2 Lionel d t0
Ctl.4 R5 Bruno c t0
Ctl.5 R6 Bruno b t0
Ctl.6 R1 Bruno f t0
Ctl.7 R3 Lionel g t0
Ctl.8 R4 Lionel g t0
Sham0.1 R7 Bruno a t1
Sham0.2 R8 Bruno a t1
Sham0.3 R6 Lionel a t1
Sham0.4 R3 Lionel c t1
Sham0.5 R5 Bruno c t1
Sham0.6 R4 Lionel b t1
Sham0.7 R1 Lionel e t1
Sham0.8 R2 Bruno e t1
Sham45.1 R8 Bruno a t2
Sham45.2 R7 Bruno a t2
Sham45.3 R2 Lionel d t2
Sham45.4 R1 Bruno d t2
Sham45.5 R3 Lionel c t2
Sham45.6 R5 Bruno c t2
Sham45.7 R4 Lionel c t2
Sham45.8 R6 Bruno b t2
Sham24.1 R8 Bruno a t3
Sham24.2 R7 Bruno a t3
Sham24.3 R1 Bruno d t3
Sham24.4 R2 Lionel d t3
Sham24.5 R5 Lionel c t3
Sham24.6 R4 Bruno c t3
Sham24.7 R6 Lionel b t3
Sham24.8 R3 Lionel g

t3

deseq2 linear combination model matrix • 1.6k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

What is the experiment? What are you measuring? What is the design you are currently using? What are you trying to compare or test?

What is the meaning of the replicate column here? 

What version of software are you running: include the output of sessionInfo() in posts.

ADD COMMENT
0
Entering edit mode

Its a time series experiment to check differential gene expression across time there are many variables like surgeon, biological replicates and library preparation batch that might affect our analysis.

Biological replicates are done in different days. 

dds <- DESeqDataSetFromMatrix(countData = cts,
                                                       colData = coldata, 
                                                       design = ~ replicate + batch + surgeon + time)

dds <- DESeq(dds, test = "LRT", reduced = ~ replicate + batch + surgeon )

 

ADD REPLY
0
Entering edit mode

What does R1 share with R1 at other times? Same Q but batch?

ADD REPLY
0
Entering edit mode

R1 samples represent the mice sacrificed in the same week. I was wondering if I can remove it from the analysis. Unfortunately, when I do PCA plot, it is clear that there's a variation among biological replicates (8 replicates per time point).

I can consider that its a biological variation and not experimental so once taken into consideration it will induce a big variation right?

ADD REPLY
0
Entering edit mode

And what exactly is batch here. What do the batch = a samples have in common?

ADD REPLY
0
Entering edit mode

batches correspond to library preparation, the samples that are prepared together for mRNA enrichment.

ADD REPLY
0
Entering edit mode

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] DESeq2_1.16.1              SummarizedExperiment_1.6.5 DelayedArray_0.2.7         matrixStats_0.52.2        
 [5] Biobase_2.36.2             GenomicRanges_1.28.5       GenomeInfoDb_1.12.2        IRanges_2.10.3            
 [9] S4Vectors_0.14.5           BiocGenerics_0.22.0       

loaded via a namespace (and not attached):
 [1] genefilter_1.58.1       locfit_1.5-9.1          splines_3.4.1           lattice_0.20-35        
 [5] colorspace_1.3-2        htmltools_0.3.6         base64enc_0.1-3         blob_1.1.0             
 [9] survival_2.41-3         XML_3.98-1.9            rlang_0.1.2             DBI_0.7                
[13] foreign_0.8-69          BiocParallel_1.10.1     bit64_0.9-7             RColorBrewer_1.1-2     
[17] GenomeInfoDbData_0.99.0 plyr_1.8.4              stringr_1.2.0           zlibbioc_1.22.0        
[21] munsell_0.4.3           gtable_0.2.0            htmlwidgets_0.9         memoise_1.1.0          
[25] latticeExtra_0.6-28     knitr_1.17              geneplotter_1.54.0      AnnotationDbi_1.38.2   
[29] htmlTable_1.9           Rcpp_0.12.13            acepack_1.4.1           xtable_1.8-2           
[33] scales_0.5.0            backports_1.1.1         checkmate_1.8.4         Hmisc_4.0-3            
[37] annotate_1.54.0         XVector_0.16.0          bit_1.1-12              gridExtra_2.3          
[41] ggplot2_2.2.1           digest_0.6.12           stringi_1.1.5           grid_3.4.1             
[45] tools_3.4.1             bitops_1.0-6            magrittr_1.5            RSQLite_2.0            
[49] lazyeval_0.2.0          RCurl_1.95-4.8          tibble_1.3.4            Formula_1.2-2          
[53] cluster_2.0.6           Matrix_1.2-11           data.table_1.10.4       rpart_4.1-11           
[57] nnet_7.3-12             compiler_3.4.1         

ADD REPLY

Login before adding your answer.

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