DESeq2 Batch effects
1
0
Entering edit mode
@sancharisircar24-10010
Last seen 5.4 years ago

Hello, I need some help regarding this group of RNA-seq data sets on different stress conditions (say A, B and C). The authors who actually performed these experiments performed cluster analysis using FPKM and normalized across all the stress conditions. In the paper, they mentioned they have kept all the experimental conditions same and varied only the stress. I am not interested in DEG analysis as of now, I only want to export the vst-transformed data for downstream analysis (cluster, co-expression network analysis, etc). How do I modify the code ? Kindly help .

Data:

   Stress A

    Ctrl_A_rep1

    Ctrl_A_rep2

    Str_A_1hr_rep1

    Str_A_1hr_rep2

    Str_A_6hr_rep1

    Str_A_6hr_rep2

   Stress B 

    Ctrl_B_rep1

    Ctrl_B_rep2

    Str_B_1hr_rep1

    Str_B_1hr_rep2

    Str_B_6hr_rep1

    Str_B_6hr_rep2

    Str_B_6hr_rep3 

 

Stress C

    Ctrl_Crep1

    Ctrl_C_rep2

    Str_C_1hr_rep1

    Str_C_1hr_rep2

    Str_C_6hr_rep1

    Str_C_6hr_rep2  

R code I tried as of now:

    library(DESeq2)

    count_table<-read.table("all_expr.txt", header=T, row.names=1, sep="\t")

    batch<-factor(c(rep("stress_A",6), rep("stress_B",7), rep("stress_C",6)

    exp_design<-data.frame(row.names=colnames(count_table), condition = c("ctrl_A",  "ctrl_A", "A_1hr", "A_1hr", "A_6hr", "A_6hr",   "ctrl_B",  "ctrl_B", "B_1hr", "B_1hr", "B_6hr", "B_6hr", "B_6hr", "ctrl_C",  "ctrl_C", "C_1hr", "C_1hr", "C_6hr", "C_6hr"), batch)

    conditions=exp_design$condition

    ds <- DESeqDataSetFromMatrix(countData=count_table, exp_design, formula(~batch+condition))    

I am getting this error:

error:

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.

 

deseq2 • 564 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 18 hours ago
United States

The error message points to a section of the vignette. Please go read this section and let me know if you have further questions.

ADD COMMENT

Login before adding your answer.

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