Putting aside the rationale for wanting to remove these genes, there are many ways to do what you're after.
Let's say your DESeqDataSet
object is named dds
and your "results table" is called res
.
Take a minute to familiarize yourself with the type of entries stored in the columns of res
, by taking a quick peak: head(res)
.
Your dds
should have some type of row-level identifiers. You can find this out by looking at the output of head(rownames(dds))
. Can you match those identifiers with any of the entries in the columns of res
? If you can't, you've got larger fish to fry, but let's press on ...
Depending on how you built dds
, it should also have a DataFrame
of meta information for the rows (genes) of your dds
, which you can see by looking at rowData(dds)
. Do any of the entries there match the entries in the columns of res
?
One you've identified the column in res
that has identifiers you can match to some gene information in dds
, then get the identifiers from res
you want to remove, and store them in axe
, and do something like dds2 <- dds[!rowData(dds)$some_identifier %in% axe,]
A DESeqDataSet
is a SummarizedExperiment
(read that vignette if you haven't already). Both of which can be indexed like a 2d data structure. If you are having problems with the mechanics of subsetting and filtering 2d objects, then it'd be helpful to run through a couple of R tutorials before you get too frustrated by some R basics in your bioinformatics quest.
Deleted for now, think I figured it out.