rna seq design matrix
1
0
Entering edit mode
19 months ago

Hi all, I have RNA-seq data and it is composed of one control group and two knockout groups, to simplify my samples are detailed below;

Control_1
Control_2
AKT_KO_g1_1
AKT_KO_g1_2
AKT_KO_g2_1
AKT_KO_g2_2

These are my samples (in duplicates), so to compare all KO samples with controls and in the same time I want to compare g1 and g2 samples how should I design my matrix?

I have an idea about this but I have never analyzed a data like this before

matrix

sample     KO      gRNA
Control_1     1     0     0
Control_2    1     0     0
AKT_KO_g1_1     1     0     0
AKT_KO_g1_2     1     0     0
AKT_KO_g2_1     1     0     1
AKT_KO_g2_2     1     0     1

But when I design like this in gRNA column g2 will be compared with both g1 and Control. How can I overcome this? Thanks in advance

edgeR deseq2 modelmatrix dge rna-seq • 1.1k views
ADD COMMENT
1
Entering edit mode

You need to design your matrix adequately. Everything is well explained in this tutorial : https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7873980/ The key is to use contrasts

df=data.frame(Genotype=c("Control","Control","KO_g1","KO_g1","KO_g2","KO_g2"))
design=model.matrix(~0+Genotype,df)

...

my.contrasts <- makeContrasts(Control=(GenotypeKO_g1+GenotypeKO_g2)/2-GenotypeControl,
                              g1vg2=GenotypeKO_g2-GenotypeKO_g1,
                              levels=colnames(design))
ADD REPLY
0
Entering edit mode

The DESeq2 analogon to the (a+b)/2 way of making edgeR contrasts for averages would be the listValues, see https://support.bioconductor.org/p/91823/

ADD REPLY
0
Entering edit mode
19 months ago

Have you read the DESeq2 vignette? You don't have to make a model matrix at all, just specify what to compare to what with contrasts.

ADD COMMENT

Login before adding your answer.

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