Hi,
I am a novice for R and bioinformatics. I am trying to run DESeq2 with my raw count table (.txt). I have been trying to follow the beginner's guide for the DESeq2 package, but it is still hard to understand because my experimental condition is different from the example. Would you please help me to figure it out how to make a DESeqDataset and run? Thank you in advance for your time.
Here is my experimental design.
- Treatment: Control vs Treated
- Animal group: 4 genotypes in duplicate (genotype1-1, genotype1-2, genotype2-1, genotype2-2, genotype3-1, genotype3-2, genotype4-1, genotype4-2)
- Model: Treatment, Animal group, Animal * Treatment (interaction of animal and treatment).
I want to run DESeq2 with 2-way ANOVA-like frame work (2 treatment X 4 genotypes).
Jin
Which animal groups are treated and untreated?
Each treatment has 4 genotypes.
In other words, Control (genotype1-1, genotype1-2, genotype2-1, genotype2-2, genotype3-1, genotype3-2, genotype4-1, genotype4-2).
Treated (genotype1-1, genotype1-2, genotype2-1, genotype2-2, genotype3-1, genotype3-2, genotype4-1, genotype4-2).
So if I understand correctly, you have total 16 samples. 8 treated and 8 control, each with 4 genotypes in duplicates.
But again if you post this on bioconductor support forum you will get proper suggestion from developer himself.
Hi poisonAlien,
Thank you very much for your help. I will try this and post on the forum as your suggestion as well.
Jin
I tried it, and got a following Error like below.
countMatrix
is your counts table. (as you mentioned in your question - raw count table (.txt).) You should read it into R before doing this.Assuming you have named your table as 'count_table.txt' and first column is your gene names (or IDs), followed by rest of the 16 columns, organised according to sample names in above 'coldata'
then try running above code.
There was no error, but give some message below,
It appears that the last variable in the design formula,
treatment
, has a factor level,control
, which is not the base level. We recommend you usefactor(...,levels=...)
orrelevel()
to set this as the base level before proceeding. for more information, please see the 'Note on factor levels' invignette('DESeq2')
.Ahh! The warning because reference level is treated here. See the edit above.
It works! Thank you so much for your help!
I have got the result below,
Does this mean that the
genotype4_treated
is significantly different from others?Sorry again, I am in trouble with an Error. Below is all scripts.
I can't say much about your results. But regarding the above error, your first column must start with counts. Here your first column is ID's, which should be rownames. While reading the table, use
row.names = 1
, which makes first columns as rowanmes. Anyways here is it.Thank you so much for your help again. I appreciate it.
Hi, I am just bit confused.. I run the following script on R version 3.2 and everything was fine:
however, when I updated R into 3.3 I start getting the following error message:
I tried to follow many solutions but non of them worked .
can anyone help
thanks much