Remove genes in a list from cts
1
0
Entering edit mode
Bine ▴ 50
@bine-23912
Last seen 7 months ago
UK

Dear all,

I hope someone can help me with this as I just cant figure it out. I have my DESEQ2 object cts, which includes all my genes. Now I only want to look at 100 genes, which are in the list "risk_genes".

I tried with cts_new <- cts[cts %in% risk_genes,] but then I am left with 0 genes.

What am I doing wrong?

Thank you so much for any help!!

Bine

DESeq2 • 1.3k views
ADD COMMENT
0
Entering edit mode

That's not the right syntax. Google and experiment until you find the right syntax.

ADD REPLY
1
Entering edit mode
@mikelove
Last seen 17 hours ago
United States

Think about the objects you have. The risk genes is a character vector. If you want to compare to a character vector you need another one. Eg consider rownames()

ADD COMMENT
0
Entering edit mode

I tried different variations now.. I dont know why it is not working..

cts_new<-cts %>% dplyr::filter(rownames(cts) %in% risk_genes_1)

I have been reading in forums and sources but I cant figure it out..

ADD REPLY
1
Entering edit mode

So you read the DESeq2 vignette? The part about pre-filtering? http://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#pre-filtering

ADD REPLY

Login before adding your answer.

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