Rename rownames(res) manually
1
0
Entering edit mode
E. Marina ▴ 10
@d228d615
Last seen 2.6 years ago
United Kingdom

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 • 577 views
ADD COMMENT
1
Entering edit mode
ADD REPLY
1
Entering edit mode
Kevin Blighe ★ 3.9k
@kevin
Last seen 22 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 COMMENT
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 REPLY

Login before adding your answer.

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