Skip to contents

这个函数用于执行coloc.abf()共定位分析并绘图。

Usage

coloc_abf(
  exposure_dat,
  outcome_dat,
  type_exposure = "quant",
  col_pvalues_exposure = "pval",
  col_N_exposure = "N",
  col_MAF_exposure = "MAF",
  col_beta_exposure = "beta",
  col_se_exposure = "se",
  col_snp_exposure = "SNP",
  col_chr_exposure = "CHR",
  col_pos_exposure = "BP",
  prevalence_exposure = NA,
  type_outcome = "cc",
  col_pvalues_outcome = "pval",
  col_N_outcome = "samplesize",
  col_MAF_outcome = NA,
  col_beta_outcome = "beta",
  col_se_outcome = "se",
  col_snp_outcome = "SNP",
  prevalence_outcome = NA,
  save_stacked_dat = FALSE,
  build = 38,
  save_locus = FALSE,
  title1 = "xQTL",
  title2 = "GWAS",
  width = 8,
  height = 5,
  plot_pdf = "locuscompare",
  save_path = "./"
)

Arguments

exposure_dat

暴露数据或GWAS文件路径。非R包内置xQTL数据,可使用xQTL_cis_dat()函数转换获取。

outcome_dat

结局数据或GWAS文件路径。建议使用标准的TwosampleMR格式结局数据。

type_exposure

暴露数据GWAS类型,"quant"或"cc","quant"表示连续型数据,"cc"表示二分类型数据,默认为"quant"。

col_pvalues_exposure

必填,暴露数据GWAS中p值所在的列的名称,默认为"pval"。

col_N_exposure

必填,暴露数据GWAS中样本量所在的列的名称,默认为"N"。

col_MAF_exposure

必填,暴露数据GWAS中次要等位基因频率所在的列的名称,默认为"MAF"。

col_beta_exposure

必填,暴露数据GWAS中beta系数所在的列的名称,默认为"beta"。

col_se_exposure

必填,暴露数据GWAS中标准误差所在的列的名称,默认为"se"。

col_snp_exposure

必填,暴露数据GWAS中SNP标识所在的列的名称,默认为"SNP"。

col_chr_exposure

非必填,'save_stacked_dat=TRUE'时,需填写暴露数据GWAS中chr标识所在的列的名称,默认为"CHR"。

col_pos_exposure

非必填,'save_stacked_dat=TRUE'时,需填写暴露数据GWAS中pos标识所在的列的名称,默认为"BP"。

prevalence_exposure

暴露数据的患病率,默认为NA。暴露数据为二分类型数据时填写。

type_outcome

结局数据GWAS的类型,"quant"或"cc","quant"表示连续型数据,"cc"表示二分类型数据。默认为"cc"。

col_pvalues_outcome

必填,结局数据GWAS中p值所在的列的名称,默认为"pval"。

col_N_outcome

必填,结局数据GWAS中样本大小所在的列的名称,默认为"samplesize"。

col_MAF_outcome

非必填,结局数据GWAS中最小等位基因频率所在的列的名称,默认NA。

col_beta_outcome

必填,结局数据GWAS中beta系数所在的列的名称,默认为"beta"。

col_se_outcome

必填,结局数据GWAS中标准误差所在的列的名称,默认为"se"。

col_snp_outcome

必填,结局数据GWAS中SNP标识所在的列的名称,默认为"SNP"。

prevalence_outcome

结局数据的患病率,默认为NA。

save_stacked_dat

TRUE或FALSE,是否返回基因组区域stack_assoc_plot图数据,默认为FALSE,如果TRUE,则返回assoc、SigSNP数据。

build

37或38,人类参考基因组版本,默认38。

save_locus

TRUE或FALSE,是否保存locuscomparer作图,默认为FALSE。

title1

xQTL图的标题。

title2

GWAS图的标题。

width

图形宽度。

height

图形高度。

plot_pdf

保存的pdf图形文件名,默认locuscompare。

save_path

图形文件保存路径,默认"./"。

Value

共定位分析结果。