对 GWAS 基因组版本转换以适配 MetaXcan 分析
MetaXcan_Harmonization.Rd
该函数用于对 GWAS 结果文件进行标准化处理,包括基因组坐标转换、SNP 信息对齐以及格式调整,以适配 MetaXcan 工具进行后续分析, 详见:https://github.com/hakyimlab/MetaXcan/wiki/Tutorial:-GTEx-v8-MASH-models-integration-with-a-Coronary-Artery-Disease-GWAS
Usage
MetaXcan_Harmonization(
gwas_file = "./XXX_MTAG.txt",
liftover = "./hg19ToHg38.over.chain.gz",
snp_reference_metadata = "./reference_panel_1000G/variant_metadata.txt.gz",
snp_col = "SNP",
chr_col = "CHR",
pos_col = "BP",
beta_col = "beta",
se_col = "se",
eaf_col = "eaf",
effect_allele_col = "effect_allele",
other_allele_col = "other_allele",
pval_col = "pval",
samplesize_col = "N",
ncase = 5000,
opt_arguments = NULL,
save_name = "bmi_MTAG",
save_path = "./"
)
Arguments
- gwas_file
字符串,GWAS 结果文件的路径(默认为"./XXX_MTAG.txt")。
- liftover
字符串,基因组坐标转换的链文件路径(默认为"./hg19ToHg38.over.chain.gz")。
- snp_reference_metadata
字符串,SNP 参考数据文件路径。
- snp_col
字符串,GWAS 结果文件中 SNP 标识符的列名(默认 "SNP")。
- chr_col
字符串,GWAS 结果文件中染色体编号的列名(默认 "CHR")。
- pos_col
字符串,GWAS 结果文件中 SNP 物理位置(碱基对位置)的列名(默认 "BP")。
- beta_col
字符串,GWAS 结果文件中效应值(回归系数 β)的列名(默认 "beta")。
- se_col
字符串,GWAS 结果文件中标准误(standard error)的列名(默认 "se")。
- eaf_col
字符串,GWAS 结果文件中效应等位基因频率(effect allele frequency, EAF)的列名(默认 "eaf")。
- effect_allele_col
字符串,GWAS 结果文件中效应等位基因的列名(默认 "effect_allele")。
- other_allele_col
字符串,GWAS 结果文件中非效应等位基因的列名(默认 "other_allele")。
- pval_col
字符串,GWAS 结果文件中 P 值的列名(默认 "pval")。
- samplesize_col
字符串,GWAS 结果文件中样本量的列名(默认 "N")。
- ncase
数值,二分类GWAS数据中的病例数量;连续型GWAS数据设置为NULL。
- opt_arguments
字符串,额外的可选参数(默认为 NULL)。
- save_name
字符串,输出文件的名称。
- save_path
字符串,输出文件的存储路径(默认 "./")。如果路径不存在,则会自动创建。