PLINK: Compute LD from list of SNPs using 1000 Genomes
1
0
Entering edit mode
8.1 years ago
8chocinco • 0

I have a list of SNPs. I'd like compute the r-squared values to remove any SNPs that are in linkage disequilibrium, similar to what SNAP does -- SNAP does not allow large lists of SNPs.

So, I downloaded the 1000 Genomes data from the LocusZoom website. Then I sought to use PLINK to compute the r-squared values by first combining files across chromosomes:

plink --bfile locuszoom/data/1000G/genotypes/2012-03/EUR/chr1 \
      --merge-list geno_list.txt \
      --make-bed \
      --out locuszoom/data/1000G/genotypes/2012-03/EUR/chr_all

Then I ran the LD command using my SNP list ("snp_list.txt"), but I get the following error:

PLINK v1.90b3.36 64-bit (31 Mar 2016)
https://www.cog-genomics.org/plink2 (C) 2005-2016 Shaun Purcell, Christopher Chang GNU General Public License v3 Logging to plink.log. Options in effect: --bfile locuszoom/data/1000G/genotypes/2012-03/EUR/chr_all --ld-snp-list snp_list.txt --r2

1033897 MB RAM detected; reserving 516948 MB for main workspace. 16504864 variants loaded from .bim file. 379 people (0 males, 0 females, 379 ambiguous) loaded from .fam. Ambiguous sex IDs written to plink.nosex. Using up to 127 threads (change this with --threads). Before main variant filters, 379 founders and 0 nonfounders present. Calculating allele frequencies... done. 16504864 variants and 379 people pass filters and QC. Note: No phenotypes present. Error: No valid variants specified by --ld-snp/--ld-snps/--ld-snp-list.

Similar error when I try just two SNPs:

PLINK v1.90b3.36 64-bit (31 Mar 2016)
https://www.cog-genomics.org/plink2 (C) 2005-2016 Shaun Purcell, Christopher Chang GNU General Public License v3 Logging to plink.log. Options in effect: --bfile locuszoom/data/1000G/genotypes/2012-03/EUR/chr_all --ld rs2840528 rs754594 --r2

1033897 MB RAM detected; reserving 516948 MB for main workspace. 16504864 variants loaded from .bim file. 379 people (0 males, 0 females, 379 ambiguous) loaded from .fam. Ambiguous sex IDs written to plink.nosex . Using up to 127 threads (change this with --threads). Before main variant filters, 379 founders and 0 nonfounders present. Calculating allele frequencies... done. 16504864 variants and 379 people pass filters and QC. Note: No phenotypes present. Error: --ld variant name not found.

Suggestions?

plink ld 1000 Genomes • 5.7k views
ADD COMMENT
0
Entering edit mode
8.1 years ago
Floris Brenk ★ 1.0k

plink2 --bfile INPUT --ld SNP1 SNP2 --r2

works for me fine, so guess something wrong with your snps e.g. not in your map/bim file

ADD COMMENT

Login before adding your answer.

Traffic: 2503 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6