Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use GWAS digital covariates

Shulou Source: shulou.com Published: 2022-06-01 03:06:20 09月26日 Update

Today, I would like to share with you the relevant knowledge of how to use GWAS digital covariates. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

1. Covariant file arrangement

The first column is FID, the second column is ID, and the third column is a covariant (note that it can only be numbers, not characters! )

Here the covariable file is:

[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

Here, the third is gender and the fourth is generation. In order to facilitate operation, we take generation as numerical value and analyze covariates directly.

two。 Digital covariable awk'{print $1 cov.txt > cov1.txt

The data are as follows:

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 analysis of LM model with numerical covariates

"Code:"

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

"Log:"

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.

"result file:" re.assoc.linear

"result Preview:"

Insert a picture description here

The result here includes the test of the covariate. we do not need to output the covariable result, we can add the parameter:-- hide-covar

4. Use R language to compare results with 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 + M7room1Magna dataSecretdd)

Summary (mod_M7)

Mod_M9 = lm (phe.V3 ~ cov.V4 + M9001); summary (mod_M9)

M7 plus numerical covariates:

M9 plus numerical covariates:

The results are exactly the same.

These are all the contents of this article entitled "how to use GWAS Digital Covariates". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Tags: Variables results numbers values knowledge articles files generations content analysis different large consistent code parameters pictures most characters that is gender Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Shulou Technology MariaDB Apple Microsoft