转录因子预测-7SCENIC运行runGenie3报错

报错 cannot allocate vector of size 111.3 Mb

runGenie3(exprMat_filtered_log, scenicOptions, nParts = 100) # 6.29日 15:00开始跑
#需要注意nParts参数,它的作用是把表达矩阵分成n份分开计算,目的是防止数据量大时内存不够。


Using 785 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 10
Running GENIE3 part 100
Running GENIE3 part 11
Running GENIE3 part 12
Running GENIE3 part 13
Running GENIE3 part 14
Running GENIE3 part 15
Running GENIE3 part 16
Error in { : task 57 failed - "无法分配大小为111.3 Mb的矢量"

尝试办法1出错解决 | Error: cannot allocate vector of size 109.7 Mb (ngui.cc) 加这个代码 gc(),还是报错

Using 785 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 10
Error in serialize(data, node$con) : error writing to connection

7.7日,清空环境和 gc(),只用了integrated,其他都没加载。还是报错

> runGenie3(exprMat_filtered_log, scenicOptions, nParts = 100) # 6.29日 15:00开始跑
Using 785 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 10
Running GENIE3 part 100
Running GENIE3 part 11
Running GENIE3 part 12
Error in unserialize(socklist[[n]]) : error reading from connection
> 

7.11 重启电脑,开始跑,还是报错

> set.seed(1001)
> runGenie3(exprMat_filtered_log, scenicOptions,nParts=80)
Using 785 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 10
Running GENIE3 part 11
Running GENIE3 part 12
Running GENIE3 part 13
Running GENIE3 part 14
Running GENIE3 part 15
Running GENIE3 part 16
Running GENIE3 part 17
Running GENIE3 part 18
Running GENIE3 part 19
Error in { : task 62 failed - "无法分配大小为111.3 Mb的矢量"

7.12 准备试试这个

https://www.jianshu.com/p/f1976b2f2aa2
https://zhuanlan.zhihu.com/p/603388588
https://www.jianshu.com/p/1c4681c2efc0

> library(future)
> plan()
multicore:
- args: function (..., workers = 10, envir = parent.frame())
- tweaked: TRUE
- call: plan("multicore", workers = 10)
> plan("multicore", workers = 10)
> options(future.globals.maxSize=1000*1024*1024)##default有最大可使用内存限制,可更改
> 
> set.seed(1001)
> runGenie3(exprMat_filtered_log, scenicOptions,nParts=100) #  7.8日 20:00开始跑
Using 785 TFs as potential regulators...
Running GENIE3 part 1
Error in file(con, "w") : all connections are in use
In addition: Warning messages:
1: In .Internal(gzfile(description, open, encoding, compression)) :
  closing unused connection 127 (<-DESKTOP-NN3NDT8:11302)
2: In .Internal(gzfile(description, open, encoding, compression)) :
  closing unused connection 126 (<-DESKTOP-NN3NDT8:11302)
3: In .Internal(gzfile(description, open, encoding, compression)) :
  closing unused connection 125 (<-DESKTOP-NN3NDT8:11302)
4: In .Internal(gzfile(description, open, encoding, compression)) :
  closing unused connection 124 (<-DESKTOP-NN3NDT8:11302)
5: In .Internal(gzfile(description, open, encoding, compression)) :
  closing unused connection 123 (<-DESKTOP-NN3NDT8:11302)

7.14更新报错,又出现了新的报错

> runGenie3(exprMat_filtered_log, scenicOptions,nParts=1000,resumePreviousRun = T) #  7.8日 20:00开始跑
Using 785 TFs as potential regulators...
Error in runGenie3(exprMat_filtered_log, scenicOptions, nParts = 1000,  : 
  Some genes are in several of the partial runs.
> runGenie3(exprMat_filtered_log, scenicOptions,nParts=1000) #  7.8日 20:00开始跑
Using 785 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 10
Running GENIE3 part 100
Running GENIE3 part 1000
Running GENIE3 part 101
Running GENIE3 part 102
Running GENIE3 part 103
Running GENIE3 part 104
Running GENIE3 part 105
Running GENIE3 part 106
Running GENIE3 part 107
Running GENIE3 part 108
Running GENIE3 part 110
Error in file(con, "w") : all connections are i
Running GENIE3 part 109
Running GENIE3 part 11n use
> runGenie3(exprMat_filtered_log, scenicOptions,nParts=1000) #  
Using 785 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 10
Running GENIE3 part 100
Running GENIE3 part 1000
Running GENIE3 part 101
Running GENIE3 part 102
Running GENIE3 part 103
Running GENIE3 part 104
Running GENIE3 part 105
Running GENIE3 part 106
Running GENIE3 part 107
Running GENIE3 part 108
Running GENIE3 part 109
Running GENIE3 part 11
Running GENIE3 part 110
Error in file(con, "w") : all connections are in use

7.27更新:代码什么也没变,居然跑通了?!

> memory.limit(10000000)
[1] 1e+07
> set.seed(1001)
> 
> #exportsForArboreto(exprMat, scenicOptions)
> 
> 
> 
> runGenie3(as.matrix(exprMat_filtered_log), scenicOptions)
Using 785 TFs as potential regulators...
Running GENIE3 part 1
Running GENIE3 part 10
Running GENIE3 part 2
Running GENIE3 part 3
Running GENIE3 part 4
Running GENIE3 part 5
Running GENIE3 part 6
Running GENIE3 part 7
Running GENIE3 part 8
Running GENIE3 part 9
Finished running GENIE3.
> save(exprMat_filtered,scenicOptions,file = "input_GENIE3_data.Rdata")
> scenicOptions@settings$nCores <- 10#并行计算时调用的线程
> scenicOptions@settings$seed <- 1001 
> ##推断共表达模块
> runSCENIC_1_coexNetwork2modules(scenicOptions)
23:23   Creating TF modules
Number of links between TFs and targets (weight>=0.001): 2963509
             [,1]
nTFs          785
nTargets     7320
nGeneSets    4652
nLinks    3912923
> ##推断转录调控网络(regulon)
> runSCENIC_2_createRegulons(scenicOptions)
23:26   Step 2. Identifying regulons

载入程辑包:‘AUCell’

The following object is masked from ‘package:SCENIC’:

    plotEmb_rgb

Using the column 'features' as feature index for the ranking database.
Using the column 'features' as feature index for the ranking database.
tfModulesSummary:
                               [,1]
top50perTargetAndtop50            3
top5perTargetAndtop10perTarget    3
top50Andtop1sd                    4
w0.005Andtop10perTarget           4
top50perTargetAndtop1sd           5
top50perTargetAndtop3sd           5
w0.005Andtop1sd                   9
w0.005Andtop3sd                  10
w0.005Andtop50                   11
w0.001Andtop50perTarget          28
top50Andtop3sd                   36
top5perTarget                    46
top10perTarget                   62
w0.005                           65
top50perTarget                  152
top50                           156
top3sd                          161
top1sd                          440
w0.001                          596
23:26   RcisTarget: Calculating AUC
Using the column 'features' as feature index for the ranking database.
Scoring database:  [Source file: hg19-500bp-upstream-7species.mc9nr.feather]
Using the column 'features' as feature index for the ranking database.
Scoring database:  [Source file: hg19-tss-centered-10kb-7species.mc9nr.feather]
23:59   RcisTarget: Adding motif annotation
Using BiocParallel...
Using BiocParallel...
Number of motifs in the initial enrichment: 926416
Number of motifs annotated to the matching TF: 15312
00:10   RcisTarget: Pruning targets
Using the column 'features' as feature index for the ranking database.
Error in file(con, "w") : all connections are in use
> save.image("D:/atrial fibrillation 2022.11.03/R_SCENIC_V3/scenic_0727.RData")
Warning message:
In .Internal(gzfile(description, open, encoding, compression)) :
  closing unused connection 127 (<-DESKTOP-NN3NDT8:11168)
> scenicOptions@settings$nCores <- 14#并行计算时调用的线程
> scenicOptions@settings$seed <- 1001 #涉及随机数种子便于重复结果

但是在跑runSCENIC_2_createRegulons(scenicOptions)的时候,报错:Error in file(con, "w") : all connections are in use

官方教程里面跑完runGenie3演示说需要重启一下,我没重启,一会试一下是不是这个原因

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 214,588评论 6 496
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,456评论 3 389
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 160,146评论 0 350
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,387评论 1 288
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,481评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,510评论 1 293
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,522评论 3 414
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,296评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,745评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,039评论 2 330
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,202评论 1 343
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,901评论 5 338
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,538评论 3 322
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,165评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,415评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,081评论 2 365
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,085评论 2 352

推荐阅读更多精彩内容