Question: normalization with DEseq2
0
gravatar for F
3.0 years ago by
F3.1k
Iran
F3.1k wrote:

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 • 3.0k views
ADD COMMENTlink modified 3.0 years ago by cpad01128.9k • written 3.0 years ago by F3.1k
2
gravatar for Devon Ryan
3.0 years ago by
Devon Ryan84k
Freiburg, Germany
Devon Ryan84k wrote:
 Error: object 'se' not found

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

ADD COMMENTlink written 3.0 years ago by Devon Ryan84k

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 REPLYlink written 3.0 years ago by F3.1k
4

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 REPLYlink written 3.0 years ago by andrew.j.skelton735.3k

yes u right

but im 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 REPLYlink written 3.0 years ago by F3.1k
2
gravatar for Antonio R. Franco
3.0 years ago by
Spain. Universidad de Córdoba
Antonio R. Franco3.8k wrote:

"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 instruntions..

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 yoy are using bioinformatics, you need to have some basic knowledge of it

ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by Antonio R. Franco3.8k

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 REPLYlink written 3.0 years ago by F3.1k
1

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 REPLYlink modified 3.0 years ago • written 3.0 years ago by Antonio R. Franco3.8k

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 REPLYlink modified 3.0 years ago • written 3.0 years ago by F3.1k
1

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 formated 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 REPLYlink written 3.0 years ago by Antonio R. Franco3.8k

Antonio, i typed the exact codes from page 6 of DEseq2 manual that is why i didnt get error because this is not my data sets and this is the example data embedded in the package...i donno how to dedicate the commands there to my own data 

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by F3.1k
1

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

ADD REPLYlink written 3.0 years ago by Antonio R. Franco3.8k

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 rstuio, what you would type to start the normalization?

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by F3.1k

see pag 17...

ADD REPLYlink written 3.0 years ago by Antonio R. Franco3.8k

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 REPLYlink modified 3.0 years ago • written 3.0 years ago by Antonio R. Franco3.8k

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 REPLYlink written 3.0 years ago by F3.1k

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 REPLYlink written 3.0 years ago by Antonio R. Franco3.8k

really thank you Antonio

this is my email

Fereshteh.Izadi@mpikg.mpg.de

ADD REPLYlink written 3.0 years ago by F3.1k
1
gravatar for cpad0112
3.0 years ago by
cpad01128.9k
India
cpad01128.9k wrote:

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 COMMENTlink modified 3.0 years ago • written 3.0 years ago by cpad01128.9k
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: 670 users visited in the last hour