factcircuit
FactCircuit는 불변 출처와 단계별 검증, 제한된 검색, 재현 가능한 평가를 제공하는 감사 가능한 주장·증거 검증 루프입니다
targets 프레임워크를 이용해 재현 가능한 다코호트 GWAS 메타분석 파이프라인을 구축하는 함수 모음입니다
Functions for building reproducible multi-cohort GWAS meta-analysis pipelines using the targets framework. Supports binary and quantitative traits with LDSC intercept correction, IVW meta-analysis, lo
데이터RGitHub @mglev1n온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기GWAS meta-analysis pipeline functions
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
gwastargets provides a suite of functions for building reproducible multi-cohort GWAS meta-analysis pipelines using the targets framework. It supports both binary (case/control) and quantitative traits and handles the full workflow from raw summary statistics through meta-analysis and downstream quality-control.
The package is organized around two complementary use cases:
1. Generating a targets pipeline — given a cohort manifest and trait metadata, produce the complete _targets.R code for a reproducible analysis:README 전문 보기 ↗gwastargets provides a suite of functions for building reproducible multi-cohort GWAS meta-analysis pipelines using the targets framework. It supports both binary (case/control) and quantitative traits and handles the full workflow from raw summary statistics through meta-analysis and downstream quality-control.
# install.packages("pak")
pak::pkg_install("mglev1n/gwastargets")
The package is organized around two complementary use cases:
1. Generating a targets pipeline — given a cohort manifest and trait metadata, produce the complete _targets.R code for a reproducible analysis:
library(gwastargets)
manifest <- data.frame(
path = c("/data/UKBB_EUR.txt.gz", "/data/MVP_AFR.txt.gz", "/data/BBJ_EAS.txt.gz"),
file = c("UKBB_EUR.txt.gz", "MVP_AFR.txt.gz", "BBJ_EAS.txt.gz"),
cohort = c("UKBB", "MVP", "BBJ"),
ancestry = c("EUR", "AFR", "EAS"),
study = c("UKBB_EUR", "MVP_AFR", "BBJ_EAS"),
stringsAsFactors = FALSE
)
code <- generate_gwas_meta_pipeline(
trait = "CAD",
trait_type = "binary",
n_col = "EffectiveN",
manifest_df = manifest
)
cat(code)
2. Using the pipeline functions directly — each stage is available as a standalone exported function for interactive use or integration into existing workflows:
| Function | Purpose |
|---|---|
prep_gwas() | Clean, harmonize, and LDSC-correct one cohort's summary statistics |
summarize_sumstats() | Per-cohort QC summary (N, MAF range, median SE, precision) |
meta_analyze_ivw() | Fixed-effects IVW meta-analysis across cohorts |
extract_loci() | Clump significant variants into independent loci with gene annotation |
extract_common_variants() | Identify variants present across all studies (for MR-MEGA) |
calculate_mr_mega_mds() | Compute MR-MEGA MDS coordinates from cross-cohort effect estimates |
snp_match_munge() | Match summary statistics to a reference panel and munge for LDSC |
harmonize_sumstats_headers() | Standardize column names across GWAS file formats |
Raw summary stats (per cohort)
│
▼
prep_gwas() ← clean, match HM3, LDSC intercept correction
│
├──── ldsc_h2() per-cohort heritability (via ldscr)
│
├──── summarize_sumstats() per-cohort QC table
│
├──── meta_analyze_ivw() per-ancestry IVW meta-analysis
│ └── extract_loci()
│
└──── meta_analyze_ivw() all-populations IVW meta-analysis
├── extract_loci()
└── extract_common_variants()
└── calculate_mr_mega_mds()
generate_gwas_meta_pipeline() validates the manifest before generating any code. The required columns are:
| Column | Description |
|---|---|
path | Full path to the raw summary statistics file |
file | Basename of the file (used to join back to per-cohort summaries) |
cohort | Human-readable cohort label (e.g. "UKBB") |
ancestry | Ancestry label matching ldscr reference panels (e.g. "EUR", "AFR", "EAS") |
study | Unique identifier used as the tar_map target name — no spaces or special characters |
Additional columns are preserved in the serialized output and can be used downstream.
ldscr — LDSC heritability and genetic correlation in RtidyGWAS — GWAS summary statistics cleaninggwasRtools — GWAS loci extraction and annotationtargets — reproducible pipeline toolkit