This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Forum: Plink calculator for calculating pairwise LD

Hi,

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

Regards

ld plink snp

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

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.

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

0 answers

No answers yet.

Log in to answer this question.