Hi all ,
I am new to this field of Transcriptome analysis , so please help me in this.
I just want to know that can we run DESeq2 for without replicate of treated and Untreated .If yes then what should the change in the syntax of DESeq2 .Below is the syntax i am using for with Replicate samples.
And if no , then what is the other tool should i use for this type of analysis.
====================================================================================
library(DESeq2)
library(DESeq2)
directory<-"/home/dgl/projects/110_AmpliseqRNA/all_samples_with-replicates/Cervical-Liver"
sampleFiles <- grep("treated",list.files(directory),value=TRUE)
sampleCondition<-c("treated","treated","treated","untreated","untreated","untreated")
sampleTable<-data.frame(sampleName=sampleFiles, fileName=sampleFiles, condition=sampleCondition)
sampleTable
ddsHTSeq<-DESeqDataSetFromHTSeqCount(sampleTable=sampleTable, directory=directory, design=~condition)
colData(ddsHTSeq)$condition<-factor(colData(ddsHTSeq)$condition, levels=c("untreated","treated"))
dds<-DESeq(ddsHTSeq,fitType="mean")
res<-results(dds)
res<-res[order(res$padj),]
head(res)
mcols(res,use.names=TRUE)
write.csv(as.data.frame(res),file="Raw_File_deseq2.csv")
FileforIpathway=res[,c(2,6)]
write.csv(as.data.frame(FileforIpathway),file="File_for_iPathway_deseq2.csv")
pdf("DEseq2_MA_plot.pdf")
plotMA(dds,ylim=c(-10,10),main="DESeq2")
dev.off()
pdf("DESeq2_Dispersion_plot.pdf")
plotDispEsts(dds)
dev.off()
==========================================================================================
It should direct you to read a section of ?DESeq for more information. It redirected there. From there, I am not getting how to change conditions when object is created by DataSetfromHTSeqcount. Kindly guide me.
You can use a design of ~1 to build the object, then you can modify the variables as you like, then change the design to what you want with:
before running DESeq().
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory2, design =~ condition) Warning message: In DESeqDataSet(se, design = design, ignoreRank) : some variables in design formula are characters, converting to factors
ddsHTSeq <- DESeq(ddsHTSeq) estimating size factors estimating dispersions Error in checkForExperimentalReplicates(object, modelMatrix) :
so estimation of dispersion is not possible. Treating samples as replicates was deprecated in v1.20 and no longer supported since v1.
Kindly make it clear to me....I did not get point design <-....
I am new for R and DeSeq2 as well.
Here Please tell me: What I have to write design(dds) <-......
dds <- DESeq(ddsHTSeq) estimating size factors estimating dispersions Error in checkForExperimentalReplicates(object, modelMatrix) :
The design matrix has the same number of samples and coefficients to fit, so estimation of dispersion is not possible. Treating samples as replicates was deprecated in v1.20 and no longer supported since v1.22.
Yes, it is true this is not supported in DESeq2.
Dear Please help me ..I have to submit the task till this week.
This is not an appropriate request for a Bioconductor developer. Sorry I won't have additional feedback here.
I did not get you as I asked for help . I need help to resolve my issue. If you will guide me, how can I correct my errors. Then it will be very helpful. Sorry if I said something wrong.
dsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory2, design =~ condition) Warning message: In DESeqDataSet(se, design = design, ignoreRank) : some variables in design formula are characters, converting to factors
ddsHTSeq <- DESeq(ddsHTSeq) estimating size factors estimating dispersions Error in checkForExperimentalReplicates(object, modelMatrix) :
The design matrix has the same number of samples and coefficients to fit,
so estimation of dispersion is not possible. Treating samples as replicates was deprecated in v1.20 and no longer supported since v1.
Kindly make it clear to me....I did not get point design <-....
I am new for R and DeSeq2 as well.