Question: Filtering DGEList object in edgeR
0
gravatar for alakatos
21 months ago by
alakatos90
United States
alakatos90 wrote:

Hello All, 

I made a DGEList object.

d <- DGEList(counts = COUNTS[,8:43], group = condition,genes=COUNTS$HGNC_symbol) 

 

I added  additional parameters to the list.

rownames(d) <- COUNTS$Ensembl
d$ENTREZ <- COUNTS$NCBI_geneID
d$ENSEMBL <- COUNTS$Ensembl
d$Symbol <- COUNTS$HGNC_symbol
d$length <- COUNTS$Length
d$gc <- COUNTS$GC​

Then I filtered the list.

keep <- rowSums(cpm(d)>2)>= 3
d <- d[keep,]
dim(d)

13980 36

The filtering worked on the original DGEList object but not on the added parameters.

$genes
                   genes
ENSG00000000003   TSPAN6
ENSG00000000419     DPM1
ENSG00000000457    SCYL3
ENSG00000000460 C1orf112
ENSG00000001036    FUCA2
13980 more rows ...

$ENTREZ
[1]  7105 64102  8813 57147 55732
58228 more elements ...

$ENSEMBL
[1] ENSG00000000003 ENSG00000000005 ENSG00000000419 ENSG00000000457 ENSG00000000460
58233 Levels: ENSG00000000003 ENSG00000000005 ENSG00000000419 ENSG00000000457 ... ENSG00000284600
58228 more elements  etc.

I was wondering if there is a way to filter the added parameters as well to keep all the info in one place for downstream analysis.

Thank you for your help and time.

Anita 

edger filter dgelist • 657 views
ADD COMMENTlink modified 21 months ago by Gordon Smyth37k • written 21 months ago by alakatos90
Answer: Filtering DGEList object in edgeR
2
gravatar for Ryan C. Thompson
21 months ago by
The Scripps Research Institute, La Jolla, CA
Ryan C. Thompson7.3k wrote:

If you want to add additional gene metadata, do so by adding columns to the d$genes data frame (or creating it if it doesn't exist). Similarly, to add sample metadata, add columns to the d$samples data frame. These elements will be subset along with the counts matrix as you expect.

ADD COMMENTlink modified 21 months ago • written 21 months ago by Ryan C. Thompson7.3k

It worked. Thanks.

ADD REPLYlink written 21 months ago by alakatos90
Answer: Filtering DGEList object in edgeR
0
gravatar for Gordon Smyth
21 months ago by
Gordon Smyth37k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth37k wrote:

As Ryan has already said, you need to add gene annotation columns to d$genes rather than to d itself, for example

d$genes$Symbol <- COUNTS$HGNC_symbol

or perhaps all at once

d$genes <- COUNTS[,1:7]

For more information, type help("DGEList-class")

 

ADD COMMENTlink modified 21 months ago • written 21 months ago by Gordon Smyth37k

Thank you.

A

 

ADD REPLYlink written 21 months ago by alakatos90
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 16.09
Traffic: 173 users visited in the last hour