当前位置: 首页 > article >正文

dnaMethyAge包学习笔记

 1.introduction

      许多对甲基化年龄进行计算的文章都是采用网站实现计算的,能够实现对甲基化年龄的计算的R包相对比较少,其中应用最广的是dnaMethyAge包。作者本想寻找能够计算Grimage和Grimage2的R包,奈何没有寻找到,因此只能记录一下能够计算其他许多甲基化年龄的R包dnaMethyAge的学习笔记。

2.example

#安装和加载R包dnaMethyAge
devtools::install_github("yiluyucheng/dnaMethyAge")
library('dnaMethyAge')

## prepare betas dataframe
data('subGSE174422') ## load example betas,>=0.6,<=0.2
#                 GSM5310260_3999979009_R02C02 GSM5310261_3999979017_R05C01
#cg00000029                               0.29                         0.31
#cg00000108                               0.84                         0.83
#cg00000109                               0.74                         0.70
#cg00000165                               0.09                         0.09
#cg00000236                               0.55                         0.55
#cg00000289                               0.53                         0.43
#cg00000292                               0.70                         0.67
#cg00000321                               0.12                         0.14
#cg00000363                               0.24                         0.20
#cg00000622                               0.03                         0.03
availableClock()#List all supported clocks
# [1] "HannumG2013"    "HorvathS2013"   "LevineM2018"    "ZhangQ2019"    
# [5] "ShirebyG2020"   "YangZ2016"      "ZhangY2017"     "LuA2019"       
# [9] "HorvathS2018"   "DunedinPACE"    "McEwenL2019"    "CBL_specific"  
#[13] "PCGrimAge"      "PCHorvathS2013" "PCHannumG2013"  "PCHorvathS2018"
#[17] "PCPhenoAge"     "CBL_common"     "Cortex_common"  "epiTOC2"       
#[21] "BernabeuE2023c" "LuA2023p1"      "LuA2023p2"      "LuA2023p3"  
#设置想计算的甲基化时钟
clock_name <- 'HorvathS2013'
#计算Horvath2013
horvath_age <- methyAge(betas, clock=clock_name)
print(horvath_age)
#                        Sample     mAge
#1 GSM5310260_3999979009_R02C02 74.88139
#2 GSM5310261_3999979017_R05C01 62.36400
#3 GSM5310262_3999979018_R02C02 68.04759
#4 GSM5310263_3999979022_R02C01 61.62691
#5 GSM5310264_3999979027_R02C01 59.65161
#6 GSM5310265_3999979028_R01C01 60.95991
#7 GSM5310266_3999979029_R04C02 52.48954
#8 GSM5310267_3999979031_R06C02 64.29711

        还能通过纳入age年龄计算得到age acceleration。

print(info)
#                        Sample  Age    Sex
#1 GSM5310260_3999979009_R02C02 68.8 Female
#2 GSM5310261_3999979017_R05C01 45.6 Female
#3 GSM5310262_3999979018_R02C02 67.4 Female
#4 GSM5310263_3999979022_R02C01 45.6 Female
#5 GSM5310264_3999979027_R02C01 62.5 Female
#6 GSM5310265_3999979028_R01C01 45.1 Female
#7 GSM5310266_3999979029_R04C02 53.2 Female
#8 GSM5310267_3999979031_R06C02 63.8 Female
horvath_age <- methyAge(betas, clock=clock_name, age_info=info, fit_method='Linear', do_plot=TRUE)
print(horvath_age)
#                        Sample  Age    Sex     mAge Age_Acceleration
#1 GSM5310260_3999979009_R02C02 68.8 Female 74.88139         7.334461
#2 GSM5310261_3999979017_R05C01 45.6 Female 62.36400         3.318402
#3 GSM5310262_3999979018_R02C02 67.4 Female 68.04759         1.013670
#4 GSM5310263_3999979022_R02C01 45.6 Female 61.62691         2.581311
#5 GSM5310264_3999979027_R02C01 62.5 Female 59.65161        -5.586763
#6 GSM5310265_3999979028_R01C01 45.1 Female 60.95991         2.097534
#7 GSM5310266_3999979029_R04C02 53.2 Female 52.48954        -9.340977
#8 GSM5310267_3999979031_R06C02 63.8 Female 64.29711        -1.417638

 参数"do_plot=TRUE"能生成methyage和age的散点图


http://www.kler.cn/a/399677.html

相关文章:

  • springboot第82集:消息队列kafka,kafka-map
  • 小程序-基于java+SpringBoot+Vue的驾校预约平台设计与实现
  • 代码段数据段的划分
  • 【阅读记录-章节1】Build a Large Language Model (From Scratch)
  • 【STL】set,multiset,map,multimap的介绍以及使用
  • RT-Thread 星火1号学习笔记
  • nodejs入门(1):nodejs的前后端分离
  • ✅DAY27贪心算法 | 455.分发饼干 | 376. 摆动序列 | 53. 最大子序和
  • 认证鉴权框架SpringSecurity-6--6.x版本升级篇
  • IQ Offset之工厂实例分析
  • 一文简单了解Android中的input流程
  • QT5.14*解决QSslSocket::connectToHostEncrypted: TLS initialization faile
  • 网络常用特殊地址-127.0.0.1
  • SRP 实现 Cook-Torrance BRDF
  • 网络物理隔离技术
  • 一文了解清楚oracle数据库undo表空间
  • 前端人之网络通信概述
  • 重构Action-cli前端脚手架
  • 【jvm】如何判断一个对象是否可以回收
  • 力扣经典面试题
  • 【原创】java+ssm+mysql商品库存管理系统(进销存)设计与实现
  • Springboot如何打包部署服务器
  • matlab的函数名和函数文件名的关系(编程注意事项)
  • 深入解析 Vue 3 中的 watch 和 watchEffect
  • 基于Lora通讯加STM32空气质量检测WIFI通讯
  • 一个简单的图像分类项目(九)并行训练的学习:多GPU的DP(DataParallel数据并行)