我在 R 中使用以下函式來開發一個簡單的火山圖:
EnhancedVolcano(all_genes, x = "logFC", y = "adjust.p.value", lab = all_genes$Gene.ID,
pCutoff = 10e-2, FCcutoff = 1)
我希望我的 pCutoff 線看起來代表 p = 0.05,在這個數字的對數刻度上,它在 y 軸上顯示為 1.3。但是,將“10e-2”更改為“10e-2.5”會產生錯誤
錯誤:意外的數字常量:“EnhancedVolcano(all_genes, x = "logFC", y = "adjust.p.value", lab = all_genes$Gene.ID, pCutoff = 10e-2.5"
關于如何在 1.3 處獲得水平 p 值截止線的任何建議(目前出現在 1.2 處)。以下是一些可重現的資料:
結構(串列(X = 1:14,Gene.ID = c(“A”,“B”,“C”,“D”,“E”,“F”,“G”,“H”,“I ", "J", "K", "L", "M", "N"), logFC = c(1.5, 0.17212922, 0.145542174, 0.304348578, 0.124636936, 0.247841044, 0.160818268, 0.123741518, 0.148530876, 0.148960225, 0.114135472, - 0.147118359, 0.095549291, 0.138521594), AveExpr = c(5.426424957, 4.289728233, 4.901134193, 4.742864705, 5.447030699, 4.539641767, 4.650750102, 5.901020922, 5.365944907, 5.818788787, 4.837214384, 7.017656548, 4.531897822, 5.192294452), t = c(6.15098624, 5.452898247, 4.979246654, 4.949519834, 4.818043279, 4.73403717, 4.701937811, 4.522692175, 4.518518374, 4.281900066, 4.247981727, -4.194421592, 4.10350597, 4.088357671), p.value = c(1.27e-09, 6.8e-08, 7.99e-07, 9.26e-07、1.77e-06、2.65e-06、3.09e-06、7.13e-06、7.27e-06、2.1e-05、2.44e-05、3.07e-05、4.53e-05、4.83 e-05), adjust.p.value = c(1.64e-05, 0.000438854, 0.002987004, 0.002987004, 0.004558267, 0.005687325, 0.005687325, 0.010422933, 0.010422933, 0.027128901, 0.028601707, 0.033061438, 0.04452146, 0.04452146), B = c(11.2786109 , 7.664706936, 5.439886439, 5.306497286, 4.725465519, 4.361868581, 4.224515919, 3.473656504, 3.45649938, 2.508304771, 2.376338878, 2.169980059, 1.825392322, 1.76867543)), class = "data.frame", row.names = c(NA, -14L))B = c(11.2786109, 7.664706936, 5.439886439, 5.306497286, 4.725465519, 4.361868581, 4.224515919, 3.473656504, 3.45649938, 2.508304771, 2.376338878, 2.169980059, 1.825392322, 1.76867543)), class = "data.frame", row.names = c(NA, -14L))B = c(11.2786109, 7.664706936, 5.439886439, 5.306497286, 4.725465519, 4.361868581, 4.224515919, 3.473656504, 3.45649938, 2.508304771, 2.376338878, 2.169980059, 1.825392322, 1.76867543)), class = "data.frame", row.names = c(NA, -14L))
uj5u.com熱心網友回復:
我認為您需要以下代碼,其中 p 值的計算類似于 p=10^-s ,其中 s 是您的 1.3,如下所示:
library(EnhancedVolcano)
EnhancedVolcano(all_genes, x = "logFC", y = "adjust.p.value", lab = all_genes$Gene.ID,
pCutoff = 10^-1.3, FCcutoff = 1)
輸出:
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/498167.html
標籤:r
上一篇:如何在回圈內索引新創建的列名