Filtering DGEList object in edgeR
2
0
Entering edit mode
alakatos ▴ 130
@alakatos-6983
Last seen 5.3 years ago
United States

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 

DGElist filter edgeR • 3.6k views
ADD COMMENT
2
Entering edit mode
@ryan-c-thompson-5618
Last seen 11 weeks ago
Icahn School of Medicine at Mount Sinai…

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 COMMENT
0
Entering edit mode

It worked. Thanks.

ADD REPLY
0
Entering edit mode
@gordon-smyth
Last seen 6 hours ago
WEHI, Melbourne, Australia

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 COMMENT
0
Entering edit mode

Thank you.

A

 

ADD REPLY

Login before adding your answer.

Traffic: 463 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