-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
712 lines (395 loc) · 293 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>损不足</title>
<subtitle>奉有余</subtitle>
<link href="https://blog.leafminer.cn/atom.xml" rel="self"/>
<link href="https://blog.leafminer.cn/"/>
<updated>2024-12-19T04:43:55.336Z</updated>
<id>https://blog.leafminer.cn/</id>
<author>
<name>虫子</name>
</author>
<generator uri="https://hexo.io/">Hexo</generator>
<entry>
<title>在VSCode 中配置 R 环境,以方便使用AI代码助手</title>
<link href="https://blog.leafminer.cn/2024/12/19/4d8bae2a22b8/"/>
<id>https://blog.leafminer.cn/2024/12/19/4d8bae2a22b8/</id>
<published>2024-12-19T04:43:34.000Z</published>
<updated>2024-12-19T04:43:55.336Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218221346324.png" alt=""></p><p>一直以来,都习惯使用RStudio。然而,随着大规模语言模型技术的发展,RStudio也集成了GitHub Copilot这一功能,旨在提升编码效率与准确性。遗憾的是,GitHub Copilot对于非学生用户采取了付费订阅模式,这在一定程度上限制了其更广泛的应用。</p><span id="more"></span> <p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218234934329.png" alt=""> <img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-12-18%20221941.png" alt=""></p><p>与此同时,国内也出现了多款基于本土研发的大规模语言模型所支持的代码辅助工具,但这些工具并未直接集成到RStudio平台之中。相比之下,在Visual Studio Code (VSCode)这一跨平台源代码编辑器中,开发者能够轻松访问多种大模型驱动的插件。鉴于此情况,转向采用VSCode似乎成为了一个更为实际的选择,尤其是在考虑到了解基础操作后即可有效利用AI助手进行高效开发的因素下。这样不仅能够享受到智能提示带来的便利性,同时也为探索更加复杂的项目打下了坚实的基础。</p><blockquote><p>上面这些话是用雨雀AI助手修改的,好用!</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218223739171.png" alt=""></p></blockquote><p><code>radian</code> 是 R 程序的替代控制台,具有多行编辑和丰富语法高亮功能,被认为是 R 的 <code>ipython </code>克隆版,设计更接近 <code>julia</code>。本文主要介绍了<code>VSCode</code>中R 环境需要的一系列插件与R包,并用 <code>radian</code> 替换 rterm 。用的Windows 11系统。</p><h2 id="font-style-color-1DC0C9-软件安装-font"><font style="color:#1DC0C9;">软件安装</font></h2><ul class="lvl-0"><li class="lvl-2"><p><strong>安装R语言</strong>:<span class="exturl" data-url="aHR0cHM6Ly93d3cuci1wcm9qZWN0Lm9yZy8=">https://www.r-project.org/<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-2"><p><strong>安装</strong>**<font style="color:rgb(35, 38, 59);">Python</font>**:<span class="exturl" data-url="aHR0cHM6Ly93d3cucHl0aG9uLm9yZy9kb3dubG9hZHMv">https://www.python.org/downloads/<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-2"><p><strong>安装 radian</strong>:纠正了官方 R 终端的许多局限性,并支持语法高亮和自动补全等许多功能,这里用radian替换<strong>VSCode</strong>中的rterm。通过 pip 安装 radian</p></li></ul><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip install -U radian</span><br></pre></td></tr></table></figure><ul class="lvl-0"><li class="lvl-2"><p>**安装 VSCode **:<span class="exturl" data-url="aHR0cHM6Ly9jb2RlLnZpc3VhbHN0dWRpby5jb20vRG93bmxvYWQ=">https://code.visualstudio.com/Download<i class="fa fa-external-link-alt"></i></span></p></li></ul><p><u>安装完后,接着把它们都添加到系统环境变量path中。</u></p><h2 id="font-style-color-1DC0C9-安装插件和R包-font"><font style="color:#1DC0C9;">安装插件和R包</font></h2><ul class="lvl-0"><li class="lvl-2"><p><strong>代码助手插件</strong>:各大模型在VSCode基本上都有插件,在拓展中搜索即可,比如腾讯的腾讯云AI代码助手、字节的MarsCode AI和阿里的TONGYI Lingma等。提供行级/函数级实时续写、自然语言生成代码、单元测试生成、代码注释生成、代码解释、研发智能问答、异常报错排查等能力。</p></li><li class="lvl-2"><p><strong>R</strong>:<font style="color:rgb(31, 35, 41);">该扩展为R语言提供支持,包括诸如扩展语法高亮显示、基于代码分析的R语言服务、与R终端交互、查看数据、绘图、工作区变量、帮助页面、管理软件包以及处理R Markdown文档等功能。</font></p></li><li class="lvl-2"><p><strong>R Debugger</strong>:此扩展将R语言的调试功能添加到VSCode,并依赖于R包vscDebugger。</p></li><li class="lvl-2"><p><strong>R包</strong><code>**vscDebugger**</code>:<font style="color:rgb(42, 161, 152);"> </font><code><font style="color:rgb(163, 21, 21);">devtools::install_github("ManuelHentschel/vscDebugger")</font></code></p></li><li class="lvl-2"><p><strong>R包</strong><code>**languageserver**</code>😗* **<code><font style="color:rgb(38, 139, 210);">install.packages</font><font style="color:rgb(101, 123, 131);">(</font><font style="color:rgb(42, 161, 152);">"languageserver"</font><font style="color:rgb(101, 123, 131);">)</font></code></p></li><li class="lvl-2"><p><strong>R包</strong><code>**httpgd**</code>: 用于提供一个图形设备,通过 HTTP 和 WebSockets 异步提供 SVG 图形。<code><font style="color:rgb(38, 139, 210);">install.packages</font><font style="color:rgb(101, 123, 131);">(</font><font style="color:rgb(42, 161, 152);">"httpgd"</font><font style="color:rgb(101, 123, 131);">)</font></code></p></li></ul><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219001330362.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218220519607.png" alt=""><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218220519607.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-12-18%20220612.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218220415494.png" alt=""></p><h2 id="font-style-color-1DC0C9-在VScode中用radian替换rterm-font"><font style="color:#1DC0C9;">在VScode中用radian替换rterm</font></h2><p>在 Visual Studio Code 中,按下“ctrl+,”打开<strong>设置</strong>,假设 R 安装在“D:\Program Files\R”路径下</p><ul class="lvl-0"><li class="lvl-2"><p>搜索“Rpath: Windows”设置为“D:\Program Files\R\bin\x64\R.exe”</p></li></ul><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219011143875.png" alt=""></p><ul class="lvl-0"><li class="lvl-2"><p>搜索“Rterm: Windows”中默认的“rterm”替换为“radian.exe”的路径(如"<font style="color:rgb(192, 52, 29);background-color:rgb(251, 229, 225);">D:\Program Files\Scripts\radian.exe</font>")。查看radian的位置</p></li></ul><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">where.exe radian</span><br></pre></td></tr></table></figure><ul class="lvl-0"><li class="lvl-2"><p>去掉“Rterm: Option”中的“–no-save”和“–no-store”,添加 “–no-site-file”</p></li><li class="lvl-2"><p>设置完成后重新启动 VScode,发送 R 代码到控制台时:第一次发送时会调用 R 终端,第二次才会将代码发送到终端运行</p></li></ul><h2 id="font-style-color-1DC0C9-设置镜像地址-font"><font style="color:#1DC0C9;">设置镜像地址</font></h2><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment"># 查看使用cran安装时的默认镜像</span></span></span><br><span class="line"><span class="meta prompt_">options()$</span><span class="language-bash">repos</span> </span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment">#查看使用bioconductor的默认镜像</span></span></span><br><span class="line"><span class="meta prompt_">options()$</span><span class="language-bash">BioC_mirror</span> </span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment">#指定bioconductor镜像,这个是中国科技大学镜像</span></span></span><br><span class="line">options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/") </span><br><span class="line"><span class="meta prompt_">#</span><span class="language-bash"><span class="comment">#指定cran安装镜像,这个是清华镜像</span></span></span><br><span class="line">options("repos" = c(CRAN="https://mirrors.sjtug.sjtu.edu.cn/cran/")) </span><br></pre></td></tr></table></figure><h2 id="试试看">试试看</h2><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219042455078.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219042821995.png" alt=""></p><p><font style="color:#1DC0C9;">运行效果如下图</font></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219042059691.png" alt=""></p><h2 id="参考">参考</h2><ul class="lvl-0"><li class="lvl-2"><p><span class="exturl" data-url="aHR0cHM6Ly93d3cuY25ibG9ncy5jb20vb3Vyd2VpZ3Vhbi9wLzE0NjUwMzUzLmh0bWw=">将VScdoe的R终端替换为radian - hzworld - 博客园<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-2"><p><span class="exturl" data-url="aHR0cHM6Ly93d3cuY25ibG9ncy5jb20vbGlueGlhb3h1L3AvMTY3Mjk1NzAuaHRtbA==">R语言、01 VSCODE 配置 R 环境快速指南、4.2.1版本 - 小能日记 - 博客园<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-2"><p><span class="exturl" data-url="aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3pob25na2V5dWFuY2hvbmdxaW5nL2FydGljbGUvZGV0YWlscy8xMTk0MTYzMTI=">R安装包源设置的常见方式及国内常用源_rstudio 设置 安装源-CSDN博客<i class="fa fa-external-link-alt"></i></span></p></li></ul></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218221346324.png" alt=""></p>
<p>一直以来,都习惯使用RStudio。然而,随着大规模语言模型技术的发展,RStudio也集成了GitHub Copilot这一功能,旨在提升编码效率与准确性。遗憾的是,GitHub Copilot对于非学生用户采取了付费订阅模式,这在一定程度上限制了其更广泛的应用。</p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E5%85%B6%E4%BB%96/"/>
<category term="插件" scheme="https://blog.leafminer.cn/tags/%E6%8F%92%E4%BB%B6/"/>
<category term="GitHub" scheme="https://blog.leafminer.cn/tags/GitHub/"/>
<category term="R语言" scheme="https://blog.leafminer.cn/tags/R%E8%AF%AD%E8%A8%80/"/>
<category term="大模型" scheme="https://blog.leafminer.cn/tags/%E5%A4%A7%E6%A8%A1%E5%9E%8B/"/>
<category term="VSCode" scheme="https://blog.leafminer.cn/tags/VSCode/"/>
<category term="代码助手" scheme="https://blog.leafminer.cn/tags/%E4%BB%A3%E7%A0%81%E5%8A%A9%E6%89%8B/"/>
<category term="环境配置" scheme="https://blog.leafminer.cn/tags/%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/"/>
</entry>
<entry>
<title>昨天还说它订阅收费,怎么今天就免费了--GitHub 刚刚宣布了免费版 Copilot</title>
<link href="https://blog.leafminer.cn/2024/12/19/3903b74cd636/"/>
<id>https://blog.leafminer.cn/2024/12/19/3903b74cd636/</id>
<published>2024-12-19T04:37:34.000Z</published>
<updated>2024-12-19T04:40:18.234Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219100729400.png" alt=""></p><p>GitHub 宣布了免费版 Copilot!不过,<font style="color:rgb(31, 35, 40);">每月的响应次数限制为 2000 次代码补全和 50 条聊天信息。订阅付费的是无限制次数的。距离使用它,你只有一个申请GitHub账号的距离。</font></p><span id="more"></span> <p><font style="color:rgb(31, 35, 40);">GitHub Copilot 是一款 AI 编码助手,可帮助你更快、更省力地编写代码,从而将更多精力集中在问题解决和协作上 【官网文档】。</font></p><p><font style="color:rgb(31, 35, 40);">这世界变化真快!</font></p><p><font style="color:rgb(31, 35, 40);">昨天还是这样的收费界面</font></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241218234934329.png" alt=""></p><p>今天就变这样了</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-12-19%20110414.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219104921934.png" alt=""></p><p>VsSCode更新后就看到了</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219100613568.png" alt=""></p><p>Rstudio</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219110040029.png" alt=""></p><p>免费是免费了,不过记得处理比较重要的东西时关掉这个:</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219112117808.png" alt=""></p><p><font style="color:rgb(31, 35, 40);">允许 GitHub 使用我在代码编辑器中的代码片段来改进产品。 允许 GitHub、其关联公司和第三方使用我的代码片段来研究和改进 GitHub Copilot 的建议、相关模型和产品功能。更多信息请参阅“关于 GitHub Copilot 隐私”。</font></p><p><font style="color:rgb(31, 35, 40);">在GitHub账户中,</font><strong><font style="color:rgb(31, 35, 40);">设置 -> Copilot</font></strong><font style="color:rgb(31, 35, 40);">,找到上图选项取消选中。</font></p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241219100729400.png" alt=""></p>
<p>GitHub 宣布了免费版 Copilot!不过,<font style="color:rgb(31, 35, 40);">每月的响应次数限制为 2000 次代码补全和 50 条聊天信息。订阅付费的是无限制次数的。距离使用它,你只有一个申请GitHub账号的距离。</font></p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E5%85%B6%E4%BB%96/"/>
<category term="GitHub" scheme="https://blog.leafminer.cn/tags/GitHub/"/>
<category term="大模型" scheme="https://blog.leafminer.cn/tags/%E5%A4%A7%E6%A8%A1%E5%9E%8B/"/>
<category term="免费" scheme="https://blog.leafminer.cn/tags/%E5%85%8D%E8%B4%B9/"/>
<category term="Copilot" scheme="https://blog.leafminer.cn/tags/Copilot/"/>
</entry>
<entry>
<title>免费语音转文字,还能生成脑图和导读——通义千问</title>
<link href="https://blog.leafminer.cn/2024/12/17/0511ae781404/"/>
<id>https://blog.leafminer.cn/2024/12/17/0511ae781404/</id>
<published>2024-12-16T16:54:34.000Z</published>
<updated>2024-12-18T02:07:48.134Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>通义千问是阿里云自主研发的超大规模语言模型,能够根据用户提供的问题或提示生成相关的回复。它可以理解并处理各种类型的文本内容,包括但不限于日常对话、专业领域知识问答、文本创作、编程咨询等。这里写一下使用通义千问简单的进行语音转文字</p><p>通义千问链接 <span class="exturl" data-url="aHR0cHM6Ly90b25neWkuYWxpeXVuLmNvbS9xaWFud2VuLw==">https://tongyi.aliyun.com/qianwen/<i class="fa fa-external-link-alt"></i></span></p><span id="more"></span> <h2 id="准备">准备</h2><ol><li class="lvl-3"><p><strong>语音文件</strong></p></li></ol><ul class="lvl-0"><li class="lvl-2"><p><strong>视频支持:</strong></p><ul class="lvl-2"><li class="lvl-4">单个文件最长6小时,单次最多可上传50个</li><li class="lvl-4">支持格式:mp4/wmv/m4v/flv/rmvb/dat/mov/mkv/webm/avi/mpeg/3gp/ogg</li><li class="lvl-4">单个最大6G</li></ul></li><li class="lvl-2"><p><strong>音频支持:</strong></p><ul class="lvl-2"><li class="lvl-4">支持格式:mp3/wav/m4a/wma/aac/ogg/amr/flac/aiff</li><li class="lvl-4">单个最大500M</li></ul></li></ul><ol start="2"><li class="lvl-3"><p><strong>联网</strong>的电脑(手机APP上也行)</p></li></ol><h2 id="使用方法">使用方法</h2><ol><li class="lvl-3"><p>打开通义千问链接 <span class="exturl" data-url="aHR0cHM6Ly90b25neWkuYWxpeXVuLmNvbS9xaWFud2VuLw==">https://tongyi.aliyun.com/qianwen/<i class="fa fa-external-link-alt"></i></span> 登录(手机验证码登录,省事)</p></li><li class="lvl-3"><p>点击界面中的<strong>效率</strong>,进入下图界面</p></li></ol><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241217215801641.png" alt=""></p><ol start="3"><li class="lvl-3"><p>再点击<strong>音视频速读</strong> 打开文件上传窗口</p></li></ol><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241217215850904.png" alt=""></p><ol start="4"><li class="lvl-3"><p>等文件上传并解析成功,可以通过上传记录打开,点击<strong>立即查看</strong></p></li></ol><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241217215623487.png" alt=""></p><ol start="5"><li class="lvl-3"><p>可以看到已经转成文字显示的内容,在这里可以下载保存问Word格式,也可以复制</p></li></ol><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-12-17%20214028.png" alt=""></p><p><strong>导读</strong></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/20241217215324478.png" alt=""></p><p><strong>脑图</strong></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@main/2024/12/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE%202024-12-17%20215424.png" alt=""></p><p><strong>笔记</strong>(你可以在这里编辑记录需要的文字内容)</p><p><img data-src="https://cdn.nlark.com/yuque/0/2024/png/12885947/1734445292227-118a311b-ce92-483b-8a5c-c2fcf8ed159a.png" alt=""></p><p>免费准确,暂时没看到次数限制之类的。</p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>通义千问是阿里云自主研发的超大规模语言模型,能够根据用户提供的问题或提示生成相关的回复。它可以理解并处理各种类型的文本内容,包括但不限于日常对话、专业领域知识问答、文本创作、编程咨询等。这里写一下使用通义千问简单的进行语音转文字</p>
<p>通义千问链接 <span class="exturl" data-url="aHR0cHM6Ly90b25neWkuYWxpeXVuLmNvbS9xaWFud2VuLw==">https://tongyi.aliyun.com/qianwen/<i class="fa fa-external-link-alt"></i></span></p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E5%85%B6%E4%BB%96/"/>
<category term="通义千问" scheme="https://blog.leafminer.cn/tags/%E9%80%9A%E4%B9%89%E5%8D%83%E9%97%AE/"/>
<category term="大模型" scheme="https://blog.leafminer.cn/tags/%E5%A4%A7%E6%A8%A1%E5%9E%8B/"/>
<category term="语音转文字" scheme="https://blog.leafminer.cn/tags/%E8%AF%AD%E9%9F%B3%E8%BD%AC%E6%96%87%E5%AD%97/"/>
<category term="免费" scheme="https://blog.leafminer.cn/tags/%E5%85%8D%E8%B4%B9/"/>
</entry>
<entry>
<title>R语言之NCBI等数据库的序列批量下载和相关R包的使用</title>
<link href="https://blog.leafminer.cn/2024/12/08/94302b2b5e9e/"/>
<id>https://blog.leafminer.cn/2024/12/08/94302b2b5e9e/</id>
<published>2024-12-08T13:04:27.000Z</published>
<updated>2024-12-08T13:13:36.130Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><h2 id="Biomartr包">Biomartr包</h2><h3 id="报错信息">报错信息</h3><h4 id="问题1:">问题1:</h4><p><code>download.database.all(db = "taxdb", path = "taxdb")</code>运行后报错, 这个包检测网络连接情况的<code>connected.to.internet</code>函数,源码如下:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">connected.to.internet <- function() {</span><br><span class="line"> if (curl::curl_fetch_memory("www.google.com")$status_code == 200) {</span><br><span class="line"> return(TRUE)</span><br><span class="line"> } else {</span><br><span class="line"> message(</span><br><span class="line"> "It seems that you are not connected to the internet. A query to www.google.com was not successful. Could you please check?"</span><br><span class="line"> )</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure><span id="more"></span><p>因为是检测google连接情况来判定网络是否联通的,所以国内使用会出问题。 解决办法: _ 修改hosts: _ 修改R包代码,把<code>www.google.com</code>换成<code>www.bing.com</code>,从github下载源码,修改后本地安装。</p><h4 id="问题2(未解决):">问题2(未解决):</h4><p><code>getCollection( db = "refseq", organism = "Drosophila melanogaster")</code>报错</p><figure class="highlight livecodeserver"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">The FTP link: <span class="string">'https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/215/GCF_000001215.4_Release_6_plus_ISO1_MT/GCF_000001215.4_Release_6_plus_ISO1_MT_assembly_stats.txt'</span> seems <span class="keyword">not</span> <span class="built_in">to</span> be available <span class="keyword">at</span> <span class="keyword">the</span> moment. This might either be due <span class="built_in">to</span> <span class="keyword">an</span> instable <span class="keyword">internet</span> connection, <span class="keyword">a</span> firewall issue, <span class="keyword">a</span> wrong organism name, <span class="keyword">or</span> due <span class="built_in">to</span> <span class="keyword">the</span> fact that <span class="keyword">the</span> specified organism is <span class="keyword">not</span> available <span class="keyword">in</span> <span class="keyword">the</span> database you selected. If <span class="keyword">it</span> is <span class="keyword">an</span> <span class="keyword">internet</span> connection issue, could you please <span class="keyword">try</span> <span class="built_in">to</span> re-run <span class="keyword">the</span> <span class="function"><span class="keyword">function</span> <span class="title">to</span> <span class="title">see</span> <span class="title">whether</span> <span class="title">it</span> <span class="title">works</span> <span class="title">now</span>?</span></span><br></pre></td></tr></table></figure><p><span class="exturl" data-url="aHR0cHM6Ly9mdHAubmNiaS5ubG0ubmloLmdvdi9nZW5vbWVzL2FsbC9HQ0YvMDAwLzAwMS8yMTUvR0NGXzAwMDAwMTIxNS40X1JlbGVhc2VfNl9wbHVzX0lTTzFfTVQvR0NGXzAwMDAwMTIxNS40X1JlbGVhc2VfNl9wbHVzX0lTTzFfTVRfYXNzZW1ibHlfc3RhdHMudHh0">https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/215/GCF_000001215.4_Release_6_plus_ISO1_MT/GCF_000001215.4_Release_6_plus_ISO1_MT_assembly_stats.txt<i class="fa fa-external-link-alt"></i></span>可以在浏览器中正常下载</p><p>可能出问题的:<code>custom_download.R,getGenome.R,getBioSet.R,readAssemblyDoc.R,Refseq_Genbank_post_processing.R</code></p><h3 id="简介">简介</h3><p>为了在元基因组规模上自动检索基因组和它们的注释信息,<code>biomartr</code>包提供了基因组序列检索和功能注释检索的接口功能。<code>biomartr</code>的主要目标是促进计算再现性和大规模处理基因组数据(元)基因组分析。有了<code>biomartr</code>,用户现在可以控制并了解他们自动检索的基因组版本。许多大规模基因组学研究缺乏这些信息。当基因组版本信息的记录被忽视时,再现和数据解释几乎是不可能的。 In detail, <code>biomartr</code> automates <em>genome, proteome, CDS, RNA, Repeats, GFF/GTF (annotation), genome assembly quality, and metagenome project data</em> retrieval from the major biological databases such as <strong>NCBI RefSeq</strong> <strong>NCBI Genbank</strong> <strong>ENSEMBL</strong> <strong>ENSEMBLGENOMES</strong>(截止到2019年4月份 - ENSEMBL和ENSEMBLGENOMES已经合并了- see details here) <strong>UniProt</strong></p><h3 id="安装biomartr包">安装biomartr包</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"># On Windows, this won't work - see ?build_github_devtools</span><br><span class="line">install_github("HajkD/biomartr", build_vignettes = TRUE, dependencies = TRUE)</span><br><span class="line"></span><br><span class="line"># When working with Windows, first you need to install the</span><br><span class="line"># R package: rtools -> install.packages("rtools")</span><br><span class="line"></span><br><span class="line"># Afterwards you can install devtools -> install.packages("devtools")</span><br><span class="line"># and then you can run:</span><br><span class="line"></span><br><span class="line">devtools::install_github("HajkD/biomartr", build_vignettes = TRUE, dependencies = TRUE)</span><br><span class="line"></span><br><span class="line"># and then call it from the library</span><br><span class="line">library("biomartr", lib.loc = "C:/Program Files/R/R-3.1.1/library")</span><br></pre></td></tr></table></figure><h3 id="自带教程">自带教程</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># source the biomartr package</span><br><span class="line">library(biomartr)</span><br><span class="line"># look for all tutorials (vignettes) available in the biomartr package</span><br><span class="line"># this will open your web browser</span><br><span class="line">browseVignettes("biomartr")</span><br></pre></td></tr></table></figure><h4 id="Meta-Genome-Retrieval">Meta-Genome Retrieval</h4><ul class="lvl-0"><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/meta.retrieval.html"><code>meta.retrieval()</code></a> : Perform Meta-Genome Retieval from NCBI of species belonging to the same kingdom of life or to the same taxonomic subgroup</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/meta.retrieval.all.html"><code>meta.retrieval.all()</code></a> : Perform Meta-Genome Retieval from NCBI of the entire kingdom of life</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getMetaGenomes.html"><code>getMetaGenomes()</code></a> : Retrieve metagenomes from NCBI Genbank</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getMetaGenomeAnnotations.html"><code>getMetaGenomeAnnotations()</code></a> : Retrieve annotation *.gff files for metagenomes from NCBI Genbank</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/listMetaGenomes.html"><code>listMetaGenomes()</code></a> : List available metagenomes on NCBI Genbank</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getMetaGenomeSummary.html"><code>getMetaGenomeSummary()</code></a> : Helper function to retrieve the assembly_summary.txt file from NCBI genbank metagenomes</p></li><li class="lvl-2"><p><code>clean.retrieval()</code>: Format meta.retrieval output</p></li></ul><h4 id="Genome-Retrieval">Genome Retrieval</h4><ul class="lvl-0"><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/listGenomes.html"><code>listGenomes()</code></a> : List all genomes available on NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/listKingdoms.html"><code>listKingdoms()</code></a> : list the number of available species per kingdom of life on NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/listGroups.html"><code>listGroups()</code></a> : list the number of available species per group on NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getKingdoms.html"><code>getKingdoms()</code></a> : Retrieve available kingdoms of life</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getGroups.html"><code>getGroups()</code></a> : Retrieve available groups for a kingdom of life</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/is.genome.available.html"><code>is.genome.available()</code></a> : Check Genome Availability NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getCollection.html"><code>getCollection()</code></a> : Retrieve a Collection: Genome, Proteome, CDS, RNA, GFF, Repeat Masker, AssemblyStats</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getGenome.html"><code>getGenome()</code></a> : Download a specific genome stored on NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getGenomeSet.html"><code>getGenomeSet()</code></a> : Genome Retrieval of multiple species</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getProteome.html"><code>getProteome()</code></a> : Download a specific proteome stored on NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getProteomeSet.html"><code>getProteomeSet()</code></a> : Proteome Retrieval of multiple species</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getCDS.html"><code>getCDS()</code></a> : Download a specific CDS file (genome) stored on NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getCDSSet.html"><code>getCDSSet()</code></a> : CDS Retrieval of multiple species</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getRNA.html"><code>getRNA()</code></a> : Download a specific RNA file stored on NCBI and ENSEMBL servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getRNASet.html"><code>getRNASet()</code></a> : RNA Retrieval of multiple species</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getGFF.html"><code>getGFF()</code></a> : Genome Annotation Retrieval from NCBI (<code>*.gff</code>) and ENSEMBL (<code>*.gff3</code>) servers</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getGTF.html"><code>getGTF()</code></a> : Genome Annotation Retrieval (<code>*.gtf</code>) from ENSEMBL servers</p></li><li class="lvl-2"><p><code>getRepeatMasker() :</code> Repeat Masker TE Annotation Retrieval</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getAssemblyStats.html"><code>getAssemblyStats()</code></a> : Genome Assembly Stats Retrieval from NCBI</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getKingdomAssemblySummary.html"><code>getKingdomAssemblySummary()</code></a> : Helper function to retrieve the assembly_summary.txt files from NCBI for all kingdoms</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getMetaGenomeSummary.html"><code>getMetaGenomeSummary()</code></a> : Helper function to retrieve the assembly_summary.txt files from NCBI genbank metagenomes</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getSummaryFile.html"><code>getSummaryFile()</code></a> : Helper function to retrieve the assembly_summary.txt file from NCBI for a specific kingdom</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getENSEMBLInfo.html"><code>getENSEMBLInfo()</code></a> : Retrieve ENSEMBL info file</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getGENOMEREPORT.html"><code>getGENOMEREPORT()</code></a> : Retrieve GENOME_REPORTS file from NCBI</p></li></ul><h4 id="Import-Downloaded-Files">Import Downloaded Files</h4><ul class="lvl-0"><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/read_genome.html"><code>read\_genome()</code></a> : Import genomes as Biostrings or data.table object</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/read_proteome.html"><code>read\_proteome()</code></a> : Import proteome as Biostrings or data.table object</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/read_cds.html"><code>read\_cds()</code></a> : Import CDS as Biostrings or data.table object</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/read_gff.html"><code>read\_gff()</code></a> : Import GFF file</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/read_rna.html"><code>read\_rna()</code></a> : Import RNA file</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/read_rm.html"><code>read\_rm()</code></a> : Import Repeat Masker output file</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/read_assemblystats.html"><code>read\_assemblystats()</code></a> : Import Genome Assembly Stats File</p></li></ul><h4 id="Database-Retrieval">Database Retrieval</h4><ul class="lvl-0"><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/listDatabases.html"><code>listNCBIDatabases()</code></a> : Retrieve a List of Available NCBI Databases for Download</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/download.database.html"><code>download.database()</code></a> : Download a NCBI database to your local hard drive</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/download.database.all.html"><code>download.database.all()</code></a> : Download a complete NCBI Database such as e.g. <code>NCBI nr</code> to your local hard drive</p></li></ul><h4 id="BioMart-Queries">BioMart Queries</h4><ul class="lvl-0"><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/biomart.html"><code>biomart()</code></a> : Main function to query the BioMart database</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getMarts.html"><code>getMarts()</code></a> : Retrieve All Available BioMart Databases</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getDatasets.html"><code>getDatasets()</code></a> : Retrieve All Available Datasets for a BioMart Database</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getAttributes.html"><code>getAttributes()</code></a> : Retrieve All Available Attributes for a Specific Dataset</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getFilters.html"><code>getFilters()</code></a> : Retrieve All Available Filters for a Specific Dataset</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/organismBM.html"><code>organismBM()</code></a> : Function for organism specific retrieval of available BioMart marts and datasets</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/organismAttributes.html"><code>organismAttributes()</code></a> : Function for organism specific retrieval of available BioMart attributes</p></li><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/organismFilters.html"><code>organismFilters()</code></a> : Function for organism specific retrieval of available BioMart filters</p></li></ul><h4 id="Performing-Gene-Ontology-queries">Performing Gene Ontology queries</h4><p><strong>Gene Ontology</strong></p><ul class="lvl-0"><li class="lvl-2"><p><a href="https://docs.ropensci.org/biomartr/reference/getGO.html"><code>getGO()</code></a> : Function to retrieve GO terms for a given set of genes</p></li></ul><h3 id="Ensembl-BioMart-Examples">Ensembl BioMart Examples</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">library(myTAI)</span><br><span class="line"></span><br></pre></td></tr></table></figure><h3 id="示例">示例</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"># retrieve a list of available sequence databases at NCBI</span><br><span class="line">listNCBIDatabases(db = "all")</span><br><span class="line"># show all NCBI nr files</span><br><span class="line">listNCBIDatabases(db = "nr")</span><br><span class="line"></span><br><span class="line"># download the entire NCBI taxonomy database</span><br><span class="line">download.database.all(db = "taxdb", path = "taxdb")</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># download collection for Saccharomyces cerevisiae,用不了</span><br><span class="line"># getCollection( db = "refseq", organism = "Drosophila melanogaster")</span><br></pre></td></tr></table></figure><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># download all Drosophila melanogaster genomes,用不了</span><br><span class="line"># meta.retrieval(kingdom = "invertebrate", db = "refseq", type = "genome")</span><br></pre></td></tr></table></figure><h3 id="BiomaRt包和biomartr包的区别">BiomaRt包和biomartr包的区别</h3><p>BiomaRt软件包与biomartr软件包的主要区别在于,biomartr扩展了BiomaRt的功能注释检索过程,并提供了对基因组、蛋白质组、编码序列、gff文件、RNA序列、Repeat Masker注释文件的有用检索功能,以及对NCBI nr等整个数据库的检索功能。</p><h2 id="BiomaRt包">BiomaRt包</h2><h3 id="报错信息-2">报错信息</h3><h4 id="问题1:-2">问题1:</h4><figure class="highlight reasonml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="type">Error</span> <span class="keyword">in</span> `collect<span class="literal">()</span>`: ! <span class="type">Failed</span> <span class="keyword">to</span> collect <span class="keyword">lazy</span> table. </span><br><span class="line"><span class="type">Caused</span> by error <span class="keyword">in</span> `db_collect<span class="literal">()</span>`: ! <span class="type">Arguments</span> <span class="keyword">in</span> `...` must be used. </span><br><span class="line">✖ <span class="type">Problematic</span> argument: • ..<span class="number">1</span> = <span class="type">Inf</span> ℹ <span class="type">Did</span> you misspell an argument name? <span class="type">Backtrace</span>: </span><br><span class="line"><span class="number">1.</span> biomaRt::listEnsembl<span class="literal">()</span> </span><br><span class="line"><span class="number">11.</span> dbplyr:::collect.tbl_sql(., <span class="type">Inf</span>) </span><br><span class="line"><span class="number">16.</span> dbplyr::db_collect(x$src$con, sql, n = n, warn_incomplete = warn_incomplete, ...)</span><br></pre></td></tr></table></figure><p>由于dplyr和Biocfilecache之间的不兼容导致的错误问题,而Biomart是无辜的旁观者! <strong>解决办法</strong>:更新你的 BioManager 版本</p><h4 id="问题2:">问题2:</h4><figure class="highlight oxygene"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">错误: Your query <span class="keyword">has</span> been redirected <span class="keyword">to</span> http:<span class="comment">//status.ensembl.org indicating this Ensembl service is currently unavailable.</span></span><br><span class="line">Look at ?useEnsembl <span class="keyword">for</span> details <span class="keyword">on</span> how <span class="keyword">to</span> <span class="keyword">try</span> a mirror site.</span><br></pre></td></tr></table></figure><p>浏览器打不开该网站,等服务器好了就行了</p><h3 id="简介-2">简介</h3><p>biomaRt工具包是一个连接bioMart数据库的R语言接口,能够通过这个软件包自由地链接到bioMart数据库: 1. 查找某个基因在染色体上的位置。反之,给定染色体每一区间,返回该区间的基因s; 2. 通过EntrezGene的ID查找到相关序列的GO注释。反之,给定相关的GO注释,获取相关的EntrezGene的ID; 3. 通过EntrezGene的ID查找到相关序列的上游100bp序列(可能包含启动子等调控元件); 4. 查找人类染色体上每一段区域中已知的SNPs; 5. 给定一组的序列ID,获得其中具体的序列;</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">library(biomaRt)</span><br></pre></td></tr></table></figure><h3 id="选择数据库和对应的服务">选择数据库和对应的服务</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"># 线虫数据库WormBase ParaSite host="parasite.wormbase.org"</span><br></pre></td></tr></table></figure><p>在ensembl.org网站上获取所有Ensembl mart的列表</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">listEnsembl(mirror = "asia")</span><br><span class="line">#更换版本</span><br><span class="line">listEnsembl("GRCh=37")</span><br></pre></td></tr></table></figure><p>listMarts, listDatasets and useMart for the Ensembl mirrors You can connect to the following Ensembl mirrors using the listMarts, listDatasets and useMart functions:</p><ul class="lvl-0"><li class="lvl-2"><p>Ensembl US West: <span class="exturl" data-url="aHR0cHM6Ly91c3dlc3QuZW5zZW1ibC5vcmcvaW5kZXguaHRtbA==">https://uswest.ensembl.org/index.html<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-2"><p>Ensembl US East: <span class="exturl" data-url="aHR0cHM6Ly91c2Vhc3QuZW5zZW1ibC5vcmcvaW5kZXguaHRtbA==">https://useast.ensembl.org/index.html<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-2"><p>Ensembl Asia: <span class="exturl" data-url="aHR0cHM6Ly9hc2lhLmVuc2VtYmwub3JnL2luZGV4Lmh0bWw=">https://asia.ensembl.org/index.html<i class="fa fa-external-link-alt"></i></span></p></li></ul><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">listMarts(host="https://asia.ensembl.org")</span><br><span class="line"># 选取特定的服务</span><br><span class="line">ensembl_asia <- useMart(biomart="ENSEMBL_MART_ENSEMBL", host = "https://asia.ensembl.org")</span><br><span class="line"># 同ensembl_asia1 <- useMart("ensembl", host="https://asia.ensembl.org")</span><br><span class="line"># 同ensembl_asia2 <- useEnsembl(biomart="ensembl",host = "http://asia.ensembl.org")</span><br><span class="line"># useEnsembl函数专门用于ensembl数据库</span><br><span class="line"></span><br><span class="line">#查看可选数据集</span><br><span class="line">head(listDatasets(ensembl_asia))</span><br><span class="line"></span><br><span class="line"># 限制为果蝇的基因注释数据集</span><br><span class="line">dm_ensembl <- useDataset(dataset="dmelanogaster_gene_ensembl", mart=ensembl_asia)</span><br><span class="line"># 查看该数据集下的filters</span><br><span class="line"># filter:控制根据什么东西来过滤,可以是不同数据库的ID,也可以是染色体定位系统坐标</span><br><span class="line">filters <- listFilters(dm_ensembl)</span><br><span class="line"># 查看该数据集下的attributes</span><br><span class="line">attrs <- listAttributes(dm_ensembl)</span><br><span class="line">table(attrs$page)</span><br></pre></td></tr></table></figure><p>“<code>listDatasets</code>” function will give you the list of all the species available (mart datasets) for a given mart <code>getBM</code>允许使用mart过滤器和属性列表(filters和attributes)构建BioMart查询。</p><h4 id="示例1:给定-EntrezGene,获取其5’-UTR序列">示例1:给定 EntrezGene,获取其5’ UTR序列</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">entrez <- c("39454","50253","32871")</span><br><span class="line">utr5 <- getBM(attributes=c('entrezgene_id','5utr'), # 总共有55中序列类型,详见attrs数据框</span><br><span class="line"> filters="entrezgene_id",</span><br><span class="line"> values=entrez,</span><br><span class="line"> mart=dm_ensembl)</span><br><span class="line"># 方法2: 针对ensembl库的通过getBM获取序列的简化版</span><br><span class="line">utr5-2 <- getSequence(id=entrez,</span><br><span class="line"> type="entrezgene_id",</span><br><span class="line"> seqType='5utr',</span><br><span class="line"> mart=dm_ensembl)</span><br></pre></td></tr></table></figure><h4 id="示例2:获取Ensembl-Gene-Transcript-IDs-and-Uniprot-Swissprot,其映射到果蝇Ensembl-Gene-ID-“FBgn0038539”">示例2:获取Ensembl Gene, Transcript IDs and Uniprot Swissprot,其映射到果蝇Ensembl Gene ID “FBgn0038539”</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">dm_swissprot <- biomaRt::getBM(attributes=c('external_synonym','ensembl_transcript_id','uniprotswissprot','genbank'),</span><br><span class="line"> filters = 'external_synonym', </span><br><span class="line"> values = Dm_Atgs$SYMBOL, </span><br><span class="line"> mart = dm_ensembl)</span><br><span class="line">dm_swissprot</span><br></pre></td></tr></table></figure><h4 id="示例3:获取某一染色体上某一段位置的SNPs">示例3:获取某一染色体上某一段位置的SNPs</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">snpmart <- useMart(biomart = "ENSEMBL_MART_SNP", dataset="hsapiens_snp",host = "https://asia.ensembl.org")</span><br><span class="line">snps <- getBM(attributes = c('refsnp_id','allele','chrom_start','chrom_strand'),</span><br><span class="line"> filters = c('chr_name','start','end'),</span><br><span class="line"> values = list(8,148350,148612),</span><br><span class="line"> mart = snpmart)</span><br></pre></td></tr></table></figure><h4 id="示例4:-出错了-将果蝇基因映射到人的基因上">示例4:(出错了)将果蝇基因映射到人的基因上</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">dm_ensembl <- useMart('ensembl',dataset="dmelanogaster_gene_ensembl",host = "https://asia.ensembl.org")</span><br><span class="line">human <- useMart('ensembl',dataset = "hsapiens_gene_ensembl",host = "https://asia.ensembl.org")</span><br><span class="line">mouse <- useMart('ensembl',dataset = "mmusculus_gene_ensembl",host = "https://asia.ensembl.org")</span><br><span class="line">dm2h.g <- getLDS(attributes = c("external_synonym"),</span><br><span class="line"> filters = "external_synonym",</span><br><span class="line"> values = Dm_Atg_genes_ID$SYMBOL,</span><br><span class="line"> mart = dm_ensembl,</span><br><span class="line"> attributesL = c("hgnc_symbol","chromosome_name","start_position"),</span><br><span class="line"> martL = human,</span><br><span class="line"> uniqueRows = T)</span><br><span class="line"></span><br></pre></td></tr></table></figure><h2 id="R语言批量爬取NCBI基因注释数据">R语言批量爬取NCBI基因注释数据</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">#library(RCurl) </span><br><span class="line">#library(stringr)</span><br><span class="line">#library(XML)</span><br><span class="line">library(httr2)</span><br><span class="line">library(rvest)</span><br><span class="line">rm(list=ls())</span><br></pre></td></tr></table></figure><h4 id="导入要爬取的基因列表:">导入要爬取的基因列表:</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Dm_Atg_genes <- read.table('Dm_Atgs.txt',stringsAsFactors = F)</span><br><span class="line">names(Dm_Atg_genes) <- 'SYMBOL'</span><br><span class="line">Dm_Atg_genes</span><br></pre></td></tr></table></figure><p>NCBI对于基因页面的索引方式都是 <strong><span class="exturl" data-url="aHR0cHM6Ly9saW5rLmppYW5zaHUuY29tLz90PWh0dHBzOi8vd3d3Lm5jYmkubmxtLm5paC5nb3YvZ2VuZS9FbnRyemU=">https://www.ncbi.nlm.nih.gov/gene/Entrze<i class="fa fa-external-link-alt"></i></span></strong> <strong>ID</strong> 的方式。</p><h4 id="gene-symbos转为entrze-ID"><code>gene symbos</code>转为<code>entrze ID</code></h4><p>使用<code>mget()</code>函数获取</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">library("org.Dm.eg.db")</span><br><span class="line">AnnotationDbi::keytypes(org.Dm.eg.db)</span><br><span class="line">mget(Dm_Atg_genes$SYMBOL, #需要转换的Symbol</span><br><span class="line"> org.Dm.egSYMBOL2EG, # Symbol转EntrezID</span><br><span class="line"> ifnotfound=NA)</span><br><span class="line"></span><br><span class="line"># EntrezID转Symbol</span><br><span class="line">mget(Dm_Atg_genes_ID$ENTREZID, #需要转换的EntrezID</span><br><span class="line"> org.Dm.egSYMBOL, #EntrezID转Symbol</span><br><span class="line"> ifnotfound=NA)</span><br></pre></td></tr></table></figure><p>需要将<code>gene symbos</code>转为<code>entrze ID</code>,这里使用<code>clusterProfiler</code>包的<code>bitr</code>函数进行转换:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"># 使用clusterProfiler将gene symbol转为entrze ID</span><br><span class="line">library(clusterProfiler)</span><br><span class="line">Dm_Atg_genes_ID <- bitr(Dm_Atg_genes$SYMBOL, fromType="SYMBOL", toType="ENTREZID", OrgDb="org.Dm.eg.db")</span><br><span class="line"></span><br><span class="line"># EntrezID转Symbol</span><br><span class="line">bitr(Dm_Atg_genes_ID$ENTREZID, #需要转换的基因ID</span><br><span class="line"> fromType = "ENTREZID", #需要转换的类型</span><br><span class="line"> toType = "SYMBOL", #需要转换为的类型</span><br><span class="line"> OrgDb = org.Dm.eg.db) #注释包</span><br></pre></td></tr></table></figure><p>AnnotationDbi包的<code>mapIds</code>函数</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"># 使用AnnotationDbi将gene symbol转为entrze ID</span><br><span class="line">mapIds(x = org.Dm.eg.db,#注释包</span><br><span class="line"> keys = Dm_Atg_genes$SYMBOL, #需要转换的基因Symbol</span><br><span class="line"> keytype = "SYMBOL", #需要转换的类型</span><br><span class="line"> column = "ENTREZID") #需要转换为的类型</span><br><span class="line"></span><br><span class="line"># EntrezID转Symbol</span><br><span class="line">mapIds(x = org.Dm.eg.db,#注释包</span><br><span class="line"> keys = Dm_Atg_genes_ID$ENTREZID, #需要转换的基因ID</span><br><span class="line"> keytype = "ENTREZID", #需要转换的类型</span><br><span class="line"> column = "SYMBOL") #需要转换为的类型</span><br><span class="line"></span><br><span class="line"># 与mapIds函数相比,该函数可同时将一种ID转换成多种类型的ID。</span><br><span class="line">select(x = org.Dm.eg.db,keys = Dm_Atg_genes_ID$SYMBOL,columns = c("GENENAME","ENTREZID"),keytype = "SYMBOL")</span><br><span class="line"></span><br><span class="line"># 将Gene Symbol转换为Gene Name,key为Akt,属于Gene Symbol,所以对应的keytype为SYMBOL</span><br><span class="line">mapIds(x = org.Dm.eg.db,keys = "Akt",column = "GENENAME",keytype = "SYMBOL")</span><br></pre></td></tr></table></figure><p>BiomaRt用起来更加灵活,可以不同版本参考基因组ID转换,不同类型基因ID转换,甚至同基因跨物种同源基因转换</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line"># 使用BiomaRt将gene symbol转为entrze ID</span><br><span class="line">library(biomaRt)</span><br><span class="line"></span><br><span class="line"># 查看可用数据库</span><br><span class="line">listMarts()</span><br><span class="line">listEnsembl()</span><br><span class="line"></span><br><span class="line"># 建立数据库链接,ensembl</span><br><span class="line">mart<-useMart("ensembl")</span><br><span class="line"># 寻找目标数据库,对应的物种及参考基因组版本</span><br><span class="line">dataset_list=as.data.frame(listDatasets(mart))</span><br><span class="line"># 选择果蝇数据库,重新建立数据库链接</span><br><span class="line">mart_dm=useMart("ensembl", "dmelanogaster_gene_ensembl")</span><br><span class="line"></span><br><span class="line"># 查看可用的输入数据类型 </span><br><span class="line">mart_dm_list <- listFilters(mart_dm)</span><br><span class="line">write.csv(mart_dm_list,"mart_dm_list.csv")</span><br><span class="line"># 查看可用的输出数据类型</span><br><span class="line">listAttributes(mart_dm)</span><br><span class="line"></span><br><span class="line"># ID 转换,不局限于ID转换,还可检索其他信息</span><br><span class="line">list_gene <- getBM(attributes=c('entrezgene_id','ensembl_gene_id','external_synonym',"go_id", "flybase_gene_id", "external_gene_name","flybasename_gene"), </span><br><span class="line"> filters = 'entrezgene_id', </span><br><span class="line"> values = Dm_Atg_genes_ID$ENTREZID, </span><br><span class="line"> mart = mart_dm)</span><br><span class="line"># gene symbol转为entrze ID</span><br><span class="line">getBM(attributes=c('entrezgene_id','ensembl_gene_id','external_synonym',"go_id", "external_gene_name"), </span><br><span class="line"> filters = 'external_synonym', </span><br><span class="line"> values = Dm_Atg_genes_ID$SYMBOL, </span><br><span class="line"> mart = mart_dm)</span><br><span class="line"># 需要注意的是,ensembl id转换时存在三种情况</span><br><span class="line"># 1. 一个ensembl_gene_id转换为多个entrezgene_id,</span><br><span class="line"># 2. 一个ensembl_gene_id转换为多个gene symbol</span><br><span class="line"># 3. 同时还有许多基因ID无法成功转换,标记为NA</span><br><span class="line">a=list_gene[!duplicated(list_gene$ensembl_gene_id),]</span><br></pre></td></tr></table></figure><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"># 网址数据框:</span><br><span class="line">Dm_Atg_genes_ID$NCBI_url <- paste("https://www.ncbi.nlm.nih.gov/gene/",Dm_Atg_genes_ID$ENTREZID,sep="")</span><br><span class="line">head(Dm_Atg_genes_ID)</span><br></pre></td></tr></table></figure><p>使用<code>XML</code>包的<code>getNodeSet()</code>函数需要两个参数,一个是根据URL获得的网页<code>XML document</code>对象,另一个是要定位的节点(<code>xpath</code>格式)。</p><p><code>Xpath:</code></p><p>//*[@id=“summaryDl”]/dd[1]/text()</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># Official Symbol的xpath://*[@id="summaryDl"]/dd[1]/text()</span><br><span class="line"># Official Full name://*[@id="summaryDl"]/dd[2]/text()</span><br><span class="line"># Primary source://*[@id="summaryDl"]/dd[3]/a</span><br><span class="line"># Locus tag://*[@id="summaryDl"]/dt[4]</span><br><span class="line"># See related://*[@id="summaryDl"]/dd[5]/a</span><br><span class="line"># Gene type://*[@id="summaryDl"]/dd[5]/text()</span><br><span class="line"># Summary://*[@id="summaryDl"]/dd[10]/text()</span><br><span class="line"></span><br></pre></td></tr></table></figure><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"># 用于Rcurl</span><br><span class="line"># 根据xpath获取节点内容:</span><br><span class="line">#getNodesTxt <- function(html_txt1,xpath_p){</span><br><span class="line"># els1 = getNodeSet(html_txt1, xpath_p)</span><br><span class="line"># # 获得Node的内容,并且去除空字符:</span><br><span class="line"> els1_txt <- sapply(els1,xmlValue)[!(sapply(els1,xmlValue)=="")]</span><br><span class="line"># # 去除\n:</span><br><span class="line"># str_replace_all(els1_txt,"(\\n )+","")</span><br><span class="line">#}</span><br><span class="line"></span><br><span class="line">## 处理节点格式,为character且长度为0的赋值为NA:</span><br><span class="line">#dealNodeTxt <- function(NodeTxt){</span><br><span class="line"># ifelse(is.character(NodeTxt)==T && length(NodeTxt)!=0 , NodeTxt , NA)</span><br><span class="line">#}</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>当HTTP请求不包含用户代理字符串时,该网络服务器似乎返回403禁止错误。 默认情况下,<code>RCurl</code>不传递用户代理。 您可以使用<code>useragent</code>=参数设置一个。<code>httr2</code>包比<code>RCurl</code>更好一些,可以发出HTTP请求(并且它默认设置了一个用户代理字符串)。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">#for(i in 1:nrow(Dm_Atg_genes_ID)){</span><br><span class="line"> </span><br><span class="line"># if(url.exists(Dm_Atg_genes_ID[1,"NCBI_url"],useragent="curl/5.2.0 Rcurl/1.98.1.14")) {</span><br><span class="line"># cat("网址连接正常!\t")</span><br><span class="line"># } else {cat("网址有误!停止运行!\t");break}</span><br><span class="line"># # 获得网页:</span><br><span class="line"># doc <- getURL(Dm_Atg_genes_ID[i,"NCBI_url"],useragent="curl/5.2.0 Rcurl/1.98.1.14")</span><br><span class="line"># # 使用httr2获取页面</span><br><span class="line"># doc <- resp_body_html(req_perform(request(Dm_Atg_genes_ID[i,"NCBI_url"])))</span><br><span class="line"># cat("成功获得网页!\t")</span><br><span class="line"># # 获得网页内容</span><br><span class="line"># html_txt1 <- htmlParse(doc, asText = TRUE)</span><br><span class="line"> </span><br><span class="line"># # 获得Full Name:</span><br><span class="line"># Dm_Atg_genes_ID[i,"FullName"] <- dealNodeTxt(getNodesTxt(html_txt1,'//*[@id="summaryDl"]/dd[2]/text()'))</span><br><span class="line"># cat("写入基因\t")</span><br><span class="line"># # 获得Gene ID:</span><br><span class="line"># Dm_Atg_genes_ID[i,"Gene_ID"] <- str_replace_all(dealNodeTxt(getNodesTxt(html_txt1,'//*[@id="summaryDl"]#/dd[3]/a')),"HGNC|:","")</span><br><span class="line"># cat("写入Gene_ID\t")</span><br><span class="line"># # 获得Gene type:</span><br><span class="line"># Dm_Atg_genes_ID[i,"GeneType"] <- dealNodeTxt(getNodesTxt(html_txt1,'//*[@id="summaryDl"]/dd[5]/text()'))</span><br><span class="line"># cat("写入GeneType\t")</span><br><span class="line"># # 获得summary:</span><br><span class="line"># Dm_Atg_genes_ID[i,"Summary"] <- ifelse(length(getNodesTxt(html_txt1,'//*[@id="summaryDl"]/dd[10]/text()'))!=0,getNodesTxt(html_txt1,'//*[@id="summaryDl"]/dd[10]/text()'),NA)</span><br><span class="line"># cat("写入Summary\n")</span><br><span class="line"> </span><br><span class="line"># print(paste("完成第",i,"个了!"))</span><br><span class="line"></span><br><span class="line">#}</span><br><span class="line"></span><br><span class="line">#xlsx::write.xlsx(Dm_Atg_genes_ID,file = 'Dm_Atg_genes_NCBI.xlsx',sheetName = "Dm_Atgs_NCBI")</span><br></pre></td></tr></table></figure><h3 id="rvest爬取数据">rvest爬取数据</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">NCBI_gene_page <- read_html(Dm_Atg_genes_ID[1,"NCBI_url"], encoding = "UTF-8")</span><br><span class="line">html_nodes(NCBI_gene_page,"p.summary")</span><br><span class="line">html_text()</span><br></pre></td></tr></table></figure><h2 id="rentrez-获取-NCBI-数据库数据">rentrez 获取 NCBI 数据库数据</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">library(rentrez)</span><br><span class="line"></span><br><span class="line"># NCBI 默认有访问限制,未设置 api key 时限制 3 次每秒,设置后限制 10 次每秒。如果有,通过 set_entrez_key 函数设置。</span><br><span class="line">#set_entrez_key("xxxxxx")</span><br><span class="line"></span><br><span class="line"># 列举可用的数据库 </span><br><span class="line">entrez_dbs()</span><br><span class="line"># 查看某数据库总结 </span><br><span class="line">entrez_db_summary("pubmed")</span><br><span class="line"># 查看某数据库支持的搜索字段(fields)</span><br><span class="line">entrez_db_searchable("pubmed")</span><br><span class="line"># 函数 entrez_link 获取不同数据库的链接</span><br><span class="line">entrez_db_links("pubmed")</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"># 在pubmed中搜索黑腹果蝇,用 entrez_search 函数,字段用 [] 包含。</span><br><span class="line">es <- entrez_search(db = "pubmed", term = "Drosophila heart[titl] AND 2017:2024[PDAT]", retmax = 30)</span><br><span class="line">es</span><br><span class="line"># 相关文献的IDs</span><br><span class="line">es$ids</span><br><span class="line"></span><br><span class="line"># entrez_link()可用于查找交叉引用的记录</span><br><span class="line">el <- entrez_link(id = 38237924, db = "",dbfrom = "pubmed") #Sources for the full text of the paper </span><br><span class="line">el$links</span><br><span class="line">entrez_link(id = 38237924, db = "nuccore",dbfrom = "pubmed")</span><br><span class="line"># 函数 entrez_summary 取得条目总结信息,设置 always_return_list = TRUE 让函数就算一个请求也返回列表,防止在 apply 或循环时出现非预期行为。</span><br><span class="line">es <- entrez_summary(db = "pubmed", id = "38237924")</span><br><span class="line"># 函数 extract_from_esummary 从返回的总结对象提取需要信息。</span><br><span class="line">extract_from_esummary(es, "title")</span><br></pre></td></tr></table></figure><h4 id="pubmed文献计量">pubmed文献计量</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">search_year <- function(year, term){</span><br><span class="line"> query <- paste(term, "AND (", year, "[PDAT])")</span><br><span class="line"> entrez_search(db="pubmed", term=query, retmax=0)$count</span><br><span class="line">}</span><br><span class="line"></span><br><span class="line">year <- 2014:2024</span><br><span class="line">papers <- sapply(year, search_year, term="Drosophila heart[titl]", USE.NAMES=FALSE)</span><br><span class="line">plot(year, papers, type='b', main="The Rise of the Drosophila heart")</span><br></pre></td></tr></table></figure><h4 id="核酸序列-fasta-文件下载">核酸序列 fasta 文件下载</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"># 函数 entrez_fetch 获取条目完整信息,常用于下载数据,如选择 nucleotide 数据库并返回类型为 fasta 时可以下载对应 fasta信息,返回为字符串写入到文件,即完成了核酸序列 fasta 文件下载。</span><br><span class="line">el <- entrez_link(dbfrom = "taxonomy", id = "28285", db = "nucleotide")</span><br><span class="line">nu5 <- el$links$taxonomy_nuccore[1:5]</span><br><span class="line">nu5</span><br><span class="line"></span><br><span class="line">ef <- entrez_fetch(db = "nucleotide", id = nu5, rettype = "fasta")</span><br><span class="line">temp <- tempfile()</span><br><span class="line">write(ef, temp)</span><br><span class="line"></span><br></pre></td></tr></table></figure><h4 id="下载果蝇atg8a蛋白的数据">下载果蝇atg8a蛋白的数据</h4><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">all_the_links <- entrez_link(dbfrom='gene', id=32001, db='all')</span><br><span class="line">all_the_links$links</span><br><span class="line">all_the_links$links$gene_protein</span><br><span class="line"></span><br><span class="line">nuc_links <- entrez_link(dbfrom='gene', id=32001, db='protein')</span><br><span class="line">nuc_links</span><br><span class="line">nuc_links$links</span><br><span class="line">nuc_links$links$gene_protein_refseq</span><br><span class="line">ef <- entrez_fetch(db = "protein", id = 24641085, rettype = "fasta")</span><br><span class="line">write(ef, 'dm_pro_24641085.fasta')</span><br></pre></td></tr></table></figure><h2 id="参考">参考</h2><ol><li class="lvl-3"><p>Drost HG, Paszkowski J. <strong>Biomartr: genomic data retrieval with R</strong>. <em>Bioinformatics</em> (2017) 33(8): 1216-1217. <span class="exturl" data-url="aHR0cHM6Ly9hY2FkZW1pYy5vdXAuY29tL2Jpb2luZm9ybWF0aWNzL2FydGljbGUvZG9pLzEwLjEwOTMvYmlvaW5mb3JtYXRpY3MvYnR3ODIxLzI5MzE4MTYvQmlvbWFydHItZ2Vub21pYy1kYXRhLXJldHJpZXZhbC13aXRoLVI=">doi:10.1093/bioinformatics/btw821IF: 5.8 Q1 <i class="fa fa-external-link-alt"></i></span>.</p></li><li class="lvl-3"><p>R语言批量爬取NCBI基因注释数据 - 简书 (<span class="exturl" data-url="aHR0cDovL2ppYW5zaHUuY29t">jianshu.com<i class="fa fa-external-link-alt"></i></span>)</p></li><li class="lvl-3"><p>关于r:Rcurl:如果url存在,则url.exists返回false | 码农家园 (<span class="exturl" data-url="aHR0cDovL2NvZGVub25nLmNvbQ==">codenong.com<i class="fa fa-external-link-alt"></i></span>)</p></li><li class="lvl-3"><p>R语言biomaRt工具包学习笔记 - 知乎 (<span class="exturl" data-url="aHR0cDovL3poaWh1LmNvbQ==">zhihu.com<i class="fa fa-external-link-alt"></i></span>)</p></li><li class="lvl-3"><p>BiomaRt 包进行基因ID转换_biomart包id转化方法-CSDN博客</p></li><li class="lvl-3"><p>rentrez 获取 NCBI 数据库数据 - 简书 (<span class="exturl" data-url="aHR0cDovL2ppYW5zaHUuY29t">jianshu.com<i class="fa fa-external-link-alt"></i></span>)</p></li></ol></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><h2 id="Biomartr包">Biomartr包</h2>
<h3 id="报错信息">报错信息</h3>
<h4 id="问题1:">问题1:</h4>
<p><code>download.database.all(db = &quot;taxdb&quot;, path = &quot;taxdb&quot;)</code>运行后报错, 这个包检测网络连接情况的<code>connected.to.internet</code>函数,源码如下:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">connected.to.internet &lt;- function() &#123;</span><br><span class="line"> if (curl::curl_fetch_memory(&quot;www.google.com&quot;)$status_code == 200) &#123;</span><br><span class="line"> return(TRUE)</span><br><span class="line"> &#125; else &#123;</span><br><span class="line"> message(</span><br><span class="line"> &quot;It seems that you are not connected to the internet. A query to www.google.com was not successful. Could you please check?&quot;</span><br><span class="line"> )</span><br><span class="line"> &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="科研" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E7%A7%91%E7%A0%94/"/>
<category term="R语言" scheme="https://blog.leafminer.cn/tags/R%E8%AF%AD%E8%A8%80/"/>
<category term="多重序列比对" scheme="https://blog.leafminer.cn/tags/%E5%A4%9A%E9%87%8D%E5%BA%8F%E5%88%97%E6%AF%94%E5%AF%B9/"/>
<category term="检索" scheme="https://blog.leafminer.cn/tags/%E6%A3%80%E7%B4%A2/"/>
<category term="NCBI" scheme="https://blog.leafminer.cn/tags/NCBI/"/>
<category term="EMBL-EBI" scheme="https://blog.leafminer.cn/tags/EMBL-EBI/"/>
<category term="数据库" scheme="https://blog.leafminer.cn/tags/%E6%95%B0%E6%8D%AE%E5%BA%93/"/>
<category term="biomaRt包" scheme="https://blog.leafminer.cn/tags/biomaRt%E5%8C%85/"/>
<category term="Biomartr包" scheme="https://blog.leafminer.cn/tags/Biomartr%E5%8C%85/"/>
<category term="rentrez包" scheme="https://blog.leafminer.cn/tags/rentrez%E5%8C%85/"/>
</entry>
<entry>
<title>R语言-不同来源(CRAN,Bioconductor,GitHub,GitLab)R包的更新</title>
<link href="https://blog.leafminer.cn/2024/12/06/d8e77d0dfb04/"/>
<id>https://blog.leafminer.cn/2024/12/06/d8e77d0dfb04/</id>
<published>2024-12-06T00:34:41.000Z</published>
<updated>2024-12-06T12:10:42.720Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>搜索和安装R包之前说过了,这里记录一下R包的更新。要更新R包需要先知道你的R包来自哪里</p><p><strong>R包可以存放在不同的仓库(repository)里,最常见的repo包括CRAN, github,以及生物er必需的Bioconductor。</strong></p><p>CRAN,官方包CRAN,通常国内选择镜像,方法自行百度。</p><p>Bioconductor,这个通常只有生物信息学的人才用得到。</p><p>Github,大部分CRAN和Bioconductor都是托管在Github上的,一般不太稳定。</p><p><strong>可以直接在谷歌或必应搜索该包名字,即可看到是哪种R包。</strong></p><p>或者直接使用<code>rvcheck</code>包来更新。</p><span id="more"></span><h2 id="更新R包">更新R包</h2><h4 id="来自CRAN官方的R包">来自CRAN官方的R包</h4><p>设定好国内镜像,使用以下命令:</p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">old.packages<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#检查library里哪些包有更新版本</span></span><br><span class="line">update.packages<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#更新library里所有包</span></span><br></pre></td></tr></table></figure><p>用Rstudio的话,可以进行点击下面的这个Update:</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/2024/12/20241206014028117.png" alt=""></p><p>或者Rstudio菜单栏点击<code>Tools</code>,选择<code>Check for Package Updates</code></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/2024/12/20241206014251995.png" alt=""></p><h4 id="来自Bioconductor的R包">来自Bioconductor的R包</h4><p>需要使用<code>BiocManager</code>包,先用上面的方法把该包更新到最新版本:</p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> <span class="punctuation">(</span><span class="operator">!</span>requireNamespace<span class="punctuation">(</span><span class="string">"BiocManager"</span><span class="punctuation">,</span> quietly <span class="operator">=</span> <span class="literal">TRUE</span><span class="punctuation">)</span><span class="punctuation">)</span></span><br><span class="line"> install.packages<span class="punctuation">(</span><span class="string">"BiocManager"</span><span class="punctuation">)</span></span><br><span class="line">BiocManager<span class="operator">::</span>version<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#检查当前Bioconductor版本</span></span><br></pre></td></tr></table></figure><p>更新:</p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">BiocManager<span class="operator">::</span>install<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#更新到最新的release版本,使用ask=FALSE可以跳过询问直接更新</span></span><br><span class="line">BiocManager<span class="operator">::</span>install<span class="punctuation">(</span>version <span class="operator">=</span> <span class="string">"3.20"</span><span class="punctuation">)</span> <span class="comment">#更新到指定版本</span></span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/2024/12/20241206022045647.png" alt=""></p><h4 id="来自GitHub的R包">来自GitHub的R包</h4><p>没有一致的仓库来源,不用工具的话,只能手动一个个的重新安装来更新:</p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">library<span class="punctuation">(</span>devtools<span class="punctuation">)</span></span><br><span class="line">install_github<span class="punctuation">(</span><span class="string">"username/repository"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><p>还是用<code>rvcheck</code>包吧。</p><hr><h2 id="用rvcheck包更新R包">用<code>rvcheck</code>包更新R包</h2><p>该包会自动判断包的来源(包括CRAN、Bioconductor、GitHub和GitLab)并检查更新。</p><h3 id="安装">安装</h3><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">install.packages<span class="punctuation">(</span><span class="string">"rvcheck"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><h3 id="使用">使用</h3><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">library<span class="punctuation">(</span>rvcheck<span class="punctuation">)</span></span><br><span class="line">check_r<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#检查R版本</span></span><br><span class="line">check_cran<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#检查CRAN来源的最新发布版本</span></span><br><span class="line">check_bioc<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#检查Bioconductor来源的最新发布版本</span></span><br><span class="line">check_github<span class="punctuation">(</span><span class="string">"GuangchuangYu/clusterProfiler"</span><span class="punctuation">)</span> <span class="comment">#检查GitHub来源指定包的最新发布版本</span></span><br><span class="line">check_gitlab<span class="punctuation">(</span><span class="string">'ezlab/orthodb_r'</span><span class="punctuation">)</span> <span class="comment">#检查GitLab来源指定包的最新发布版本</span></span><br><span class="line">update_all<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#更新上面所有来源的R包</span></span><br></pre></td></tr></table></figure><h2 id="使用installr包更新R并迁移R包">使用<code>installr</code>包更新R并迁移R包</h2><p>该包可以查找最新的R版本,下载并运行安装程序,删除安装文件,将之前的R包复制并更新到新安装的R中。</p><p>此外,它可以安装很多其他软件 (比如:R,’ Rtools ‘,’ RStudio ‘,’ Git ',…等等!),提供一个软件的下载链接也行。还能关机、重启、睡眠、休眠和锁定操作系统。</p><h3 id="安装-2">安装</h3><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">install.packages<span class="punctuation">(</span><span class="string">"installr"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><h3 id="更新R">更新R</h3><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">check.for.updates.R<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#检查是否有更新版本的R</span></span><br><span class="line">get_latest_r_version<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#返回CRAN上可用的R的最新版本作为R系统版本对象</span></span><br><span class="line">updateR<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#或者updater()检查最新的R版本,如果有更新的R版本,下载并安装它</span></span><br></pre></td></tr></table></figure><h3 id="R包迁移">R包迁移</h3><ul class="lvl-0"><li class="lvl-2"><p>将R升级到一个新版本——并将所有的包从旧的R安装复制到新的R中</p></li><li class="lvl-2"><p>移动到一个全局library——想要将所有的包从局部library文件夹复制到全局library文件夹</p></li></ul><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">copy.packages.between.libraries<span class="punctuation">(</span></span><br><span class="line"> from<span class="punctuation">,</span></span><br><span class="line"> to<span class="punctuation">,</span></span><br><span class="line"> ask <span class="operator">=</span> <span class="literal">FALSE</span><span class="punctuation">,</span></span><br><span class="line"> keep_old <span class="operator">=</span> <span class="literal">TRUE</span><span class="punctuation">,</span></span><br><span class="line"> do_NOT_override_packages_in_new_R <span class="operator">=</span> <span class="literal">TRUE</span></span><br><span class="line"><span class="punctuation">)</span></span><br><span class="line"></span><br><span class="line"><span class="comment">#示例</span></span><br><span class="line">create.global.library<span class="punctuation">(</span><span class="punctuation">)</span> <span class="comment">#创建全局library,默认位置"R_path/R/library"</span></span><br><span class="line">copy.packages.between.libraries<span class="punctuation">(</span>ask <span class="operator">=</span> <span class="built_in">T</span><span class="punctuation">)</span> <span class="comment">#</span></span><br></pre></td></tr></table></figure><table><thead><tr><th><code>from</code></th><th>library文件夹位置</th></tr></thead><tbody><tr><td><code>to</code></td><td>复制到的位置</td></tr><tr><td><code>ask</code></td><td>是否应该让用户选择从哪两个library中复制包?如果为<code>FALSE</code>(默认值),则将library文件夹复制到最新的R安装。这将覆盖"from"和"to"参数</td></tr><tr><td><code>keep_old</code></td><td>复制还是移动library文件夹</td></tr><tr><td><code>do_NOT_override_packages_in_new_R</code></td><td>请勿覆盖新的包。默认<code>TRUE</code>。设定为<code>FALSE</code>,如果一个包同时存在于"from"和"to" library文件夹中,那么它会将"to"包的版本复制到“to”</td></tr></tbody></table><h2 id="参考:">参考:</h2><ol><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly93d3cub21pY3NjbGFzcy5jb20vYXJ0aWNsZS8xOTky">R及R包的更新、移除、卸载 - 组学大讲堂问答社区<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly93d3cub21pY3NjbGFzcy5jb20vYXJ0aWNsZS8xOTcw">安装R包的几种方法 - 组学大讲堂问答社区<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9tcC53ZWl4aW4ucXEuY29tL3M/c3JjPTExJnRpbWVzdGFtcD0xNzMzNDE4OTcwJnZlcj01NjcwJnNpZ25hdHVyZT1aNjhheWh3YjJxbFA5eHdRa2FheHZDLXoyNlhzeGRkV0tTZG1MSC1wbzhNS0NPd1AyZTRNZHJmazh1SVB1Km84bTVRTUczOTVWcjB0aG5kR0sxUVRYMnMxTjgqeXNoTkNJa1BuaGpnV1dPa3lsSUVLbERoVW5MMkhZcUtraVhEWCZuZXc9MQ==">12. R studio/R 工具指南(十一:R 的更新与R 包的迁移)<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL0d1YW5nY2h1YW5nWXUvcnZjaGVjaw==">GitHub - GuangchuangYu/rvcheck: ✅R/Package Version Check<i class="fa fa-external-link-alt"></i></span></p></li></ol><p></p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>搜索和安装R包之前说过了,这里记录一下R包的更新。要更新R包需要先知道你的R包来自哪里</p>
<p><strong>R包可以存放在不同的仓库(repository)里,最常见的repo包括CRAN, github,以及生物er必需的Bioconductor。</strong></p>
<p>CRAN,官方包CRAN,通常国内选择镜像,方法自行百度。</p>
<p>Bioconductor,这个通常只有生物信息学的人才用得到。</p>
<p>Github,大部分CRAN和Bioconductor都是托管在Github上的,一般不太稳定。</p>
<p><strong>可以直接在谷歌或必应搜索该包名字,即可看到是哪种R包。</strong></p>
<p>或者直接使用<code>rvcheck</code>包来更新。</p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E5%85%B6%E4%BB%96/"/>
<category term="R语言" scheme="https://blog.leafminer.cn/tags/R%E8%AF%AD%E8%A8%80/"/>
<category term="BiocManager" scheme="https://blog.leafminer.cn/tags/BiocManager/"/>
<category term="更新" scheme="https://blog.leafminer.cn/tags/%E6%9B%B4%E6%96%B0/"/>
<category term="R包" scheme="https://blog.leafminer.cn/tags/R%E5%8C%85/"/>
<category term="library" scheme="https://blog.leafminer.cn/tags/library/"/>
<category term="rvcheck" scheme="https://blog.leafminer.cn/tags/rvcheck/"/>
<category term="installr" scheme="https://blog.leafminer.cn/tags/installr/"/>
</entry>
<entry>
<title>R语言中多重序列比对(MultipleAlignment)结果导出到文件(fasta文件和Phylip文件)</title>
<link href="https://blog.leafminer.cn/2024/12/05/9f3e7aa190aa/"/>
<id>https://blog.leafminer.cn/2024/12/05/9f3e7aa190aa/</id>
<published>2024-12-05T03:23:22.000Z</published>
<updated>2024-12-05T05:21:31.168Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/2024/12/20241205102457133.png" alt=""></p><p>这里是使用<code>Biostrings</code>包导入fasta格式的多重比对序列,并导出多重序列比对后的数据为fasta和phylip文件。</p><span id="more"></span><h2 id="导入多重比对序列">导入多重比对序列</h2><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">readDNAMultipleAlignment<span class="punctuation">(</span>filepath<span class="punctuation">,</span> format<span class="punctuation">)</span> <span class="comment">#DNA</span></span><br><span class="line">readRNAMultipleAlignment<span class="punctuation">(</span>filepath<span class="punctuation">,</span> format<span class="punctuation">)</span> <span class="comment">#RNA</span></span><br><span class="line">readAAMultipleAlignment<span class="punctuation">(</span>AAMultipleAlignment<span class="punctuation">,</span> format<span class="punctuation">)</span> <span class="comment">#蛋白序列</span></span><br></pre></td></tr></table></figure><h2 id="导出多重比对序列">导出多重比对序列</h2><h3 id="核酸序列">核酸序列</h3><ol><li class="lvl-3"><p><strong>导出到fasta文件</strong>:</p></li></ol><ul class="lvl-0"><li class="lvl-2"><p>如果你需要将你的多重序列比对对象(MultipleAlignment object)导出为fasta文件,你可以将其转换为<code>DNAStringSet</code>对象,然后像下面这样将其写入fasta文件:</p></li></ul><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">DNAStr <span class="operator"><-</span> as<span class="punctuation">(</span>origMAlign<span class="punctuation">,</span> <span class="string">"DNAStringSet"</span><span class="punctuation">)</span></span><br><span class="line">writeXStringSet<span class="punctuation">(</span>DNAStr<span class="punctuation">,</span> file<span class="operator">=</span><span class="string">"myFile.fa"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><ul class="lvl-0"><li class="lvl-2"><p>这里的<code>as(origMAlign, "DNAStringSet")</code>是将<code>origMAlign</code>(原始的多重序列比对对象)转换为<code>DNAStringSet</code>类型。<code>writeXStringSet(DNAStr, file="myFile.fa")</code>则是将转换后的<code>DNAStringSet</code>对象<code>DNAStr</code>写入名为<code>myFile.fa</code>的fasta文件中。</p></li></ul><ol start="2"><li class="lvl-3"><p><strong>导出到Phylip文件</strong>:</p></li></ol><ul class="lvl-0"><li class="lvl-2"><p>Phylip格式不仅存储你正在导出的序列,还存储对象的列掩码(column masking)。如果你对序列进行了掩码处理,并且在导出Phylip文件时,这个掩码会被记录到你导出的文件中。</p></li><li class="lvl-2"><p>与上面的fasta文件示例类似,任何被你掩码掉的行(rows)也会从导出的文件中移除。</p></li><li class="lvl-2"><p>导出Phylip文件的代码如下:</p></li></ul><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">write.phylip<span class="punctuation">(</span>phylipMAlign<span class="punctuation">,</span> filepath<span class="operator">=</span><span class="string">"myFile.txt"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><ul class="lvl-0"><li class="lvl-2"><p>这里的<code>write.phylip(phylipMAlign, filepath="myFile.txt")</code>是将<code>phylipMAlign</code>(可能是已经进行了某些处理的多重序列比对对象)写入名为<code>myFile.txt</code>的Phylip文件中。</p></li></ul><h3 id="蛋白序列">蛋白序列</h3><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">AA_MA <span class="operator"><-</span> as<span class="punctuation">(</span>AAMultipleAlignment<span class="punctuation">,</span> <span class="string">"AAStringSet"</span><span class="punctuation">)</span></span><br><span class="line">writeXStringSet<span class="punctuation">(</span>AA_MA<span class="punctuation">,</span> file<span class="operator">=</span><span class="string">"AAMultipleAlignment.fasta"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><ul class="lvl-0"><li class="lvl-2"><p>这里的<code>as(AAMultipleAlignment, "AAStringSet")</code>是将<code>AAMultipleAlignment</code>(原始的多重序列比对对象)转换为<code>AAStringSet</code>类型。<code>writeXStringSet(AA_MA, file="AAMultipleAlignment.fasta")</code>则是将转换后的<code>AAStringSet</code>对象AA_MA写入名为<code>AAMultipleAlignment</code>的<code>fasta</code>文件中。</p></li></ul><h2 id="参考">参考</h2><p><span class="exturl" data-url="aHR0cHM6Ly9iaW9jb25kdWN0b3Iub3JnL3BhY2thZ2VzL2RldmVsL2Jpb2MvdmlnbmV0dGVzL0Jpb3N0cmluZ3MvaW5zdC9kb2MvTXVsdGlwbGVBbGlnbm1lbnRzLmh0bWwjZXhwb3J0aW5nLXRvLWZpbGU=">https://bioconductor.org/packages/devel/bioc/vignettes/Biostrings/inst/doc/MultipleAlignments.html#exporting-to-file<i class="fa fa-external-link-alt"></i></span></p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/2024/12/20241205102457133.png" alt=""></p>
<p>这里是使用<code>Biostrings</code>包导入fasta格式的多重比对序列,并导出多重序列比对后的数据为fasta和phylip文件。</p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="科研" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E7%A7%91%E7%A0%94/"/>
<category term="R语言" scheme="https://blog.leafminer.cn/tags/R%E8%AF%AD%E8%A8%80/"/>
<category term="多重序列比对" scheme="https://blog.leafminer.cn/tags/%E5%A4%9A%E9%87%8D%E5%BA%8F%E5%88%97%E6%AF%94%E5%AF%B9/"/>
<category term="MultipleAlignment" scheme="https://blog.leafminer.cn/tags/MultipleAlignment/"/>
<category term="fasta" scheme="https://blog.leafminer.cn/tags/fasta/"/>
<category term="保存" scheme="https://blog.leafminer.cn/tags/%E4%BF%9D%E5%AD%98/"/>
<category term="Biostrings包" scheme="https://blog.leafminer.cn/tags/Biostrings%E5%8C%85/"/>
</entry>
<entry>
<title>谁说女人不懂逻辑 | 张嘉佳</title>
<link href="https://blog.leafminer.cn/2024/12/03/5a0c328a2fee/"/>
<id>https://blog.leafminer.cn/2024/12/03/5a0c328a2fee/</id>
<published>2024-12-03T06:46:03.000Z</published>
<updated>2024-12-03T14:40:46.508Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p><strong>张嘉佳</strong>,作家,出版作品有长篇小说《几乎成了英雄》,短篇小说集《从你的全世界路过》等.。微信号:justastudio</p><p>人不犯我,我不犯人。</p><p>人若犯我,我气得哭了。</p><p>去年这时候,有个男性朋友被送进了精神病院,大家引以为鉴。男人进来,女人勿点。</p><p>这个朋友,被老婆的闺密们气得手抖,认为她们是傻逼。闺密团也认为他是个傻逼,决定开次审判会,正好他也想当面论一论,所以就定下日期,大家坐而论道。</p><p>闺密A说:“明天情人节,你准备了什么礼物?”</p><p>朋友踌躇满志,掏出笔记本,上面记录了次日早九点一直到晚上的安排。</p><p>闺密B随便翻翻,冷笑说:“都是些老掉牙的玩意儿。”</p><p>闺密C悠悠地说“你听过一个寓言没有?明明我喜欢的是苹果,结果你偏偏给了我一车香蕉,我还非得泪流满面感恩戴德。”</p><p>“这就是你们男人的逻辑,可我犯了什么错,我只是想要一个苹果而已。”</p><p>朋友怒道:“我怎么知道你到底要什么?”</p><span id="more"></span> <p>闺密们放声大笑,说:“你连这个都不知道,还好意思觍着狗脸说爱我?”</p><p>朋友的气势弱了三分,说:“那女人就没有错的地方吗?”</p><p>闺密们齐齐喝了口咖啡,说:“你说说看。”</p><p>朋友起劲儿了,说:“正在开会,结果老婆电话一个接一个,讲了在开会啊,还打还打,你就不能体谅我吗?”</p><p>闺密们勃然大怒,说:“你是对夺命连环call(电话)有意见?你以为我们想?这都是因为爱你啊!要是心里没有你,谁他妈的给你不停地打电话?”</p><p>朋友脖子一缩,咆哮了:“我要的是安静!安静就是我的苹果,电话就是我的香蕉,给我一车香蕉,我还非得泪流满面感恩戴德?我只不过想要一个苹果而已!”</p><p>闺密A拍桌子:“造反了!你这么懂逻辑去做律师啊?”</p><p>闺密B拍桌子:“太冷血!诡辩狗!”</p><p>闺密C拍桌子:“爱是不能交换,不能类比,你这么说就是把爱情当作交易了!”</p><p>朋友一滞:“你们先说的苹果香蕉……”</p><p>闺密们集体掀桌:“去你妈的苹果香蕉,喜欢吃我们帮你买一车皮,麻烦你对女朋友好一点儿可以吗?”</p><p>朋友额头爆青筋。</p><p>服务员过来摆好桌子。</p><p>闺密们冷笑:“还有怨气?通通说出来,让我们看看你有多low(没品)。”</p><p>朋友豁出去了,说:“一次我换灯泡,结果失败了,被骂了一个多星期。”</p><p>“至于吗?倒车没入库,连倒了七八把,整晚没理我,至于吗……”</p><p>闺密A大笑:“换灯泡、倒车什么的都不会的男人,还要来干吗?”</p><p>闺密B冷笑:“芝麻大的事情你有脸说?”</p><p>朋友额头爆青筋,喘气:“对啊,芝麻大的事情,说了我一个多星期……”</p><p>闺密C语重心长地说:“男人,多做,少说。”</p><p>朋友愣了一会儿,说:“前几天她心情不好,我上蹿下跳,买这买那,端茶送水,也不给我好脸色……”</p><p>闺密们相视而笑:“我们女人多简单,其实也不用你做什么,只要说一句‘我爱你’。”</p><p>朋友颤抖着问:“刚刚你们还告诉我,多做,少说。”</p><p>闺密们恨铁不成钢,大叫:“该做的时候做,该说的时候说!”</p><p>朋友带着哭腔问:“那什么时候该做,什么时候该说?”</p><p>闺密们掀桌:“这都不知道,还好意思觍着狗脸说爱我?”</p><p>服务员过来摆好桌子。</p><p>闺密A:“有时候做点儿事情,代替说‘我爱你’。”</p><p>闺密B:“有时候不用做事情,直接说‘我爱你’。”</p><p>闺密C:“搞错了,就是你的不对。”</p><p>朋友抱头痛哭,崩溃,干号:“那对和错到底总有个标准吧?”</p><p>闺密A:“女人发发牢騷,其实不用你来装牛逼分析,只是要你的安慰。”</p><p>闺密B:“女人是情绪的,感性的,别用逻辑来框死我们。”</p><p>闺密C总结:“一句话,女人不在乎对错,在乎你的态度。”</p><p>朋友迷惘地问:“那我的态度有什么问题?”</p><p>闺密A:“你的态度不对。”</p><p>闺密B:“你的态度是错的。”</p><p>闺密C:“说过我们不在乎对错,只在乎你的态度!”</p><p>朋友掀桌:“那态度对和错总有个标准吧?”</p><p>闺密们掀桌:“这都不知道,还好意思觍着狗脸说爱我?”</p><p>服务员过来摆好桌子。</p><p>朋友低头:“我错了。”</p><p>闺密们扭头:“错在哪里?”</p><p>朋友低头:“逻辑错了。”</p><p>闺密们大怒:“放屁!”</p><p>朋友吓尿了:“是态度错了,是态度错了。”</p><p>闺密们放缓口气:“态度错在哪里?”</p><p>一股陰森森的寒意从朋友心底涌上,他开始克制不住地战栗,说:</p><p>“错在……错在……不该要苹果啊……不对……错在做做说说啊……不对……错在态度的逻辑啊……不对……错在……错在…”</p><p>朋友掀桌,眼泪四飙,手舞足蹈地哭喊着:“我他妈连这都不知道,怎么好意思觍着狗脸说爱你啊……”</p><p>服务员把朋友送去了精神病院。</p><p>服务员摆好桌子。</p><p>闺密A摇头:“这么简单的问题,认错,就是对的态度。”</p><p>闺密B惋惜:“对的认错,不是知道自己错在哪里,而是知道怎么认错。”</p><p>闺密C微笑:“认错的态度,就是对的逻辑。”</p><p>闺密们举杯:“谁说我们女人不懂逻辑。”</p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p><strong>张嘉佳</strong>,作家,出版作品有长篇小说《几乎成了英雄》,短篇小说集《从你的全世界路过》等.。微信号:justastudio</p>
<p>人不犯我,我不犯人。</p>
<p>人若犯我,我气得哭了。</p>
<p>去年这时候,有个男性朋友被送进了精神病院,大家引以为鉴。男人进来,女人勿点。</p>
<p>这个朋友,被老婆的闺密们气得手抖,认为她们是傻逼。闺密团也认为他是个傻逼,决定开次审判会,正好他也想当面论一论,所以就定下日期,大家坐而论道。</p>
<p>闺密A说:“明天情人节,你准备了什么礼物?”</p>
<p>朋友踌躇满志,掏出笔记本,上面记录了次日早九点一直到晚上的安排。</p>
<p>闺密B随便翻翻,冷笑说:“都是些老掉牙的玩意儿。”</p>
<p>闺密C悠悠地说“你听过一个寓言没有?明明我喜欢的是苹果,结果你偏偏给了我一车香蕉,我还非得泪流满面感恩戴德。”</p>
<p>“这就是你们男人的逻辑,可我犯了什么错,我只是想要一个苹果而已。”</p>
<p>朋友怒道:“我怎么知道你到底要什么?”</p></summary>
<category term="转载" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/"/>
<category term="生活" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/%E7%94%9F%E6%B4%BB/"/>
<category term="小小说" scheme="https://blog.leafminer.cn/tags/%E5%B0%8F%E5%B0%8F%E8%AF%B4/"/>
<category term="转载" scheme="https://blog.leafminer.cn/tags/%E8%BD%AC%E8%BD%BD/"/>
<category term="张嘉佳" scheme="https://blog.leafminer.cn/tags/%E5%BC%A0%E5%98%89%E4%BD%B3/"/>
<category term="女人" scheme="https://blog.leafminer.cn/tags/%E5%A5%B3%E4%BA%BA/"/>
<category term="逻辑" scheme="https://blog.leafminer.cn/tags/%E9%80%BB%E8%BE%91/"/>
</entry>
<entry>
<title>网页请求阿里云 DataV Geo 在线地图,路径访问返回403问题</title>
<link href="https://blog.leafminer.cn/2024/12/03/5b68cbc7ed8f/"/>
<id>https://blog.leafminer.cn/2024/12/03/5b68cbc7ed8f/</id>
<published>2024-12-02T17:52:44.000Z</published>
<updated>2024-12-03T02:59:12.905Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><h2 id="问题如下:">问题如下:</h2><p>部分javascript显示如下:</p><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">"page"</span>).<span class="property">style</span>.<span class="property">background</span> = style[<span class="number">0</span>];</span><br><span class="line"><span class="keyword">var</span> myChart = echarts.<span class="title function_">init</span>(<span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">'main'</span>));</span><br><span class="line">myChart.<span class="title function_">showLoading</span>();</span><br><span class="line">$.<span class="title function_">get</span>(<span class="string">'https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json'</span>, <span class="keyword">function</span> (<span class="params">geoJson</span>) {</span><br><span class="line"> myChart.<span class="title function_">hideLoading</span>();</span><br><span class="line"> echarts.<span class="title function_">registerMap</span>(<span class="string">'china'</span>, geoJson);</span><br></pre></td></tr></table></figure><p>本地请求运行正常,上传到GitHub仓库中的网站后请求<span class="exturl" data-url="aHR0cHM6Ly9nZW8uZGF0YXYuYWxpeXVuLmNvbS9hcmVhc192My9ib3VuZC8xMDAwMDBfZnVsbC5qc29u">https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json<i class="fa fa-external-link-alt"></i></span> 返回403,加载失败。</p><span id="more"></span><h2 id="解决办法:">解决办法:</h2><p>在Html文件中的<code><head></code>间添加:</p><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag"><<span class="name">meta</span> <span class="attr">name</span>=<span class="string">"referrer"</span> <span class="attr">content</span>=<span class="string">"no-referrer"</span> /></span></span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/2024/12/20241203102658585.png" alt=""></p><h2 id="正常显示:">正常显示:</h2><p>本地,网站均正常显示:</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/2024/12/20241203101758289.png" alt=""></p><h2 id="参考">参考</h2><p><span class="exturl" data-url="aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl81OTI4NzAyNS9hcnRpY2xlL2RldGFpbHMvMTQxMjUxNDk0">https://blog.csdn.net/weixin_59287025/article/details/141251494<i class="fa fa-external-link-alt"></i></span></p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><h2 id="问题如下:">问题如下:</h2>
<p>部分javascript显示如下:</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&quot;page&quot;</span>).<span class="property">style</span>.<span class="property">background</span> = style[<span class="number">0</span>];</span><br><span class="line"><span class="keyword">var</span> myChart = echarts.<span class="title function_">init</span>(<span class="variable language_">document</span>.<span class="title function_">getElementById</span>(<span class="string">&#x27;main&#x27;</span>));</span><br><span class="line">myChart.<span class="title function_">showLoading</span>();</span><br><span class="line">$.<span class="title function_">get</span>(<span class="string">&#x27;https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json&#x27;</span>, <span class="keyword">function</span> (<span class="params">geoJson</span>) &#123;</span><br><span class="line"> myChart.<span class="title function_">hideLoading</span>();</span><br><span class="line"> echarts.<span class="title function_">registerMap</span>(<span class="string">&#x27;china&#x27;</span>, geoJson);</span><br></pre></td></tr></table></figure>
<p>本地请求运行正常,上传到GitHub仓库中的网站后请求<span class="exturl" data-url="aHR0cHM6Ly9nZW8uZGF0YXYuYWxpeXVuLmNvbS9hcmVhc192My9ib3VuZC8xMDAwMDBfZnVsbC5qc29u">https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json<i class="fa fa-external-link-alt"></i></span> 返回403,加载失败。</p></summary>
<category term="笔记" scheme="https://blog.leafminer.cn/categories/%E7%AC%94%E8%AE%B0/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E7%AC%94%E8%AE%B0/%E5%85%B6%E4%BB%96/"/>
<category term="API" scheme="https://blog.leafminer.cn/tags/API/"/>
<category term="问题" scheme="https://blog.leafminer.cn/tags/%E9%97%AE%E9%A2%98/"/>
<category term="地图" scheme="https://blog.leafminer.cn/tags/%E5%9C%B0%E5%9B%BE/"/>
<category term="阿里云" scheme="https://blog.leafminer.cn/tags/%E9%98%BF%E9%87%8C%E4%BA%91/"/>
<category term="403" scheme="https://blog.leafminer.cn/tags/403/"/>
</entry>
<entry>
<title>使用Rstudio提交到GitHub仓库过程中出现的问题及其解决办法</title>
<link href="https://blog.leafminer.cn/2024/12/03/20da183667a5/"/>
<id>https://blog.leafminer.cn/2024/12/03/20da183667a5/</id>
<published>2024-12-02T16:29:33.000Z</published>
<updated>2024-12-02T16:38:21.275Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><h2 id="问题1:">问题1:</h2><p>在使用Rstudio中的git,提交 (commit) 时会出现以下错误:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">error: gpg failed to sign the data</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241202233315.png" alt=""></p><span id="more"></span><p>通过搜索,查到以下解决办法,办法可行。</p><p>这是一个常见的错误,通常与与GnuPG(GNU隐私保护)工具集相关的问题有关。GnuPG是一个用于加密和数字签名的免费软件,常用于保护Git提交的完整性和真实性。</p><h2 id="错误原因">错误原因</h2><p>gpg失败签名数据错误可能由以下几个原因引起:</p><h3 id="a-GnuPG未正确配置">a. GnuPG未正确配置</h3><p>在某些情况下,GnuPG未正确配置可能导致无法签名数据。这可能是由于缺少必要的密钥对或不正确的配置文件设置。</p><h3 id="b-缺少GnuPG密钥">b. 缺少GnuPG密钥</h3><p>要对Git提交进行签名,您需要使用GnuPG密钥对。如果您没有生成或导入密钥,那么Git将无法执行签名操作。</p><h3 id="c-Git设置错误">c. Git设置错误</h3><p>有时,Git的设置可能会影响GnuPG的签名功能。可能存在不正确的配置或设置冲突,导致gpg无法成功签名数据。</p><h2 id="解决办法">解决办法</h2><ol><li class="lvl-3"><p>查看是否存在GnuPG密钥</p></li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">gpg --list-keys</span><br></pre></td></tr></table></figure><p>存在密钥显示如图:<img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241202235057737.png" alt=""></p><ol start="2"><li class="lvl-3"><p>生成新的密钥</p></li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">gpg --gen-key</span><br></pre></td></tr></table></figure><ol start="3"><li class="lvl-3"><p>导入GnuPG密钥</p></li></ol><p>导出新生成的公钥和私钥:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">gpg --output pubkey.gpg --armor --export [email protected]</span><br><span class="line">gpg --output privkey.gpg --armor --export-secret-key [email protected]</span><br></pre></td></tr></table></figure><p>将公钥和私钥导入到GnuPG密钥环中:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">gpg --import pubkey.gpg</span><br><span class="line">gpg --allow-secret-key-import --import privkey.gpg</span><br></pre></td></tr></table></figure><ol start="4"><li class="lvl-3"><p>问题解决</p></li></ol><h2 id="问题2:">问题2:</h2><p>Rstudio和VStudio运行Git过程中会弹出账号选择窗口。</p><p>原因:设定了多个账号,未设定默认。</p><h2 id="解决办法-2">解决办法</h2><h3 id="方法一-设定默认账号">方法一 设定默认账号</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># git config --global credential.<URL>.username <USERNAME></span><br><span class="line">git config --global credential.https://github.com.username=leafminer</span><br></pre></td></tr></table></figure><p>关联默认账户与已存在于本地的clone:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git remote set-url origin https://[email protected]/</span><br><span class="line"># clone时使用下面的方式,可直接关联:</span><br><span class="line"># git clone https://[email protected]/mona/test</span><br></pre></td></tr></table></figure><h3 id="方法二-退出多余账号">方法二 退出多余账号</h3><p>使用<code>git credential-manager github</code>管理账号</p><p>先查看当前存在的账号:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git credential-manager github</span><br></pre></td></tr></table></figure><p>删除不需要的账号:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git credential-manager github logout 22977646</span><br></pre></td></tr></table></figure><p>示例结果如下图:</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241203002453097.png" alt=""></p><h2 id="参考">参考</h2><ol><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9nZWVrLWRvY3MuY29tL2dpdC9naXQtcXVlc3Rpb25zLzgwN19naXRfZ2l0X2Vycm9yX2dwZ19mYWlsZWRfdG9fc2lnbl9kYXRhLmh0bWw=">https://geek-docs.com/git/git-questions/807_git_git_error_gpg_failed_to_sign_data.html<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2dpdC1lY29zeXN0ZW0vZ2l0LWNyZWRlbnRpYWwtbWFuYWdlci9ibG9iL21haW4vZG9jcy9tdWx0aXBsZS11c2Vycy5tZCN0bGRyLXRlbGwtZ2NtLXRvLXJlbWVtYmVyLXdoaWNoLWFjY291bnQtdG8tdXNl">https://github.com/git-ecosystem/git-credential-manager/blob/main/docs/multiple-users.md#tldr-tell-gcm-to-remember-which-account-to-use<i class="fa fa-external-link-alt"></i></span></p></li></ol></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><h2 id="问题1:">问题1:</h2>
<p>在使用Rstudio中的git,提交 (commit) 时会出现以下错误:</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">error: gpg failed to sign the data</span><br></pre></td></tr></table></figure>
<p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241202233315.png" alt=""></p></summary>
<category term="笔记" scheme="https://blog.leafminer.cn/categories/%E7%AC%94%E8%AE%B0/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E7%AC%94%E8%AE%B0/%E5%85%B6%E4%BB%96/"/>
<category term="Github" scheme="https://blog.leafminer.cn/tags/Github/"/>
<category term="Git" scheme="https://blog.leafminer.cn/tags/Git/"/>
<category term="Rstudio" scheme="https://blog.leafminer.cn/tags/Rstudio/"/>
<category term="commit" scheme="https://blog.leafminer.cn/tags/commit/"/>
<category term="gpg" scheme="https://blog.leafminer.cn/tags/gpg/"/>
<category term="GnuPG" scheme="https://blog.leafminer.cn/tags/GnuPG/"/>
</entry>
<entry>
<title>用RStudio与Git、GitHub连接起来,实现代码管理和数据分析</title>
<link href="https://blog.leafminer.cn/2024/12/01/0ef357bbdb4c/"/>
<id>https://blog.leafminer.cn/2024/12/01/0ef357bbdb4c/</id>
<published>2024-12-01T01:23:43.000Z</published>
<updated>2024-12-01T08:20:45.460Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201155718.png" alt=""></p><p>Git的基本操作以及如何通过RStudio与GitHub进行交互。这里仅介绍了通过Git和Rstudio管理GitHub仓库的设置步骤。更多内容见 <span class="exturl" data-url="aHR0cHM6Ly9oYXBweWdpdHdpdGhyLmNvbS8=">https://happygitwithr.com/<i class="fa fa-external-link-alt"></i></span></p><span id="more"></span><h2 id="配置Git">配置Git</h2><p>使用下面的命令查看Git的安装位置和版本。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">which git</span><br><span class="line"></span><br><span class="line">git --version</span><br></pre></td></tr></table></figure><p>更新Git</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git update-git-for-windows</span><br></pre></td></tr></table></figure><p>设置Git用户名和邮件</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git config --global user.name "leafminer"</span><br><span class="line">git config --global user.email "[email protected]"</span><br><span class="line">git config --global --list</span><br></pre></td></tr></table></figure><p>也可以使用R包<code>usethis</code></p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">library<span class="punctuation">(</span>usethis<span class="punctuation">)</span></span><br><span class="line">use_git_config<span class="punctuation">(</span>user.name <span class="operator">=</span> <span class="string">"leafminer"</span><span class="punctuation">,</span> user.email <span class="operator">=</span> <span class="string">"[email protected]"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><p>设定默认的初始分支名为<code>main</code></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git config --global init.defaultBranch main</span><br></pre></td></tr></table></figure><p>R包<code>usethis</code></p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 默认为main</span></span><br><span class="line">usethis<span class="operator">::</span>git_default_branch_configure<span class="punctuation">(</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><h2 id="设定令牌">设定令牌</h2><p>R包<code>usethis</code></p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># 跳转到 https://github.com/settings/tokens,创建Token</span></span><br><span class="line">usethis<span class="operator">::</span>create_github_token<span class="punctuation">(</span><span class="punctuation">)</span></span><br><span class="line"><span class="comment"># 粘贴保存创建的Token</span></span><br><span class="line">gitcreds<span class="operator">::</span>gitcreds_set<span class="punctuation">(</span><span class="punctuation">)</span></span><br><span class="line"><span class="comment"># 查看</span></span><br><span class="line">gitcreds_get<span class="punctuation">(</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241130170835.png" alt=""></p><p>设定GitHub远程仓库和仓库地址</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git remote set-url 2024-R-PhDdata https://github.com/leafminer/2024-R-PhDdata.git</span><br><span class="line">git remote -v</span><br></pre></td></tr></table></figure><p>R包<code>usethis</code></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># 查看远程库和地址</span><br><span class="line">usethis::git_remotes()</span><br><span class="line"># 修改远程库和地址</span><br><span class="line">usethis::use_git_remote(</span><br><span class="line"> "2024-R-PhDdata",</span><br><span class="line"> "https://github.com/leafminer/2024-R-PhDdata.git",</span><br><span class="line"> overwrite = TRUE</span><br><span class="line">)</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241130195644.png" alt=""></p><p><code>credentials</code>和<code>gh</code>包</p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">credentials<span class="operator">::</span>set_github_pat<span class="punctuation">(</span><span class="punctuation">)</span></span><br><span class="line"></span><br><span class="line">usethis<span class="operator">::</span>gh_token_help<span class="punctuation">(</span><span class="punctuation">)</span></span><br><span class="line"></span><br><span class="line">usethis<span class="operator">::</span>git_sitrep<span class="punctuation">(</span><span class="punctuation">)</span></span><br><span class="line"></span><br><span class="line">gh<span class="operator">::</span>gh_whoami<span class="punctuation">(</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><hr><h2 id="设定密钥">设定密钥</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">ssh-keygen -t rsa -b 4096 -C "Rstudio"</span><br><span class="line"># ssh-keygen -t ed25519 -C "Rstudio"</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241130234334.png" alt=""></p><p>确保ssh - agent处于运行状态:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">eval $(ssh-agent -s)</span><br><span class="line"># Agent pid 1542</span><br></pre></td></tr></table></figure><p>添加你的密钥,用正确的名字代替你的钥匙。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh-add ~/.ssh/id_rstudio</span><br></pre></td></tr></table></figure><p>复制公钥到剪贴板:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">clip < ~/.ssh/id_rstudio.pub</span><br></pre></td></tr></table></figure><p>ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA9kHA+/Vx8ksFibaRCYYlj2r/zS5DezRmSOsn00AltJ Rstudio</p><h2 id="使用Git连接GitHub仓库">使用Git连接GitHub仓库</h2><p>登录GitHub,添加公钥到远程仓库。步骤见<a href="https://blog.leafminer.cn/2024/11/30/b3793277a33f/">https://blog.leafminer.cn/2024/11/30/b3793277a33f/</a></p><p>检验是否成功</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh -T [email protected]</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.nlark.com/yuque/0/2024/png/12885947/1732982642594-ab266bee-213c-44dc-b752-6777f5ef82d3.png" alt=""></p><p>克隆远程仓库到本地</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git clone https://github.com/leafminer/2024-R-PhDdata.git</span><br></pre></td></tr></table></figure><p>使用Git上传本地文件到远程仓库</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">git commit</span><br><span class="line">git push</span><br></pre></td></tr></table></figure><p>在Windows上,你可能会看到一个关于LF的消息会被CRLF所取代。这是正常的,不需要对你的部分采取任何行动。Windows对行结尾的处理与其他操作系统不同,但Git for Windows的默认设置适合大多数人和情况。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">git config --show-origin --get core.autocrlf</span><br><span class="line"># file:"C:\\ProgramData/Git/config" true</span><br><span class="line"># If your value shows as false, you can set it to true with this command:</span><br><span class="line">git config --global core.autocrlf true</span><br></pre></td></tr></table></figure><h2 id="使用Rstudio管理仓库">使用Rstudio管理仓库</h2><h4 id="连接远程仓库">连接远程仓库</h4><ol><li class="lvl-3"><p>使用已有的仓库,或者创建新的仓库。通过<code>Add a README file</code>初始化仓库。复制下图的链接:</p></li></ol><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201005841.png" alt=""><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201005841.png" alt=""><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201005841.png" alt=""></p><ol start="2"><li class="lvl-3"><p>在Rstudio中创建新的项目:</p></li></ol><p><code>File</code> > <code>New Project</code> > <code>Version Control</code> > <code>Git</code> <strong>Repository URL</strong>粘贴上一步复制的仓库链接。</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201010316.png" alt=""><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201010343.png" alt=""><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201010358.png" alt=""></p><ol start="3"><li class="lvl-3"><p>上述操作应该会自动从GitHub下载名为README.md的文件。表明本地与远程连接成功。</p></li></ol><h4 id="保存,更改和提交">保存,更改和提交</h4><p>点击右上方窗格中的" Git "选项卡。</p><p><img data-src="https://cdn.nlark.com/yuque/0/2024/png/12885947/1732987069740-8ea9b073-2149-4f61-a701-15f5d31d140d.png" alt=""></p><p>或者</p><p><img data-src="https://cdn.nlark.com/yuque/0/2024/png/12885947/1732987111221-04846302-4420-484e-9589-fade75270b56.png" alt=""></p><p>勾选文件旁边的“<code>Staged</code>”(已暂存)复选框,表示你想要将这个文件的更改包含在即将进行的提交中。</p><p>如果你还没有在Git弹出窗口中,点击“<code>Commit</code>”(提交)按钮。这将打开一个新的提交窗口。</p><p><strong>输入提交信息</strong>:在提交窗口中,你需要输入一个“Commit message”(提交信息),这个信息简要描述了你所做的更改。在这个例子中,你可以输入“Commit from RStudio”来表示这个提交是在RStudio中完成的。</p><p><strong>完成提交</strong>:输入完提交信息后,点击“<code>Commit</code>”按钮来完成提交过程。这样,你的更改就会被保存到本地的Git仓库中。点击“<code>Push</code>”推送到GitHub仓库。</p><h2 id="参考">参考</h2><ol><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9oYXBweWdpdHdpdGhyLmNvbS9zc2gta2V5cw==">https://happygitwithr.com/ssh-keys<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9oYXBweWdpdHdpdGhyLmNvbS9wdXNoLXB1bGwtZ2l0aHVi">https://happygitwithr.com/push-pull-github<i class="fa fa-external-link-alt"></i></span></p></li></ol></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241201155718.png" alt=""></p>
<p>Git的基本操作以及如何通过RStudio与GitHub进行交互。这里仅介绍了通过Git和Rstudio管理GitHub仓库的设置步骤。更多内容见 <span class="exturl" data-url="aHR0cHM6Ly9oYXBweWdpdHdpdGhyLmNvbS8=">https://happygitwithr.com/<i class="fa fa-external-link-alt"></i></span></p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E5%85%B6%E4%BB%96/"/>
<category term="Github" scheme="https://blog.leafminer.cn/tags/Github/"/>
<category term="Git" scheme="https://blog.leafminer.cn/tags/Git/"/>
<category term="SSH" scheme="https://blog.leafminer.cn/tags/SSH/"/>
<category term="Rstudio" scheme="https://blog.leafminer.cn/tags/Rstudio/"/>
<category term="Token" scheme="https://blog.leafminer.cn/tags/Token/"/>
</entry>
<entry>
<title>Hexo部署-Git配置SSH公钥连接本地仓库与远程仓库</title>
<link href="https://blog.leafminer.cn/2024/11/30/b3793277a33f/"/>
<id>https://blog.leafminer.cn/2024/11/30/b3793277a33f/</id>
<published>2024-11-30T03:17:16.000Z</published>
<updated>2024-11-30T15:53:19.772Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>在本地计算机上生成新的 SSH 密钥。 生成密钥后,可将公钥添加到 <span class="exturl" data-url="aHR0cDovL0dpdEh1Yi5jb20=">GitHub.com<i class="fa fa-external-link-alt"></i></span> 上的帐户中,以便通过 SSH 为 Git 操作启用身份验证。</p><p>GitHub创建的仓库默认分支通常名为<strong>main</strong>,旧一点的储存库可能名为<strong>master</strong>。</p><p><code>checkout -B main</code></p><span id="more"></span><ol><li class="lvl-3"><p>打开Git Bash创建密钥。输入:</p></li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh-keygen -t ed25519 -C "[email protected]"</span><br></pre></td></tr></table></figure><p>将以提供的电子邮件地址为标签创建新 SSH 密钥。</p><p>当系统提示您“Enter a file in which to save the key(输入要保存密钥的文件)”时,可以按 Enter 键接受默认文件位置。 请注意,如果以前创建了 SSH 密钥,则 ssh-keygen 可能会要求重写另一个密钥,在这种情况下,我们建议创建自定义命名的 SSH 密钥。 为此,请键入默认文件位置,并将 id_ALGORITHM 替换为自定义密钥名称。</p><ol start="2"><li class="lvl-3"><p>根据提示,键入安全密码。</p></li><li class="lvl-3"><p><code>cat</code>查看公钥,<code>clip</code>复制。</p></li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ls -al ~/.ssh</span><br><span class="line">cat ~/.ssh/id_ed25519.pub</span><br><span class="line">clip < ~/.ssh/id_ed25519.pub</span><br></pre></td></tr></table></figure><ol start="4"><li class="lvl-3"><p>粘贴到GitHub远程仓库。</p></li></ol><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241129234115.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241129234920.png" alt=""></p><ol start="5"><li class="lvl-3"><p>验证是否配置成功</p></li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh -T [email protected]</span><br></pre></td></tr></table></figure><ol start="6"><li class="lvl-3"><p><code>\hexo\.git\config</code>文件</p></li></ol><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241130110907.png" alt=""></p><ol start="7"><li class="lvl-3"><p><code>hexo</code>生成并部署</p></li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo g&&hexo d</span><br></pre></td></tr></table></figure><h2 id="参考">参考</h2><ol><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9kb2NzLmdpdGh1Yi5jb20vemgvYXV0aGVudGljYXRpb24vY29ubmVjdGluZy10by1naXRodWItd2l0aC1zc2gvZ2VuZXJhdGluZy1hLW5ldy1zc2gta2V5LWFuZC1hZGRpbmctaXQtdG8tdGhlLXNzaC1hZ2VudA==">https://docs.github.com/zh/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-3"><p><span class="exturl" data-url="aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzU2Njc2MzExL2FydGljbGUvZGV0YWlscy8xMzU1MDkyNjE=">https://blog.csdn.net/m0_56676311/article/details/135509261<i class="fa fa-external-link-alt"></i></span></p></li></ol><p></p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>在本地计算机上生成新的 SSH 密钥。 生成密钥后,可将公钥添加到 <span class="exturl" data-url="aHR0cDovL0dpdEh1Yi5jb20=">GitHub.com<i class="fa fa-external-link-alt"></i></span> 上的帐户中,以便通过 SSH 为 Git 操作启用身份验证。</p>
<p>GitHub创建的仓库默认分支通常名为<strong>main</strong>,旧一点的储存库可能名为<strong>master</strong>。</p>
<p><code>checkout -B main</code></p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E5%85%B6%E4%BB%96/"/>
<category term="Github" scheme="https://blog.leafminer.cn/tags/Github/"/>
<category term="设置" scheme="https://blog.leafminer.cn/tags/%E8%AE%BE%E7%BD%AE/"/>
<category term="Git" scheme="https://blog.leafminer.cn/tags/Git/"/>
<category term="SSH" scheme="https://blog.leafminer.cn/tags/SSH/"/>
</entry>
<entry>
<title>安全套与不倒翁 | 杨殳</title>
<link href="https://blog.leafminer.cn/2024/11/29/433d505a57c9/"/>
<id>https://blog.leafminer.cn/2024/11/29/433d505a57c9/</id>
<published>2024-11-29T12:29:53.000Z</published>
<updated>2024-11-29T14:10:06.063Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>1</p><p>他们说最近城里有丧尸,我根本不信,都市传说而已。</p><p>那天夜里两点半,我去找老徐买安全套。这个时间去,一是安全,二是心急。</p><p>说来惭愧,单身好多年,安全套这东西,我其实没真的用过。现在好了,终于谈了恋爱。我们感情很不错,决定进一步发展。</p><p>打车到了虎坊桥,再走一段小路,找到老徐家。</p><p>超市当然有安全套和避孕药卖,虽然限购令规定只准卖给已婚已育的人,但总有办法浑水摸鱼。</p><p>关键是我不信任超市的货,网上卖的我也不信。</p><p>老徐从前是个做公众号的,穷了很多年,没想到人过中年,铤而走险一回,靠倒卖安全套发了小财。他有三个孩子,每月可以合法买二十个。</p><span id="more"></span><p>我不信超市和电商,是因为另一个都市传说,说是有不少人拿着针在超市里扎安全套,最近他们还被安插进了电商库房,发货前扎一扎。</p><p>这个都市传说我相信,因为从某种逻辑上说是合理的。至于是哪种逻辑,我也说不上来,可在这城里生活久了,你就会知道什么是合理。</p><p>2</p><p>满怀激动地揣着安全套从老徐家出来,还走回虎坊桥打车。</p><p>树影里突然有响动,像是谁趿拉着鞋走路,我好奇地停下张望,那人就到了眼前,朝我扑上来。</p><p>我后撤两步,定睛一瞧,是个烂脸的男人,眼歪口斜。我想跑,被他从身后扑住,死沉。</p><p>虽然不信丧尸,但我看过不少丧尸片,他那模样的确像个丧尸。挣扎之中,他张口咬向我的脖子。</p><p>尖牙上黏着黑血丝,真是个丧尸。原来丧尸是有口臭的,像吃了韭菜饺子。</p><p>我闭上眼惨叫,要晕过去。</p><p>睁开眼时,一个小胡子站在跟前,握着根铁棍,那丧尸的头被他使劲踩在脚下,身子还在蠕动。</p><p>他身材瘦小,戴了副黑框眼镜,自我介绍说是个教授。</p><p>他让我跟他走。我一向对陌生人谨慎,不敢答应。</p><p>小胡子一抬脚,丧尸腾一声立起来,直挺挺地,像装了弹簧。眼看丧尸又扑过来,我差点尿裤子,跟着小胡子跑进了胡同。</p><p>小胡子拽着我一路飞跑,停在一栋老楼前,邀请我到他家坐坐。我回头看,小胡子说,追不上,他行动很慢。</p><p>我看他像是很懂丧尸的样子,就随他进了楼,反正也很难打到车。</p><p>小胡子引着我走进地下室,怪不得他身上有股潮气。</p><p>到了一个房间门口,墙上嵌着一张电子屏,广告里的男女令我心中一荡。</p><p>我摸摸裤兜的安全套,还在。</p><p>3</p><p>房间的四壁包着黑铁皮,到处是书。纸的霉味和铁锈气刺入鼻腔,有点头疼。</p><p>小胡子给我冲包速溶咖啡,灯下才看清他的脸,原来不戴眼镜,是黑眼圈太黑了,像几年没睡觉。</p><p>我再次谢谢他,说没想到真的有丧尸。</p><p>他不置可否,说传言都是这样,传着传着就变成真的了。我想了想,确实如此。</p><p>他问,知道那东西为什么扑你吗?</p><p>我说,那东西?不是丧尸吗?</p><p>他点上一根烟,摇头,只是长得像丧尸,不算是。</p><p>小胡子不再解释,朝我喷口烟,说因为你身上有味儿。</p><p>有味儿?</p><p>精液的气味儿。</p><p>我红了脖子,但还是忍不住揪起衣领闻了闻。小胡子说的没错。这几年我经常自慰,恋爱后也常偷摸自己来。找老徐高价买套,就是为了享受真正的性爱。</p><p>小胡子说,丧尸是个传说。</p><p>——你知道加勒比海吧,那里从前有一群巫师,给人催眠或者下药,人就像死了一样,埋之后再挖出来,脑袋上钉根棍子,他们就失去了记忆,对你言听计从,就是活死人。</p><p>我想起看过的恐怖片《活死人之夜》,于是问到,他们吃人吗?</p><p>不,他们下地干活,主人需要什么就干什么。小胡子说完,从桌上拿起一本旧书递给我,书名叫《挺族消亡简史》。</p><p>我翻开,见扉页上写着一句题词:</p><p>我看起来像是在轻飘飘慢吞吞地下坠,可是你知道吗?我灵魂中有一种什么东西得到了升华。——于观</p><p>这句话有点眼熟,但我想不起来在哪里见过。</p><p>我又翻开书的目录看——</p><p>“挺字源流考”、“从丧到挺的概念演变”、“挺是意识还是行动抑或口嗨”、“五百个样本:挺族的生物学研究”、“浅析挺族背后人的主体性”……</p><p>原来是本论文集。</p><p>我眼花缭乱,想起十几年前的事情,世界各地出现一个散居的部落,被人们叫做挺族,据记载,这些人都很懒,每天光挺尸睡大觉就要用掉八小时,而且不爱花钱,不爱谈恋爱,有的连房子都没有。当时的新闻批判他们可耻。</p><p>后来很快,不知道什么原因,没人再谈论他们,挺族就像一个热搜话题,歘地冒出来又歘地不见了。</p><p>我翻到这本书的版权页,果然不是正规出版物。</p><p>可这跟丧尸——以及我自慰有什么关系?</p><p>3</p><p>正要问,小胡子又从书堆里扒出一本没有封面的书,翻开一页,指给我看一句话:</p><p>……动辄以立枷示威,前后毙者数以千计……</p><p>什么意思?我问他,立枷是什么?</p><p>就是站笼。</p><p>他说,世上最难熬的刑罚有两种,一是熬鹰,让你一直醒着,二是站笼,让你一直站着。</p><p>我很认同,说因为会累啊,人活着,最难熬的就是累,钝刀拉肉,生不如死。</p><p>小胡子笑笑,说你还挺会打比方,有点文化。</p><p>我心中得意,也笑笑。</p><p>不过,当听完小胡子解释完丧尸和自慰的关系,我笑不出来了。</p><p>那只丧尸弹性很好,对不对?小胡子问。</p><p>我说是。他也用了丧尸这个词。</p><p>因为他本来就是一只不倒翁,就是不会倒的人,一直站着。</p><p>小胡子说,不倒翁是城市有关单位专门研制的新型市民,身体健康就能报名试验,无痛无感,一个月就能完成转变。</p><p>我问,老站着怎么睡觉?</p><p>不用睡,小胡子说,当然,试验还不完美,据说现在的不倒翁会有点晕——你遇到的那个,是彻底的失败品,前一阵子跑出来了,城里应该有几十只,他们会攻击自慰的人,能闻到那种气味儿。你记得从前有个电影叫《寂静之地》吧?小胡子说,电影里的怪物听见人弄出声响就攻击,不倒翁几十公里外就能闻到你在自慰。</p><p>什么?我又想发笑,但笑容僵在脸上。</p><p>小胡子拉开了衣柜,里面站了个人,脸上没烂,但挂着诡异的笑。</p><p>别怕,小胡子说,这个是我捡来的,也是个失败的不倒翁,已经死了。</p><p>他打个哈欠,露出一口黄牙,说,不是我出手,你已经变成不倒翁了——被咬了也会变成他们。</p><p>我想起那张烂脸和韭菜味儿,一阵后怕。</p><p>才三点半,我却不敢告辞。小胡子虽然怪怪的,但总算是个同类。</p><p>4</p><p>小胡子问我,想不想知道挺族是怎么消失的。</p><p>确实有点好奇。</p><p>我说,和不倒翁有关?</p><p>小胡子说,其实,当年的挺族没消失,只是他们年纪大了,很多人自己站起来了——当然也有不少是跪着,只有极少数总是扶不起来的,被拿来做了科研素材。</p><p>说完,他从衣柜里拉出那具尸体,推倒,尸体又弹了起来,像个玩具。</p><p>关于挺,当年人们争论的不是一回事,小胡子说,老年人说的经济体,年轻人说的是个体,有人认为是认命,有人觉得正是不认命才选择做挺族,你能听懂吗?</p><p>我说不是太懂。</p><p>流行词是蜡烛,挺的概念一出现,就迅速膨胀,遇到高温就熔化,又被按需重塑,你捏一只马,他捏一只鹿,指鹿为马,说三道四。</p><p>我有点懂了,耐心听他说。</p><p>不过,有一点可以确定,挺是一个姿势,任何姿势都是一种表达,汹涌的表达一旦汇聚,就难免被当做洪水猛兽,你有点文化,一定了解历史上那些事——这点不用我说。</p><p>我其实没那么多文化,但他不容我发问,继续讲,还做起了手势。</p><p>——人为什么睡觉前爱琢磨事儿?因为挺这个姿势,尤其容易让人思考,有当年加入挺族的人说,那是一个让人想到自己需求的姿势,所谓主体性。</p><p>见我愣愣地不说话,他停下来,说我打个比方——你参加一场越野登山竞赛,登顶就有巨额奖金,但途中有猛虎和暴风雪,你带好干粮往上爬,爬一半发现有人带的干粮比你多,有人能打虎,有人衣服厚,甚至有人坐直升机,而且主办方不提供安全保障。你会不会心生退意,选择退赛或待在半山腰?可能还会一边下山一边说,底下也不错,奖金虽多,可山顶一瓶水都一百块呢。</p><p>我连连点头,说我就是这样淡泊名利。</p><p>他打断我,说比淡泊复杂,还有无望,不满,自嘲,怀疑,以及羡慕、嫉妒、恨。</p><p>我又猛点头,问他为什么。</p><p>他夺过咖啡,自己喝了一口,然后使劲踹了一脚不倒翁。不倒翁摇摇晃晃,诡异的笑容不那么可怕了。</p><p>但是,这并非主体性。小胡子说,况且,如果那是座假山呢,玩过游戏吧,一座山峰可能是一台机器,每个登山者都是动力源。</p><p>5</p><p>小胡子扶住不倒翁说,这个东西,内部名字叫作消费人,不睡觉不思考,就能一直消费。</p><p>他情绪激昂,我有些怀疑,问他怎么了解那么清楚。</p><p>小胡子沉吟片刻,叹口气说,我就是消费人研制者之一,不过现在退出了,因为哲学方面的思考更让我兴奋,否则不会跟你讲这些——不要打断我。</p><p>我看看表,决定再听他说一会儿,天亮了就走。</p><p>于是我像个学生,他像个老师,不倒翁就是个教具。</p><p>登山竞赛的问题,他说,不在于奋斗还是懒惰,而是规则本身就是个骗局,消费人的骗局。美国社会学家弗洛姆有个观点,为满足欲望而奋斗在当代社会是一门新的宗教,让人有追求幸福的幻觉,其实你消费得越多,就越像个奴隶,被产业系统制造和操控的日益膨胀的需求绑架。</p><p>什么意思?我还是忍不住打断他。</p><p>就是你的工作是在为别人制造消费需求,同时又被别人工作制造出来的需求诱惑,花掉挣来的钱,他说,一个经济体的发展维持,需要源源不断的消费人,就是你。</p><p>这话有点绕,但我听懂了。</p><p>我想了一会儿,说,不过——我想消费什么好像可以自由选择?</p><p>小胡子哈哈大笑。</p><p>那当然,这就是骗局高明所在,你们年轻人爱说财务自由,买菜自由买车自由买房自由买各种更贵东西的自由,如果这种自由是唯一可追求的自由,那当然只能参加爬山竞赛了,眼看着怕不赢,于是退赛——或者作出退赛的姿态。</p><p>我附和说,就是弃权,撂挑子,消极怠工。</p><p>他收起笑说, 这么理解可以,但不能只这么理解,弗洛姆你可能不熟,马克思的话你总听过吧——宗教是人民的鸦片。</p><p>6</p><p>这话我知道,从小就学,教材里加粗加黑,要背诵的。鸦片麻痹人民,不是好东西,宗教是鸦片,也不是好东西。</p><p>不过,小胡子的解释却不太一样。</p><p>他说,这句话出自马克思研究法理学的一篇文章,上下文很复杂,说了怕你也不懂,我还打比方,比如你认同日月神教的宗旨,相信它代表世间的正义和公平,理应一统江湖,于是你就臣服东方教主的权威,听其号令赴汤蹈火,那日月神教这个组织就是你的宗教。假使你觉得五岳派和岳不群代表正义和公平,愿意听任其驱使,那五岳派就是你的宗教——可在令狐冲眼里,组织不重要,自在与情义才最重要,这就是他的主体性,令狐冲最大的潜力和资产,就是他为自己而选择和行动。</p><p>我反驳,金庸写的那是门派,不叫宗教。</p><p>小胡子说,看来还是得说点抽象的。他翻出一个笔记本,念给我听——</p><p>如果有一个中心,代表了所有人们想象当中最美好的一切素质,包括公平、正义。当有这样的一个投射中心,这个中心又形成了组织,这个组织变成最有权力的,那这个时候就是一个变形的宗教。</p><p>这就是马克思定义宗教,小胡子说,台湾学者杨照在通识课上讲的,很清晰。</p><p>我似懂非懂,不知道说什么,小胡子却突然笑了。</p><p>他说,想想也可笑,从前有个叫苏联的国家,发明了一种叫马克思主义的宗教,由他们做代理人,掌握最大的权力,简直是打了马克思的脸。</p><p>我不太知道苏联,他也不愿多谈,说那都是猴年马月了,如今的鸦片是消费,不倒翁就是信徒,鸦片吸多了就会成瘾,像活在幸福的幻觉里,兴奋、无聊、倦怠,屹立不倒,前仆后继。</p><p>这句话令我豁然开朗,弃权,撂挑子,消极怠工的另一面向是戒毒,就像广告里说的选择新的生活方式——我词穷,只好从广告里找词。这点我知道,广告里的说你要选择你想要的生活方式,但却只给你展现符合消费逻辑的诱惑,所谓生活方式,是套模板。</p><p>不管挺族如今怎么样,但在当时,选择挺至少是给了自己一个察觉自我的机会,小胡子说。</p><p>他眼里闪烁着狡黠的光亮,像个智者。</p><p>7</p><p>天就要亮了,我变得越来越清醒,或许是咖啡的作用。</p><p>我起身告辞,小胡子拉住我,要讲最后一个问题。这件事很重要,他说。</p><p>我看看表,地铁首发车还有半小时,就听他说完吧。</p><p>自由,才是我们最大的困境,一代又一代的哲学家都研究过,小胡子说,关于挺的争议,其根本是人有没有选择挺的自由。</p><p>Negative,他嘴里蹦出一个英文词,小胡子颤抖着,自由的含义,有一千种,我只谈一种,叫做消极自由,是哲学家以赛亚·柏林的概念,意思就是个人免于外界干涉的自由,或者说你可以不被威逼,不遭利诱,被强迫做什么,一个能去做他能做的事而不受阻碍。</p><p>我说,这不是很容易吗,我意志一向坚定。</p><p>小胡子笑,说话可以这么说,实际情况你是理解的。</p><p>我继续反驳,说我不是挺族,我积极向上,有理想有追求,想做的事也不违法,谁会阻拦我?</p><p>小胡子又笑,说你有追求,是什么?</p><p>我确实没细想过,但我想过好日子,有钱有闲就行。于是我说,追求美好生活。</p><p>那何为美好生活?小胡子问,是登山竞赛里那些赢家的生活吗?</p><p>我没说话,心中疑惑,也很不服气。</p><p>小胡子闪过一丝失望的神色,说,《猜火车》看过吧,记得开头吗?</p><p>选择生命,选择工作,选择职业,选择家庭,选择可恶的大彩电,选择洗衣机、汽车、雷射碟机,选择健康、低胆固醇和牙医保险,选择按揭,选择朋友,选择套装、便服和行李,选择分期付款和三件套西装,选择收看无聊的游戏节目,边看边吃零食…</p><p>我说记得,全是选择,不知道选择什么。</p><p>选择,其实是在计算,或者是被算计,交出了选择权,他揪一揪胡子,看来我得再说一个概念,积极自由,或许你能明白。</p><p>他说,在伯林的概念里,所谓积极自由,是指去做什么的自由,就像你说你有追求,不过,这种积极的追求,可能是一种华丽的伪装,是自由地去过一种被规定被要求的生活,登山竞赛人人都有自由追求登顶,但你明明不爱登山只喜欢游泳,为何不去游泳呢?</p><p>我似乎被激怒,又提出一连串的问题,但小胡子拒绝回答,建议我去回家挺挺尸,看看书。</p><p>挺着的时候,是最好的读书机会,你可以看点哲学什么的,不要觉得文科没用,他说,当然,只谈概念容易造成混乱和误导,我看你有些愚钝,又急着想走,只好长话短说,你就当闲谈吧。</p><p>8</p><p>他这么一说,我倒有点不急着走了。</p><p>我向他道歉,说并不是反对你,只是觉得有点空谈。</p><p>小胡子站起来拍拍我,说自由当然不能空谈,但遇到具体的困境时,必须拿出来谈,谈谈自由,是认清自身处境的一种方法。</p><p>他让我站到书架边,不知从哪摸出一对黑色的手铐,说,我们再打个比方。</p><p>我求知心切,就听从他安排。他把我铐在书架上。</p><p>——你想走,我把你拷了起来,这是我侵犯了你的自由。但如果我们约定,你让我铐一小时,我就给你一千块,你可能会主动让我多铐几小时,并觉得这是自行选择,对自己有利。这就像你的追求,是所谓积极的。</p><p>他从兜里摸出一把钱。我确实心动了一秒钟。</p><p>——但如果你认为被人铐起来换一笔钱是原则问题,这几小时不如去散步,给多少都不干,拒绝和我交易,虽然失去了多挣一笔钱的机会,但散步很开心。这是你的自由,所谓消极的。</p><p>我胳膊有点酸,说我懂了,切身体会一下就是更容易懂。</p><p>——所以,我认为伯林是用极端的概念来说明问题,什么消极积极,都是个词罢了,不必太认真,关键是自己体会。</p><p>我体会到了,我说,谢谢你,把手铐打开吧。</p><p>小胡子微笑着走过来,却把钥匙丢在了地上,又把上衣脱了。</p><p>我说,你要干什么?别过来!</p><p>他盯住我,慢慢地说,我说打个比方,你选择配合我,但却没有思考一件事,规则是我说的,钥匙在我手里,这可能是个骗局。</p><p>我大叫,放开我,你到底要干什么?</p><p>争论永不停歇,但现实迫在眉睫,他说,我要与你发生性关系。</p><p>9</p><p>我大叫一声,放开我!</p><p>小胡子无动于衷,开始解皮带。</p><p>我被那东西咬了,对,不倒翁,丧尸,他说,我刚捡来这家伙时,他还没死透,咬了我一口。他展示大腿上的伤口,两排黑洞,已经溃烂。</p><p>你是丧尸!我挣扎,大骂,你被咬了关我什么事!你这是犯罪,强奸!</p><p>他脱掉裤子,露出干柴一样的腿,内裤肥大,肮脏。我气得浑身颤抖,使劲拽手铐,书架是铁的,纹丝不动。</p><p>不要觉得我在骗你,我也是为了活命,他说,被这东西咬了,只有一种办法能救命,七十二小时内找个人性交——无论性别。</p><p>我吃了一惊,以为自己听错了。</p><p>这不科学!我几乎要哭出来。</p><p>但是合理,他说。</p><p>不倒翁是我研发的,我了解他的毒性,只有性交,做爱,啪啪啪,武侠小说看过吧,和那种不做爱就死的春药差不多,只是这毒不催情,发作过程只会让人无法睡觉,你看见我的黑眼圈了,他使劲瞪大眼说,我三天没合眼了。</p><p>我一阵阵眩晕,感觉恶心。变态,疯子!我朝他吐吐沫。</p><p>不用害怕,很快的。他伸手解我的衣服。</p><p>我当然害怕,他妈的变态,骗子。</p><p>他站在我身后,脏手摸进我腰里,我的手被手铐勒出血。我绝望了。</p><p>我说,我口袋里有安全套。我很惊讶自己这么说,是在放弃反抗吗,或者是一种理性的抵抗,不知道。</p><p>不行,用了安全套就解不了毒,必须是纯天然的性交,他摇摇头,无奈地笑了,不倒翁虽然是失败品,但传播这毒倒也能刺激消费,真是可笑。</p><p>我没有力气再挣扎,说,咱们到床上去,站着怎么行?</p><p>他抓住我的肩,解我的衣服,像只猴子一样贴在后面。</p><p>站着就行,他说,放心,我没什么病,你也不会怀孕。</p><p>我看见那只不倒翁,仍诡异地笑着,似乎摇晃了几下。</p><p>10</p><p>像是过去了一分钟,又像是过去了一年。</p><p>一切结束后,我想问他,自己会不会因此染上毒,需要七十二小时内进行纯天然性交。</p><p>但我一句话也不想说。</p><p>钝刀拉肉,生不如死。</p><h6 id="编者后记:">编者后记:</h6><p>这个故事是我在一个语音聊天室听来的,不知道发生在哪一年。讲述者是否故事的当事人,也无从考证。大概就是一则都市传说吧,无论过去还是将来,哪会有这种事呢。故事里充斥生硬说教,夹带私货,极有可能是无聊者杜撰,姑妄听之吧。若说有意思之处,我以为只有小胡子说的关于宗教的几句话。不过,据一些学者说,马克思就像知识分子的鸦片,怕那小胡子是磕大了吧。</p><p>而所谓「挺」,这个词我倒是在某些北方方言里听过,有人问你睡了吗,你可以说,没睡着呢,刚挺下一会儿。在这个故事,包含着一种奇怪的悖论,千百年来的传统,都说是昏睡不好,人要要觉悟首先要醒来,但另一方面却很少人讲,睡着的人的避开乃至抵抗了消费社会的规训和怂恿,倒成了一种醒来。</p><p>而「挺」的另一个意思,不正是「支撑」和「坚持」吗,虽然一般坚持很累很勉强。</p><hr><p>原文链接:<span class="exturl" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9ub3RlLzgwNDY4NzA5OS8/X2k9Mjg4MzMzNWJKSVRBWEs=">安全套与不倒翁<i class="fa fa-external-link-alt"></i></span></p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>1</p>
<p>他们说最近城里有丧尸,我根本不信,都市传说而已。</p>
<p>那天夜里两点半,我去找老徐买安全套。这个时间去,一是安全,二是心急。</p>
<p>说来惭愧,单身好多年,安全套这东西,我其实没真的用过。现在好了,终于谈了恋爱。我们感情很不错,决定进一步发展。</p>
<p>打车到了虎坊桥,再走一段小路,找到老徐家。</p>
<p>超市当然有安全套和避孕药卖,虽然限购令规定只准卖给已婚已育的人,但总有办法浑水摸鱼。</p>
<p>关键是我不信任超市的货,网上卖的我也不信。</p>
<p>老徐从前是个做公众号的,穷了很多年,没想到人过中年,铤而走险一回,靠倒卖安全套发了小财。他有三个孩子,每月可以合法买二十个。</p></summary>
<category term="转载" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/"/>
<category term="其他" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/%E5%85%B6%E4%BB%96/"/>
<category term="小小说" scheme="https://blog.leafminer.cn/tags/%E5%B0%8F%E5%B0%8F%E8%AF%B4/"/>
<category term="转载" scheme="https://blog.leafminer.cn/tags/%E8%BD%AC%E8%BD%BD/"/>
<category term="故事" scheme="https://blog.leafminer.cn/tags/%E6%95%85%E4%BA%8B/"/>
<category term="宗教" scheme="https://blog.leafminer.cn/tags/%E5%AE%97%E6%95%99/"/>
<category term="消费" scheme="https://blog.leafminer.cn/tags/%E6%B6%88%E8%B4%B9/"/>
<category term="丧尸" scheme="https://blog.leafminer.cn/tags/%E4%B8%A7%E5%B0%B8/"/>
</entry>
<entry>
<title>从UniProtKB数据库检索蛋白信息-queryup包</title>
<link href="https://blog.leafminer.cn/2024/11/28/a34278e620bd/"/>
<id>https://blog.leafminer.cn/2024/11/28/a34278e620bd/</id>
<published>2024-11-28T10:16:30.000Z</published>
<updated>2024-11-28T11:01:38.002Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>queryup包可以从’ UniProtKB ’ REST API中检索蛋白质信息。</p><p><strong>URL</strong> <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL1ZvaXNpbm5lRy9xdWVyeXVw">https://github.com/VoisinneG/queryup<i class="fa fa-external-link-alt"></i></span></p><p><strong>BugReports</strong> <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL1ZvaXNpbm5lRy9xdWVyeXVwL2lzc3Vlcw==">https://github.com/VoisinneG/queryup/issues<i class="fa fa-external-link-alt"></i></span></p><span id="more"></span> <h2 id="安装">安装</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">install.packages("queryup")</span><br><span class="line"># 或者</span><br><span class="line">devtools::install_github("VoisinneG/queryup")</span><br></pre></td></tr></table></figure><h2 id="函数及示例">函数及示例</h2><h3 id="可用的查询字段">可用的查询字段</h3><p>查询字段,该字段可用于使用" queryup "生成查询以及相关的示例和描述。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">library(queryup)</span><br><span class="line">query_field</span><br><span class="line"></span><br><span class="line"># 字段</span><br><span class="line">query_fields$field</span><br><span class="line"># 示例</span><br><span class="line">query_fields$example</span><br><span class="line"># 简述</span><br><span class="line">query_fields$description</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241128123616.png" alt=""></p><h3 id="返回的查询字段">返回的查询字段</h3><p>返回可以使用" queryup "检索的字段,以及它们在检索<code>data.frame</code>中出现的标签。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">return_fields</span><br><span class="line"># 字段</span><br><span class="line">return_fields$field</span><br><span class="line"># 标签</span><br><span class="line">return_fields$label</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241128124242.png" alt=""></p><h3 id="Mus-musculus中1000个UniProt的条目名称和其他属性">Mus musculus中1000个UniProt的条目名称和其他属性</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">uniprot_entries</span><br></pre></td></tr></table></figure><p><img data-src="images/clipboard-49488359.png" alt=""></p><h3 id="查询">查询</h3><p><code>get_uniprot_data</code> 和<code>query_uniprot</code> 均能获取UniProt数据。但<code>query_uniprot</code>解析错误信息,并从查询中移除无效的条目。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">#Retrieve data from UniProt using UniProt's REST API. To avoid non-responsive queries, they are split into smaller queries with at most max_keys items per query field. </span><br><span class="line">query_uniprot(</span><br><span class="line"> query = NULL,</span><br><span class="line"> base_url = "https://rest.uniprot.org/uniprotkb/",</span><br><span class="line"> columns = c("accession", "id", "gene_names", "organism_id", "reviewed"),</span><br><span class="line"> max_keys = 200,</span><br><span class="line"> updateProgress = NULL,</span><br><span class="line"> show_progress = TRUE</span><br><span class="line">)</span><br></pre></td></tr></table></figure><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><code>query</code></td><td>同上</td></tr><tr><td><code>base_url</code></td><td>同上</td></tr><tr><td><code>columns</code></td><td>同上,例如 “accession”, “id”, “genes”, “keywords”, “sequence”。更多见<code>return_fields</code></td></tr><tr><td><code>max_keys</code></td><td>最大检索数</td></tr><tr><td><code>updateProgress</code></td><td>在shiny 中显示运行进程</td></tr><tr><td><code>show_progress</code></td><td>显示进度条</td></tr></tbody></table><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"># Retrieve data from UniProt using UniProt's REST API</span><br><span class="line">get_uniprot_data(</span><br><span class="line"> query = NULL,</span><br><span class="line"> base_url = "https://rest.uniprot.org/uniprotkb/",</span><br><span class="line"> columns = c("accession", "id", "gene_names", "organism_id", "reviewed")</span><br><span class="line">)</span><br><span class="line"></span><br><span class="line">query <- list("accession_id" = c("P22682", "P47941"))</span><br><span class="line">df <- get_uniprot_data(query = query, columns = c("accession", "id", "gene_names", "keyword", "sequence"))$content</span><br><span class="line">df</span><br></pre></td></tr></table></figure><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line">#</span><br><span class="line">query <- list("gene_exact" = "Akt1")</span><br><span class="line">df <- query_uniprot(query, show_progress = FALSE)</span><br><span class="line"></span><br><span class="line">df <- query_uniprot(query, </span><br><span class="line"> columns = c("id", "sequence", "keyword", "gene_primary"),</span><br><span class="line"> show_progress = FALSE)</span><br><span class="line"># 查询单个基因</span><br><span class="line">query2 <- list("gene_exact" = "Pik3r1", </span><br><span class="line"> "reviewed" = "true", </span><br><span class="line"> "organism_id" = "9606")</span><br><span class="line">df <- query_uniprot(query, show_progress = FALSE)</span><br><span class="line">print(df)</span><br><span class="line"></span><br><span class="line"># 查询多个基因</span><br><span class="line">query <- list("gene_exact" = c("Itpr", "CaMKI"), </span><br><span class="line"> "reviewed" = "true", </span><br><span class="line"> "organism_id" = c("9606", "10090"))</span><br><span class="line">df <- query_uniprot(query, show_progress = FALSE)</span><br><span class="line">print(df)</span><br></pre></td></tr></table></figure><h2 id="参考">参考</h2><ol><li class="lvl-3"><p>VoisinneG/queryup: R client for the UniProt REST API</p></li><li class="lvl-3"><p>queryup: Query the ‘UniProtKB’ REST API</p></li></ol></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>queryup包可以从’ UniProtKB ’ REST API中检索蛋白质信息。</p>
<p><strong>URL</strong> <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL1ZvaXNpbm5lRy9xdWVyeXVw">https://github.com/VoisinneG/queryup<i class="fa fa-external-link-alt"></i></span></p>
<p><strong>BugReports</strong> <span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL1ZvaXNpbm5lRy9xdWVyeXVwL2lzc3Vlcw==">https://github.com/VoisinneG/queryup/issues<i class="fa fa-external-link-alt"></i></span></p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="科研" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E7%A7%91%E7%A0%94/"/>
<category term="R语言" scheme="https://blog.leafminer.cn/tags/R%E8%AF%AD%E8%A8%80/"/>
<category term="果蝇" scheme="https://blog.leafminer.cn/tags/%E6%9E%9C%E8%9D%87/"/>
<category term="UniProt" scheme="https://blog.leafminer.cn/tags/UniProt/"/>
<category term="蛋白" scheme="https://blog.leafminer.cn/tags/%E8%9B%8B%E7%99%BD/"/>
<category term="ID转换" scheme="https://blog.leafminer.cn/tags/ID%E8%BD%AC%E6%8D%A2/"/>
<category term="queryup包" scheme="https://blog.leafminer.cn/tags/queryup%E5%8C%85/"/>
</entry>
<entry>
<title>无从告别的告别 | 里则林</title>
<link href="https://blog.leafminer.cn/2024/11/27/e207cdca9b7a/"/>
<id>https://blog.leafminer.cn/2024/11/27/e207cdca9b7a/</id>
<published>2024-11-27T08:53:06.000Z</published>
<updated>2024-11-27T08:57:24.984Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>1<br>小时候我常常面对离别。<br>大人会跟我说,明天我们要去xx地方了。而xx地方,一般都是我从未听说过的某个城市。我听完会默默地点头,然后坐在沙发上,看大人们收拾东西。心里则提前开始消化恐慌,对未知和陌生的恐慌。<br>记得还在上海的时候,小区里住着许多子女不在身边的孤寡老人,老师要我们在某个暑假去找一个老人,然后陪伴他们,算是作业。<br>我就找了隔壁那幢楼的一个老头。我记得我第一次敲他的门,他开了半截门,奇怪地看着我,我呆滞地傻愣半天,然后用手摇了摇胸前的红领巾说:“你好,我是小学生。老师要我来陪你。”</p><span id="more"></span><p>老头听完,微微一笑,把门敞开,示意我进去,问我:“你从哪里来?”<br>我坐在脚碰不到地的高凳上,晃动着双脚指了指左边说:“我从隔壁来。”<br>“嗯,我见过你,每天带着一帮小朋友到处折断小区里的竹子。”<br>我点点头说:“没错!”<br>他又问我:“为什么?”<br>“为了赶一只猫和打仗。”<br>他笑笑没理我,打开了大厅和天井之间的门,我抬头看去,天井里全是花花草草和无数个鸟笼,每个鸟笼里都住着一只鸟。<br>我站起身准备接受他的邀请一起走进天井里看看。但是他没有。他就那么自顾自旁若无人地摆弄起了花草,让我觉得他不太懂人情世故,没有家教。<br>搞得我有点不知所措,只能又坐回原处,开始四下张望。<br>老头家里有简单的家具,一堆茶壶,一张大桌子上有一盏式样老土的彩色玻璃灯,灯旁有很多农业技能书。我想尝试跟他对话。<br>于是对他“喂”了一声。<br>他转过头来说我没礼貌,然后又继续低头在天井里摆弄花草。<br>最后我只能哈欠连天地看着墙上的表,等着两个小时结束。<br>因为那时老师规定我们,每次陪老人家至少两个小时,然后拿一个小本子给老人家签字和写评语。<br>临走的时候,我拿出本子给老头,老头戴上老花镜看了看本子上的大致内容,问我写什么好。这个问题让我猝不及防,觉得回到了从前——考试考得好,老师放了一排礼物,让我们各自挑自己喜欢的,我喜欢最贵的,但常常不好意思直接拿,都是拿的退而求其次的奖品。<br>于是我说:“写点还不错的就行。” 接着马上有点不好意思地看向别处。<br>然后就听见了他刷刷写字的声音,写完合上本子递给了我。我拿起本子,转身要走。他又叫住了我,从天井里抱来一盆土:“你在土上面摁一摁。”<br>我不解地看着他,他说:“摁一摁就行!” 我就摁了一摁,然后马上嫌弃地边搓手边走了出去。<br>回到家,吃饭的时候,妈妈问我今天陪老爷爷开心吗,我说不开心,妈妈问我为什么,我说因为这老头不开心我陪他。<br>妈妈一个筷子头打了过来,骂我没礼貌。<br>我心里愤愤不平,边吃菜边开始在脑海里统计周围的老人家还有哪些,下定决心一定要换一个人陪陪。<br>在那天临睡前,我突然想起那个本子,然后迫不及待地想看看老头写了什么内容,于是翻开看了看,发现上面工工整整地写着:“他今天非常乖,非常热情,很有礼貌,家教很好,很讨人喜欢。”<br>那时我语文好,知道“非常”和“很”后面只要接上很好的词汇,就是很好的表扬。看完,竟然有点不好意思。</p><p>2<br>后来我每天去陪这老头,几乎不怎么说话,他不是弄花草就是弄鸟,偶尔我坐在大厅和天井连接的地方,呆呆地着看他。<br>老头则依旧每天结束时,在本子上换着花样夸我。得到他无比绚丽的措辞几乎成了我去陪他的唯一动力。从活泼,到善良,再到爱护花草,和学习能力强。应有尽有。<br>某个下午老头坐在桌子上看书,我在他对面一动不动,老头抬头看了看我,然后看了看他那堆书。<br>我就跟顺着他的目光也看了看那堆书,随后又继续呆滞地看着他,他又用手拨了拨他那堆书。<br>我才看见里面有一本《杨家将演义》的连环画。我伸手摸了摸那本书,犹豫间,他对我点点头。于是我就把那本书抽了出来。津津有味地读了起来。<br>老头问我最喜欢谁,我说我喜欢杨宗保。<br>老头问我为什么。<br>我说因为电视上他老婆穆桂英好看。<br>他又问我喜欢花木兰吗,我问她花木兰是谁。他就给我讲了一下午花木兰。<br>从那天起,他就不摆弄花草了,每次来,都和我面对面看书,每天他书堆里都会莫名其妙地有一本不同的连环画。<br>有一天看到又是连环画,我突然觉得无聊透了,做作地打起了一个又长又大声的哈欠,然后趴在了桌子上一言不发地发呆。<br>老头咳嗽了几声,然后问我吃糖吗。我继续趴在桌子上摇着头。<br>他说你等一会,转身进了房间。我看见他打开衣柜,到处翻,最后面红耳赤地拿出一把剑。<br>我立马跳了起来,双眼放光地看向他,因为我从小就喜欢大宝剑这种东西。<br>老头第一次脸上露出了调皮的神色,拔出剑来,故作姿态地舞了两下。那天下午我们在天井里,老头教我玩了一套晨练时的老年剑法。<br>从那天之后,我只要去到老头家,他会第一时间给我背上那把大宝剑,然后该干吗干吗。看书,陪他弄花草,他会问我很多关于我的事,有一天当他得知我在学校是大队长的时候,他直接把我抱了起来,一个劲地对我说:“原来你这么厉害呀!”<br>我则得意地笑着。<br>我跟老头没事就看书,弄花草,逗鸟,和玩大宝剑,不知不觉过去了15天,还有5天我就可以结束陪伴老人家的作业了。<br>我把这件事告诉了老头,老头愣了一会,说:“那明天我带你去城隍庙买一把属于自己的大宝剑吧。”<br>我惊讶地看向他,问他是真的吗?<br>他用力地点点头。我一激动,抱住了她,第一次说了句:“谢谢爷爷!”<br>他 面色绯红,有点不好意思,也抱了抱我,但显得异常开心。那天晚上,他陪我一起回家,然后跟我的妈妈说他想第二天带我去城隍庙玩,希望我妈妈同意。然后还从 包里掏了很久,掏出自己的身份证,还有一张写了自己电话的纸片。他们在门口聊了挺久,而我在屋子里紧张地看着这一切。最后看见老头对我开心地笑了笑,用手凭空作剑,对着我舞了舞,就开心地走了。<br>妈妈转头过来严肃地看着我,我马上立正在原地,妈妈对我说:“不能乱跑,知道吗?”<br>我一颗心就沉了下去。<br>接着妈妈又说:“在明天跟爷爷出去的时候。”<br>我立马喜笑颜开,脖子像按了发条,使劲点头。<br>第二天在城隍庙,老头全程拉着我的手,他带我走进一个大楼里,里面有数不过来的摊位,每个摊位的墙上都挂满了大宝剑,我们两个这家看看,那家看看,人很多,很拥挤,我看见他有点不自然,把我护在他身前,挤到一个摊位前。<br>看着琳琅满目的刀枪棍棒,我一时没了目标,满心欢喜地扫来扫去,我们两个站在一起,老头有些紧张地问我:“是不是不喜欢这里的?”<br>我摇摇头说:“没有,我都喜欢!”<br>老头才爽朗地笑了起来,告诉我别着急,慢慢挑,他等我。<br>后来我挑了一把黑色的,老头找老板要了一根红色的背带,蹲在门口帮我按在了剑鞘上,挂上了我的后背。那天我觉得自己终于成为了我最想成为的人——展昭。<br>后来老头带我去买麦芽糖,我们坐在一个亭子里吃糖的时候,老头问我:“你有爷爷吗?” 我愣了好一会。<br>他有点尴尬地看着我,显得不知所措。<br>我反问他:“爷爷是……我爸爸的爸爸?”<br>他有点惊讶,接着对我说:“是啊。”<br>我边吃糖边说:“我不记得自己的爷爷,从来没有见过他。”<br>他就不说话了,摸摸我的头,问我说:“你还想吃什么?”<br>我摇摇头,一起陷入了沉默里。</p><p>3<br>其实我从小就不记得自己爷爷和所有亲戚,因为我的童年颠沛流离,一时在这,一时在那,却从未回过老家。<br>我一直以为每年过年家里只有四个人,是很正常的事情。<br>我一直到97年香港回归,7岁那年,才第一次听爸爸妈妈对我说起“爷爷”两个字。那是一个晚上,我从睡梦中被叫醒,带着一肚子的起床气,觉得自己恨整个世界。<br>爸爸严肃地把我拉到角落里,让我穿上衣服,说要带我去见爷爷。我磨磨蹭蹭半天,就是不肯。因为那年我实在不知道爷爷是什么。对于到底哪里突然冒出了一个爷爷来,我百思不得其解,并且很认真地以为爷爷是爸妈的某个无聊朋友。<br>后来爸爸接了一个电话,神色更加急迫,大声地吼我:“你到底要不要穿衣服!”<br>我一肚子起床气瞬间找到了出口,哭声喷薄而出,大声地喊着:“我就不穿!”<br>爸爸对我投来了一个此生难忘的失望眼神,然后和妈妈急匆匆地出门了。没过多久,一个称之为“姑姑”的人来到了家里,哄我哄了半天,我才把衣服穿上,跟着她出了门,去见所谓的“爷爷”。<br>去到一半,姑姑接了一个电话,然后让司机掉转车头,我们又回了家。<br>那天从头到尾我都不知道发生了什么。<br>那之后的许多年,我才终于很清晰地知道了爷爷是谁,是干吗的,也从别人口中得知,我还没记事的时候,爷爷常常在过年的时候叫着我的小名,然后我屁颠屁颠地跑过去,他会塞给我一个无比丰厚的红包,别人说他最疼我,小时候。<br>只是后来我被父母带着四处跑,既不知道自己根在哪,也不知道有哪些所谓的亲人,我以为世界上每个人都和我一样,只有家人。<br>也知道了,那个晚上,是我最后一次,能见到爷爷的机会。此后这件事成了我想起一次就遗憾和自责一次的事情。<br>直到去年我24岁,临近清明节的时候,爸爸让我开车带着姐姐回老家去给爷爷扫墓。我听完二话没说就推掉了所有事情。<br>一路上雨点淅淅沥沥地打在车上,我和姐姐一路上都没有说话,开在乡间的泥泞小路上。<br>我被亲戚带着,去了爷爷住过的老房子,看见一个黑不溜秋的奶瓶,他们说那是我的。看见了许多爷爷当年生活时的东西,甚至都叫不上名字,那到底是什么。<br>那天在墓碑前,放起了一长串大鞭炮,我看着爷爷的名字,心里说:“爷爷,我回来啦。” 然后眼睛就红了。<br>我心里又说:“爷爷,在那个年纪,我真是像个不落地的蒲公英,从未有人跟我提过我从哪里来,也没有人确定地告诉我,我要到哪里去。”<br>就像被风一直裹着,以为世界上并没有可以落脚的土地。<br>“但你原谅我的话,你就刮来一阵风好了。”<br>于是那天很神奇地在一秒之后,刮来了一阵风。</p><p>4<br>后来在那个陪老人的作业本上,老爷爷给我写的最后一个评语是:“他像我的孙子一样,我像他的爷爷一样。”<br>那时我常常面对离别,妈妈在某天跟我说,这个暑假结束之后,我们要去重庆了。<br>我点点头,坐在沙发上。我不知道重庆是什么地方,也不知道在那会遇见什么人。只是已经开始在心里提前默默地消化起了对未知和陌生的恐惧。<br>走那天,老头赶来,抱着一盆小花,气喘吁吁地说:“这是你来那天,我给你种的,名字就叫小则林。”<br>我一看是一盆黄黄的小花。<br>但妈妈说:“坐飞机,带不了这些。”<br>我遗憾地看着老头,老头也略显无奈,犹豫了一会说:“没事,等你回来的时候,小则林就跟你长得一样大了。”说完摸了摸我的头。<br>但我并没有再回来过,甚至没能带走那把爷爷送我的大宝剑。<br>并且那年,最后走的时候,我也没明白过来,“爷爷”到底是什么。<br>但只要时间一天一天地过去,人在时间里,很快就会长大。<br>有时夜深人静的时候,我会想起那盆小黄花,也会想起97年那个夜晚。<br>并且每次都带着遗憾,因为他们从来不知道我去了多少地方,也不知道我见过多少人,甚至他们永远没有办法知道,他们一直在我心里,并且没有办法告诉他们,这些无从告别的告别。</p><hr></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>1<br>
小时候我常常面对离别。<br>
大人会跟我说,明天我们要去xx地方了。而xx地方,一般都是我从未听说过的某个城市。我听完会默默地点头,然后坐在沙发上,看大人们收拾东西。心里则提前开始消化恐慌,对未知和陌生的恐慌。<br>
记得还在上海的时候,小区里住着许多子女不在身边的孤寡老人,老师要我们在某个暑假去找一个老人,然后陪伴他们,算是作业。<br>
我就找了隔壁那幢楼的一个老头。我记得我第一次敲他的门,他开了半截门,奇怪地看着我,我呆滞地傻愣半天,然后用手摇了摇胸前的红领巾说:“你好,我是小学生。老师要我来陪你。”</p></summary>
<category term="转载" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/"/>
<category term="学习" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/%E5%AD%A6%E4%B9%A0/"/>
<category term="小小说" scheme="https://blog.leafminer.cn/tags/%E5%B0%8F%E5%B0%8F%E8%AF%B4/"/>
<category term="转载" scheme="https://blog.leafminer.cn/tags/%E8%BD%AC%E8%BD%BD/"/>
<category term="故事" scheme="https://blog.leafminer.cn/tags/%E6%95%85%E4%BA%8B/"/>
<category term="离别" scheme="https://blog.leafminer.cn/tags/%E7%A6%BB%E5%88%AB/"/>
<category term="告别" scheme="https://blog.leafminer.cn/tags/%E5%91%8A%E5%88%AB/"/>
</entry>
<entry>
<title>使用R语言从UniProt数据库检索蛋白信息-UniprotR包</title>
<link href="https://blog.leafminer.cn/2024/11/27/dd36854d083f/"/>
<id>https://blog.leafminer.cn/2024/11/27/dd36854d083f/</id>
<published>2024-11-27T07:43:21.000Z</published>
<updated>2024-11-27T15:01:20.241Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241125123119.png" alt="uniprot"></p><p><code>UniprotR</code> 包通过丰富的函数和可视化工具,使得从UniProt数据库中检索和分析蛋白质信息变得更加便捷和高效。</p><span id="more"></span> <h2 id="基本信息">基本信息</h2><ul class="lvl-0"><li class="lvl-2"><p><strong>版本</strong>:2.4.0</p></li><li class="lvl-2"><p><strong>作者</strong>:Mohamed Soudy 和 Ali Mostafa</p></li><li class="lvl-2"><p><strong>描述</strong>:连接到Uniprot,使用蛋白质的访问号检索信息,如名称、分类信息等。</p></li><li class="lvl-2"><p><strong>URL</strong>:<span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL1Byb3Rlb21pY3NsYWI1NzM1Ny9Vbmlwcm90Ug==">https://github.com/Proteomicslab57357/UniprotR<i class="fa fa-external-link-alt"></i></span></p></li><li class="lvl-2"><p><strong>问题报告</strong>:<span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL1Byb3Rlb21pY3NsYWI1NzM1Ny9Vbmlwcm90Ui9pc3N1ZXM=">https://github.com/Proteomicslab57357/UniprotR/issues<i class="fa fa-external-link-alt"></i></span></p></li></ul><p><strong>功能</strong>:</p><ul class="lvl-0"><li class="lvl-2"><p>提供多种功能,包括构建基因树、位置树、转换ID、富集分析(包括生物学过程、细胞组分、KEGG、分子功能、REACTOME)、获取疾病关联、表达数据、家族域数据、一般信息、杂项信息、名称和分类信息、病理生物技术信息、PDB结构、蛋白质注释、功能、基因本体信息、蛋白质相互作用、蛋白质网络、蛋白质网络(全部)、蛋白质组信息、蛋白质组FASTA、PTM处理、出版物信息、序列长度、序列同源、序列、结构信息、亚细胞位置等。</p></li><li class="lvl-2"><p>提供了解析UniProt信息和绘制各种图表的功能,如GO分子功能、GO亚细胞定位、酸度、电荷、染色体信息、基因网络、GO全部、GO生物学过程、GO信息、GO术语、Gravy、理化性质、蛋白质存在状态、蛋白质GO生物、蛋白质GO细胞、蛋白质GO分子、蛋白质状态、蛋白质分类等。</p></li></ul><p><strong>图表和可视化</strong>:</p><ul class="lvl-0"><li class="lvl-2"><p>除了数据检索,<code>UniprotR</code> 还提供了多种数据可视化工具,帮助用户更直观地理解蛋白质的特性和功能。</p></li></ul><p><strong>安装和依赖</strong>:</p><ul class="lvl-0"><li class="lvl-2"><p>该包不需要编译,可以直接从CRAN安装,且依赖于多个R包,方便用户进行数据分析和可视化。</p></li></ul><h2 id="安装">安装</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">install.packages("UniprotR")</span><br></pre></td></tr></table></figure><h2 id="使用示例">使用示例</h2><p><code>GetAccessionList</code>函数可用于从csv文件中获取UniProt Accession / s列表。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">library(UniprotR) </span><br><span class="line">Dm_Acc <- GetAccessionList("Dm_uniprot.csv")</span><br><span class="line"></span><br><span class="line">#用于检查输入数据的有效性</span><br><span class="line">ProcessAcc(Dm_Acc)</span><br><span class="line"></span><br></pre></td></tr></table></figure><p><strong>DataObjPath:</strong> Excel文件 (.csv) 的路径,文件内容如下图。</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241125114109.png" alt="csvfile"></p><h3 id="录入时间">录入时间</h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127223443.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Dm_Acc_General <- GetGeneral_Information(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127205024.png" alt=""></p><h3 id="其他">其他</h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127205934.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Dm_Acc_Miscellaneous <- GetMiscellaneous(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br><span class="line"></span><br><span class="line">PlotproteinStatus(Dm_Acc_Miscellaneous,"I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><h3 id="获取分类信息">获取分类信息</h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127224415.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">TaxaObj <- GetNamesTaxa(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br><span class="line"># 用于绘制染色体中access / s数据中位置的频率</span><br><span class="line">PlotChromosomeInfo(TaxaObj)</span><br><span class="line"># 基于从' GetNamesTaxa '中检索到的主基因对蛋白质进行聚类。</span><br><span class="line">PlotGenesNetwork(TaxaObj)</span><br></pre></td></tr></table></figure><h3 id="Pathology-Biotech"><strong>Pathology & Biotech</strong></h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127210744.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Pathology_Biotech <- GetPathology_Biotech(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><h3 id="下载PDB结构数据">下载PDB结构数据</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Dm_pdbStructure <- GetpdbStructure(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><h3 id="蛋白功能">蛋白功能</h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127224209.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Dm_ProteinFunction <- GetProteinFunction(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><h3 id="转换ID">转换ID</h3><p>将UniProtKB的AC / ID转换为UniProtKB中的任何数据库ID。详细信息参阅<span class="exturl" data-url="aHR0cHM6Ly93d3cudW5pcHJvdC5vcmcvaGVscC9pZF9tYXBwaW5nJUU1JTkyJThDaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL01vaG1lZFNvdWR5L1VuaXByb3RSL21hc3Rlci91bmlwcm90X2lkcy5jc3Y=">https://www.uniprot.org/help/id_mapping和https://raw.githubusercontent.com/MohmedSoudy/UniprotR/master/uniprot_ids.csv<i class="fa fa-external-link-alt"></i></span></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ConvertID(Dm_Acc,ID_from="UniProtKB_AC-ID",ID_to="OrthoDB",taxId="7227",path=NULL)</span><br></pre></td></tr></table></figure><p><code>ConvertID(ProteinAccList,ID_from="UniProtKB_AC-ID",ID_to=NULL,taxId=NULL,path=NULL)</code></p><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><strong><code>ProteinAccList</code></strong></td><td>UniProt Accession/s 向量</td></tr><tr><td><code>ID_from</code></td><td>数据库标识符的缩写,从中将Accession / ID进行转换。</td></tr><tr><td><code>ID_to</code></td><td>数据库标识符缩写字符串,Accession / ID将转换为该字符串。默认为UniProtKB中可用的所有数据库标识符。见<span class="exturl" data-url="aHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL01vaG1lZFNvdWR5L1VuaXByb3RSL21hc3Rlci91bmlwcm90X2lkcy5jc3Y=">uniprot_ids.csv<i class="fa fa-external-link-alt"></i></span>{.uri}</td></tr><tr><td><code>taxId</code></td><td>当ID_to为’ UniProtKB '时需要TaxId字符串。例如 ‘9606’ for human。</td></tr><tr><td><code>path</code></td><td>保存excel文件的路径。</td></tr></tbody></table><h3 id="获取蛋白序列-fasta格式">获取蛋白序列-fasta格式</h3><p>通过 UniProt 中的蛋白ID,下载蛋白序列。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"># 下载UniProt的蛋白序列并保存为fasta文件</span><br><span class="line">GETSeqFastaUniprot(Dm_Acc, "I:/Thesis/Analysis_Display/R_data",FileName = "Dm_Prot")</span><br><span class="line"></span><br><span class="line"># 获取序列长度</span><br><span class="line">GetSeqLength(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br><span class="line"></span><br><span class="line"># 获取蛋白亚型信息</span><br><span class="line">GetSequenceIso(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure><h3 id="蛋白序列信息">蛋白序列信息</h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127224330.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># 获取序列信息</span><br><span class="line">Dm_Sequences <- GetSequences(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><h3 id="蛋白互作-STRING">蛋白互作-STRING</h3><p>连接到stringdb并检索输入列表之间的PPI</p><p><code>GetproteinNetwork_all(ProteinAccList , directorypath = NULL, SpeciesID = 7227)</code></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"># 根据导入的数据生成PPI</span><br><span class="line">GetproteinNetwork_all(Dm_Acc, "I:/Thesis/Analysis_Display/R_data", SpeciesID = 7227)</span><br><span class="line"># 获得蛋白质相互作用列表</span><br><span class="line">GetProteinInteractions(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127224052.png" alt=""></p><h3 id="GO分析-“Gene-ontology”(基因本体论)">GO分析-“Gene ontology”(基因本体论)</h3><p>格式</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127223940.png" alt=""></p><p><code>PlotGOBiological(GOObj, Top = 10, directorypath = NULL)</code></p><p><code>Plot.GOMolecular(GOObj, Top = 10, directorypath = NULL)</code></p><p><code>Plot.GOSubCellular(GOObj, Top = 10, directorypath = NULL)</code></p><p><code>PlotGoInfo(GOObj , directorypath = NULL)</code></p><p><code>PlotGOAll(GOObj, Top = 10, directorypath = NULL, width = width, height = height)</code></p><p><code>GOObj</code> 参数: 指的是得自 <code>GetProteinGOInfo</code> 函数的数据集。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"># 获取Gene ontolgy信息</span><br><span class="line">GeneOntologyObj <- GetProteinGOInfo(Dm_Acc,"I:\\Thesis\\Analysis_Display\\R_data")</span><br><span class="line"># 解析从UniprotR函数' GetProteinGOInfo '中检索的数据。</span><br><span class="line">Goparse(GeneOntologyObj)</span><br><span class="line"># This Function is used to plot data retrieved from UniprotR Function "GetProteinGOInfo"</span><br><span class="line">PlotGoterms(GeneOntologyObj,"I:\\Thesis\\Analysis_Display\\R_data")</span><br><span class="line"># Biological process</span><br><span class="line">PlotGOBiological(GeneOntologyObj) </span><br><span class="line">PlotProteinGO_bio(GeneOntologyObj)</span><br><span class="line"># Molecular function</span><br><span class="line">Plot.GOMolecular(GeneOntologyObj)</span><br><span class="line"> PlotProteinGO_molc(GeneOntologyObj)</span><br><span class="line"># Subcellualr localization</span><br><span class="line">Plot.GOSubCellular(GeneOntologyObj)</span><br><span class="line">PlotProteinGO_cel(GeneOntologyObj)</span><br><span class="line"># 合并BP、MF、CC</span><br><span class="line"># This Function is used to plot data retrieved from UniprotR Function "GetProteinGOInfo".</span><br><span class="line">PlotGoInfo(GeneOntologyObj,"I:\\Thesis\\Analysis_Display\\R_data")</span><br><span class="line"># This Function is used to plot the retrieved Gene Ontology from function ’GetProteinGOInfo’</span><br><span class="line">PlotGOAll(GOObj = GeneOntologyObj, directorypath = getwd(), width = 8, height = 5)</span><br><span class="line"># </span><br><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/GoPlotInfo.jpeg" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/GO%20All.jpeg" alt=""></p><h3 id="KEGG富集分析">KEGG富集分析</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Enrichment.KEGG(Dm_Acc,OS="dmelanogaster",p_value=0.05,directorypath="I:/Thesis/Analysis_Display/R_data",top=10)</span><br><span class="line"># 对给定的基因或蛋白质列表进行富集分析</span><br><span class="line">Pathway.Enr(Dm_Acc,OS="dmelanogaster",p_value=0.05,directorypath="I:/Thesis/Analysis_Display/R_data",top=10)</span><br></pre></td></tr></table></figure><h3 id="蛋白表达信息">蛋白表达信息</h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127224012.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Dm_Acc_Expression <- GetExpression(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><h3 id="蛋白结构信息">蛋白结构信息</h3><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127223517.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127223620.png" alt=""></p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"># 蛋白二级结构</span><br><span class="line">GetStructureInfo(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br><span class="line"></span><br><span class="line"># 结构域</span><br><span class="line">Dm_Acc_Domains <- GetFamily_Domains(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><h3 id="亚细胞定位">亚细胞定位</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">GetSubcellular_location(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241127223850.png" alt=""></p><h3 id="发表的文献">发表的文献</h3><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">GetPublication(Dm_Acc, "I:/Thesis/Analysis_Display/R_data")</span><br></pre></td></tr></table></figure><p><img data-src="images/clipboard-3403100846.png" alt=""></p><h2 id="其他R包-UniProt">其他R包-UniProt</h2><h3 id="drawProteins包">drawProteins包</h3><p>根据从Uniprot蛋白质数据库中获得的数据绘制蛋白结构示意图。</p><p>其基本工作流程是:</p><ol><li class="lvl-3"><p>提供一个或多个Uniprot ID;</p></li><li class="lvl-3"><p>从Uniprot API中获取特征列表;</p></li><li class="lvl-3"><p>绘制这些蛋白质的基本链;</p></li><li class="lvl-3"><p>根据需要添加特征。</p></li></ol><p><code>drawProteins</code>使用包httr与Uniprot API进行交互,并将一个JSON对象提取到R中。JSON对象用于创建数据表。 然后使用ggplot2绘制蛋白示意图。 详细见 <span class="exturl" data-url="aHR0cHM6Ly93d3cuYmlvY29uZHVjdG9yLm9yZy9wYWNrYWdlcy9yZWxlYXNlL2Jpb2MvdmlnbmV0dGVzL2RyYXdQcm90ZWlucy9pbnN0L2RvYy9kcmF3UHJvdGVpbnNfQmlvY1N0eWxlLmh0bWw=">https://www.bioconductor.org/packages/release/bioc/vignettes/drawProteins/inst/doc/drawProteins_BiocStyle.html<i class="fa fa-external-link-alt"></i></span></p><h3 id="queryup包">queryup包</h3><p>从’ UniProtKB ’ REST API中检索蛋白质信息</p><h2 id="参考">参考</h2><ol><li class="lvl-3"><p>Proteomicslab57357/UniprotR: Retrieving Information of Proteins from Uniprot</p></li><li class="lvl-3"><p>CRAN: Package UniprotR</p></li><li class="lvl-3"><p>UniprotR: Retrieving and visualizing protein sequence and functional information from Universal Protein Resource (UniProt knowledgebase) - PubMed</p></li><li class="lvl-3"><p>自学R语言–使用UniprotR包提取Uniprot数据库内容 - 知乎</p></li></ol></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241125123119.png" alt="uniprot"></p>
<p><code>UniprotR</code> 包通过丰富的函数和可视化工具,使得从UniProt数据库中检索和分析蛋白质信息变得更加便捷和高效。</p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="科研" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E7%A7%91%E7%A0%94/"/>
<category term="R语言" scheme="https://blog.leafminer.cn/tags/R%E8%AF%AD%E8%A8%80/"/>
<category term="果蝇" scheme="https://blog.leafminer.cn/tags/%E6%9E%9C%E8%9D%87/"/>
<category term="UniProt" scheme="https://blog.leafminer.cn/tags/UniProt/"/>
<category term="蛋白" scheme="https://blog.leafminer.cn/tags/%E8%9B%8B%E7%99%BD/"/>
<category term="ID转换" scheme="https://blog.leafminer.cn/tags/ID%E8%BD%AC%E6%8D%A2/"/>
<category term="UniprotR包" scheme="https://blog.leafminer.cn/tags/UniprotR%E5%8C%85/"/>
</entry>
<entry>
<title>使用R语言通过DIOPT数据库检索同源基因-RDIOPT包</title>
<link href="https://blog.leafminer.cn/2024/11/26/59d71c476e67/"/>
<id>https://blog.leafminer.cn/2024/11/26/59d71c476e67/</id>
<published>2024-11-26T01:50:13.000Z</published>
<updated>2024-11-26T13:08:42.373Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241126153440.png" alt=""></p><p>RDIOPT包 是 DIOPT 同源基因查找器 (<strong>DIOPT Ortholog Finder</strong>) 的一个简单包装器(wrapper)。这个包(package)的目的是允许用户直接从 R 语言环境中查询同源基因,而不需要复制和粘贴操作。RDIOPT 依赖于 DIOPT API 来执行查询和搜索结果。</p><span id="more"></span> <h2 id="安装">安装</h2><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#install.packages("devtools")</span></span><br><span class="line">devtools<span class="operator">::</span>install<span class="punctuation">\</span>_github<span class="punctuation">(</span><span class="string">"myuhao/RDIOPT"</span><span class="punctuation">)</span></span><br></pre></td></tr></table></figure><h2 id="函数及参数">函数及参数</h2><p><code>find_orthologs(genes, from = 9606, to = 7227, filter = "none", version = 8)</code></p><table><thead><tr><th><code>genes</code></th><th>字符向量,基因的<code>enterzID</code>。<code>gene symbol</code>。</th></tr></thead><tbody><tr><td><code>from</code></td><td>源物种<code>NCBI Taxonomy ID</code></td></tr><tr><td><code>to</code></td><td>目标物种<code>NCBI Taxonomy ID</code></td></tr><tr><td><code>filter</code></td><td>筛选结果,具体参数见后面内容。</td></tr><tr><td><code>version</code></td><td>版本,<code>8</code>或者<code>9</code></td></tr></tbody></table><p><code>from</code> 和 <code>to</code>为<code>NCBI Taxonomy ID</code>. DIOPT 目前支持以下 IDs (DRSC - DRSC Integrative Ortholog Prediction Tool):</p><ul class="lvl-0"><li class="lvl-2"><p><code>all</code>: 以下所有物种 (仅限<code>to</code>使用)</p></li><li class="lvl-2"><p><code>83333</code> Escherichia coli [ E. coli ]</p></li><li class="lvl-2"><p><code>3702</code> Arabidopsis thaliana [ Thale cress ]</p></li><li class="lvl-2"><p><code>4896</code> Schizosaccharomyces pombe [ Fission yeast ]</p></li><li class="lvl-2"><p><code>4932</code> Saccharomyces cerevisiae [ Yeast ]</p></li><li class="lvl-2"><p><code>6239</code> Caenorhabditis elegans [ Worm ]</p></li><li class="lvl-2"><p><code>7165</code> Anopheles gambiae [ Mosquito ]</p></li><li class="lvl-2"><p><code>7227</code> Drosophila melanogaster [ Fly ]</p></li><li class="lvl-2"><p><code>7955</code> Danio rerio [ Zebrafish ]</p></li><li class="lvl-2"><p><code>8364</code> Xenopus tropicalis [ Western clawed frog ]</p></li><li class="lvl-2"><p><code>10116</code> Rattus norvegicus [ Rat ]</p></li><li class="lvl-2"><p><code>10090</code> Mus musculus [ Mouse ]</p></li><li class="lvl-2"><p><code>9606</code> Homo sapiens [ Human ]</p></li></ul><p><strong><code>filter</code></strong></p><ul class="lvl-0"><li class="lvl-2"><p><code>none</code> 无过滤,显示所有结果。</p></li><li class="lvl-2"><p><code>best_match</code> 只有当每个输入基因或蛋白有一个以上匹配时,才返回最佳匹配。</p></li><li class="lvl-2"><p><code>exclude_score_less_1</code> 排除低diopt得分( score > 1 ,除非仅匹配得分为1)</p></li><li class="lvl-2"><p><code>exclude_score_less_2</code> 排除低diopt得分( score > 2 ,除非仅匹配得分为1或2)</p></li></ul><h2 id="示例">示例</h2><p>以黑腹果蝇 [ <em>Drosophila melanogaster</em> (fruit fly) ] 的Akt, CaMKI基因为例</p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241126192800.png" alt=""></p><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241126201505.png" alt=""></p><figure class="highlight r"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">library<span class="punctuation">(</span>RDIOPT<span class="punctuation">)</span></span><br><span class="line"><span class="comment"># Entrez ID</span></span><br><span class="line">gene_of_Dm <span class="operator"><-</span> <span class="built_in">c</span><span class="punctuation">(</span><span class="number">41957</span><span class="punctuation">,</span><span class="number">43792</span><span class="punctuation">)</span></span><br><span class="line"><span class="comment"># 安装了AnnotationDbi可以使用gene sysmbol</span></span><br><span class="line"><span class="keyword">if</span> <span class="punctuation">(</span>require<span class="punctuation">(</span>org.Dm.eg.db<span class="punctuation">)</span><span class="punctuation">)</span> <span class="punctuation">{</span></span><br><span class="line"> gene_of_Dm <span class="operator"><-</span> <span class="built_in">c</span><span class="punctuation">(</span><span class="string">"Akt"</span><span class="punctuation">,</span><span class="string">"CaMKI"</span><span class="punctuation">)</span></span><br><span class="line"><span class="punctuation">}</span></span><br><span class="line"><span class="comment"># 果蝇NCBI Taxonomy ID为7227</span></span><br><span class="line">Dm_orthologs <span class="operator"><-</span> RDIOPT<span class="operator">::</span>find_orthologs<span class="punctuation">(</span>gene_of_Dm<span class="punctuation">,</span> from <span class="operator">=</span> <span class="number">7227</span><span class="punctuation">,</span> to <span class="operator">=</span> <span class="string">"all"</span><span class="punctuation">,</span> filter <span class="operator">=</span> <span class="string">"best_match"</span><span class="punctuation">)</span></span><br><span class="line">Dm_orthologs</span><br></pre></td></tr></table></figure><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241126202220.png" alt=""></p><h2 id="参考">参考</h2><ol><li class="lvl-3"><p>myuhao/RDIOPT: R interface to run DIOPT ortholog finders</p></li><li class="lvl-3"><p>DRSC - DRSC Integrative Ortholog Prediction Tool</p></li></ol></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p><img data-src="https://cdn.jsdelivr.net/gh/leafminer/tuchuang@master/20241126153440.png" alt=""></p>
<p>RDIOPT包 是 DIOPT 同源基因查找器 (<strong>DIOPT Ortholog Finder</strong>) 的一个简单包装器(wrapper)。这个包(package)的目的是允许用户直接从 R 语言环境中查询同源基因,而不需要复制和粘贴操作。RDIOPT 依赖于 DIOPT API 来执行查询和搜索结果。</p></summary>
<category term="原创" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/"/>
<category term="科研" scheme="https://blog.leafminer.cn/categories/%E5%8E%9F%E5%88%9B/%E7%A7%91%E7%A0%94/"/>
<category term="R语言" scheme="https://blog.leafminer.cn/tags/R%E8%AF%AD%E8%A8%80/"/>
<category term="实例" scheme="https://blog.leafminer.cn/tags/%E5%AE%9E%E4%BE%8B/"/>
<category term="果蝇" scheme="https://blog.leafminer.cn/tags/%E6%9E%9C%E8%9D%87/"/>
<category term="DIOPT" scheme="https://blog.leafminer.cn/tags/DIOPT/"/>
<category term="同源基因" scheme="https://blog.leafminer.cn/tags/%E5%90%8C%E6%BA%90%E5%9F%BA%E5%9B%A0/"/>
<category term="RDIOPT包" scheme="https://blog.leafminer.cn/tags/RDIOPT%E5%8C%85/"/>
</entry>
<entry>
<title>和江湖谈一场恋爱 | 周宏翔</title>
<link href="https://blog.leafminer.cn/2024/11/25/f984d4bf689a/"/>
<id>https://blog.leafminer.cn/2024/11/25/f984d4bf689a/</id>
<published>2024-11-25T02:43:29.000Z</published>
<updated>2024-11-27T08:52:41.376Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>老姜是我们哥儿几个里面最有钱的,一集电视剧剧本写下来就够我们半年的工资,所以有事儿没事儿我们都爱靠着老姜蹭吃蹭喝。老姜谈起自己事业,从来都是云淡风轻,在我们在为了同事比自己多拿几千年终奖而纠结的时候,老姜总是大手一挥,爽快地说:“得了,今天吃喝嫖赌我一个人买单!”</p><span id="more"></span><p>当然,我们都不是白眼狼,老姜也有“遇难”的时候,在文字世界里徜徉的他是个生活白痴,什么电路跳闸,马桶堵塞,喝醉了倒在路边,往往无法自理,只要他一个电话,我们立马赶到,二话不说,一条龙服务。<br>跟着老姜除了能够偶尔享受一下奢靡的生活,更重要的是可以听他说几个故事。老姜的故事总是百转千回,荡气回肠,往往听到精彩之处,老姜就立马收口,欲知详情,请听下回分解。我和老姜开玩笑说,你去开个茶馆儿,准火!老姜说,肥水不流外人田,也就是逗你们哥儿几个开心开心,真要我去讨好那帮子人,我还不愿意呢。<br>和老姜暧昧的女人可不少,有时候还有几个小有名气的大角儿,为了让自己多点戏份,跟着老姜可是形影不离。但老姜这个人把持有度,知道什么是可以碰的,什么是不能碰的,懂得引火上身的道理,往往点到即止。<br>直到老姜遇到了苏荷,他才真正感觉到了棋逢对手。<br>苏荷不是漂亮姑娘,说起来,她不仅脸蛋儿一般,身材还有些偏胖,就老姜第一眼看见她,就怀疑她肯定是导演的亲戚“走后门”进来的。让这样的女生演女二真的好吗,老姜不禁想到。那是老姜所编的为数不多的古装剧,纵使为数不多,也好歹是自己的作品演绎,出于本有的职业操守,老姜还是和导演提出了换角的建议,结果第二天,苏荷就风驰电掣地追到了老姜家,老姜前一晚为了赶剧本,凌晨四点才上床,这天刚亮,就被那野兽撞门的剧烈声响给吵醒了。<br>老姜一开门,苏荷就劈头盖脸地骂起来,“为什么要把我换掉?我不就是没有献身吗?你们这群老流氓!”老姜瞬间把门关上,靠在门上稍稍安静了两秒,睡眼惺忪地他还没搞清楚状况,苏荷又在门外大吵大闹起来,“你个没良心的,吃干抹净,你个负心汉,陈世美,见了漂亮姑娘就忘了糟糠之妻,你……”苏荷没说完,老姜就把她拉进了屋。<br>两个人面面相觑,大眼瞪小眼,半晌,苏荷双手抱胸,说:“想也别想!”<br>“靠,我可没那么重口味!”老姜忍不住说道。<br>“那你想干嘛?”苏荷死死地盯着他。<br>“我还想问你,你到底想干嘛?”<br>苏荷咬着嘴唇,肚子里的话翻了一遍又一遍,最后说:“实在当不了女二,女三女四也行!”<br>老姜说:“换掉你是导演的意思,我又做不了主。”<br>苏荷红着脸说:“你个老流氓,导演都和我说了,就是我没给你献身!”<br>事后老姜回忆起来,说那天就像是在饭店点了熊掌,上了猪蹄,吃到嘴里,还有一撮毛。<br>最终老姜为了证实自己和那些女演员非亲非故,没有所谓的“潜规则”,还是给苏荷换到了一个女配角,用老姜的话来说,这个角色至关重要,虽然整部戏只有三场,但是没有这三场,剧情就无法继续。<br>苏荷非常用心,即使是微不足道的角色,她也常常在空闲时候自我演练。那些台词对着镜子说了一遍又一遍,最后上场的时候,基本都是一次性过关,没有任何NG的情况。老姜在旁边看,竟然也为苏荷的努力和认真有所动容。连着四个月的拍摄,苏荷一直跟着剧组,风雨无阻,老姜偶尔去探班,发现苏荷一直在,间隙他过去问她:“你不是都拍完了吗?”苏荷说:“我特别想知道故事的结局。”<br>杀青的那天晚上,导演特别设了宴犒劳大家,老姜喝得醉醺醺,错把苏荷当成了组里另外一个小姑娘,脸不觉靠上去,立马被甩了一个大耳光,全场一下鸦雀无声,老姜立刻清醒了过来,苏荷眼看无法收场,打开门一溜烟跑了。<br>老姜从酒店出来,摇头晃脑不清醒,一辆出租杀过来,差点把老姜撞倒在地,老姜只觉有个人拉了自己一把,司机准备出来嘟囔几句,却被拉自己的那个人噼里啪啦骂了回去,老姜只觉酒精往大脑一冲,眼前一黑,两眼一闭,就这样倒了下去。<br>醒来的时候,老姜发现自己躺在一间招待所房间的床上,床头有一张纸条,上面写:住宿的钱我付过了,八十五,下面是我的银行卡号,醒了记得打给我,苏荷。老姜觉得好笑,把纸条放进了上衣口袋,翻身又睡了过去。<br>一场戏结束之后,老姜拿钱去泰国旅游了一趟,回来的时候,又准备接新活儿。他打电话给我们哥儿几个,找了个饭店准备请我们吃一顿,他说,回头他要闭关了,写不好可不出山。<br>那天我们去吃烤鱼,大家伙儿都听着老姜在泰国的逸闻趣事,老姜一边说着自己的艳遇一边嘚瑟得吐烟圈。看着老姜耀武扬威,实在遭人羡慕。突然有人问老姜,之前和你打得火热的小姑娘怎么样了?老姜咧嘴笑道,哪个小姑娘,跟着我转的小姑娘多了去了,不晓得你说哪个。<br>夜里回家的时候,老姜一边扭着腰一边唱着歌,楼道黑漆漆,刚要开门,踩到一团软绵绵的东西,立马听到一声尖叫。他吓得后退几步,打了火机,微弱的火光让他看清了苏荷狼狈的脸,苏荷就跟一只遗弃的小猫一样。老姜大叫一声,擦,女鬼上身啊!<br>老姜开了门,邀她进屋,问她怎么跟从大宅门逃出的小媳妇儿一样,苏荷沉默了很久,才告诉老姜她被男朋友扔大街了,男朋友骑着摩托车突突地离开了她的世界。<br>苏荷说,我男朋友说我每天都做白日梦,没得救了,说我已经不是十七八岁的小姑娘,梦想就是狗屁,根本养不活自己。他不想拖着一个拖油瓶,我在他眼中就是一个不切实际的疯子!我也不知道怎么走着走着就走到你楼下,上来敲门你不在,蹲在门口睡着了。<br>老姜有些恍惚,却依旧看清了她两颊的泪痕,红通通的眼睛,应该是哭了很久。<br>苏荷坐在沙发上,长长叹了一口气,可怜巴巴地问老姜她是不是真的没得救了,老姜红着脸,吐着酒气说,还好,不算晚期。老姜四仰八叉地靠在椅子上问苏荷,为什么那么想当演员。苏荷说,我就是想演戏,我喜欢演戏。<br>老姜一时间语塞,不知道怎么说才好。<br>苏荷突然问起老姜之前那部戏什么时候播,老姜想了想,说,应该快了。苏荷在茶几上抓起一支笔,用力在老姜手上写了个号码,硌得老姜生痛,苏荷说,这是我电话,要是快播了,你和我说一声,等我成了大明星,我要让他后悔死!<br>后来老姜在一家咖啡店写稿遇见苏荷,她穿着围裙在那里接待客人,眼看老姜来了,她突然有些不好意思。老姜一坐就是一天,店铺打烊,老姜才走,漆黑的夜,老姜觉得苏荷一个人走不安全,说开车载她一程,苏荷摇头,说自己坐晚班公交就好了,老姜问苏荷住哪儿,苏荷说在杨思,老姜说他正巧顺路。其实老姜住徐汇,根本和苏荷不是一个方向。<br>老姜问她为什么不好好找份工作,苏荷说她要一面体验生活一面丰富阅历,好的演员必须方方面面尝试,否则演戏不真。老姜说,其实除了演员,世上还有很多事情可以做。<br>苏荷突然沉默了,半晌,开口说,我为了学演戏,我妈在外面借了很多钱,当时遭了很多白眼,我跟我妈说,有朝一日,我一定让那些瞧不起我的亲戚刮目相看,我一定会成为大明星!就算我男朋友和我掰了,我也无所谓了,我和我妈说了,我的戏很快就要播了,电话那头她笑得可开心了。苏荷说得激动,有些泪眼婆娑。<br>老姜突然靠边停车,他打开车窗,点了一支烟,说:“人在江湖,身不由己。”苏荷睁大眼睛望着他问:“什么意思?”老姜深深地吸了一口,弹了烟灰,看着苏荷,诚恳地说:“其实你演的那三出戏,导演全剪掉了,不是你演的不好,而是那些戏份真的不需要。”苏荷一时呆若木鸡,顷刻大叫一声,抓住老姜手臂狠狠地咬了一口,又给了老姜一巴掌,打开车门冲了出去。<br>老姜开车也没追上苏荷,他突然有些愧疚,他问过导演当时为什么选她当女二号,导演说,因为她已经来试过十几次戏了,每次都带些新花样来,总觉得不让她试试,也有些对不起她,反正女二在中途会死掉,让她试试也无妨,但是,所有人都知道,以她那样的长相,肯定是红不了。<br>那段时间老姜特别不开心,剧也不写了,成天邀约我们出来喝酒,我问他是不是做了亏心事,搞大了哪个女明星的肚子,老姜笑不出来,我们想,这下完了,从前可没有哪个女人让他茶饭不思。<br>一天老姜喝多了,一口气给苏荷打了二十个电话,苏荷忍无可忍,只有接了,老姜说:“你来,我给你写新戏!”苏荷在那头没有说话,老姜继续说:“我认识的导演多,我给他们推荐!”苏荷还是没有说话,老姜接着说:“你是不是不信我?”苏荷微微舒了一口气,说:“我妈不在了,我演给谁看呢?”原来苏荷没有告诉他,当时母亲已经病重,等的就是苏荷那场戏,结果戏没了,妈也没了。<br>老姜说:“你出来,你出来,我想见你。”<br>“你想,我不想。”说完就挂断了老姜的电话。<br>老姜喝多了,就爬到苏荷之前打工那家咖啡馆门口,后来老板打电话给苏荷,苏荷踹了老姜两脚,老姜恍恍惚惚说不出话,苏荷拖着老姜上出租车,老姜抓着苏荷的手,苏荷想拖出来,再给他两巴掌,结果老姜又抓住她另一只手,那天老姜靠在苏荷肩上,说了一堆胡话,结果苏荷把老姜带回了家。<br>老姜说,你缺的不是演技,是机会。<br>苏荷冷冷地说,现在说这些有什么用?<br>老姜满嘴酒气说,别忘了那些看你笑话的亲戚。<br>苏荷不出声,老姜接着说,你妈不在了,江湖还在,你是女侠,随时都要回来。<br>没多久,老姜和苏荷走到了一起,老姜逼着苏荷减肥,每天督促她束身,早起陪她跑步,晚上监督她少吃,几个月下来,苏荷瘦了二十斤,和之前我们看到的那个苏荷判若两人。苏荷甚至比之前更努力,老姜写了剧,她就在家对着镜子念,拿手机录下来,自己听不下去,就重头再来。老姜看在眼里,心里却不是滋味,苏荷问老姜自己演得如何,老姜说,好,真的好。苏荷为了瘦小腿,用保鲜膜绑了一个月,最后弄得苏荷身上都过敏了,老姜说,你太拼了。苏荷说,你不是说我是女侠吗,哪个女侠不是这样拼出来的?<br>老姜说带苏荷去见几个导演,苏荷当场拒绝,她说,我才不要因为你的关系“走后门”,你说我演得好,是真话,我就去,是假话,我就继续练。老姜说不过她,只有给她一个深深的吻和大大的拥抱,没多久,苏荷靠自己的实力接了个女三号,虽然戏份也不多,但是苏荷很开心。<br>那天苏荷拉着老姜,叫上我们一群人去吃饭,席间大家都很开心,几个兄弟揶揄老姜,当了这么多年的山大王,终于被苏荷这个女侠降服了。<br>苏荷开始在圈子里小有名气,接的戏也越来越多,老姜继续闭关写剧本,有时候苏荷还能帮老姜介绍几个导演,夫妻搭配,干活不累,两个人感情越来越好,大家都说这次是瞌睡遇到枕头,碰巧了。<br>但是娱乐圈里人红是非多,很快就有人说苏荷是靠老姜上位,开始在背后诋毁苏荷,说当今谁有点“献身精神”都能红,不知道谁又翻出苏荷之前的照片,开始传言她到韩国整容。那段时间苏荷压力很大,和老姜常常吵架,老姜写累了,也不想和苏荷说话,就到酒吧去喝酒,碰到熟悉的小妹,又露出了本性,接二连三有人和苏荷打小报告,说老姜和谁谁又勾搭上了。苏荷问老姜,老姜便说苏荷不信任,一来二去,争吵成了冷战,最终爆发,只有分手。<br>老姜一气之下说,和女生说说话怎么了,成天就只许对着你一个人了?苏荷猛地踹了老姜的命根子,声色俱厉地说:“滚犊子,你这辈子就是个老流氓!”<br>苏荷走后,老姜回到了一个人生活的状态,不知道为何,却突然忘记了自己曾经怎么独自生活。他想起这些日子,自己写剧本累的时候,苏荷会帮他揉肩,渴了苏荷给他倒茶,虽然彼此忙,在家做饭不多,但是苏荷的糖醋小排确实是人间美味。<br>苏荷一走,老姜像中邪一样,一个字也写不出来,每天打开电脑发呆,写了几行,又回头删掉,来来去去,写不到一百字,眼看要交剧本了,他还一个字都没动,最后投资方生气,干脆换掉了编剧,老姜受到了打击,还被要求退还定金,老姜的钱早用得差不多了,因此欠了一屁股债。<br>以前那个意气风发的老姜不见了,我们看见他的时候,他完全变成了山顶洞人,蓬头垢面,披头散发,老姜的房间堆满了揉成团的稿纸,他说他完了,真的完了。<br>我们赶紧联系到苏荷,当时苏荷不在上海,正在蒙古拍戏,信号不好,没听清我们说的,只听到“老姜完了完了”就立马从蒙古飞回来,苏荷去敲门,老姜没开,她以为老姜为情自杀,掏出钥匙开了门,结果老姜和一个小姑娘正躺在床上,苏荷红着脸又红着眼,摔了门,快步下了楼。<br>老姜淡出圈子一段时间,再回来,新人都占了空,没有多少人找他写戏了,那段时间,老姜穷困潦倒,成了我们哥儿几个请他吃喝嫖赌,老姜叹气说,出来混,都是要还的啊。<br>那时候苏荷已经红了,我们喝酒还能看见苏荷的广告,老姜看着电视里的苏荷,嘴上不说,眼里都是泪,老姜说,谁能想得到,原来的小胖妞现在居然在拍减肥茶广告。<br>几天后,老姜接到一个导演的电话,说看了他以前的本子,想和他谈谈合作的事。老姜盛装打扮,到了饭店,对方才说,是苏荷介绍的,苏荷是他们下部戏的女主角。<br>签完合同的那个下午,老姜坐在咖啡厅里,望着窗外,心里空荡荡一片。<br>夜里聚会,老姜说终于他妈的找到份活儿了。我们为他东山再起干杯。老姜叹气,说,最后居然还要靠女人!<br>兄弟问老姜,你想苏荷吗?<br>老姜说,不想,谁想谁是孙子!<br>说着猛灌了一杯酒,带着哭腔说道,我他妈就是孙子!<br>老姜永远不胜酒力,永远不能自理,他倒在路边,我们给苏荷打了电话,苏荷过来的时候,我们就自动撤退了,苏荷把老姜塞进了自己的车,怕老姜冷,开了暖气,老姜在后面哭,叫着苏荷的名字,苏荷假装听不到,眼泪却都滴在了方向盘上。<br>苏荷把老姜送回家,老姜抓着苏荷的手说,锁没换,你随时都可以回来。苏荷迟疑了几秒,还是把手抽出来,她说,虽然锁没换,但是我的钥匙已经丢了。老姜没有再说话,苏荷打算下楼,老姜说,能不能陪我说会儿话。<br>老姜点了支烟,苏荷趴在阳台栏杆上,这个家,是曾经他们一起经营的地方。<br>苏荷突然开口,说,我不在,房间也还整洁,应该有小姑娘帮你打扫吧。老姜吐了一口烟,眯着眼睛,说,每天晚上我都收拾一遍,想着你哪天回来,觉得这还是个家。苏荷鼻子有些酸,但没有接老姜的话,老姜接着说,你啊,不要太拼,江湖再大,女侠也要有个家。<br>苏荷别过脸,淡淡地说,别搞笑了,你还真把我当女侠啊!你啊,就是剧本写多了,快变神经病了!<br>苏荷起身,走到老姜身边,挽起老姜的右袖,那个被她咬过的齿痕,已经渐渐看不清了。苏荷说,你看,不管曾经多么用力,最后都会消失。好了,玩笑开完了,我走了,对你那些小姑娘好点,注意身体。<br>老姜趴在阳台上,看着苏荷的车渐渐消失在夜色之中,哽咽得说不出一句话来。<br>苏荷一边开着车,一手伸进大衣口袋里,在驶向郊区的路上,她打开车窗,把那枚随身携带的钥匙抛了出去。金属在路灯下划出一道弧线,汽车飞速驶过,听不到它最终落地的声响。<br>爱这回事儿,不过是两个人在兵荒马乱中的相濡以沫,能够共苦的人,往往等到难关已过,无法同甘,你以为你爱上了一个人,其实,只是爱上了那个拔刀亮剑的江湖,和那段彼此磨砺的岁月。</p><hr></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>老姜是我们哥儿几个里面最有钱的,一集电视剧剧本写下来就够我们半年的工资,所以有事儿没事儿我们都爱靠着老姜蹭吃蹭喝。老姜谈起自己事业,从来都是云淡风轻,在我们在为了同事比自己多拿几千年终奖而纠结的时候,老姜总是大手一挥,爽快地说:“得了,今天吃喝嫖赌我一个人买单!”</p></summary>
<category term="转载" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/"/>
<category term="学习" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/%E5%AD%A6%E4%B9%A0/"/>
<category term="小小说" scheme="https://blog.leafminer.cn/tags/%E5%B0%8F%E5%B0%8F%E8%AF%B4/"/>
<category term="转载" scheme="https://blog.leafminer.cn/tags/%E8%BD%AC%E8%BD%BD/"/>
<category term="故事" scheme="https://blog.leafminer.cn/tags/%E6%95%85%E4%BA%8B/"/>
<category term="恋爱" scheme="https://blog.leafminer.cn/tags/%E6%81%8B%E7%88%B1/"/>
<category term="江湖" scheme="https://blog.leafminer.cn/tags/%E6%B1%9F%E6%B9%96/"/>
</entry>
<entry>
<title>我所说的拼命,只是不顾一切的活着 | 午歌</title>
<link href="https://blog.leafminer.cn/2024/11/25/05f6fd108850/"/>
<id>https://blog.leafminer.cn/2024/11/25/05f6fd108850/</id>
<published>2024-11-25T02:40:13.000Z</published>
<updated>2024-11-26T01:04:33.921Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>8月,台风“海葵”在宁波登陆,我被困在栎社机场的候机厅,过了11点钟,延误的航班没有丝毫消息。我在手机通讯录里不断的翻看着宋玉的名字,仿佛手指轻点一下,就能联通到他的世界。</p><p>风很大,大雨瓢泼而下,而我始终没有点动它。</p><span id="more"></span><p><strong>1</strong></p><p>我和宋玉是发小,5岁那年,我和他在家属院后的货仓里玩火时,点燃了一张大油毡。不知怎么油毡燃烧时滴下的沥青溅到我的棉裤上。我的新棉裤迅疾燃烧起来,我蜷着身子疼得在地上嗷嗷直叫。宋玉见状,慌忙一把一把的抓起沙子盖在我的火腿上——没有用,他又使出吃奶的劲头拼命在上面吐口水, 可惜仍无济于事。</p><p>火势加大,我疼得哇哇大哭,宋玉褪下他的裤子,一泡尿撒在上面,浇灭了大部分的火苗。眼看着剩下的火种死灰复燃,宋玉光着屁股就抱着我的大腿打起滚来,最终熄灭了所有的火苗。</p><p>事后,宋玉被他娘吊着打了半天。而我因为伤口发炎,躺在医院里好吃好喝的住了一个星期。<br>我的左腿上至今还有一条8寸长的“火疤瘌”,宋玉说,那是我们伟大友谊的见证。</p><p>可在当时我感动的要命,是宋玉的果断与勇敢保住了我的大腿。<br>我说,宋玉,你是我的救命恩人。你想要什么,我都买给你!<br>宋玉爬在我的身边,嘿嘿一笑说,不用了,你先欠着,我想到了你再还。</p><p>说完话,他得意的翻身坐起,谁知屁股一挨床,就“哇哦”一声,蹿出去老高,像一只燃烧的钻天猴儿炮仗。</p><p><strong>2</strong></p><p>到了小学我们被分到了同一个班级。<br>我因为成绩还不错,是老师眼里的好学生。<br>宋玉则是调皮捣蛋的孩子王,因为“大腿事件”知恩图报,我时常把作业和小纸条及时的传给宋玉。</p><p>5年级,文艺汇演,宋玉找我一起演舞台剧。<br>宋玉说,大闹天宫里缺一个重要角色,你演不演?</p><p>我问,是孙悟空吗?<br>宋玉说,那是我的角儿!<br>我问,是天兵天将吗?<br>宋玉说,比这个待遇要好一点!<br>我问,那是?<br>宋玉说,是玉皇大帝,你考虑一下!</p><p>我说,玉皇大帝就算了,整个大闹天宫里一直都被揍得很怂,有损我的好孩子形象。<br>宋玉说,我会尽量减少你的戏份,蒋一燕会演王母娘娘,你再考虑一下。</p><p>蒋一燕是我们全校闻名的学霸,不但成绩好,人也生的十分清秀,而且画画也非常棒。那个年龄段,但凡三观发育正常,身体茁壮成长的男生,都争着和蒋一燕做朋友,借她作业,收藏她的画,陪她一起大扫除。</p><p>于是我不假思索的就答应了下来。<br>宋玉也最终兑现了承诺,整个《大闹天空》被他改的面目全非,主要戏份就是王母娘娘和孙悟空在蟠桃园斗法。<br>而我唯一的一句台词,就是钻在课桌底下,歇斯底里的喊了一句:<br>“快去请如来佛祖!”</p><p><strong>3</strong></p><p>六年级时,蒋一燕参加了学校的绘画兴趣班,放学比普通同学晚一小时。因为在“大闹天宫”里结下“仙缘”,我和宋玉主动担任护花使者,时常陪伴“王母娘娘”圣驾左右。</p><p>一路上,我们三个说说笑笑,从马路边的白杨树上摘下知了壳,在月季花苗圃里的抓住西瓜虫,一遍遍清点落在电线上的小麻雀。日子过得简单美好,仿佛天空一般了无褶皱,仿佛流云一般长生不老。</p><p>毕业前的那年夏天,我们三路过一个叫九道弯的胡同。<br>胡同的转角里,突然窜出一个高中生模样的小混混拦路打劫。因为宋玉他爸是市里的领导,家境很好,这个土豪上来就掏出二十块钱稳住了局面。</p><p>那个打劫的小混混,本来拿了钱乐呵呵要离开。瞥了眼蒋一燕,忽然调转过头来。<br>“小姑娘,长得挺漂亮啊!”混混一脸坏笑,说着向蒋一燕伸出一只手来。</p><p>宋玉一个健步挡在前面,“拿了钱还不走?”</p><p>那小混混发出一声古怪的冷笑,一脚踹在宋玉的肚子上。<br>“你妈!多管闲事是吧?”</p><p>宋玉捂着肚子倒在地上,使劲跟我使眼色,让我拉着蒋一燕快跑。<br>我当时完全傻掉,直到混混再伸手去摸蒋一燕时,我才把自己的脸蛋凑了过去。</p><p>“你也找死是吗?”混混果断的给了我左脸一记耳光。<br>我不知从哪里来的勇气,不但戳在原地一动不动,而且用眼神示意那个混混,你可以在我右脸上再来一下,可是休想跨过去。<br>“傻逼!”那混混心领神会,迅速满足了我的美好愿望!</p><p>可我还没动,又转过另外一侧脸颊对着他。<br>混混很意外我的抗打击能力,正在考虑调用他腿长蛋高的远程攻击模式时,捂着肚子的宋玉发疯似的冲过来,赶在混混抬腿之前,抱住了他,一口咬在他大腿根的内测。那混混痛的嚎叫了一声,跳出去半米开外。</p><p>“你妈!一个傻子,一个疯子,一对傻逼!”混混骂骂咧咧着一步一瘸的走开了。</p><p>宋玉从地上缓缓的爬起来,蒋一燕走过来,伸手碰触着我发烫的脸颊问我:<br>“疼不疼?”<br>宋玉抢过来说:“哎呀,我的肚子疼死了!”<br>我尴尬的笑笑说:“我没事,左右各一下,正好平衡了。”</p><p>后来三个人一路上没再多说话。蒋一燕吓坏了,眼里一直噙着泪水。<br>我忽然觉得,眼泪才是检验美女的唯一标准。</p><p>燕子样子美极了,比起平时清秀素雅的模样,更像一株挂着露水的粉荷。夕阳把她的影子拉得好长,我很想掬一捧她的眼泪,收集起那晚红颜的霞光,就在那个黄昏,我人生第一次体会到了心中的痒痒,就像我热辣双颊一样,不可抑制,酥麻发烫。</p><p><strong>4</strong></p><p>很久以后,宋玉问起我,为什么那天蒋一燕会先跑来问我疼不疼?<br>“明明是我伤的更重一点!”宋玉说。<br>“我离她近一点啊,可能是近水楼台先得月吧?!”<br>“你是不是喜欢她?”<br>“我没有!”<br>“那我就放心了。”宋玉如释重负的说。</p><p>我转而反问:“要是她喜欢我呢?”<br>宋玉说:“要是那样,我就不追了。”<br>我说:“世界那么大,又不是只有我们两个是男人!”<br>宋玉说:“不管是谁,敢追我兄弟的女人,我就找砖头拍死他!”</p><p>我笑笑说:“你这个疯子!”<br>宋玉说:“你这个傻子!”<br>“一对傻逼!哈哈哈哈!”我们两个抱在了一起。</p><p>时间飞快,转眼就上完了初中,临近毕业,学校要从我和蒋一燕中找一个人作为优秀毕业生代表上台发言。</p><p>“无上的荣誉啊!你就让给燕子吧。”宋玉忽然跟我说。<br>“那是当然,好男不和女斗!”</p><p>“别和我争燕子好吗?我知道你也喜欢她,兄弟,其他的我都可以给你,命也可以!”宋玉忽的郑重的抓住我的肩膀。<br>“看在你当年为了保住我的大腿,屁股被揍成烂桃的份上!”我忍不住哈哈大笑起来。</p><p>“哈哈哈!”我卯足了劲头笑着,生怕宋玉听出的我的尴尬,直到笑的喘不出气来。</p><p>离校之前,蒋一燕代表全校学生上台致辞,特别提到我和宋玉两个最佳损友的伟大友谊。台下宋玉暗地为我竖起了大拇指,冲我傻傻笑着。<br>我指指自己的屁股,拔出中指和他遥相呼应。</p><p>作为毕业礼物,蒋一燕送给我和宋玉一人一副水彩画。<br>我的那副上,画着九道弯胡同附近的白杨树和五色的月季花,蓝天下,飞翔着一只轻盈的燕子。</p><p>宋玉问我:“她给你画了几只燕子?”<br>我说:“一只啊?”<br>“给我画了两只,这是不是比翼齐飞的意思。”宋玉喜笑颜开。<br>“嗯!那恭喜你啦,哈哈哈!”<br>这次我笑的很开心,真的,仿佛在沉闷的大天里戳开一个豁亮的口子。</p><p><strong>5</strong></p><p>初中毕业后,我转学去了临市的重点中学,蒋一燕继续留在本地,而宋玉因为没考上高中,被他爸安排进了南京空军地勤的汽车连。</p><p>我第一次感受了好爸爸的伟大力量。</p><p>这期间,只要宋玉回来,一定安排我和蒋一燕一块出去海搓。那时他已经攒下不少钱,每次都从南京带回各种鸭子身上的零件以及香辣可口的麻辣小龙虾。</p><p>我们的伟大友谊顺利升级换代,从有难同当,到有福共享。<br>我没想过太多,也没想过将来,只觉得日子好像是放了葱姜蒜花椒大料以及王守义十三香的小龙虾一样,美味的不真实,可惜好时光总是溜得很快,转眼间,就是唆唆手指,各奔前程的匆匆散场。</p><p>好在我和蒋一燕都考进了北京城的大学。到了周末晃晃悠悠坐上十几站地铁,就能匆匆见上一面。<br>宋玉让我指天为誓,并约法三章:<br>第一, 不能爱上蒋一燕;<br>第二, 不能让蒋一燕爱上我;<br>第三, 要时常出没在蒋一燕的周围,不能让其他男人有机可乘。</p><p>宋玉说,有难度吗?<br>我说,so young so simple so naïve!<br>宋玉说,说人话!<br>我说,小意思,我这就去告诉蒋一燕,我其实是个GAY!</p><p>宋玉说,你小子,虽然人怂一点,可脑瓜是真好用!</p><p><strong>6</strong></p><p>刚到北京的时候,我有意回避和蒋一燕见面。<br>如是几次,有天我在学校食堂捡到一本了《OutServe》杂志,正好那周又约了蒋一燕来科大玩。我便用几件脏衣服卷着一坨手纸和那本杂志压在枕头下面。</p><p>蒋一燕到学校的时候,我推说在学生会有事,让她先去宿舍等我。<br>半小时后,我风尘仆仆的跑回宿舍,看见蒋一燕坐在我的床边上,用手机上网玩。宿舍的衣架上,我的衣服已被她洗干净,正滴滴答答的淌着水滴。</p><p>在心里,我迅速为自己默默的点了个赞,并顺道抽了自己两个耳光。</p><p>那天我送蒋一燕回学校,一路走了七站地铁的马路,说了几辈子没说完的话,却丝毫没有疲倦的感觉。<br>轧马路的长短是检验真爱的唯一标准。我深谙此道,可是我有承诺在先,所以当蒋一燕装作无意问起我有没有女孩子追求时,我含含糊糊的回答她:<br>“其实,我更喜欢男人多一点!”</p><p>蒋一燕起初一阵坏笑,前思后想,联系了我的回避、手纸和《OutServe》杂志的一连串线索之后,恍然大悟的说道:<br>“妈呀!原来你和宋玉是一对,我当了好几年的灯泡,我竟然不知道!”</p><p>他娘的,太意外了!这完全不是我想让她得出的推论。<br>事到如此,我不得不说:“宋玉不是gay,起码我知道他爱的不是我,而是你!”</p><p>蒋一燕眨着细长的眼睛笑起来,她说:“信息量好大,我的CPU不够用,你让我缓一缓!”<br>说罢,她的双颊红热,我忽然想起多年前,那片红霞满天飞的斜阳,她用眼泪把我铸成琥珀,自此我的灵魂一直凝炼在那个百转千回的黄昏。</p><p><strong>7</strong></p><p>虽然我不能确定蒋一燕从此便会相信我是GAY的谎言,但我的态度起码表明:我真的对她不感冒。在我心里,她和宋玉已然成了比翼齐飞的一对。</p><p>我陆续买了几套运动装,颜色很齐整,都是深深浅浅的紫色。<br>每次我去见蒋一燕,或者她过来,我都精心把自己装扮成一个长条茄子。我们沿着地铁线步行,一路迎来送往,谈人生,谈艺术,唯独不谈感情。</p><p>轧马路的长短是检验真爱的唯一标准,没有比这个再扯淡!</p><p>后来,宋玉和蒋一燕顺利成章的走到了一起,宋玉退伍后被他爸运作进了市政府做,蒋一燕被准公公安排进了市文化馆。</p><p>毕业后,我背起行囊,跋山涉水,远走他乡。在上海,一家代理进口变频器的公司里,我找到了一份安装调试的工作。</p><p>宋玉和蒋一燕大婚,宋玉一天打十八个电话让我回去做伴郎,我推说买不到火车票,在电话里和宋玉大吵。<br>宋玉说,你他妈要是把我当兄弟,把燕子当妹子,你就给我滚回来!<br>我说,买不到火车票,我可能会迟到一天或两天。</p><p>宋玉说,买不到火车票,你就坐飞机。再不行,你打辆车回来,我给你报销。<br>我大吼,谁要你报销,有钱就不起吗?</p><p>最后,我还是赶回去了!<br>婚礼正进行得如火如荼,新娘踮起脚尖,正准备接受新郎的香吻。我出现了,不合时宜的捧着一大束紫罗兰出现了。</p><p>宋玉看到我,撇下闭着眼睛的燕子,径直从礼台上冲下来。<br>他一把抱住我,把我箍得要死。我说:“你这个疯子!”<br>宋玉说:“你这个傻逼!”<br>我的眼泪瞬时飚了出来。我已经两年没见过他俩了,要不是顾忌宋叔叔的面子,我和宋玉一定在台下互扇耳光来表达敬意!</p><p>宋玉在我的脖子上狠狠的亲了一口,我噙着眼泪给蒋一燕献花,故作镇定的说:<br>“你老公亲我那是他的问题,不代表我爱着他哦!”<br>蒋一燕只是淡淡的说:“来了就好,来了就好!”</p><p>隔天后宋玉和燕子送我返回上海,在车站,宋玉偷偷问我:<br>“为什么手上那么多疤痕?”<br>我说是试验失误的时候,电流击穿烫的。“公司是计件的,我多调试几台,就多赚一点!”</p><p>宋玉问:“你要不要这么拼命啊?”<br>我不知哪来的火气,反诘说:“我和你不一样,除了性命,其他没得和人拼。我所说的拼命,只是不顾一切的活着!”</p><p>宋玉郑重说:“你回来吧!我和我老爸谈过了,他可以把你安排进质监局!”<br>我说:“我拼得很好,很开心,犯不上什么事都去请如来佛祖!”<br>“你有种!”宋玉一拳凿在我的左肩,恶狠狠的说。</p><p><strong>8</strong></p><p>在上海的生活并不容易,物价高,房价高,一个月根本攒不下什么钱。后来我辗转来到了宁波,做着一份登高作业的弱电调控工作。<br>一年后,我认识了一个武汉女孩,她叫吴小云,我们的感情发展的很顺利,又过了大半年,我带吴小云返回老家成亲。</p><p>宋玉开着他的新路虎来给我做婚车,蒋小燕抛下吃奶的孩子,亲手来给吴小云画婚妆。<br>新婚的那天夜里,吴小云忽然很警觉的问我,蒋一燕是不是从前喜欢过我?</p><p>女人的直觉有时敏感的吓人,我问小云,怎么判断的?<br>小云说:“挑头花的时候,我想选粉的,她却说你一直都中意紫色,这么细节的问题都记在心里,你们一定有鬼。”</p><p>我笑笑说,那只是一个操蛋的误会。燕子初中毕业时送我和宋玉每人一副水彩,那时候人家俩就决定比翼双飞,而让我自立门户,独上青天啦。</p><p>在宁波,我时常爬上高耸的塔机操纵设备。象山港跨海大桥建造那会儿,我每天要徒手爬上240米高的主桥墩塔吊,补贴很高,日子过得逐渐殷实起来。<br>我时常望着空旷辽远的海面思念故乡,想起宋玉和燕子,想起九道弯的白杨树和西瓜虫。</p><p>2年后,大桥造好,我联系了同学才知道,宋玉他家出事了。<br>他爸因为经济问题被批捕,牵连出宋玉就业的违纪问题。家里为了减轻量刑拼命往外掏钱,宋玉也已经离职半年了。</p><p>我见到宋玉的时候,他正在卡车货场准备装货跑长途,人黑瘦,脸上透着一股倔强的精气。<br>我说:“有我能帮上忙的,一定告诉我!’<br>宋玉说:“没什么,能扛得住!”</p><p>我说:“别那么拼命,身体最重要!”<br>宋玉冷笑一声:“拿命去拼,是因为没别的可拼,这不是你说的吗?谁不是不顾一切的活着!”</p><p>我茫然无措,只好选择默默离开,其实我很想对他说:<br>“你也有种,一定要好好活着!”</p><p>人生就是这样,苦难就像九道弯的胡同里随时跳出来的小混混一样,有时一个耳光接着一个耳光的抽你,有时忽然一脚把你踹在地上。</p><p><strong>9</strong></p><p>8月,台风“海葵”在宁波登陆,我被困在栎社机场的候机厅,过了11点钟,延误的航班没有丝毫消息。我在手机通讯录里不断的翻看着宋玉的名字,仿佛手指轻点一下,就能联通到他的世界。</p><p>就在几个小时前,我接到了燕子的电话。她告诉我宋玉出事了。</p><p>机场外,风很大,大雨瓢泼而下,而我始终没有拨出号码。</p><p>我赶回老家时,宋玉已经被安排下葬。人生匆匆,我竟赶不上见他最后一面。<br>据说那段日子,宋玉为了多赚点钱,经常连夜赶路。出事的那一天,他车子坏在了高速公路上,虽然他支起了三脚架,可惜那晚的视线太过模糊。后面的卡车发现路障时已经来不及反应,直接将他撞在前面卡车的翻斗上。</p><p>亲朋散尽,在宋玉老家的最后一个下午,我和蒋一燕一起整理着他的遗物。</p><p>我在书架上发现了一副被压的很平整的油彩画。</p><p><strong>画上有高大的白杨树和五色的月季花,蓝天下,并排飞翔着三只小燕子,手拉手一般,围成一个半圆。</strong></p><p>吴小云在傍晚打来电话问我几时可以回去?<br>蒋一燕倚在窗边,淡淡说,回吧,我会坚强的。</p><p>我恍然想起来,在多年前的那个黄昏,在那个被拉长的美丽的背影后,蒋一燕忽然在家门前转过身来,她破涕而笑,用婉转的声音说到:<br>“我很好,谢谢你们!”</p><p>九道弯的胡同虽然很长,而我们终究能走出来。</p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>8月,台风“海葵”在宁波登陆,我被困在栎社机场的候机厅,过了11点钟,延误的航班没有丝毫消息。我在手机通讯录里不断的翻看着宋玉的名字,仿佛手指轻点一下,就能联通到他的世界。</p>
<p>风很大,大雨瓢泼而下,而我始终没有点动它。</p></summary>
<category term="转载" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/"/>
<category term="学习" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/%E5%AD%A6%E4%B9%A0/"/>
<category term="小小说" scheme="https://blog.leafminer.cn/tags/%E5%B0%8F%E5%B0%8F%E8%AF%B4/"/>
<category term="转载" scheme="https://blog.leafminer.cn/tags/%E8%BD%AC%E8%BD%BD/"/>
<category term="故事" scheme="https://blog.leafminer.cn/tags/%E6%95%85%E4%BA%8B/"/>
<category term="活着" scheme="https://blog.leafminer.cn/tags/%E6%B4%BB%E7%9D%80/"/>
<category term="拼命" scheme="https://blog.leafminer.cn/tags/%E6%8B%BC%E5%91%BD/"/>
</entry>
<entry>
<title>你是你坚强的后盾 | 里则林</title>
<link href="https://blog.leafminer.cn/2024/11/25/8c414ce66bf7/"/>
<id>https://blog.leafminer.cn/2024/11/25/8c414ce66bf7/</id>
<published>2024-11-25T02:38:33.000Z</published>
<updated>2024-11-26T01:04:51.982Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>很多时候无须在乎天空的阴霾,因为你就是你自己的太阳。</p><p>小时候我特别害怕过马路,因为有一年家里一个保姆带着我过马路去公园玩,当时她看到一辆面包车疾驰而来,她一紧张,就甩开我那正紧握着她的手,自己跑了。我张着嘴傻愣在原地,然后听到轮胎剧烈摩擦马路的声音,虽然车最终在我面前刹住了,但我还是被吓晕了。</p><span id="more"></span><p>昏迷中我只知道我被人抱起,然后就什么都不记得了。从此以后我患上了马路恐惧症。那些年,很多人行道上没有红绿灯,所以只要旁边没人一起过马路,我就会一直站到有人为止。</p><p>后来朋友们发现了我这个特点,经常在过马路到中间的时候,集体跑掉。我站在路中间,挣扎一会,然后掉头回去,虽然走到对面和回头的距离基本上是一样的,但是我就是接受不了我居然可以一个人从马路这头走到那头。</p><p>朋友们笑完以后,又会从对面无奈地走回来,再带我过一次马路。</p><p>我总极力做一些事情掩饰心里的懦弱。</p><p>二年级的时候,体育课上有一条小蛇从草丛里爬了出来,一大群小伙伴作鸟兽散,我站在原地,思考了一下,然后冲上去对着那条蛇踩了十几二十脚,整条蛇被踩成了蛇干。大家都为我鼓掌,但我一点得意的感觉都没有,因为我不敢一个人过马路。</p><p>三年级的时候,小伙伴们都在讨论青蛙好恶心,打赌谁敢抓一只青蛙放在自己手掌上,此时我默默地从草丛里出来,看着大家,然后从裤袋里掏出一只癞蛤蟆。小伙伴们又作鸟兽散。但我仍然没有觉得自己有多牛,因为我不敢一个人过马路。</p><p>也许很多人都不相信,但这的确成了我童年比较大的一个困扰,夜深人静时看着窗外,我会觉得很羞愧。为什么我一个男孩子,却不敢一个人过马路?</p><p>直到五年级,每次过马路,朋友们都挤眉弄眼地互相递着眼色,机智的我早已看穿,于是我绕道走人行天桥……</p><p>后来我养成了一个坏习惯,跟朋友们一起走在路上,为了防止要过马路,我会拉着前面一个人的衣服。他一路扯着我走,会不爽地转过头来问我干吗,我告诉他,别问。</p><p>我曾无数次在吃完饭后,走到楼下,看着面前车来车往的马路,深吸一口气,下定决心今天要走过去,然后勇敢地踏出第一步,接着会下意识地一个转身,回到原地。这时心里就会非常失落,那种失落,我直到今天都记忆犹新。</p><p>直到后来我生了场大病。住院一个月,有几天要在手上扎十多个备用针孔,然后把针头留在手上,用胶布粘着。那是我无法理解的一种医疗方式,因为直到最后那些针孔也没用上。至于是什么病,最后医生也没搞清楚。只是每天发烧、呕吐,我以为我活不长了,心里顿时比过不了马路还失落。</p><p>在一个午后,一个护士姐姐又来给我打针,我有点紧张,护士姐姐问我:“妈妈呢?”我说出去还没回来。护士看着我满手的针孔,有点痛心,问我疼吗。我说扎的时候疼。然后护士莫名其妙地对我说了一句:“很坚强啊,小朋友,你真是你自己坚强的后盾。”</p><p>我烧得头昏脑涨,听不太懂这句话,我对着护士不解地“啊”了一声。</p><p>她又耐心地重复:“我说,你是你自己坚强的后盾!”然后我看着她默默地给我打完一针,目送她离开。</p><p>那天傍晚,我走出病房,看着医院门口的一条大马路。我走到斑马线前,看了看对面,又看了看满手的针孔,心里反复默念着一句“你是你坚强的后盾……”</p><p>然后深吸一口气,径直往前走;中途有车,我就在马路中间停了下来,车过了,我又继续走,几秒钟后走到了对面。我抬头看着正前方的医院大门,接着又走了回去。最后盯着眼前的大马路,我不禁大哭起来,感觉许多年的压抑和挣扎都释怀了。我再也不是一个不敢独自过马路的男孩子了。</p><p>第二天,我的烧退了,也不吐了,下午就出院了。没有人知道为什么突然就好了,更没有人知道我竟然会因为害怕一个人过马路,纠结了半个童年。</p><p>从那天以后,我也不会再抓一些恶心的小动物在手里,就为显示自己胆子很大;现在想起来,无法直面心中的恐惧,反而会越逞强就越显得懦弱。</p><p>以后的日子偶尔害怕紧张的时候,我会想,现在有比小时候一个人站在马路中央的感觉更可怕吗?然后我就放松了许多。</p><p>真正的坚强也许并非刀枪不入,永远不会受任何伤害,而是被伤害以后,仍能直面内心最大的恐惧并走出阴影,做一个坚强的人。</p><p>所以这个荒诞到难以想象的故事,总是在我变得懦弱的时候连同那句“你是你坚强的后盾”一起,跳进我的脑海。</p><p>许多年以后,一个夜里,我坐在窗边给杂志写稿子,快写完的时候,脚抖了几下,把电源踢掉了,写的东西全没了;然后我整理了一下情绪,又继续写,写到一半,停电了。我整个人就崩溃了,眼泪都要气出来了。过了一会,我拿起手机,想给编辑发短信说这稿子我可能交不了了。正犹豫要不要发送的时候,看了一眼窗外,楼下就是一条大马路。</p><p>我忍不住想起了那段荒诞的往事,想起曾经那个仅仅是因为终于自己过了一次马路而感慨得大哭的孩子,心里顿时豁然开朗。我想,这个时候没有人能帮你,也许以后你还会遇到更多只能自己过的马路,所以你必须写完它。</p><p>后来我写完的时候,天都亮了。那篇文章,就是《生活的样子》,它是《一生中落的雪,我们不能全部看见》的初稿。后来通过这篇文章,我非常幸运地被一些人知道,后来有出版社说要找我出书,我也因此有机会去自己最感兴趣的地方实习。</p><p>回到许多年前,如果我没有多问护士姐姐一句,然后把那句话深刻地记在心里,没有念念不忘地无数次去直面一条对我来说仿佛没有尽头的马路,我想在那个夜晚,我一定还会习惯性地懦弱,放弃完成那篇稿子,那么我现在可能拥有完全不一样的生活轨迹。</p><p>人不会太孤单,但许多路,你可能需要自己走。但是没关系,因为你是你坚强的后盾。</p><hr></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>很多时候无须在乎天空的阴霾,因为你就是你自己的太阳。</p>
<p>小时候我特别害怕过马路,因为有一年家里一个保姆带着我过马路去公园玩,当时她看到一辆面包车疾驰而来,她一紧张,就甩开我那正紧握着她的手,自己跑了。我张着嘴傻愣在原地,然后听到轮胎剧烈摩擦马路的声音,虽然车最终在我面前刹住了,但我还是被吓晕了。</p></summary>
<category term="转载" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/"/>
<category term="学习" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/%E5%AD%A6%E4%B9%A0/"/>
<category term="小小说" scheme="https://blog.leafminer.cn/tags/%E5%B0%8F%E5%B0%8F%E8%AF%B4/"/>
<category term="转载" scheme="https://blog.leafminer.cn/tags/%E8%BD%AC%E8%BD%BD/"/>
<category term="后盾" scheme="https://blog.leafminer.cn/tags/%E5%90%8E%E7%9B%BE/"/>
<category term="恐惧" scheme="https://blog.leafminer.cn/tags/%E6%81%90%E6%83%A7/"/>
<category term="故事" scheme="https://blog.leafminer.cn/tags/%E6%95%85%E4%BA%8B/"/>
</entry>
<entry>
<title>再哭一点点 | 琦君</title>
<link href="https://blog.leafminer.cn/2024/11/25/dba14e18fae5/"/>
<id>https://blog.leafminer.cn/2024/11/25/dba14e18fae5/</id>
<published>2024-11-25T02:27:05.000Z</published>
<updated>2024-11-25T02:30:35.249Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><script class="meting-secondary-script-marker" src="\assets\js\Meting.min.js"></script><div id="vip-container"><p>妹妹从美国加州打电话来,悲泣着告知,她久病的老伴走了。她勉强忍住呜咽说:“他走得很安详,没有一点痛苦,我服侍他这些年,也安心了。姐,这就是人生啊!”我捏着话筒,只颤声地说:“你要多多保重,路途遥远,我为风湿所苦,无法去陪伴你。”第二天,我很不放心地打电话去问她情况。她平静地说:“一切都安排好了。孩子们都已经回到我身边,倒是觉得家里比以前热闹些。我已经想开了,姐姐千万不要为我挂心。”<br>从那天开始,抢劫杀人放火的念头,我每天都有的。</p><span id="more"></span> <p>她转以轻松的语调继续说:“我在忙着照顾两岁的孙儿,他真是可爱又调皮,他妈妈打了他两下屁股,他就坐在地上一直哭,不肯起来。我搂着他说:‘宝宝不要哭嘛,你哭得奶奶好心烦。’他抹着鼻涕眼泪说:‘哦,我不想哭,但是我忍不住呀,奶奶,让我再哭一点点好吗?’我听得好心酸,想想我和老伴相依相守这一辈子,如今他先走了。我生怕小辈们不放心,不得不忍住眼泪,但我也真想再哭一点点啊!”</p><p>我默默地听着,止不住泪水涔涔而下。想起妹妹幼年时,胖嘟嘟的,穿一身红花布衫裤,人见人爱。父亲病危时,全家人心情慌乱,没好好照顾她,她只好一个人在院子里寂寞地玩皮球。看见我这个比她大十六岁的姐姐走近她时,马上张开双臂喊:“姐姐,抱抱。”父亲逝世的那一刻,母亲抱她到床边,她哭着喊:“爸爸,爸爸为什么不理我?我要吃爸爸的奶油饼干。”家人为她脱去红花衫裤,换上素服,她又哭闹着:“我要穿红花衫裤,爸爸说我好漂亮。”</p><p>岁月已逝去半个多世纪,穿红花衫裤的胖女娃,如今已是拥抱孙儿的祖母了。</p><p>想起悠悠往事,我也怎忍得住不再哭一点点呢?</p></div><script src="https://my.openwrite.cn/js/readmore.js" type="text/javascript"></script><script>var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);if (!isMobile) { var btw = new BTWPlugin(); btw.init({ "id": "vip-container", "blogId": "33502-1730425843713-524", "name": "虫子的生存笔记", "qrcode": "https://leaf-miner.pages.dev/image/%E5%85%AC%E4%BC%97%E5%8F%B7.png", "keyword": "more" });}</script>]]></content>
<summary type="html"><p>妹妹从美国加州打电话来,悲泣着告知,她久病的老伴走了。她勉强忍住呜咽说:“他走得很安详,没有一点痛苦,我服侍他这些年,也安心了。姐,这就是人生啊!”我捏着话筒,只颤声地说:“你要多多保重,路途遥远,我为风湿所苦,无法去陪伴你。”第二天,我很不放心地打电话去问她情况。她平静地说:“一切都安排好了。孩子们都已经回到我身边,倒是觉得家里比以前热闹些。我已经想开了,姐姐千万不要为我挂心。”<br>
从那天开始,抢劫杀人放火的念头,我每天都有的。</p></summary>
<category term="转载" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/"/>
<category term="学习" scheme="https://blog.leafminer.cn/categories/%E8%BD%AC%E8%BD%BD/%E5%AD%A6%E4%B9%A0/"/>
<category term="小小说" scheme="https://blog.leafminer.cn/tags/%E5%B0%8F%E5%B0%8F%E8%AF%B4/"/>
<category term="转载" scheme="https://blog.leafminer.cn/tags/%E8%BD%AC%E8%BD%BD/"/>
<category term="故事" scheme="https://blog.leafminer.cn/tags/%E6%95%85%E4%BA%8B/"/>
<category term="死亡" scheme="https://blog.leafminer.cn/tags/%E6%AD%BB%E4%BA%A1/"/>
<category term="往事" scheme="https://blog.leafminer.cn/tags/%E5%BE%80%E4%BA%8B/"/>
</entry>
</feed>