normalization with DEseq2
3
0
Entering edit mode
8.5 years ago
zizigolu ★ 4.3k

Hi,

I counted my reads using featurecounts, now i was going to normalize them by DEseq2 package but I don't know what happened

> library("DESeq2")
> ddsSE <- DESeqDataSet(se, design = ~ cell + dex)
Error in assayNames(se) : 
  error in evaluating the argument 'x' in selecting a method for function 'assayNames': Error: object 'se' not found
> dds <- DESeqDataSetFromMatrix(countData = countData,
+ colData = colData,
+ design = ~ condition)
Error in as.matrix(countData) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Error: object 'countData' not found
> directory <- "/usr/data/nfs6/izadi/microarray/subread-1.4.6-p5-source/summary.txt/"
> dds <- DESeqDataSetFromMatrix(countData = countData,
+                               colData = colData,
+                               design = ~ condition)
Error in as.matrix(countData) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Error: object 'countData' not found

Please someone tell me what can I do

RNA-Seq DEseq2 • 7.1k views
ADD COMMENT
2
Entering edit mode
8.5 years ago
Error: object 'se' not found

What do you think that means? You should be able to figure it out from the error message.

ADD COMMENT
0
Entering edit mode

But I can't... Sorry you think if i can use excel function instead of R to normalize my reads count because since started bioinformatics never i could run anything in R properly :(

ADD REPLY
4
Entering edit mode

If you're an academic/ researcher, you need to take the time to learn R if you want to progress in Bioinformatics. Either you take some time learning the skills yourself, or you speak to your supervisor / boss and ask if there are any bioinformaticians within your facility you could consult with. Option C is that you ask your supervisor/ boss to send you on an R course. You can't just post every single error that you get and expect everyone within this community to figure out your problems for you. Sorry if that sounds harsh - but you need to be practical in filling the gaps in your knowledge!

ADD REPLY
0
Entering edit mode

Yes u right

but I'm a visitor here and Iran ministry of science supported me then i cant ask mpi to provide a course for me, here in mpi i tried to much to ask help to learn bioinformatics but everyone were busy and rejected me...

ADD REPLY
2
Entering edit mode
8.5 years ago

"se" should be your data

You can read in the DESeq2 vignette you need to provide to this package a data.frame (a sort of matrix) containing a list of genes names as row names, and the counts you get after mapping as columns whose col names are set with the names of all the conditions you use

You can do that with R, but you need to know some easy and basic knowledge of R to do so.

I can recommend the following

  1. Tu run the R package swirl() to learn some basics of R. Just install the package, load the library and run swirl(). And then just follow the instructions..

  2. To use excel to handle the data to format them in the way that DESeq is expecting to receive. I insist.. as rownames you need to provide the gene names, and so on, so still is likely that some handling need to be done with R

And stick to R. If you are using bioinformatics, you need to have some basic knowledge of it

ADD COMMENT
0
Entering edit mode

Thank you Antonio,

This is few rows of my featurecounts output

Geneid      accepted018347_hits.bam   accepted019035_hits.bam   acceptedSRR074122_hits.bam   acceptedSRR074123_hits.bam   acceptedSRR074123_hits.bam   acceptedSRR314813_hits.bam   acceptedSRR314814_hits.bam   acceptedSRR314815_hits.bam      acceptedSRR331224_hits.bam   acceptedSRR346552_hits.bam   acceptedSRR346553_hits.bam   acceptedSRR390313_hits.bam
AT1G01010   31     37   4   3   3   57   685   138      267   114   215   9
AT1G01020   153    211    19    8    8    132    192    130        89    233    260    14
AT1G01030   10     13    0    1    1    80    13    78        6    95    89    2
AT1G01040   88     106    3    0    0    647    776    1036        442    865    963    30

I need to normalize this file until Thursday, but really I got confused...

ADD REPLY
1
Entering edit mode

Take a look to pages 5 and 6 of this document

How have loaded your data?

The DESeqDataSet() function is expecting data already formatted as a SummarizedExperiment format, and your data does not have this format. You must follow section 1.2.3 "Count matrix input" that will let you enter your data. You must also provide with another data.frame containing the conditions. See the vignette for the details

You just after loading the library and after creating both dataframes (counts and conditions)..

dds <- DESeqDataSetFromMatrix(countData = your_featurecounts_output_file, colData = colData, design = ~ condition)
ADD REPLY
0
Entering edit mode

In page 5 and 6 i typed the codes

> library("DESeq2")
> ddsSE <- DESeqDataSet(se, design = ~ cell + dex)
> ddsSE
class: DESeqDataSet 
dim: 64102 8 
exptData(1): ''
assays(1): counts
rownames(64102): ENSG00000000003 ENSG00000000005 ... LRG_98
  LRG_99
rowRanges metadata column names(0):
colnames(8): SRR1039508 SRR1039509 ... SRR1039520 SRR1039521
colData names(9): SampleName cell ... Sample BioSample

But is this is not my data

ADD REPLY
1
Entering edit mode

It is sort of confusing

After running

ddsSE <- DESeqDataSet(se, design = ~ cell + dex)

the first time, you got an error

Now you run the same code, and no error whatsoever.. And I don't know why..

DeSeqDataSet is used when your data is formatted as a SummarizeExperiment coming from another program or package

And you must use DESeqDataSetFromMatrix() when you have a matrix with gene names and counts. In this case, another data.frame is required that describe the conditions of your experiment

I don't know where the "se" data comes from and how you got it

ADD REPLY
0
Entering edit mode

Antonio, I typed the exact codes from page 6 of DEseq2 manual that is why I didn't get error because this is not my data sets and this is the example data embedded in the package... I don't know how to dedicate the commands there to my own data

ADD REPLY
1
Entering edit mode

It seems that you got your data already. Keep going with the analysis

ADD REPLY
0
Entering edit mode

No I mean I only copied and pasted the commands but this is not my data I have only the featurecounts output yet, not more...

Sorry Antonio, if you were me after opening rstudio, what you would type to start the normalization?

ADD REPLY
0
Entering edit mode

see pag 17...

ADD REPLY
0
Entering edit mode

Ok I see

It seems that you have your data.frame with counts already done

Now you need to create a design condition. Here is a copy of the code I use in my own DESeq2

design <- data.frame(mutant=c("704","704","4249","4249","8987","8987"), condition= c("N","NA","N","NA","N","NA"))
rownames(design) <- c("N704","NA704","N4249","NA4249","N8987","NA8987") # We name rows
head(diseno)

See the c(data, bla bla..) ? Mutants are a set of three mutants in my case. conditions indicate that they were treated in two different ways. There are infinite ways of designing your experiments

You need to create a data.frame with your conditions and or treatment in a similar way

Once you have both, you ca import your data into DESeq

ADD REPLY
0
Entering edit mode

Thank you so much for your patience...

As I told I only have a file containing the reads count by featurecounts in txt format as I pasted above...

Then do I have data frame or I should do perform something to create data frame?

I have 61 samples collected from various RNA-seq experiments with various condition

I named the sample by the SSR accession for example SSR047183 and not like your case defined by treatment or control

Anyway you thought me to preparing the condition design (I have not tried yet) but what can I do for data frame?

ADD REPLY
0
Entering edit mode

Send me your e-mail. I will help you in private. We will post here the solution afterwards. Mine es arfranco at uco.es

ADD REPLY
0
Entering edit mode

Really thank you Antonio

This is my email

Fereshteh.Izadi@mpikg.mpg.de

ADD REPLY
1
Entering edit mode
8.5 years ago

Is there any reason why you are creating DESeq2 object using 2 methods at the same time? Were you trying different methods to create DESeqDataSets? (code copy/pasted from OP)

1) Creating DESeqDataSet from sumarized experiment

> ddsSE <- DESeqDataSet(se, design = ~ cell + dex)

2) Creating DESeqDataSet from Matrix

> dds <- DESeqDataSetFromMatrix(countData = countData,
+ colData = colData,
+ design = ~ condition)
ADD COMMENT

Login before adding your answer.

Traffic: 2384 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6