DESGfrom HTSEqcount command then summarized result was executed in DESeq. Now I would like to know I have 50 normal and 50 cancer same sample numbers. How I find differentially expresssed genes in these two conditions.
condition <- cc('C1','C2'.....so on ,'N1','N2', and so on)
file_list <- list.files(path = directory, pattern ="*.bam.count")
sampleFiles <- c(file_list)
sampleTable <- data.frame(sampleName = sampleFiles,
fileName = sampleFiles,
condition = condition)
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
class: DESeqDataSet
dim: 47051 100
metadata(1): version
assays(1): counts
rownames(47051): A1BG A1BG-AS1 ... ZZZ3 bA395L14.12
rowData names(0):
colnames(100): C1.bam.count C10.bam.count ... N8.bam.count
N9.bam.count
colData names(1): condition
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.
When I mentioned design =~ 1 in
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory2, design =~ 1)
Warning message:
In DESeqDataSet(se, design = design, ignoreRank) :
some variables in design formula are characters, converting to factors
ddsHTSeq
class: DESeqDataSet
dim: 47051 100
metadata(1): version
assays(1): counts
rownames(47051): A1BG A1BG-AS1 ... ZZZ3 bA395L14.12
rowData names(0):
colnames(100): C1.bam.count C10.bam.count ... N8.bam.count
N9.bam.count
colData names(1): condition
ddsHTSeq <- DESeq(ddsHTSeq)
estimating size factors
estimating dispersions
....................give the result.
Now please guide me how to differentiate among two samples from same organism. I will be heartily thankful to you.
Thank you so much for this.
Sorry for these stupid questions but I have one more issue in:
I have 2 different bacteria names as the filenames for the .count files. For example, "cowan" and "isolate" are names of the bacteria. I tried grep-ing both at a time but it doesn't work. How can I can solve this?
Thanks a ton,
Sudip
Just like the variable condition
remember sampleFiles correspond with condition
Hi ZZzzzzhong I am trying to follow the method you have suggested, however, I am getting an error " Error in data.frame(sampleName = sampleFiles, fileName = sampleFiles, : arguments imply differing number of rows: 0, 4".
I have checked the number of rows in all individual files , and they are same.
Here is my script
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.
When I am executing :