Generating Dataset for DESeq2 Analysis Issue
1
0
Entering edit mode
2.7 years ago
alex.j.e • 0

Hi,

Rather new to bioinformatics. Currently generated the 'dds' file used for DESeq2 analysis by combining the count file and sample design matrix.

Upon doing this, I receive this error message:

> **'Warning in DESeqDataSet(se, design = design, ignoreRank) :   some variables in design formula are characters, converting to factors
> Error in checkFullRank(modelMatrix) :    the model matrix is not full
> rank, so the model cannot be fit as specified.   One or more variables
> or interaction terms in the design formula are linear   combinations
> of the others and must be removed.   Please read the vignette section
> 'Model matrix not full rank':   vignette('DESeq2')'**

Just hoping someone could please clarify what this means and explain what steps I can take to resolve it.

Thank you

DESeq2 • 1.1k views
ADD COMMENT
0
Entering edit mode

Can you show your colData() and the design?

ADD REPLY
0
Entering edit mode

I generated the script using this video (https://www.youtube.com/watch?v=wPzeea1Do18) and is found below:

#load in count matrix
dat <- read.csv("counttable2.csv", header = T, row.names = 1)

#load in secondary file, describing sample conditions 
info <- read.table("coldata2.txt", header = T, sep = '\t')

dds <- DESeqDataSetFromMatrix(countData = dat, colData = info, design = (~Library + Tissue + Variety + Time))

for reference, here is the first lines of 48 lines (using head() command) in the coldata, separated by tab:

 X Library Tissue     Variety     Time
1 X1      AA   Leaf    Tolerant  Control
2 X2      AB   Root    Tolerant  Control
3 X3      AC   Leaf Susceptible  Control
4 X4      AD   Root Susceptible  Control
5 X5      AE   Leaf    Tolerant Recovery
6 X6      AF   Root    Tolerant Recovery
ADD REPLY
0
Entering edit mode

Fitting library makes no sense as each sample is nested with itself (at least in this snippet you show). For the rest one would need to see the full table.

ADD REPLY
0
Entering edit mode
    Library Tissue  Variety Time
X1  AA  Leaf    Tolerant    Control
X2  AB  Root    Tolerant    Control
X3  AC  Leaf    Susceptible Control
X4  AD  Root    Susceptible Control
X5  AE  Leaf    Tolerant    Recovery
X6  AF  Root    Tolerant    Recovery
X7  AG  Leaf    Susceptible Recovery
X8  AH  Root    Susceptible Recovery
X9  AI  Leaf    Tolerant    40min
X10 AJ  Root    Tolerant    40min
X11 AK  Leaf    Susceptible 40min
X12 AL  Root    Susceptible 40min
X13 AM  Leaf    Tolerant    120min
X14 AN  Root    Tolerant    120min
X15 AO  Leaf    Susceptible 120min
X16 AP  Root    Susceptible 120min
X17 BA  Leaf    Tolerant    Control
X18 BB  Root    Tolerant    Control
X19 BC  Leaf    Susceptible Control
X20 BD  Root    Susceptible Control
X21 BE  Leaf    Tolerant    Recovery
X22 BF  Root    Tolerant    Recovery
X23 BG  Leaf    Susceptible Recovery
X24 BH  Root    Susceptible Recovery
X25 BI  Leaf    Tolerant    40min
X26 BJ  Root    Tolerant    40min
X27 BK  Leaf    Susceptible 40min
X28 BL  Root    Susceptible 40min
X29 BM  Leaf    Tolerant    120min
X30 BN  Root    Tolerant    120min
X31 BO  Leaf    Susceptible 120min
X32 BP  Root    Susceptible 120min
X33 CA  Leaf    Tolerant    Control
X34 CB  Root    Tolerant    Control
X35 CC  Leaf    Susceptible Control
X36 CD  Root    Susceptible Control
X37 CE  Leaf    Tolerant    Recovery
X38 CF  Root    Tolerant    Recovery
X39 CG  Leaf    Susceptible Recovery
X40 CH  Root    Susceptible Recovery
X41 CI  Leaf    Tolerant    40min
X42 CJ  Root    Tolerant    40min
X43 CK  Leaf    Susceptible 40min
X44 CL  Root    Susceptible 40min
X45 CM  Leaf    Tolerant    120min
X46 CN  Root    Tolerant    120min
X47 CO  Leaf    Susceptible 120min
X48 CP  Root    Susceptible 120min

Here is the full table.

What do i need to change to ensure DESeq2 can run correctly??

ADD REPLY
0
Entering edit mode
Library Tissue  Variety Time

X1 AA Leaf Tolerant Control X2 AB Root Tolerant Control X3 AC Leaf Susceptible Control X4 AD Root Susceptible Control X5 AE Leaf Tolerant Recovery X6 AF Root Tolerant Recovery X7 AG Leaf Susceptible Recovery X8 AH Root Susceptible Recovery X9 AI Leaf Tolerant 40min X10 AJ Root Tolerant 40min X11 AK Leaf Susceptible 40min X12 AL Root Susceptible 40min X13 AM Leaf Tolerant 120min X14 AN Root Tolerant 120min X15 AO Leaf Susceptible 120min X16 AP Root Susceptible 120min X17 BA Leaf Tolerant Control X18 BB Root Tolerant Control X19 BC Leaf Susceptible Control X20 BD Root Susceptible Control X21 BE Leaf Tolerant Recovery X22 BF Root Tolerant Recovery X23 BG Leaf Susceptible Recovery X24 BH Root Susceptible Recovery X25 BI Leaf Tolerant 40min X26 BJ Root Tolerant 40min X27 BK Leaf Susceptible 40min X28 BL Root Susceptible 40min X29 BM Leaf Tolerant 120min X30 BN Root Tolerant 120min X31 BO Leaf Susceptible 120min X32 BP Root Susceptible 120min X33 CA Leaf Tolerant Control X34 CB Root Tolerant Control X35 CC Leaf Susceptible Control X36 CD Root Susceptible Control X37 CE Leaf Tolerant Recovery X38 CF Root Tolerant Recovery X39 CG Leaf Susceptible Recovery X40 CH Root Susceptible Recovery X41 CI Leaf Tolerant 40min X42 CJ Root Tolerant 40min X43 CK Leaf Susceptible 40min X44 CL Root Susceptible 40min X45 CM Leaf Tolerant 120min X46 CN Root Tolerant 120min X47 CO Leaf Susceptible 120min X48 CP Root Susceptible 120min

Here is full table - what needs to be changed to fix this?

ADD REPLY
3
Entering edit mode
2.7 years ago
ATpoint 85k

Just remove Library from the design.

ADD COMMENT
0
Entering edit mode

Though if the A,B and C's in your sample names represent batches, do include that in the design.

ADD REPLY

Login before adding your answer.

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