温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

GWAS数字协变量怎么用

发布时间:2022-01-14 16:11:42 来源:亿速云 阅读:147 作者:iii 栏目:大数据

今天小编给大家分享一下GWAS数字协变量怎么用的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。

1. 协变量文件整理

第一列为FID 第二列为ID 第三列以后为协变量(注意,只能是数字,不能是字符!)

这里协变量文件为:

[dengfei@ny 03_linear_cov]$ head cov.txt 
1061 1061 F 3
1062 1062 M 3
1063 1063 F 3
1064 1064 F 3
1065 1065 F 3
1066 1066 F 3
1067 1067 F 3
1068 1068 M 3
1069 1069 M 3
1070 1070 M 3

 

这里第三列为性别,第四列为世代,为了方便操作,我们将世代作为数值,直接进行协变量分析

 

2. 数字协变量

awk '{print $1,$2,$4}' cov.txt >cov1.txt 

 

数据如下:

1061 1061 3
1062 1062 3
1063 1063 3
1064 1064 3
1065 1065 3
1066 1066 3
1067 1067 3
1068 1068 3
1069 1069 3
1070 1070 3

   

3. 进行数值协变量GWAS分析LM模型

「代码:」

plink --file b --pheno phe.txt --allow-no-sex --linear --covar cov1.txt --out re

 

「日志:」

PLINK v1.90b5.3 64-bit (21 Feb 2018)           www.cog-genomics.org/plink/1.9/
(C) 2005-2018 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to re.log.
Options in effect:
  --allow-no-sex
  --covar cov1.txt
  --file b
  --linear
  --out re
  --pheno phe.txt

515199 MB RAM detected; reserving 257599 MB for main workspace.
.ped scan complete (for binary autoconversion).
Performing single-pass .bed write (10000 variants, 1500 people).
--file: re-temporary.bed + re-temporary.bim + re-temporary.fam written.
10000 variants loaded from .bim file.
1500 people (0 males, 0 females, 1500 ambiguous) loaded from .fam.
Ambiguous sex IDs written to re.nosex .
1500 phenotype values present after --pheno.
Using 1 thread (no multithreaded calculations invoked).
--covar: 1 covariate loaded.
Before main variant filters, 1500 founders and 0 nonfounders present.
Calculating allele frequencies... done.
10000 variants and 1500 people pass filters and QC.
Phenotype data is quantitative.
Writing linear model association results to re.assoc.linear ... done.

 

「结果文件:」re.assoc.linear

「结果预览:」

GWAS数字协变量怎么用  
在这里插入图片描述

这里的结果包括协变量的检验,我们不需要输出协变量结果,可以加上参数:--hide-covarGWAS数字协变量怎么用

 

4. 使用R语言进行结果比较

library(data.table)
geno = fread("c.raw")
geno[1:10,1:10]
phe = fread("phe.txt")
cov = fread("cov.txt")
dd = data.frame(phe$V3,cov$V4,geno[,7:20])
head(dd)
str(dd)
mod_M7 = lm(phe.V3 ~ cov.V4 + M7_1,data=dd)
summary(mod_M7)
mod_M9 = lm(phe.V3 ~ cov.V4 + M9_1,data=dd);summary(mod_M9)

 

M7加上数值协变量结果:

GWAS数字协变量怎么用

M9加上数值协变量结果:

GWAS数字协变量怎么用

结果完全一致。

以上就是“GWAS数字协变量怎么用”这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注亿速云行业资讯频道。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI