Question: How to input data for DESeq2 from individual HTSeq count?
1
gravatar for sudu87
12 months ago by
sudu8710
sudu8710 wrote:

I am comparing the gene expression of 2 bacteria under 1 condition. I have now the count tables for 3 tech. replicates for each bacteria.

Bacteria1_1.count 
Bacteria1_2.count 
Bacteria1_3.count

...same for the other bacteria.

These files look like this:

gene1 10000 
gene2 500 
gene3 0 
gene4 5000

I want to use DESeq2 for differential gene expression analysis. But I cannot figure out how to properly execute the DESeqDataSetFromHTSeqCount() command with this type of data.

Is there another intermediate step to add ?

rna-seq deseq deseq2 htseq • 2.4k views
ADD COMMENTlink modified 12 months ago by poojasethiya80 • written 12 months ago by sudu8710
5
gravatar for ZZzzzzhong
12 months ago by
ZZzzzzhong210
ZZzzzzhong210 wrote:
directory <- "/path/to/your/files/"

directory is where your htseq-count output files are located.

sampleFiles <- grep("Bacteria",list.files(directory),value=TRUE)

samplesFiles is a variable which points to your htseq-count output files,

condition <- c('Bacteria1','Bacteria1','Bacteria1','Bacteria2','Bacteria2','Bacteria2')

One for one for your sample type

sampleTable <- data.frame(sampleName = sampleFiles,
                      fileName = sampleFiles,
                      condition = condition)
library("DESeq2")
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable,
                                   directory = directory,
                                   design= ~ condition)
ADD COMMENTlink written 12 months ago by ZZzzzzhong210

Thank you so much for this.

Sorry for these stupid questions but I have one more issue in:

sampleFiles <- grep("Bacteria",list.files(directory),value=TRUE)

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

ADD REPLYlink modified 12 months ago • written 12 months ago by sudu8710
2

Just like the variable condition

sampleFiles <- c('cowan1','cowan2','cowan3','isolate1','isolate2','isolate3')

remember sampleFiles correspond with condition

ADD REPLYlink written 12 months ago by ZZzzzzhong210
2
gravatar for poojasethiya
12 months ago by
poojasethiya80
poojasethiya80 wrote:

You can use following function to run DESeq2 on htseq-count output.

deseq_from_htseqcount.R

~ Pooja

ADD COMMENTlink modified 12 months ago • written 12 months ago by poojasethiya80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 968 users visited in the last hour