This example assumes that a GWAS was run using GCTA and an input genotypic file
(PLINK can read many different file formats - GCTA only uses .bed files, though
I typically use PLINK to create a bed file from a VCF file prior to a GCTA run).
In addition, the user must define the path of the report output from GCTA with
--clump, a significance threshold with --clump-p1 and --clump-p2
(here it is labeled "FDR_thresh"), and an output name with --out.
The result should be a report in which SNPs with the lowest p-values within
a given LD "clump" (i.e. QTL) are chosen as representative tag SNPs for that clump
vcf_file="/path/to/vcf_file.vcf.gz"
gcta_output="/path/to/GCTA/GWAS/results/file.txt.gz"
FDR_thresh=0.0001
outname="/path/to/desired/output.txt"
plink2 --vcf $vcf_file \
--allow-extra-chr \
--double-id \
--clump $gcta_output \
--clump-r2 0.2 \
--clump-field p \
--clump-p1 $FDR_thresh \
--clump-p2 $FDR_thresh \
--out $outname
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.