Forum:Plink calculator for calculating pairwise LD
0
0
Entering edit mode
9.7 years ago

Hi,

I have list of snps in vcf format. Can plink LD calculator be used for pairwise LD calculation?

Regards

LD plink SNP • 5.6k views
ADD COMMENT
1
Entering edit mode

Note that vcftools has options to calculate r2: http://vcftools.sourceforge.net/man_latest.html#OUTPUT

ADD REPLY
0
Entering edit mode

Plink2 can read VCF files, did you try loading VCF then running --r2?

ADD REPLY
0
Entering edit mode

Thanks for prompt reply. I am using followning command

./plink --vcf sample2.vcf

and getting following error.

where sampl2.vcf file is prepared from Example: http://www.1000genomes.org/node/101

PLINK v1.90b3g 64-bit (5 Mar 2015)         https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to plink.log.
516842 MB RAM detected; reserving 258421 MB for main workspace.
Error: Improperly formatted .vcf header line.
ADD REPLY
1
Entering edit mode

From GitHub code, I think plink expects tab delimited.

if (memcmp(bufptr, "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO", 38)) {
logprint("Error: Improperly formatted .vcf header line.\n");
...

Below works for me,

wget ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_07/exon/snps/CEU.exon.2010_03.genotypes.vcf.gz
/plink_1.9/plink --vcf CEU.exon.2010_03.genotypes.vcf.gz --r2 --out temp
ADD REPLY

Login before adding your answer.

Traffic: 2622 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