> setwd("C:/Users/SKULTER/Desktop/New folder/")
> directory <- 'C:/Users/SKULTER/Desktop/New folder/'
> samplefiles <- grep("SRR",list.files(directory),value = TRUE)
> condition <- c('SRR5500529.txt','SRR5500530.txt')
> sampletable <- data.frame(samplname = samplefiles,filename = samplefiles,condition = condition)
library(DESeq2)
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampletable,
+ directory = directory,
+ design = ~ condition)
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.
AFTER THIS I CHANGED CONDITION = ~ 1, It worked but I'm not getting proper log2foldchang values ie no downregulated genes.