基於 MAGMA 的 gene-based 關聯分析研究

以前已經寫過兩篇gene-based 關聯分析研究,感興趣翻往期推文:app

基於GCTA的gene-based關聯分析研究
使用VEGAS2(Versatile Gene-based Association Study)進行gene based的研究ui

今日再介紹第三款軟件:MAGMAthis

跟前面的兩款軟件比起來,MAGMA 使用比較簡單。3d

下面簡要介紹基於 MAGMA 的 gene-based 關聯分析研究。code

1. 下載、安裝 MAGMA

wget https://ctg.cncr.nl/software/MAGMA/prog/magma_v1.09.zip
unzip magma_v1.09.zip

2. 下載公共數據

# 下載基因位置文件NCBI37.3.gene.loc
wget https://ctg.cncr.nl/software/MAGMA/aux_files/NCBI37.3.zip
unzip NCBI37.3.zip

# 下載參考人羣g1000_eur
wget https://ctg.cncr.nl/software/MAGMA/ref_data/g1000_eur.zip
unzip g1000_eur.zip

注意: 本推文使用的基因組版本是hg19(build 37)、參考人羣選用歐洲人羣,請各位根據本身研究的實際狀況修改;component

基因位置文件NCBI37.3.gene.loc以下所示:blog

參考人羣g1000_eur以下所示:ip

3. 準備輸入文件

到這裏,纔是本身須要準備的文件,前面的文件所有是經過公共數據得到。
輸入文件的格式同VEGAS2GCTA,只須要 GWAS 結果的 P 值和 SNP id 便可
輸入文件snpp包括兩列,第一列是SNP的ID,第二列是SNP的P值;
輸入文件snpp以下所示:ci

4. 開始分析

4.1 step1: 基因註釋

輸入命令:get

magma --annotate --snp-loc g1000_eur.bim --gene-loc NCBI37.3.gene.loc --out g1000_eur

g1000_eur.bimNCBI37.3.gene.loc文件經過前面的第二個步驟得到;

該步驟生成g1000_eur.genes.annot結果文件:

4.2 step2: gene-based 關聯分析

輸入命令:

magma --bfile g1000_eur --pval snpp N=401670 --gene-annot g1000_eur.genes.annot --out genebased

g1000_eur文件經過前面的第二個步驟得到;
snpp文件經過前面的第三個步驟得到;
g1000_eur.genes.annot文件經過 4.1 步驟得到;
N指的是研究的樣本量;

執行以上命令後,生成兩個文件:g1000_eur.genes.outg1000_eur.genes.raw

g1000_eur.genes.out即爲gene-based 關聯分析結果:

gene-based 關聯分析結果的釋義以下所示:

• GENE: the gene ID as specified in the annotation file
• CHR: the chromosome the gene is on
• START/STOP: the annotation boundaries of the gene on that chromosome (this includes any window around the gene applied during annotation)
• NSNPS: the number of SNPs annotated to that gene that were found in the data and were not excluded based on internal SNP QC
• NPARAM: the number of relevant parameters used in the model. For the SNP-wise models this is an approximate value; for the principal components regression (raw data default) this is set to the number of principal components retained after pruning; for the multimodels this is the mean NPARAM value of the component base models
• N: the sample size used when analysing that gene; can differ for allosomal chromosomes or when analysing SNP p-value input with variable sample size by SNP (due to missingness or differences in coverage in meta-analysis)
• ZSTAT: the Z-value for the gene, based on its (permutation) p-value; this is what is used as the measure of gene association in the gene-level analyses
• P: the gene p-value

生成的另一個文件g1000_eur.genes.raw以下所示:

該文件可用於後續的 gene-set 分析。


gene-based 關聯分析研究就介紹到這啦~
祝各位生活愉快~

相關文章
相關標籤/搜索