Subsetting a set of genes of interest from DESeq2 res
1
0
Entering edit mode
5.2 years ago

Dear all,

This is probably a very basic R question but I have done RNA-seq on two groups of cell lines and I want to compare expressions of 50 genes of interest among these two cell lines. I have run DESeq2 and created the results file, and annotated the Ensembl ID with gene symbols. What is the best step to "intersect" my 50 genes of interest with the res file?

Help is very much appreciated!

deseq2 rnaseq gene of interest subsetting • 2.4k views
ADD COMMENT
3
Entering edit mode
5.2 years ago
Haci ▴ 730

A head() of the result table that you want to subset would be helpful when answering your question, but anyway as far as I understand you have already added a gene_symbol column to your result table. If that is the case the following code would give you a table of "your genes of interest".

example_genes_of_interest <- c("EPCAM", "PTPRC", "COL1A1")
res[res$gene_symbol %in% example_genes_of_interest,]
ADD COMMENT
0
Entering edit mode

Thank you! That solved my problem!

ADD REPLY

Login before adding your answer.

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