Rename rownames(res) manually
0
Entering edit mode
E. Marina • 10
@d228d615
Last seen 29 days ago

I ran into a labelling problem with one package later on and would like to know if it is possible to manually change the rownames(res) for specific selected IDs without having to edit the initial counts df and run the analysis again.

[1] "OG_0"    "OG_1"    "OG_10"   "OG_100"  "OG_1000" "OG_1001" "OG_1002" "OG_1003" "OG_1004" "OG_1005" "OG_1006" "OG_1007" "OG_1008" "OG_1009" "OG_101"  "OG_1010"

where ie: OG_0 = "gene A" OG_234 = "gene B"

I tried this but it does not work

rownames(res$priorinfo$rownames)[rownames(res$priorinfo$rownames) == "OG_0"] <- "gene A"
DESeq2 • 88 views
ADD COMMENTlink
1
Entering edit mode
ADD REPLYlink
1
Entering edit mode
@u16406
Last seen 8 hours ago
Republic of Ireland

You can add a new column to your results table that contains the new gene names, and then use that new column for EnhancedVolcano. Or, you can just create a new independent character vector and, instead, pass that to EnhancedVolcano.

Kevin

ADD COMMENTlink
1
Entering edit mode

As on the linked link above: I ran the following to make it work:

    res_volcano<- as.data.frame(res)
    rownames(res_volcano)[rownames(res_volcano) == "OG_0"] <- "Custom label Gene A"
ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
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.3