Giter Club home page Giter Club logo

chrchang / plink-ng Goto Github PK

View Code? Open in Web Editor NEW
388.0 388.0 120.0 92.22 MB

A comprehensive update to the PLINK association analysis toolset. Beta testing of the first new version (1.90), focused on speed and memory efficiency improvements, is finishing up. Development is now focused on building out support for multiallelic, phased, and dosage data in PLINK 2.0.

Home Page: https://www.cog-genomics.org/plink/2.0/

Makefile 0.10% C++ 40.34% C 57.61% Shell 0.12% Python 0.38% CMake 0.06% TeX 0.17% R 0.06% Starlark 0.02% Cuda 0.03% Cython 1.02% Assembly 0.06% M4 0.03%

plink-ng's People

Contributors

aryarm avatar ashishjayamohan avatar choishingwan avatar chrchang avatar daissi avatar davidfischer avatar explodecomputer avatar eyherabh avatar kalel34 avatar kennethenevoldsen avatar kose-y avatar lbergelson avatar mindswarm avatar mkanai avatar mr-c avatar outpaddling avatar pettyalex avatar scimerc avatar willmclaren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plink-ng's Issues

config.h required for compilation but not generated by Makefile.std

There seems to be new functionality (since 1.90b2k) that compiles Rconnections.cc which appears to require a config.h file (I presume this is of the type generated by autoconf's ./configure). However, the source tree doesn't include any autoconf files.

How are we meant to generate an appropriate config.h?

Bug Report - Medelian Error on Multiallelic Variants

Starting from a multifamily joint-called VCF, I'm trying to use the '--mendel' option to detect mendelian errors based on pedigree information I supplied. But by comparison to another method, it appears to be missing many such errors when there is a multi-allelic (more than one alt) variant with mend errors in multiple families on multiple variants. I have boiled down an example in the attached zip file - a one variant VCF containing seven people over two families. Each of the affecteds should be a mendelian error, but only the ones in the first family (601) get detected, the mendelian error in family 643 is not reported.

But if you edit the VCF and change the two HET calls for the 601 children (0/2 --> 0/0), and repeat, then the error in family 643 IS reported.

Thanks

bugreport.zip

All haploid calls are ignored with `--bcf`

  • When I tried to convert the 1000 genomes data into plink format with bcftools -Ob and --bcf option, I found out all haploid calls on chr23 (chrX: Non-PAR) region are ignored (ex.1).
  • With bcftools -Oz and --vcf option, these calls are handled properly (ex.2).
  • I briefly checked the bcf_to_bed function, but not sure whether the issue is due to plink or bcftools, so I decided to just post this.
% bcftools -v
bcftools 1.1-141-g10cb60e
Using htslib 1.1-125-g3768707
Copyright (C) 2014 Genome Research Ltd.
License Expat: The MIT/Expat license
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
% plink --version
PLINK v1.90b3b 64-bit (15 Jan 2015)

[ex.1: bcftools -Ob and --bcf]

Here's a quick example with 1KGP phase3_v5 dataset to replicate the issue (need to update .fam file for using --fileter-males)

% bcftools view -Ob -r X:2699555 ALL.chrX.phase3_shapeit2_mvncall_integrated.20130502.genotypes.vcf.gz | plink --bcf /dev/stdin --out test
PLINK v1.90b3b 64-bit (15 Jan 2015)        https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to test.log.
96695 MB RAM detected; reserving 48347 MB for main workspace.
--bcf: test.bed + test.bim + test.fam written.

# need to update the sex column 

% plink --bfile test --filter-males --missing --out test
PLINK v1.90b3b 64-bit (15 Jan 2015)        https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to test.log.
96695 MB RAM detected; reserving 48347 MB for main workspace.
1 variant loaded from .bim file.
2504 people (1233 males, 1271 females) loaded from .fam.
1271 people removed due to gender filter (--filter-males).
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 1229 founders and 4 nonfounders present.
Calculating allele frequencies... done.
Total genotyping rate in remaining samples is 0.
--missing: Sample missing data report written to test.imiss, and variant-based
missing data report written to test.lmiss.
% cat test.lmiss
 CHR        SNP   N_MISS   N_GENO   F_MISS
  23   rs311165     1233     1233        1

[ex.2: bcftools -Oz and --vcf]

% bcftools view -Oz -r X:2699555 ALL.chrX.phase3_shapeit2_mvncall_integrated.20130502.genotypes.vcf.gz | plink --vcf /dev/stdin --out test2
PLINK v1.90b3b 64-bit (15 Jan 2015)        https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to test2.log.
96695 MB RAM detected; reserving 48347 MB for main workspace.
--vcf: test2.bed + test2.bim + test2.fam written.

# update fam

% plink --bfile test2 --filter-males --missing --out test2
PLINK v1.90b3b 64-bit (15 Jan 2015)        https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to test2.log.
96695 MB RAM detected; reserving 48347 MB for main workspace.
1 variant loaded from .bim file.
2504 people (1233 males, 1271 females) loaded from .fam.
1271 people removed due to gender filter (--filter-males).
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 1229 founders and 4 nonfounders present.
Calculating allele frequencies... done.
--missing: Sample missing data report written to test2.imiss, and variant-based
missing data report written to test2.lmiss.
% cat test2.lmiss
 CHR        SNP   N_MISS   N_GENO   F_MISS
  23   rs311165        0     1233        0

File read failure for bgen format v1.2 with PLINK v2.00a2LM 64-bit Intel (15 Feb 2018)

Hi! I the newest version for unix (non avx) seems to have issues opening bgen 1.2 files (from UKBB). Detailed command line below. Thanks for working on this tool! Markus

running PLINK v2.00a2LM 64-bit Intel (15 Feb 2018) with bgen 1.2 input files gives "Error: File read failure."

command:
plink2 --bgen ukb_imp_chr22_v2.bgen --sample ukb672_imp_chr22_v2_s487406.sample --make-pgen --out testchr22

Running the same as above using PLINK v2.00a1LM 64-bit Intel (24 Jan 2018) works.

[Request] Support Rserve connections through unix domain sockets

Currently, the --R option allows to connect to a local TCP service in a port specified by --R-port or the default one. However, when running the Plink-Rserve combination on shared systems such as cluster computing nodes, Rserve regularly fails as the default port is already taken by some other process, be it Rserve or not. Therefore, Rserve also allows to use a unix domain socket instead, where no clash will happen with other users.

Technically, in Rconnection.cc, connecting to those sockets is already implemented. If the port is negative, the given IP string is intepreted as a path to a unix domain socket and the family correctly set to AF_LOCAL instead if AF_INET. Unfortunately, the option parser in plink.c for --R-port expects a positive number and an IP (or host name) cannot be given at all.

It would be nice if someone could add the additional option, e.g. --R-host, and lift the positive-integer restriction on the --R-port option. As a side effect, that would also allow connecting to remote Rserve instances.

What is the difference between chromosome X and autosomes using --assoc?

hello,

My shell is

plink --vcf GWAS.23chr.vcf \
                  --a2-allele GWAS.23chr.vcf.ref \
		  --keep-allele-order \
		  --double-id \
		  --set-missing-var-ids @:# \
		  --allow-no-sex \
		  --update-sex pheno.gender.txt 3 \
		  --pheno pheno.gender.txt --mpheno 4 \
		  --recode \
		  --make-bed \
		  --out vcf2plink && \
plink --file vcf2plink --maf 0.05 --geno 0.1 --hwe 0.000005 --mind 0.2 --make-bed --recode --out plink.filter &&\
plink --bfile plink.filter --assoc --out plink_asso --allow-no-sex

The pheno.gender.txt file contains gender information, how dose PLINK consider male and female samples for chromosome X results?

thank you
best

Binary file format inconsistencies between 1.07 and 1.9

Hi, thanks for putting so much work into a fantastic piece of software. I've been working on using plink style binary files in one of my own programs and have come across an inconsistency in the documentation that I think could use some clarification.

On the original plink1.07 webpage, the .bed format is given to have the following conversions:

For the genotype data, each byte encodes up to four genotypes (2 bits per genoytpe). The coding is
     00  Homozygote "1"/"1"
     01  Heterozygote
     11  Homozygote "2"/"2"
     10  Missing genotype

While on the plink1.9 webpage, the conversion table is given as follows:

The two-bit genotype codes have the following meanings:

00	Homozygous for first allele in .bim file
01	Missing genotype
10	Heterozygous
11	Homozygous for second allele in .bim file

There seems to be some disagreement between the heterozygous and missing codings.

I downloaded the toy data distributed with plink1.9 and converted it to binary.

plink2 --bfile toy --make-bed --out toy
cat toy.ped

1 1000000000 0 0 1 1 0 0 1 1
1 1000000001 0 0 1 2 1 1 1 2

xxd -b toy.bed

0000000: 01101100 00011011 00000001 00001101 00001011           l....

cat toy.bim

1       rs0     0       1000    0       1
1       rs10    0       1001    2       1

After excluding the first two magic number bytes and the format byte, we proceed to look at the first (fourth) byte which reads

rs0
10 -  missing (1.07) / heterozygous (?) (1.9)
11 - homozygous second allele
...skip...

rs10
11 - homozygous second allele 
01 - heterozygote (1.07) / missing (?) (1.9)
...skip...

So, it seems as though this simple example supports the original v1.07 coding, unless I have misinterpreted it.

  • Was there a change in the coding between plink1.07 and plink1.9 for missing / heterozygous? If so, is there any way to distinguish the two and account for that?

About CNV association

hi

I run plink v1.07 Association mapping with segmental CNV data: regional tests
the EMP1 and EMP2 of every region is 1

my vcf is

#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	CP1600001	CP1600002	CP1600003	CP1600004	CP1600005	CP1600006	CP1600007	CP1600008	CP1600009	CP1600010	CP1600011	CP1600012	CP1600013	CP1600014	CP1600015	CP1600016	CP1600017	CP1600018	CP1600019	CP1600020	CP1600021	CP1600022	CP1600023	CP1600024	CP1600025	CP1600026	CP1600027	CP1600028	CP1600029	CP1600030	CP1600031	CP1600032	CP1600033	CP1600034	CP1600035	CP1600036	CP1600037	CP1600038	CP1600039	CP1600040	CP1600041
1	790997	CNV_1_790997_830957	T	<CN0>,<CN2>	.	PASS	END=830957;GCFRACTION=0.43;GCLENGTH=39961;GLALTFREQ=NA;GLALTSUM=0.000;GLHETSUM=0.000;GLINBREEDINGCOEFF=NA;GLREFFREQ=NA;GLREFSUM=0.000;GSCALLRATE=0.999;GSCLUSTERSEP=9.59;GSCLUSTERSEPWEIGHTEDMEAN=8.03;GSCLUSTERSEPWEIGHTEDMEDIAN=8.14;GSCNALLELES=3;GSCNCATEGORY=MIXED;GSCNDIST=0,3,794,152,18;GSCNMAX=4;GSCNMIN=1;GSCNQUAL=2181.9075;GSDUPLICATEOVERLAP=NA;GSDUPLICATES=NA;GSDUPLICATESCORE=NA;GSELENGTH=26499;GSEXPMEAN=189.3918;GSGMMWEIGHTS=0.0001,0.0031,0.8205,0.1577,0.0186,0.0000;GSM1=1.0647;GSM2=0.3106,1.5530;GSNNONREF=173;GSNONVARSCORE=NA;GSNVARIANT=173;SVTYPE=CNV	GT:CN:CNF:CNL:CNP:CNQ:GL:GP:GQ	0/2:3:2.9985:-1000.00,-110.41,-13.72,-0.00,-7.01,-22.31:-1000.00,-112.12,-13.01,-0.00,-7.94,-59.86:79.4:-14.20,-110.41,-1000.00,-0.00,-13.90,-7.01:-12.47,-113.83,-1000.00,-0.00,-15.91,-8.95:79	0/0:2:2.2905:-1000.00,-46.59,-0.00,-3.71,-19.97,-41.26:-1000.00,-49.01,-0.00,-4.42,-21.62,-79.53:44.2:-0.48,-46.59,-1000.00,-3.71,-0.18,-19.97:-0.00,-51.26,-1000.00,-4.96,-3.44,-23.17:34	0/0:2:2.0602:-1000.00,-31.48,-0.00,-8.33,-26.61,-48.86:-1000.00,-33.90,-0.00,-9.05,-28.26,-87.12:90.5:-0.48,-31.48,-1000.00,-8.33,-0.18,-26.61:-0.00,-36.15,-1000.00,-9.59,-3.44,-29.81:34	0/0:2:2.0828:-1000.00,-34.69,-0.00,-8.34,-27.44,-50.83:-1000.00,-37.12,-0.00,-9.06,-29.08,-89.09:90.6:-0.48,-34.69,-1000.00,-8.34,-0.18,-27.44:-0.00,-39.37,-1000.00,-9.60,-3.44,-30.63:34	0/0:2:2.0486:-1000.00,-32.82,-0.00,-9.11,-28.69,-52.45:-1000.00,-35.24,-0.00,-9.82,-30.33,-90.71:98.2:-0.48,-32.82,-1000.00,-9.11,-0.18,-28.69:-0.00,-37.49,-1000.00,-10.36,-3.44,-31.88:34	0/2:3:2.9220:-1000.00,-106.42,-12.13,-0.00,-8.40,-25.00:-1000.00,-108.13,-11.42,-0.00,-9.32,-62.55:93.2:-12.61,-106.42,-1000.00,-0.00,-12.31,-8.40:-10.88,-109.84,-1000.00,-0.00,-14.32,-10.33:93	0/0:2:2.0621:-1000.00,-32.94,-0.00,-8.65,-27.68,-50.87:-1000.00,-35.36,-0.00,-9.36,-29.33,-89.13:93.6:-0.48,-32.94,-1000.00,-8.65,-0.18,-27.68:-0.00,-37.61,-1000.00,-9.90,-3.44,-30.88:34	0/0:2:1.9514:-1000.00,-25.78,-0.00,-10.57,-30.21,-53.49:-1000.00,-28.20,-0.00,-11.28,-31.86,-91.75:99.0:-0.48,-25.78,-1000.00,-10.57,-0.18,-30.21:-0.00,-30.45,-1000.00,-11.82,-3.44,-33.41:34	0/0:2:2.1869:-1000.00,-36.41,-0.00,-5.42,-21.29,-41.33:-1000.00,-38.83,-0.00,-6.14,-22.93,-79.59:61.4:-0.48,-36.41,-1000.00,-5.42,-0.18,-21.29:-0.00,-41.08,-1000.00,-6.68,-3.44,-24.48:34	0/0:2:2.0285:-1000.00,-30.43,-0.00,-9.17,-28.24,-51.25:-1000.00,-32.85,-0.00,-9.89,-29.88,-89.51:98.9:-0.48,-30.43,-1000.00,-9.17,-0.18,-28.24:-0.00,-35.10,-1000.00,-10.43,-3.44,-31.43:34	0/2:3:2.7910:-1000.00,-88.50,-8.20,-0.00,-9.81,-26.83:-1000.00,-90.21,-7.48,-0.00,-10.74,-64.37:74.8:-8.68,-88.50,-1000.00,-0.00,-8.38,-9.81:-6.94,-91.92,-1000.00,-0.00,-10.38,-11.75:69	0/0:2:1.9336:-1000.00,-24.42,-0.00,-10.74,-30.25,-53.28:-1000.00,-26.84,-0.00,-11.45,-31.90,-91.54:99.0:-0.48,-24.42,-1000.00,-10.74,-0.18,-30.25:-0.00,-29.09,-1000.00,-11.99,-3.44,-33.45:34	0/0:2:1.7895:-1000.00,-18.80,-0.00,-14.79,-37.97,-64.50:-1000.00,-21.23,-0.00,-15.51,-39.62,-102.76:99.0:-0.48,-18.80,-1000.00,-14.79,-0.18,-37.97:-0.00,-23.48,-1000.00,-16.05,-3.44,-41.17:34	2/2:4:3.7541:-1000.00,-220.35,-44.25,-5.02,-0.00,-8.66:-1000.00,-221.13,-42.61,-4.09,-0.00,-45.27:40.9:-44.73,-220.35,-1000.00,-5.02,-44.43,-0.00:-41.06,-221.83,-1000.00,-3.08,-44.50,-0.00:31	0/0:2:2.0219:-1000.00,-29.98,-0.00,-9.29,-28.38,-51.39:-1000.00,-32.41,-0.00,-10.00,-30.02,-89.65:99.0:-0.48,-29.98,-1000.00,-9.29,-0.18,-28.38:-0.00,-34.66,-1000.00,-10.54,-3.44,-31.57:34	0/0:2:1.9482:-1000.00,-25.23,-0.00,-10.48,-29.87,-52.83:-1000.00,-27.65,-0.00,-11.19,-31.52,-91.09:99.0:-0.48,-25.23,-1000.00,-10.48,-0.18,-29.87:-0.00,-29.90,-1000.00,-11.73,-3.44,-33.07:34	0/0:2:2.1870:-1000.00,-38.21,-0.00,-5.68,-22.32,-43.35:-1000.00,-40.64,-0.00,-6.40,-23.97,-81.61:64.0:-0.48,-38.21,-1000.00,-5.68,-0.18,-22.32:-0.00,-42.89,-1000.00,-6.94,-3.44,-25.52:34	0/0:2:1.9498:-1000.00,-26.13,-0.00,-10.77,-30.76,-54.44:-1000.00,-28.55,-0.00,-11.49,-32.41,-92.70:99.0:-0.48,-26.13,-1000.00,-10.77,-0.18,-30.76:-0.00,-30.80,-1000.00,-12.03,-3.44,-33.96:340/0:2:1.7935:-1000.00,-17.12,-0.00,-13.26,-34.10,-57.97:-1000.00,-19.54,-0.00,-13.97,-35.74,-96.23:99.0:-0.48,-17.12,-1000.00,-13.26,-0.18,-34.10:-0.00,-21.79,-1000.00,-14.51,-3.44,-37.29:34	0/0:2:2.0280:-1000.00,-30.71,-0.00,-9.28,-28.55,-51.81:-1000.00,-33.14,-0.00,-10.00,-30.19,-90.07:99.0:-0.48,-30.71,-1000.00,-9.28,-0.18,-28.55:-0.00,-35.39,-1000.00,-10.54,-3.44,-31.74:34	0/0:2:2.0524:-1000.00,-32.91,-0.00,-8.99,-28.45,-52.09:-1000.00,-35.33,-0.00,-9.71,-30.10,-90.35:97.1:-0.48,-32.91,-1000.00,-8.99,-0.18,-28.45:-0.00,-37.58,-1000.00,-10.25,-3.44,-31.65:34	0/2:3:3.0927:-1000.00,-128.70,-17.42,-0.00,-6.04,-21.46:-1000.00,-130.40,-16.70,-0.00,-6.97,-59.01:69.7:-17.90,-128.70,-1000.00,-0.00,-17.60,-6.04:-16.16,-132.11,-1000.00,-0.00,-19.60,-7.98:70	0/0:2:1.9925:-1000.00,-29.43,-0.00,-10.25,-30.41,-54.54:-1000.00,-31.86,-0.00,-10.97,-32.06,-92.80:99.0:-0.48,-29.43,-1000.00,-10.25,-0.18,-30.41:-0.00,-34.11,-1000.00,-11.51,-3.44,-33.61:34	0/0:2:2.1112:-1000.00,-35.29,-0.00,-7.50,-25.70,-48.16:-1000.00,-37.71,-0.00,-8.22,-27.34,-86.42:82.2:-0.48,-35.29,-1000.00,-7.50,-0.18,-25.70:-0.00,-39.96,-1000.00,-8.76,-3.44,-28.89:34	0/0:2:2.1690:-1000.00,-36.42,-0.00,-5.93,-22.43,-43.16:-1000.00,-38.84,-0.00,-6.64,-24.08,-81.42:66.4:-0.48,-36.42,-1000.00,-5.93,-0.18,-22.43:-0.00,-41.09,-1000.00,-7.18,-3.44,-25.63:34	0/0:2:2.0605:-1000.00,-28.89,-0.00,-7.65,-24.43,-44.85:-1000.00,-31.31,-0.00,-8.37,-26.08,-83.12:83.7:-0.48,-28.89,-1000.00,-7.65,-0.18,-24.43:-0.00,-33.56,-1000.00,-8.91,-3.44,-27.63:34	0/0:2:2.1078:-1000.00,-34.44,-0.00,-7.44,-25.34,-47.42:-1000.00,-36.87,-0.00,-8.16,-26.98,-85.68:81.6:-0.48,-34.44,-1000.00,-7.44,-0.18,-25.34:-0.00,-39.12,-1000.00,-8.70,-3.44,-28.53:34	0/2:3:2.8678:-1000.00,-107.70,-11.40,-0.00,-9.81,-28.11:-1000.00,-109.41,-10.68,-0.00,-10.74,-65.66:99.0:-11.88,-107.70,-1000.00,-0.00,-11.58,-9.81:-10.14,-111.12,-1000.00,-0.00,-13.58,-11.75:99	0/0:2:1.9823:-1000.00,-28.98,-0.00,-10.51,-30.87,-55.18:-1000.00,-31.40,-0.00,-11.22,-32.52,-93.44:99.0:-0.48,-28.98,-1000.00,-10.51,-0.18,-30.87:-0.00,-33.65,-1000.00,-11.76,-3.44,-34.07:34	0/0:2:2.3037:-1000.00,-45.58,-0.00,-3.28,-18.77,-39.14:-1000.00,-48.01,-0.00,-4.00,-20.42,-77.40:40.0:-0.48,-45.58,-1000.00,-3.28,-0.18,-18.77:-0.00,-50.26,-1000.00,-4.54,-3.44,-21.97:34	0/0:2:1.9051:-1000.00,-24.17,-0.00,-11.88,-32.77,-57.25:-1000.00,-26.59,-0.00,-12.60,-34.41,-95.51:99.0:-0.48,-24.17,-1000.00,-11.88,-0.18,-32.77:-0.00,-28.84,-1000.00,-13.14,-3.44,-35.96:34	0/0:2:2.1443:-1000.00,-39.35,-0.00,-7.19,-26.02,-49.48:-1000.00,-41.77,-0.00,-7.91,-27.66,-87.75:79.1:-0.48,-39.35,-1000.00,-7.19,-0.18,-26.02:-0.00,-44.02,-1000.00,-8.45,-3.44,-29.21:34	0/0:2:1.8588:-1000.00,-18.38,-0.00,-10.89,-29.09,-50.21:-1000.00,-20.80,-0.00,-11.61,-30.73,-88.47:99.0:-0.48,-18.38,-1000.00,-10.89,-0.18,-29.09:-0.00,-23.05,-1000.00,-12.15,-3.44,-32.28:34	0/0:2:2.0435:-1000.00,-31.63,-0.00,-8.97,-28.08,-51.24:-1000.00,-34.06,-0.00,-9.69,-29.72,-89.50:96.9:-0.48,-31.63,-1000.00,-8.97,-0.18,-28.08:-0.00,-36.31,-1000.00,-10.23,-3.44,-31.27:34	0/0:2:1.8485:-1000.00,-19.54,-0.00,-12.05,-31.99,-55.07:-1000.00,-21.96,-0.00,-12.77,-33.63,-93.33:99.0:-0.48,-19.54,-1000.00,-12.05,-0.18,-31.99:-0.00,-24.21,-1000.00,-13.31,-3.44,-35.18:34	0/0:2:1.8699:-1000.00,-22.07,-0.00,-12.48,-33.58,-58.14:-1000.00,-24.50,-0.00,-13.19,-35.23,-96.40:99.0:-0.48,-22.07,-1000.00,-12.48,-0.18,-33.58:-0.00,-26.75,-1000.00,-13.73,-3.44,-36.78:34	0/0:2:2.0093:-1000.00,-30.80,-0.00,-10.02,-30.24,-54.54:-1000.00,-33.22,-0.00,-10.74,-31.89,-92.80:99.0:-0.48,-30.80,-1000.00,-10.02,-0.18,-30.24:-0.00,-35.47,-1000.00,-11.28,-3.44,-33.44:34	0/2:3:2.8339:-1000.00,-93.50,-9.37,-0.00,-9.31,-26.08:-1000.00,-95.21,-8.66,-0.00,-10.23,-63.63:86.6:-9.85,-93.50,-1000.00,-0.00,-9.55,-9.31:-8.12,-96.92,-1000.00,-0.00,-11.56,-11.24:81	0/2:3:3.0644:-1000.00,-123.33,-16.30,-0.00,-6.37,-21.80:-1000.00,-125.04,-15.59,-0.00,-7.30,-59.35:73.0:-16.78,-123.33,-1000.00,-0.00,-16.48,-6.37:-15.05,-126.75,-1000.00,-0.00,-18.49,-8.31:73	0/0:2:1.9505:-1000.00,-23.40,-0.00,-9.64,-27.53,-48.72:-1000.00,-25.83,-0.00,-10.36,-29.17,-86.98:99.0:-0.48,-23.40,-1000.00,-9.64,-0.18,-27.53:-0.00,-28.08,-1000.00,-10.90,-3.44,-30.72:34	0/0:2:2.0472:-1000.00,-38.33,-0.00,-10.68,-33.60,-61.41:-1000.00,-40.75,-0.00,-11.40,-35.24,-99.68:99.0:-0.48,-38.33,-1000.00,-10.68,-0.18,-33.60:-0.00,-43.00,-1000.00,-11.94,-3.44,-36.79:34
1	791801	CNV_1_791801_893718	T	<CN0>,<CN2>	.	PASS	END=893718;GCFRACTION=0.44;GCLENGTH=101918;GLALTFREQ=NA;GLALTSUM=0.000;GLHETSUM=0.000;GLINBREEDINGCOEFF=NA;GLREFFREQ=NA;GLREFSUM=0.000;GSCALLRATE=0.999;GSCLUSTERSEP=13.27;GSCLUSTERSEPWEIGHTEDMEAN=11.08;GSCLUSTERSEPWEIGHTEDMEDIAN=11.27;GSCNALLELES=3;GSCNCATEGORY=MIXED;GSCNDIST=0,2,792,154,19;GSCNMAX=4;GSCNMIN=1;GSCNQUAL=4869.1482;GSDUPLICATEOVERLAP=NA;GSDUPLICATES=NA;GSDUPLICATESCORE=NA;GSELENGTH=81249;GSEXPMEAN=580.5917;GSGMMWEIGHTS=0.0001,0.0021,0.8182,0.1600,0.0196,0.0000;GSM1=1.0220;GSM2=0.4585,2.2923;GSNNONREF=175;GSNONVARSCORE=NA;GSNVARIANT=175;SVTYPE=CNV	GT:CN:CNF:CNL:CNP:CNQ:GL:GP:GQ	0/2:3:2.9523:-1000.00,-200.83,-23.80,-0.00,-14.50,-44.32:-1000.00,-202.71,-23.09,-0.00,-15.41,-115.93:99.0:-24.28,-200.83,-1000.00,-0.00,-23.98,-14.50:-22.56,-204.60,-1000.00,0.00,-26.17,-16.42:99	0/0:2:2.0270:-1000.00,-57.66,0.00,-17.37,-53.49,-97.11:-1000.00,-60.26,0.00,-18.08,-55.11,-169.42:99.0:-0.48,-57.66,-1000.00,-17.37,-0.18,-53.49:-0.00,-62.68,-1000.00,-18.61,-3.61,-56.65:36	0/0:2:2.0089:-1000.00,-54.64,0.00,-17.71,-53.50,-96.51:-1000.00,-57.24,0.00,-18.42,-55.12,-168.83:99.0:-0.48,-54.64,-1000.00,-17.71,-0.18,-53.50:-0.00,-59.66,-1000.00,-18.95,-3.61,-56.66:36	0/0:2:1.9192:-1000.00,-47.65,0.00,-22.02,-61.45,-107.84:-1000.00,-50.25,0.00,-22.73,-63.07,-180.16:99.0:-0.48,-47.65,-1000.00,-22.02,-0.18,-61.45:-0.00,-52.67,-1000.00,-23.26,-3.61,-64.61:36	0/0:2:2.0055:-1000.00,-57.73,0.00,-18.96,-57.09,-102.88:-1000.00,-60.33,0.00,-19.67,-58.71,-175.20:99.0:-0.48,-57.73,-1000.00,-18.96,-0.18,-57.09:-0.00,-62.75,-1000.00,-20.20,-3.61,-60.25:36	0/2:3:2.8568:-1000.00,-189.37,-19.76,0.00,-17.69,-50.35:-1000.00,-191.26,-19.05,0.00,-18.60,-121.96:99.0:-20.24,-189.37,-1000.00,0.00,-19.94,-17.69:-18.52,-193.15,-1000.00,0.00,-22.13,-19.61:99	0/0:2:2.0228:-1000.00,-58.47,0.00,-17.91,-54.91,-99.54:-1000.00,-61.06,0.00,-18.62,-56.53,-171.85:99.0:-0.48,-58.47,-1000.00,-17.91,-0.18,-54.91:-0.00,-63.48,-1000.00,-19.15,-3.61,-58.07:36	0/0:2:1.8826:-1000.00,-42.10,0.00,-22.48,-61.10,-106.17:-1000.00,-44.69,0.00,-23.19,-62.72,-178.49:99.0:-0.48,-42.10,-1000.00,-22.48,-0.18,-61.10:-0.00,-47.11,-1000.00,-23.72,-3.61,-64.26:36	0/0:2:2.0024:-1000.00,-50.18,0.00,-16.70,-50.12,-90.21:-1000.00,-52.78,0.00,-17.41,-51.74,-162.53:99.0:-0.48,-50.18,-1000.00,-16.70,-0.18,-50.12:-0.00,-55.20,-1000.00,-17.94,-3.61,-53.28:36	0/0:2:2.0539:-1000.00,-60.82,0.00,-16.40,-52.11,-95.52:-1000.00,-63.42,0.00,-17.11,-53.73,-167.84:99.0:-0.48,-60.82,-1000.00,-16.40,-0.18,-52.11:-0.00,-65.84,-1000.00,-17.64,-3.61,-55.27:36	0/2:3:2.9255:-1000.00,-196.83,-22.59,-0.00,-15.31,-45.78:-1000.00,-198.72,-21.88,0.00,-16.22,-117.39:99.0:-23.07,-196.83,-1000.00,-0.00,-22.77,-15.31:-21.35,-200.61,-1000.00,0.00,-24.96,-17.23:99	0/0:2:2.0115:-1000.00,-54.85,0.00,-17.60,-53.29,-96.23:-1000.00,-57.44,0.00,-18.31,-54.92,-168.55:99.0:-0.48,-54.85,-1000.00,-17.60,-0.18,-53.29:-0.00,-59.86,-1000.00,-18.84,-3.61,-56.46:360/0:2:1.8836:-1000.00,-46.23,0.00,-24.58,-66.86,-116.21:-1000.00,-48.83,0.00,-25.29,-68.48,-188.52:99.0:-0.48,-46.23,-1000.00,-24.58,-0.18,-66.86:-0.00,-51.25,-1000.00,-25.82,-3.61,-70.02:36	2/2:4:3.7832:-1000.00,-1000.00,-87.28,-10.61,-0.00,-15.80:-1000.00,-1000.00,-85.66,-9.70,-0.00,-86.50:97.0:-87.76,-1000.00,-1000.00,-10.61,-87.46,-0.00:-84.12,-1000.00,-1000.00,-8.69,-87.73,-0.00:87	0/0:2:2.0755:-1000.00,-63.14,-0.00,-15.56,-50.79,-93.88:-1000.00,-65.74,0.00,-16.27,-52.41,-166.19:99.0:-0.48,-63.14,-1000.00,-15.56,-0.18,-50.79:-0.00,-68.16,-1000.00,-16.80,-3.61,-53.95:36	0/0:2:1.9631:-1000.00,-49.81,0.00,-19.37,-56.02,-99.59:-1000.00,-52.41,0.00,-20.08,-57.64,-171.90:99.0:-0.48,-49.81,-1000.00,-19.37,-0.18,-56.02:-0.00,-54.83,-1000.00,-20.61,-3.61,-59.18:36	0/0:2:2.1987:-1000.00,-74.29,-0.00,-10.29,-41.72,-81.61:-1000.00,-76.89,-0.00,-11.00,-43.34,-153.92:99.0:-0.48,-74.29,-1000.00,-10.29,-0.18,-41.72:-0.00,-79.31,-1000.00,-11.53,-3.61,-44.88:36	0/0:2:1.9566:-1000.00,-50.64,0.00,-20.20,-58.10,-103.08:-1000.00,-53.24,0.00,-20.91,-59.72,-175.40:99.0:-0.48,-50.64,-1000.00,-20.20,-0.18,-58.10:-0.00,-55.66,-1000.00,-21.44,-3.61,-61.26:36	0/0:2:1.9183:-1000.00,-45.29,0.00,-21.01,-58.58,-102.78:-1000.00,-47.89,0.00,-21.72,-60.20,-175.10:99.0:-0.48,-45.29,-1000.00,-21.01,-0.18,-58.58:-0.00,-50.31,-1000.00,-22.25,-3.61,-61.74:36	0/0:2:1.9269:-1000.00,-47.23,0.00,-21.17,-59.43,-104.53:-1000.00,-49.83,0.00,-21.88,-61.05,-176.85:99.0:-0.48,-47.23,-1000.00,-21.17,-0.18,-59.43:-0.00,-52.25,-1000.00,-22.41,-3.61,-62.59:36	0/0:2:1.9943:-1000.00,-56.19,0.00,-19.30,-57.47,-103.17:-1000.00,-58.79,0.00,-20.01,-59.09,-175.49:99.0:-0.48,-56.19,-1000.00,-19.30,-0.18,-57.47:-0.00,-61.21,-1000.00,-20.54,-3.61,-60.63:36	0/2:3:3.0072:-1000.00,-226.35,-28.44,-0.00,-13.92,-44.78:-1000.00,-228.24,-27.73,-0.00,-14.83,-116.39:99.0:-28.92,-226.35,-1000.00,-0.00,-28.62,-13.92:-27.20,-230.13,-1000.00,-0.00,-30.81,-15.84:99	0/0:2:1.9304:-1000.00,-49.37,0.00,-21.83,-61.45,-108.18:-1000.00,-51.97,0.00,-22.54,-63.07,-180.50:99.0:-0.48,-49.37,-1000.00,-21.83,-0.18,-61.45:-0.00,-54.39,-1000.00,-23.07,-3.61,-64.61:360/0:2:2.0764:-1000.00,-63.27,-0.00,-15.53,-50.76,-93.85:-1000.00,-65.87,0.00,-16.24,-52.38,-166.17:99.0:-0.48,-63.27,-1000.00,-15.53,-0.18,-50.76:-0.00,-68.29,-1000.00,-16.77,-3.61,-53.92:36	0/0:2:2.1169:-1000.00,-63.85,-0.00,-13.15,-45.53,-85.61:-1000.00,-66.45,-0.00,-13.85,-47.15,-157.93:99.0:-0.48,-63.85,-1000.00,-13.15,-0.18,-45.53:-0.00,-68.87,-1000.00,-14.38,-3.61,-48.69:36	0/0:2:2.0228:-1000.00,-51.41,-0.00,-15.77,-48.32,-87.58:-1000.00,-54.00,0.00,-16.48,-49.94,-159.90:99.0:-0.48,-51.41,-1000.00,-15.77,-0.18,-48.32:-0.00,-56.42,-1000.00,-17.01,-3.61,-51.48:36	0/0:2:2.0151:-1000.00,-55.44,0.00,-17.53,-53.28,-96.33:-1000.00,-58.04,0.00,-18.23,-54.90,-168.65:99.0:-0.48,-55.44,-1000.00,-17.53,-0.18,-53.28:-0.00,-60.46,-1000.00,-18.76,-3.61,-56.44:36	0/2:3:2.9717:-1000.00,-229.62,-27.81,-0.00,-15.68,-48.75:-1000.00,-231.51,-27.10,0.00,-16.59,-120.36:99.0:-28.29,-229.62,-1000.00,-0.00,-27.99,-15.68:-26.57,-233.40,-1000.00,0.00,-30.18,-17.60:99	0/0:2:2.0674:-1000.00,-65.40,0.00,-16.67,-53.85,-99.22:-1000.00,-67.99,0.00,-17.38,-55.47,-171.54:99.0:-0.48,-65.40,-1000.00,-16.67,-0.18,-53.85:-0.00,-70.41,-1000.00,-17.91,-3.61,-57.01:36	0/2:3:2.7355:-1000.00,-157.37,-12.95,-0.00,-19.91,-52.96:-1000.00,-159.26,-12.24,-0.00,-20.82,-124.57:99.0:-13.43,-157.37,-1000.00,-0.00,-13.13,-19.91:-11.71,-161.15,-1000.00,-0.00,-15.32,-21.83:99	0/0:2:2.0034:-1000.00,-57.16,0.00,-18.94,-56.88,-102.44:-1000.00,-59.76,0.00,-19.64,-58.50,-174.75:99.0:-0.48,-57.16,-1000.00,-18.94,-0.18,-56.88:-0.00,-62.18,-1000.00,-20.17,-3.61,-60.04:36	0/0:2:2.0788:-1000.00,-66.99,0.00,-16.27,-53.34,-98.73:-1000.00,-69.59,0.00,-16.98,-54.96,-171.05:99.0:-0.48,-66.99,-1000.00,-16.27,-0.18,-53.34:-0.00,-72.01,-1000.00,-17.51,-3.61,-56.50:36	0/0:2:1.8727:-1000.00,-36.35,0.00,-20.21,-54.56,-94.55:-1000.00,-38.95,0.00,-20.92,-56.18,-166.87:99.0:-0.48,-36.35,-1000.00,-20.21,-0.18,-54.56:-0.00,-41.37,-1000.00,-21.45,-3.61,-57.72:36	0/0:2:2.0140:-1000.00,-57.13,0.00,-18.14,-55.08,-99.54:-1000.00,-59.73,0.00,-18.84,-56.70,-171.86:99.0:-0.48,-57.13,-1000.00,-18.14,-0.18,-55.08:-0.00,-62.15,-1000.00,-19.37,-3.61,-58.24:36	0/0:2:1.9241:-1000.00,-44.81,0.00,-20.32,-56.92,-100.02:-1000.00,-47.41,0.00,-21.03,-58.54,-172.34:99.0:-0.48,-44.81,-1000.00,-20.32,-0.18,-56.92:-0.00,-49.83,-1000.00,-21.56,-3.61,-60.08:36	0/0:2:1.9311:-1000.00,-48.74,0.00,-21.49,-60.53,-106.59:-1000.00,-51.34,0.00,-22.20,-62.15,-178.91:99.0:-0.48,-48.74,-1000.00,-21.49,-0.18,-60.53:-0.00,-53.76,-1000.00,-22.73,-3.61,-63.69:36	0/0:2:1.9030:-1000.00,-46.75,0.00,-23.02,-63.47,-110.88:-1000.00,-49.34,0.00,-23.73,-65.09,-183.20:99.0:-0.48,-46.75,-1000.00,-23.02,-0.18,-63.47:-0.00,-51.76,-1000.00,-24.26,-3.61,-66.63:36	0/2:3:2.7683:-1000.00,-165.03,-14.65,-0.00,-19.27,-52.11:-1000.00,-166.92,-13.94,-0.00,-20.18,-123.72:99.0:-15.13,-165.03,-1000.00,-0.00,-14.83,-19.27:-13.41,-168.81,-1000.00,-0.00,-17.02,-21.19:99	0/2:3:2.9399:-1000.00,-207.39,-24.22,-0.00,-15.50,-46.89:-1000.00,-209.28,-23.51,0.00,-16.41,-118.50:99.0:-24.70,-207.39,-1000.00,-0.00,-24.40,-15.50:-22.98,-211.17,-1000.00,0.00,-26.59,-17.42:99	0/0:2:1.9638:-1000.00,-45.98,0.00,-17.84,-51.62,-91.78:-1000.00,-48.58,0.00,-18.55,-53.24,-164.10:99.0:-0.48,-45.98,-1000.00,-17.84,-0.18,-51.62:-0.00,-51.00,-1000.00,-19.08,-3.61,-54.78:36	0/0:2:2.0721:-1000.00,-76.63,0.00,-19.13,-62.19,-114.82:-1000.00,-79.23,0.00,-19.84,-63.81,-187.14:99.0:-0.48,-76.63,-1000.00,-19.13,-0.18,-62.19:-0.00,-81.65,-1000.00,-20.37,-3.61,-65.35:36
1	833820	CNV_1_833820_910074	T	<CN0>,<CN2>	.	PASS	END=910074;GCFRACTION=0.47;GCLENGTH=76255;GLALTFREQ=NA;GLALTSUM=0.000;GLHETSUM=0.000;GLINBREEDINGCOEFF=NA;GLREFFREQ=NA;GLREFSUM=0.000;GSCALLRATE=1.000;GSCLUSTERSEP=13.10;GSCLUSTERSEPWEIGHTEDMEAN=10.94;GSCLUSTERSEPWEIGHTEDMEDIAN=11.12;GSCNALLELES=3;GSCNCATEGORY=MIXED;GSCNDIST=0,1,792,156,19;GSCNMAX=4;GSCNMIN=1;GSCNQUAL=4908.4908;GSDUPLICATEOVERLAP=NA;GSDUPLICATES=NA;GSDUPLICATESCORE=NA;GSELENGTH=68749;GSEXPMEAN=490.6828;GSGMMWEIGHTS=0.0001,0.0010,0.8181,0.1611,0.0196,0.0000;GSM1=1.0350;GSM2=0.4073,2.0366;GSNNONREF=176;GSNONVARSCORE=NA;GSNVARIANT=176;SVTYPE=CNV	GT:CN:CNF:CNL:CNP:CNQ:GL:GP:GQ	0/2:3:2.9059:-1000.00,-185.84,-20.80,-0.00,-15.25,-44.92:-1000.00,-188.03,-20.09,0.00,-16.17,-125.91:99.0:-21.28,-185.84,-1000.00,-0.00,-20.98,-15.25:-19.56,-190.23,-1000.00,0.00,-23.47,-17.18:99	0/0:2:1.8551:-1000.00,-38.22,0.00,-22.79,-60.82,-104.95:-1000.00,-41.12,0.00,-23.50,-62.44,-186.64:99.0:-0.48,-38.22,-1000.00,-22.79,-0.18,-60.82:-0.00,-43.84,-1000.00,-24.03,-3.90,-63.97:39	0/0:2:1.9833:-1000.00,-50.68,0.00,-18.20,-53.61,-95.90:-1000.00,-53.58,0.00,-18.90,-55.23,-177.59:99.0:-0.48,-50.68,-1000.00,-18.20,-0.18,-53.61:-0.00,-56.30,-1000.00,-19.43,-3.90,-56.76:39	0/0:2:1.8930:-1000.00,-43.61,0.00,-22.34,-61.17,-106.58:-1000.00,-46.51,0.00,-23.05,-62.79,-188.27:99.0:-0.48,-43.61,-1000.00,-22.34,-0.18,-61.17:-0.00,-49.23,-1000.00,-23.58,-3.90,-64.32:39	0/0:2:1.9493:-1000.00,-50.03,0.00,-20.54,-58.70,-103.92:-1000.00,-52.93,0.00,-21.24,-60.32,-185.61:99.0:-0.48,-50.03,-1000.00,-20.54,-0.18,-58.70:-0.00,-55.65,-1000.00,-21.77,-3.90,-61.85:39	0/2:3:2.8165:-1000.00,-176.41,-17.22,0.00,-18.27,-50.73:-1000.00,-178.60,-16.51,0.00,-19.18,-131.72:99.0:-17.70,-176.41,-1000.00,0.00,-17.40,-18.27:-15.98,-180.80,-1000.00,0.00,-19.89,-20.19:99	0/0:2:1.9832:-1000.00,-52.61,0.00,-18.89,-55.65,-99.55:-1000.00,-55.51,0.00,-19.60,-57.27,-181.24:99.0:-0.48,-52.61,-1000.00,-18.89,-0.18,-55.65:-0.00,-58.23,-1000.00,-20.13,-3.90,-58.80:39	0/0:2:1.8663:-1000.00,-39.35,0.00,-22.44,-60.31,-104.36:-1000.00,-42.25,0.00,-23.14,-61.93,-186.05:99.0:-0.48,-39.35,-1000.00,-22.44,-0.18,-60.31:-0.00,-44.97,-1000.00,-23.67,-3.90,-63.46:39	0/0:2:1.8609:-1000.00,-35.50,0.00,-20.70,-55.44,-95.80:-1000.00,-38.40,0.00,-21.41,-57.06,-177.49:99.0:-0.48,-35.50,-1000.00,-20.70,-0.18,-55.44:-0.00,-41.12,-1000.00,-21.94,-3.90,-58.59:39	0/0:2:1.9805:-1000.00,-51.00,0.00,-18.51,-54.40,-97.22:-1000.00,-53.89,0.00,-19.22,-56.02,-178.92:99.0:-0.48,-51.00,-1000.00,-18.51,-0.18,-54.40:-0.00,-56.61,-1000.00,-19.75,-3.90,-57.55:39	0/2:3:3.0489:-1000.00,-218.37,-28.52,-0.00,-11.80,-39.72:-1000.00,-220.57,-27.82,-0.00,-12.71,-120.71:99.0:-29.00,-218.37,-1000.00,-0.00,-28.70,-11.80:-27.29,-222.77,-1000.00,-0.00,-31.20,-13.72:99	0/0:2:2.0255:-1000.00,-54.67,0.00,-16.57,-50.95,-92.44:-1000.00,-57.57,0.00,-17.28,-52.57,-174.13:99.0:-0.48,-54.67,-1000.00,-16.57,-0.18,-50.95:-0.00,-60.29,-1000.00,-17.81,-3.90,-54.10:390/0:2:1.9782:-1000.00,-55.30,0.00,-20.24,-59.37,-106.03:-1000.00,-58.20,0.00,-20.95,-60.99,-187.73:99.0:-0.48,-55.30,-1000.00,-20.24,-0.18,-59.37:-0.00,-60.92,-1000.00,-21.48,-3.90,-62.52:39	2/2:4:3.8255:-1000.00,-1000.00,-88.65,-11.69,-0.00,-14.41:-1000.00,-1000.00,-87.03,-10.78,-0.00,-94.48:99.0:-89.13,-1000.00,-1000.00,-11.69,-88.83,-0.00:-85.50,-1000.00,-1000.00,-9.77,-89.40,-0.00:98	0/0:2:2.0449:-1000.00,-57.77,0.00,-16.18,-50.84,-92.89:-1000.00,-60.67,0.00,-16.89,-52.46,-174.59:99.0:-0.48,-57.77,-1000.00,-16.18,-0.18,-50.84:-0.00,-63.39,-1000.00,-17.42,-3.90,-53.99:39	0/0:2:2.0128:-1000.00,-53.61,0.00,-17.11,-51.89,-93.73:-1000.00,-56.51,0.00,-17.82,-53.51,-175.43:99.0:-0.48,-53.61,-1000.00,-17.11,-0.18,-51.89:-0.00,-59.23,-1000.00,-18.35,-3.90,-55.04:39	0/0:2:2.1703:-1000.00,-69.03,-0.00,-11.06,-42.14,-81.21:-1000.00,-71.93,-0.00,-11.77,-43.76,-162.91:99.0:-0.48,-69.03,-1000.00,-11.06,-0.18,-42.14:-0.00,-74.65,-1000.00,-12.30,-3.90,-45.29:39	0/0:2:1.9222:-1000.00,-45.63,0.00,-20.84,-58.29,-102.38:-1000.00,-48.53,0.00,-21.55,-59.91,-184.08:99.0:-0.48,-45.63,-1000.00,-20.84,-0.18,-58.29:-0.00,-51.25,-1000.00,-22.08,-3.90,-61.44:39	0/0:2:2.0054:-1000.00,-52.97,0.00,-17.42,-52.42,-94.45:-1000.00,-55.87,0.00,-18.12,-54.04,-176.15:99.0:-0.48,-52.97,-1000.00,-17.42,-0.18,-52.42:-0.00,-58.59,-1000.00,-18.65,-3.90,-55.57:39	0/0:2:1.8780:-1000.00,-40.36,0.00,-21.96,-59.49,-103.24:-1000.00,-43.26,0.00,-22.67,-61.11,-184.94:99.0:-0.48,-40.36,-1000.00,-21.96,-0.18,-59.49:-0.00,-45.98,-1000.00,-23.20,-3.90,-62.64:39	0/0:2:1.9634:-1000.00,-51.30,0.00,-19.92,-57.64,-102.47:-1000.00,-54.20,0.00,-20.63,-59.26,-184.16:99.0:-0.48,-51.30,-1000.00,-19.92,-0.18,-57.64:-0.00,-56.92,-1000.00,-21.16,-3.90,-60.79:39	0/2:3:2.9778:-1000.00,-214.44,-26.14,-0.00,-14.39,-44.99:-1000.00,-216.63,-25.43,-0.00,-15.31,-125.98:99.0:-26.62,-214.44,-1000.00,-0.00,-26.32,-14.39:-24.90,-218.83,-1000.00,0.00,-28.81,-16.32:99	0/0:2:1.8752:-1000.00,-42.32,0.00,-23.28,-62.95,-109.17:-1000.00,-45.22,0.00,-23.99,-64.57,-190.87:99.0:-0.48,-42.32,-1000.00,-23.28,-0.18,-62.95:-0.00,-47.94,-1000.00,-24.52,-3.90,-66.10:390/0:2:1.9670:-1000.00,-49.56,0.00,-18.97,-55.07,-98.02:-1000.00,-52.46,0.00,-19.68,-56.69,-179.71:99.0:-0.48,-49.56,-1000.00,-18.97,-0.18,-55.07:-0.00,-55.18,-1000.00,-20.21,-3.90,-58.22:39	0/0:2:2.1053:-1000.00,-60.92,-0.00,-13.21,-44.94,-84.07:-1000.00,-63.82,-0.00,-13.91,-46.56,-165.77:99.0:-0.48,-60.92,-1000.00,-13.21,-0.18,-44.94:-0.00,-66.54,-1000.00,-14.44,-3.90,-48.09:39	0/0:2:1.9475:-1000.00,-42.82,0.00,-17.72,-50.57,-89.46:-1000.00,-45.72,0.00,-18.43,-52.19,-171.16:99.0:-0.48,-42.82,-1000.00,-17.72,-0.18,-50.57:-0.00,-48.44,-1000.00,-18.96,-3.90,-53.72:39	0/0:2:1.9312:-1000.00,-45.17,0.00,-19.91,-56.09,-98.76:-1000.00,-48.07,0.00,-20.62,-57.71,-180.46:99.0:-0.48,-45.17,-1000.00,-19.91,-0.18,-56.09:-0.00,-50.79,-1000.00,-21.15,-3.90,-59.24:39	0/2:3:2.9500:-1000.00,-218.63,-25.84,-0.00,-15.88,-48.45:-1000.00,-220.82,-25.14,0.00,-16.80,-129.44:99.0:-26.32,-218.63,-1000.00,-0.00,-26.02,-15.88:-24.61,-223.02,-1000.00,0.00,-28.52,-17.81:99	0/0:2:2.0546:-1000.00,-62.31,0.00,-16.76,-53.27,-97.68:-1000.00,-65.21,0.00,-17.46,-54.89,-179.38:99.0:-0.48,-62.31,-1000.00,-16.76,-0.18,-53.27:-0.00,-67.93,-1000.00,-17.99,-3.90,-56.42:39	0/2:3:2.9231:-1000.00,-189.40,-21.67,-0.00,-14.84,-44.27:-1000.00,-191.59,-20.96,-0.00,-15.75,-125.26:99.0:-22.15,-189.40,-1000.00,-0.00,-21.85,-14.84:-20.43,-193.79,-1000.00,0.00,-24.34,-16.76:99	0/0:2:2.0011:-1000.00,-55.34,0.00,-18.50,-55.46,-99.79:-1000.00,-58.24,0.00,-19.21,-57.08,-181.48:99.0:-0.48,-55.34,-1000.00,-18.50,-0.18,-55.46:-0.00,-60.96,-1000.00,-19.74,-3.90,-58.61:39	0/0:2:2.0464:-1000.00,-61.08,0.00,-16.99,-53.50,-97.80:-1000.00,-63.98,0.00,-17.70,-55.12,-179.50:99.0:-0.48,-61.08,-1000.00,-16.99,-0.18,-53.50:-0.00,-66.70,-1000.00,-18.23,-3.90,-56.65:39	0/0:2:1.8831:-1000.00,-36.09,0.00,-19.26,-52.35,-90.97:-1000.00,-38.99,0.00,-19.97,-53.97,-172.66:99.0:-0.48,-36.09,-1000.00,-19.26,-0.18,-52.35:-0.00,-41.71,-1000.00,-20.50,-3.90,-55.50:39	0/0:2:2.0404:-1000.00,-58.52,0.00,-16.70,-52.19,-95.19:-1000.00,-61.42,0.00,-17.40,-53.81,-176.88:99.0:-0.48,-58.52,-1000.00,-16.70,-0.18,-52.19:-0.00,-64.14,-1000.00,-17.93,-3.90,-55.34:39	0/0:2:1.9921:-1000.00,-50.18,0.00,-17.40,-51.68,-92.71:-1000.00,-53.07,0.00,-18.10,-53.30,-174.41:99.0:-0.48,-50.18,-1000.00,-17.40,-0.18,-51.68:-0.00,-55.79,-1000.00,-18.63,-3.90,-54.83:39	0/0:2:1.9579:-1000.00,-50.18,0.00,-19.91,-57.33,-101.76:-1000.00,-53.07,0.00,-20.62,-58.95,-183.45:99.0:-0.48,-50.18,-1000.00,-19.91,-0.18,-57.33:-0.00,-55.79,-1000.00,-21.15,-3.90,-60.48:39	0/0:2:1.9716:-1000.00,-52.82,0.00,-19.86,-57.87,-103.15:-1000.00,-55.72,0.00,-20.56,-59.49,-184.84:99.0:-0.48,-52.82,-1000.00,-19.86,-0.18,-57.87:-0.00,-58.44,-1000.00,-21.09,-3.90,-61.02:39	0/2:3:2.7918:-1000.00,-164.25,-15.30,-0.00,-18.10,-49.56:-1000.00,-166.44,-14.59,-0.00,-19.02,-130.55:99.0:-15.78,-164.25,-1000.00,-0.00,-15.48,-18.10:-14.06,-168.64,-1000.00,-0.00,-17.97,-20.03:99	0/2:3:2.9019:-1000.00,-193.13,-21.50,0.00,-16.02,-47.05:-1000.00,-195.32,-20.79,0.00,-16.94,-128.04:99.0:-21.98,-193.13,-1000.00,0.00,-21.68,-16.02:-20.26,-197.52,-1000.00,0.00,-24.17,-17.95:99	0/0:2:2.0157:-1000.00,-49.60,-0.00,-15.66,-47.62,-86.11:-1000.00,-52.50,0.00,-16.36,-49.24,-167.80:99.0:-0.48,-49.60,-1000.00,-15.66,-0.18,-47.62:-0.00,-55.22,-1000.00,-16.89,-3.90,-50.77:39	0/0:2:2.0582:-1000.00,-72.50,0.00,-19.19,-61.30,-112.57:-1000.00,-75.40,0.00,-19.90,-62.92,-194.26:99.0:-0.48,-72.50,-1000.00,-19.19,-0.18,-61.30:-0.00,-78.12,-1000.00,-20.43,-3.90,-64.45:39
1	833820	CNV_1_833820_921749	T	<CN2>	.	PASS	END=921749;GCFRACTION=0.49;GCLENGTH=87930;GLALTFREQ=NA;GLALTSUM=0.000;GLHETSUM=0.000;GLINBREEDINGCOEFF=NA;GLREFFREQ=NA;GLREFSUM=0.000;GSCALLRATE=0.997;GSCLUSTERSEP=11.84;GSCLUSTERSEPWEIGHTEDMEAN=9.88;GSCLUSTERSEPWEIGHTEDMEDIAN=10.03;GSCNALLELES=2;GSCNCATEGORY=DUP;GSCNDIST=0,0,794,154,17;GSCNMAX=4;GSCNMIN=2;GSCNQUAL=3150.7876;GSDUPLICATEOVERLAP=NA;GSDUPLICATES=NA;GSDUPLICATESCORE=NA;GSELENGTH=80424;GSEXPMEAN=575.1572;GSGMMWEIGHTS=0.0001,0.0001,0.8204,0.1615,0.0178,0.0000;GSM1=1.0294;GSM2=0.5779,2.8895;GSNNONREF=171;GSNONVARSCORE=NA;GSNVARIANT=171;SVTYPE=CNV	GT:CN:CNF:CNL:CNP:CNQ:GL:GP:GQ	0/1:3:2.8511:-1000.00,-142.63,-14.74,-0.00,-13.54,-38.39:-1000.00,-145.83,-14.03,-0.00,-14.50,-123.85:99.0:-14.74,-0.00,-13.54:-13.02,-0.00,-15.51:99	0/0:2:1.8504:-1000.00,-30.72,0.00,-18.70,-49.74,-85.72:-1000.00,-34.62,0.00,-19.40,-51.41,-171.89:99.0:0.00,-18.70,-49.74:0.00,-20.41,-53.42:99	0/0:2:1.9690:-1000.00,-40.22,-0.00,-15.31,-44.50,-79.23:-1000.00,-44.12,0.00,-16.02,-46.16,-165.39:99.0:-0.00,-15.31,-44.50:0.00,-17.03,-48.17:99	0/0:2:1.8924:-1000.00,-35.50,0.00,-18.26,-49.96,-87.02:-1000.00,-39.40,0.00,-18.97,-51.62,-173.18:99.0:0.00,-18.26,-49.96:0.00,-19.98,-53.63:99	0/0:2:1.9695:-1000.00,-42.62,0.00,-16.18,-47.05,-83.79:-1000.00,-46.52,0.00,-16.89,-48.71,-169.95:99.0:0.00,-16.18,-47.05:0.00,-17.90,-50.72:99	0/1:3:2.7690:-1000.00,-136.33,-12.11,-0.00,-15.91,-43.02:-1000.00,-139.52,-11.40,-0.00,-16.87,-128.48:99.0:-12.11,-0.00,-15.91:-10.39,-0.00,-17.88:990/0:2:1.9767:-1000.00,-42.36,-0.00,-15.63,-45.76,-81.67:-1000.00,-46.26,0.00,-16.34,-47.42,-167.83:99.0:-0.00,-15.63,-45.76:0.00,-17.35,-49.43:99	0/0:2:1.8824:-1000.00,-33.41,0.00,-17.89,-48.59,-84.41:-1000.00,-37.31,0.00,-18.59,-50.25,-170.58:99.0:0.00,-17.89,-48.59:0.00,-19.60,-52.26:99	0/0:2:1.8594:-1000.00,-28.83,0.00,-16.94,-45.32,-78.26:-1000.00,-32.73,0.00,-17.65,-46.98,-164.43:99.0:0.00,-16.94,-45.32:0.00,-18.66,-48.99:99	0/0:2:1.9908:-1000.00,-42.31,-0.00,-14.77,-43.79,-78.52:-1000.00,-46.21,-0.00,-15.47,-45.46,-164.68:99.0:-0.00,-14.77,-43.79:0.00,-16.48,-47.47:99	0/1:3:2.9940:-1000.00,-169.57,-21.01,-0.00,-10.87,-34.48:-1000.00,-172.77,-20.30,-0.00,-11.83,-119.94:99.0:-21.01,-0.00,-10.87:-19.29,-0.00,-12.84:99	0/0:2:1.9953:-1000.00,-41.86,-0.00,-14.36,-42.77,-76.79:-1000.00,-45.76,-0.00,-15.07,-44.43,-162.95:99.0:-0.00,-14.36,-42.77:0.00,-16.08,-46.44:99	0/0:2:1.9870:-1000.00,-45.70,0.00,-16.19,-47.83,-85.66:-1000.00,-49.60,0.00,-16.89,-49.50,-171.82:99.0:0.00,-16.19,-47.83:0.00,-17.90,-51.51:99	1/1:4:3.6896:-1000.00,-313.06,-60.84,-5.78,-0.00,-13.93:-1000.00,-315.30,-59.18,-4.82,-0.00,-98.43:48.2:-60.84,-5.78,-0.00:-57.17,-3.82,-0.00:38	0/0:2:2.0319:-1000.00,-45.76,-0.00,-13.54,-41.90,-76.18:-1000.00,-49.66,-0.00,-14.25,-43.56,-162.34:99.0:-0.00,-13.54,-41.90:-0.00,-15.26,-45.57:99	0/0:2:2.0333:-1000.00,-45.44,-0.00,-13.37,-41.44,-75.39:-1000.00,-49.34,-0.00,-14.08,-43.11,-161.55:99.0:-0.00,-13.37,-41.44:-0.00,-15.09,-45.12:99	0/0:2:2.1562:-1000.00,-54.98,-0.00,-9.46,-35.01,-67.00:-1000.00,-58.88,-0.00,-10.16,-36.68,-153.17:99.0:-0.00,-9.46,-35.01:-0.00,-11.17,-38.69:99	0/0:2:1.9784:-1000.00,-42.03,-0.00,-15.41,-45.16,-80.65:-1000.00,-45.93,0.00,-16.11,-46.83,-166.82:99.0:-0.00,-15.41,-45.16:0.00,-17.12,-48.84:99	0/0:2:2.0137:-1000.00,-43.86,-0.00,-13.97,-42.39,-76.59:-1000.00,-47.76,-0.00,-14.68,-44.06,-162.75:99.0:-0.00,-13.97,-42.39:-0.00,-15.69,-46.07:99	0/0:2:1.9737:-1000.00,-40.41,-0.00,-15.10,-44.07,-78.59:-1000.00,-44.31,-0.00,-15.81,-45.74,-164.75:99.0:-0.00,-15.10,-44.07:0.00,-16.82,-47.75:99	0/0:2:1.9964:-1000.00,-44.78,-0.00,-15.28,-45.57,-81.86:-1000.00,-48.68,0.00,-15.99,-47.24,-168.02:99.0:-0.00,-15.28,-45.57:0.00,-17.00,-49.25:99	0/1:3:2.8754:-1000.00,-157.36,-16.88,-0.00,-14.02,-40.39:-1000.00,-160.56,-16.17,-0.00,-14.98,-125.85:99.0:-16.88,-0.00,-14.02:-15.16,-0.00,-15.99:99	0/0:2:1.8722:-1000.00,-34.33,0.00,-19.14,-51.64,-89.48:-1000.00,-38.23,0.00,-19.85,-53.31,-175.65:99.0:0.00,-19.14,-51.64:0.00,-20.86,-55.32:99	0/0:2:1.9492:-1000.00,-38.77,-0.00,-15.95,-45.58,-80.66:-1000.00,-42.67,0.00,-16.66,-47.24,-166.83:99.0:-0.00,-15.95,-45.58:0.00,-17.67,-49.25:99	0/0:2:2.1130:-1000.00,-50.33,-0.00,-10.57,-36.36,-68.23:-1000.00,-54.23,-0.00,-11.28,-38.02,-154.40:99.0:-0.00,-10.57,-36.36:-0.00,-12.29,-40.03:99	0/0:2:1.9876:-1000.00,-37.96,-0.00,-13.43,-39.71,-71.11:-1000.00,-41.86,-0.00,-14.14,-41.37,-157.28:99.0:-0.00,-13.43,-39.71:-0.00,-15.15,-43.38:99	0/0:2:1.9235:-1000.00,-36.12,0.00,-16.45,-46.02,-80.85:-1000.00,-40.02,0.00,-17.15,-47.69,-167.01:99.0:0.00,-16.45,-46.02:0.00,-18.16,-49.70:99	0/1:3:2.8684:-1000.00,-163.49,-17.35,-0.00,-14.83,-42.53:-1000.00,-166.68,-16.65,-0.00,-15.79,-127.99:99.0:-17.35,-0.00,-14.83:-15.64,-0.00,-16.80:99	0/0:2:2.0436:-1000.00,-49.86,-0.00,-14.06,-44.08,-80.48:-1000.00,-53.76,-0.00,-14.76,-45.74,-166.65:99.0:-0.00,-14.06,-44.08:-0.00,-15.77,-47.75:99	0/1:3:2.7992:-1000.00,-134.65,-12.71,-0.00,-14.58,-40.08:-1000.00,-137.84,-12.01,-0.00,-15.54,-125.54:99.0:-12.71,-0.00,-14.58:-11.00,-0.00,-16.55:99	0/0:2:2.0064:-1000.00,-45.58,-0.00,-14.95,-45.01,-81.12:-1000.00,-49.48,-0.00,-15.65,-46.67,-167.28:99.0:-0.00,-14.95,-45.01:0.00,-16.66,-48.68:99	0/0:2:2.0319:-1000.00,-48.23,-0.00,-14.27,-44.15,-80.27:-1000.00,-52.13,-0.00,-14.97,-45.81,-166.43:99.0:-0.00,-14.27,-44.15:0.00,-15.98,-47.82:99	0/0:2:1.9178:-1000.00,-31.80,-0.00,-14.82,-41.29,-72.41:-1000.00,-35.70,-0.00,-15.53,-42.96,-158.58:99.0:-0.00,-14.82,-41.29:0.00,-16.54,-44.97:99	0/0:2:1.9920:-1000.00,-43.41,-0.00,-15.08,-44.78,-80.31:-1000.00,-47.31,-0.00,-15.79,-46.44,-166.48:99.0:-0.00,-15.08,-44.78:0.00,-16.80,-48.45:99	0/0:2:1.9945:-1000.00,-40.93,-0.00,-14.09,-41.92,-75.24:-1000.00,-44.83,-0.00,-14.79,-43.58,-161.41:99.0:-0.00,-14.09,-41.92:-0.00,-15.80,-45.59:99	0/0:2:1.9695:-1000.00,-41.84,-0.00,-15.89,-46.20,-82.28:-1000.00,-45.74,0.00,-16.60,-47.87,-168.45:99.0:-0.00,-15.89,-46.20:0.00,-17.61,-49.88:99	0/0:2:1.9433:-1000.00,-40.44,0.00,-17.02,-48.41,-85.52:-1000.00,-44.34,0.00,-17.73,-50.07,-171.69:99.0:0.00,-17.02,-48.41:0.00,-18.74,-52.08:99	0/1:3:2.7139:-1000.00,-121.46,-9.43,-0.00,-16.21,-42.68:-1000.00,-124.65,-8.72,-0.00,-17.17,-128.13:87.2:-9.43,-0.00,-16.21:-7.71,-0.00,-18.18:77	0/1:3:2.8318:-1000.00,-145.37,-14.55,-0.00,-14.50,-40.62:-1000.00,-148.56,-13.85,-0.00,-15.46,-126.08:99.0:-14.55,-0.00,-14.50:-12.84,-0.00,-16.47:99	0/0:2:2.0075:-1000.00,-39.71,-0.00,-12.98,-39.12,-70.52:-1000.00,-43.61,-0.00,-13.68,-40.78,-156.69:99.0:-0.00,-12.98,-39.12:-0.00,-14.69,-42.79:99	0/0:2:2.1023:-1000.00,-63.86,-0.00,-14.03,-47.52,-88.79:-1000.00,-67.76,-0.00,-14.73,-49.18,-174.95:99.0:-0.00,-14.03,-47.52:-0.00,-15.74,-51.19:99

I convert it to

FID	IID	CHR	BP1	BP2	TYPE	SCORE	SITES
CP1600001	CP1600001	1	790997	830957	3	0	0
CP1600002	CP1600002	1	790997	830957	2	0	0

then I run

plink-1.07-x86_64/plink --cnv-list genomestrip.cnv --cnv-make-map
plink-1.07-x86_64/plink --cnv-list genomestrip.cnv --map plink.cnv.map --fam genomestrip.fam
plink-1.07-x86_64/plink --cnv-list genomestrip.cnv --map plink.cnv.map --fam genomestrip.fam --cnv-intersect glist-hg38.dms  --cnv-test-region --mperm 10000

the result is

$head plink.cnv.regional.summary.mperm
 CHR           REGION         EMP1         EMP2
   1          DDX11L1            1            1
   1           WASH7P            1            1
   1        MIR6859-1            1            1
   1        MIR1302-2            1            1
   1          FAM138A            1            1
   1            OR4F5            1            1
   1        LOC729737            1            1
   1        MIR6859-1            1            1
   1          FAM138D            1            1

Which step did I do wrong?

Best,
Maggie

PLINK2: --genome not recognized

I'm using development build (April 16) on Linux 64-bit. When I typed in plink2 --genome, I got

PLINK v2.00a2LM 64-bit Intel (16 Apr 2018)     www.cog-genomics.org/plink/2.0/
(C) 2005-2018 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to plink2.log.
Options in effect:
  --genome

Start time: Wed Apr 18 10:01:28 2018
Error: Unrecognized flag ('--genome').
For more info, try 'plink2 --help [flag name]' or 'plink2 --help | more'.

According to the documentation (https://www.cog-genomics.org/plink2/ibd), --genome should be available.

[REQUEST] Flip-scan with D'

tl;dr - it would be useful if there were an option for using D' instead of correlation for --flip-scan.

--flip-scan is a useful tool in quality control for identifying flipped ambiguous SNPs when component parts of a GWAS have been genotyped separately. It can also be used to identify variants that have been miscalled during genotyping, as they (may) depart from the expected pattern of LD with neighbouring SNPs. To some extent, this is captured by --flip-scan's current correlation-based measure. However, D' might be a more useful measure here, as it is more sensitive to the presence of unlikely haplotypes. As such, it would be useful if --flip-scan had a D' mode as well.

Ideally, the output would be a variant of that from --flip-scan verbose

CHR_INDX     Chromosome code
SNP_INDX     Index variant identifier
BP_INDX      Index variant base-pair coordinate
A1_INDX      Index variant allele 1
SNP_PAIR     Second variant identifier
BP_PAIR      Second variant base-pair coordinate
A1_PAIR      Second variant allele 1
D_PRIME_A    Case-only D'
D_PRIME_U    Control-only D'

Feature wish: --indep-r2

Hi,
It would be nice to have a --indep-r2, (or --indep-pairwise dprime) that selects tag SNPs based on the real (haplotype-based) r^2.
Rationale:

  • the non-haplotype based r^2 is an approximation
  • it seems that the haplotype-based r^2 is slower to compute, but not that slow. On my tests it is roughly 3 times slower to compute
  • it would be consistent with --ld

Anyway, thanks for this great software.

[request] append_alleles_list, etc. in python API for PLINK2

Is it possible that PLINK2 python API can support a functionality to write multiple variants?

PgenReader currently has read_alleles_list, read_alleles_range, etc. and they are pretty useful. It would be great if there are some similar functions for PgenWriter as well.

--r2 dprime does not seem to work

Hello,
On my dataset (available upon request):
plink --bfile pair485_486 --ld 485 486

PLINK v1.90b2p 64-bit (22 May 2014)        https://www.cog-genomics.org/plink2
(C) 2005-2014 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to plink.log.
16047 MB RAM detected; reserving 8023 MB for main workspace.
2 variants loaded from .bim file.
279 people (0 males, 0 females, 279 ambiguous) loaded from .fam.
Ambiguous sex IDs written to plink.nosex .
Individual-major .bed file detected.  Transposing to SNP-major form.
Using 1 thread (no multithreaded calculations invoked).
Calculating allele frequencies... done.
Total genotyping rate is 0.795699.
2 variants and 279 people pass filters and QC.
Note: No phenotypes present.

--ld 485 486:

   R-sq = 0.0840844      D' = 0.335014

   Haplotype     Frequency    Expectation under LE
   ---------     ---------    --------------------
          CG      0.027563                0.006336
          TG      0.063346                0.084573
          CC      0.042134                0.063361
          TC      0.866957                0.845730

   In phase alleles are CG/TC

The r2 and D' are correct (i.e. same value as computed by myself or SNPRelate).
But if I do:
plink --bfile pair485_486 --r2 dprime --ld-window-r2 0
I get

 CHR_A         BP_A SNP_A  CHR_B         BP_B SNP_B           R2           DP 
     1    184100503  485      1    184244493  486    0.0277044     0.288944 

The values are totally different, and if I understood correctly the documentation they should not.

Segfault with --remove-cluster-names

Hi,

when running as such
plink --bfile plink --remove-cluster-names SomePop --make-bed --out newplink --family

The call ends up with a segfault (tested on several datasets). It seems to take a very looooong time to get there though.

Easy work around is to
grep SomePop plink.fam > SomePop.indiv
and then just use
plink --remove SomePop.indiv

but I figured I should tell you about the bug.

Thanks for the software btw :)

sanity check missing (--geno) filter

Hey - I loving the speed ups with the new plink. I wish I had this back in 08!

I'm trying to extract chrY variants from high quality females. Independent of PAR I get lot's of artefacts on exomes which are causing problems.

Calculating missing or trying to filter on missing doesn't seem to work with small datasets (n=4). That or it could be due to the handling of chrY on females. Ideas?

test1.zip

# create the input ideally with --maf 1e-9 and --geno 1e-9
#plink --bfile xxx --chr 24  --keep high_confidence_females.txt --make-bed --out test1

# confirm that there are a mix of missing and variable positions
plink --bfile test1 --recode A --out test2

# missing/geno filtering doesn't work
plink --bfile test1 --chr 24  --geno 0.000001 --recode A --out test2
plink --bfile test1 --chr 24  --geno 0.999999 --recode A --out test2

# yup calculating missing is giving nan
plink --bfile test1  --chr 24 --miss  --out test2

genome full outputs IBS0 constant

Command of type:
plink --bfile plink --genome full
Produces plink.genome file where all values on column IBS0 are constant depending on the input file. It's probably an output formatting issue since the other numbers match with old plink.

Missing zlib

The Makefile appears to assume that the zlib library is located in the current directory

g++ -Wall -O2 plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_rserve.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c Rconnection.cc hfile.c bgzf.c -m32 -o plink -L/usr/lib64/atlas -llapack -lcblas -latlas -lm -lpthread -L. zlib-1.2.8/libz.so.1.2.8
g++: error: zlib-1.2.8/libz.so.1.2.8: No such file or directory

It seems it might be better to use the system's zlib library.

Any updates on https://www.cog-genomics.org/?

Sorry to create this issue here, but there are no "contact" links on the cog-genomics.org site.

I saw Steven Hsu's talk on this study over a year ago, and I'm very curious about it. I notice that the main page of the site hasn't had any "news" items in over two years. How is it going?

If you could pass this message on to the right person, I'd appreciate it!

Bfile parameter

Hello,
I'm following this paper for QC filtering, but I'm running into an issue when I run this:
plink --bfile 00_data/hgdp –-genome --out 01_QC/03_duplication/hgdp
It outputs this error:
Error: --bfile accepts at most 1 parameter.
But I don't understand why I'm receiving that error since I specified the prefix within the 00_data folder?

Incorrect frequency result, I think.

I am not sure this is an issue with plink or with the BCF file or if the issue has been fixed, but here is a little discrepancy I found.

The BCF line for the variant is

22   16050654   10   A   <CN0>,<CN2>,<CN3>,<CN4>   100   PASS   AC=0,0,3,1;AF=0.00179712,0.0173722,0.119609,0.00399361;AN=40;CS=DUP_gs;END=16063474;NS=20;SVTYPE=CNV;DP=22545;ASN_AF=0,0,0,0;AMR_AF=0,0.0101,0.219,0.0072;SAS_AF=0.0082,0.1094,0.002;EUR_AF=0,0.007,0.0944,0.003;EAS_AF=0.001,0.0169,0.2361,0.0099;AFR_AF=0.0061,0.0363,0.0053,0;SAN_AF=0,0,0,0   GT:DP   3|0:4   0|0:7   0|0:7   0|0:11  0|0:11  0|0:11  0|4:5   0|0:11  0|0:10  0|3:16  0|0:1   0|0:14  0|0:6   0|0:9   0|3:10  0|0:13  0|0:1   0|0:9   0|0:4   0|0:7

And the result of the command

~/src/plink2/plink \
    --bfile test.bcf.plink \
    --freq

was

  22   10 <CN3>    A      0.07895       38

Should there be another line for <CN4>?

I converted the BCF to BED using the command

~/src/plink2/plink \
    --bcf test.bcf \
    --make-bed \
    --out test.bcf.plink \
    --allow-extra-chr

And my version info is

~/src/plink2/plink --version
PLINK v1.90b2c 64-bit (29 Jul 2014)

Mismatch in --genome compared to 1.07 (bug in ng)

Got following result from "--genome full gz" . Z2 (and PI_HAT) is calculated wrong. Both of them should be about 1.0. The error is clear since Z0+Z1+Z2 < 1.0

using commit f7b55fc

       FID1           IID1           FID2           IID2 RT    EZ      Z0      Z1      Z2  PI_HAT PHE       DST     PPC   RATIO    IBS0    IBS1    IBS2  HOMHOM  HETHET

c990_1_10191NV c990_1_10191NV THL COROG438000 UN NA 0.0002 0.0000 0.0000 0.0000 0 0.999981 1.0000 4104.0000 1 1 79998 1.0000 4104.0000

`--ld-snp` fails silently if there is missing data in focal SNP

It just leaves an empty file. This is for plink2 (e.g., PLINK v1.90b3h). My command looks like the following.

    plink \
    --vcf my.vcf.gz \
    --snps-only \
    --keep-allele-order \
    --keep samples.2.keep \
    --geno 0.05 \
    --r2 dprime with-freqs \
    --ld-window-r2 0.0 \
    --ld-window 1000000 \
    --ld-window-kb 1000000 \
    --ld-snp rsID_1232152 \
    --out my.output

If I manually excluded the samples containing ./. using --remove, then it seems to work.

Plink 1.9 --test-missing gives incomplete variant report

Hello! I am using --test-missing to compare differential missingness in variants between cases vs. controls. I have ~200,000 variants that ought to be compared, but the .missing result file contains only ~77,000 variants with reported frequencies.

These results have previously been pruned for excessive missingness, heterogeneity in individuals, etc.

I am running PLINK v1.90b4.6 64-bit (15 Aug 2017) on Linux Red Hat Enterprise. Relevant output from the --test-missingcommand:

196849 variants loaded from .bim file.
1487 people (739 males, 748 females) loaded from .fam.
1487 phenotype values loaded from .fam.
Before main variant filters, 1083 founders and 404 nonfounders present.
Warning: 1039 het. haploid genotypes present (see
merged_QCd_batchcomparison.hh ); many commands treat these as
missing.
Total genotyping rate is 0.999216.
196849 variants and 1487 people pass filters and QC.
Among remaining phenotypes, 508 are cases and 979 are controls.
Writing --test-missing report to merged_QCd_batchcomparison.missing
... done.

Any ideas why the report is truncated?

lfile 3+ different alleles error

I'm struggling getting some illumina genotypes to load. I've converted the gtreports to lgen format but keep getting the 3+ allele error. In the example below all that's there is A and 0. Specifying --missing-genotype 0 didn't seem to help.

mega.map
mega.fam
mega.lgen

plink --lfile mega
Error: Variant '1:10001102-G-T' in .lgen file has 3+ different alleles

This was using code from Feb 2016. Using a version from 2014 worked.

Bug in plink --merge-list using one ped/map file per sample

I have a pipeline that generates a ped/map file for each sample using an Illumina gtc file and a python script that I wrote. I then use plink --file samp1 --merge-list samps2_n.txt --make-bed --out AllSamps to merge all of the genotypes together. I have found a few instances when the genotypes in the merged bed file are not 100% concordant with the genotypes in the original ped files. It seems to only happen if samples are in a particular order in the --merge-list file, though I can't figure out if there is a pattern as to when it happens.

I have been able to replicate this bug using both "PLINK v1.90b4.10 64-bit (3 Nov 2017)" and "PLINK v1.90b3.32 64-bit (24 Feb 2016)".

After the merge I checked concordance of the original ped file with the merged file using --merge-mode 7 and the concordance for 6 samples looked like this:

SC112442_PB100119_F03.concordance.log:674909 concordant, for a concordance rate of 0.970771.
SC112445_PB100119_E09.concordance.log:683633 concordant, for a concordance rate of 0.983495.
SC197867_PB100119_D10.concordance.log:687412 concordant, for a concordance rate of 0.989207.
SC198277_PB100119_E10.concordance.log:689111 concordant, for a concordance rate of 0.991734.
SC198278_PB100119_F10.concordance.log:690717 concordant, for a concordance rate of 0.993527.
SC198302_PB100119_H01.concordance.log:695791 concordant, for a concordance rate of 1.

So for the 6 samples above, there was only 1 sample that was the expected 100% concordant. This was "samp1" in my example above.

I have files that I can send you to replicate the bug, though even compressed they seem to be too big to attach here.

Thanks,
Eric

strange artifacts seen with --r2

I've been generating large maps of kb-aggregated pairwise LD r^2 values from the 1000 genomes project. The new implementation in plink-1.9 is blazingly fast :), but I keep getting a strange "doubling" distortion effect in the lower half of the matrix. It extent of the effect is different in --bin and --bin4 mode, and I saw it in --gz mode as well. I get the right result using the text dump LD matrix from plink-1.07. I've put together a repo that reproduces the problem:

https://github.com/nezar-compbio/plink2-bug

--vcf-idspace-to _ and Error: Multiple instances of '_' in sample ID.

I am not sure how to get around this issue.

time ./plink --make-bed --vcf foo.vcf.gz --out foo.vcf.gz.plink --allow-extra-chr --vcf-idspace-to _
PLINK v1.90b3d 64-bit (10 Feb 2015)        https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to foo.vcf.gz.plink.log.
129004 MB RAM detected; reserving 64502 MB for main workspace.
Error: Multiple instances of '_' in sample ID.

Seg fault on --make-bed

I am trying to make a bed file from a 1000 genomes phase 3 bam file, and it seg faults after about 42 minutes.

The version is:

$ plink
PLINK v1.90b2c 64-bit (29 Jul 2014)

The command was:

$ plink \
--make-bed \
--bcf ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf \
--out ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink \
--allow-extra-chr

The output was:

PLINK v1.90b2c 64-bit (29 Jul 2014)         https://www.cog-genomics.org/plink2
(C) 2005-2014 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.log.
32054 MB RAM detected; reserving 16027 MB for main workspace.
--bcf: 84739k variants complete.
ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink-temporary.bed
+
ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink-temporary.bim
+
ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink-temporary.fam
written.
84739846 variants loaded from .bim file.
2504 people (0 males, 0 females, 2504 ambiguous) loaded from .fam.
Ambiguous sex IDs written to
ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.nosex
.
Using 1 thread (no multithreaded calculations invoked).
Calculating allele frequencies... done.
Total genotyping rate is 0.980324.
84739846 variants and 2504 people pass filters and QC.
Note: No phenotypes present.
--make-bed to
ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.bed
+
ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.bim
+
ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.fam
Segmentation fault (core dumped)

There were a number of temp files created, here are their sizes and the source bcf size:

 129G ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf
  62K ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink-temporary.fam
    0 ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.log
 2.0G ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink-temporary.bim
  50G ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink-temporary.bed
  40K ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.nosex
    0 ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.bed
 2.0G ALL.phase3_shapeit2_mvncall_integrated_v5_extra_anno.20130502.genotypes.bcf.plink.bim

I am happy to provide any other debug info, just let me know what you need.

Thanks,
Ryan

"Malformed .pgen file" when exporting from bgen

Hi,

I am trying to export a portion of bgen+sample to transposed .traw format:
plink2 --bgen inputfile.bgen --sample inputfile.sample --keep input.sample --maf 0.001 --export A-transpose --out test
it successfully exported bgen+sample to temporary psam+pgen+pvar but failed on calculating frequencies stage with error and exits:

Calculating allele frequencies... 0%
Error: Malformed .pgen file.

I got PLINK v2.00aLM 64-bit Intel (4 Nov 2017) and Ubuntu 16.04 LTS, previous PLINK v2.00aLM 64-bit Intel (16 Oct 2017) version works fine.

Plink 1.9 fails to build with GCC 6

Hi,
GCC 6 has not been released yet, but it's expected that GCC 6 will become the default compiler for Debian Stretch (next release). As reported by Martin Michlmayr, plink 1.9 fails to build [1] with GCC 6:

sbuild (Debian sbuild) 0.67.0 (26 Dec 2015) on dl580gen9-02.hlinux
...
make[2]: Entering directory '/<>'
g++ -Wall -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_perm.c plink_rserve.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c Rconnection.cc hfile.c bgzf.c -o plink -llapack -lcblas -latlas -lm -lpthread -ldl -lz
In file included from plink.c:19:0:
plink_common.h:62:19: error: expected unqualified-id before 'long'
#define int64_t long long
^

plink_common.h:62:19: error: expected ';' before 'long'
plink_common.h:62:24: error: declaration does not declare anything [-fpermissive]
#define int64_t long long
^

plink_common.h:61:20: error: expected unqualified-id before 'unsigned'
#define uint64_t unsigned long long
^

plink_common.h:61:20: error: expected ';' before 'unsigned'
plink_common.h:61:34: error: declaration does not declare anything [-fpermissive]
#define uint64_t unsigned long long
^

You can see the full build log here [2].

Best regards,
Dylan

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=811910
[2] https://launchpadlibrarian.net/233688889/buildlog_ubuntu-xenial-amd64.plink1.9_1.90~b3b-150117-1_BUILDING.txt.gz

Plink 1.9 fails to build on some architectures

Hi,
Plink 1.9 is now in official Debian repository [1] but it fails to build [2-3] on some architectures (arm64, ppc64el, s390x, etc) due to a missing header (emmintrin.h).

So what do you think about this? Should I disable build for these architectures or it is possible to fix this missing header?

Best regards,
Dylan

[1] https://tracker.debian.org/pkg/plink1.9
[2] https://buildd.debian.org/status/package.php?p=plink1.9
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799471

What is the multiple correction method used in CNV region-based assco

Hi Christopher,

I have got some CNV results for about 1000 samples, and I followed the instructions http://zzz.bwh.harvard.edu/plink/cnv.shtml#reg-assoc on the website to perform a region-based association test. In the result there’s a EMP1 and EMP2.

As what it says on the web page,
EMP1 Empirical p-value, per region
EMP2 Empirical p-value, corrected for all tests

However, it is not very clear to me how EMP2 was calculated, by that I mean what method has been applied for multiple tests correction.
Base on my data results, the correction seems to be stringent.

I’ve looked at other sections on the web page but couldn’t find a clear answer.

Could you explain a little on that or please point me to the relevant resources.

Thank you very much.

Regards,
Ruqian

bug with --indep-pairwise ?

Possible bug: in short the snp '5504' is pruned out but should not.

plink --bfile g10 --indep-pairwise 10 1 0.6
(~ window of 10 snps, step by 1, min R2=0.6)
cat plink.prune.out 
5299
5329
5364
5431
5500
5504

But the closest snp in LD with 5504 is 5505, with R2=0.55

plink --bfile g10 --r2 gz dprime --ld-window 1000 --ld-window-r2 0.5
zcat plink.ld.gz 

 CHR_A         BP_A SNP_A  CHR_B         BP_B SNP_B           R2           DP 
    10     35833269 5285     10     35908553 5286     0.629441            1 
    10     44234390 5299     10     44236876 5300     0.859837            1 
    10     59232437 5329     10     59239732 5330     0.736516     0.959105 
    10     67462827 5363     10     67472107 5364     0.752807       0.9897 
    10     85763376 5430     10     85766574 5431     0.735795            1 
    10    109392397 5500     10    109393124 5501     0.684211     0.989152 
    10    110105576 5504     10    110110936 5505     0.550636            1 

extra check:

plink --bfile g10 --ld 5504 5505
PLINK v1.90b2p 64-bit (27 May 2014)        https://www.cog-genomics.org/plink2
(C) 2005-2014 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to plink.log.
16047 MB RAM detected; reserving 8023 MB for main workspace.
359 variants loaded from .bim file.
279 people (0 males, 0 females, 279 ambiguous) loaded from .fam.
Ambiguous sex IDs written to plink.nosex .
Using 1 thread (no multithreaded calculations invoked).
Calculating allele frequencies... done.
Total genotyping rate is 0.996805.
359 variants and 279 people pass filters and QC.
Note: No phenotypes present.

--ld 5504 5505:

   R-sq = 0.550636       D' = 1

   Haplotype     Frequency    Expectation under LE
   ---------     ---------    --------------------
          GG     -0                       0.180072
          TG      0.469534                0.289462
          GA      0.383513                0.203440
          TA      0.146953                0.327026

   In phase alleles are GA/TG

Did I miss something ?

Dataset available upon request, I do not know how to attach it to the issue.

--make-just-fam error : no variants remaining

Hi

PLINK v1.90b5 gives an error when I try to make just a family file:

PLINK v1.90b5 64-bit (14 Nov 2017)
Options in effect:
--fam dos_pts_PROM_mix_am-qc.hg19.ch.fl.chr10_027_030.out.dosage.fam
--make-just-fam
--memory 500
--out dos_pts_PROM_mix_am-qc.hg19.ch.fl.chr10_027_030

Start time: Mon Dec 4 21:48:55 2017

Random number seed: 1512420535
64384 MB RAM detected; reserving 500 MB for main workspace.
3451 people (0 males, 3451 females) loaded from .fam.
3451 phenotype values loaded from .fam.
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 3414 founders and 37 nonfounders present.
Error: No variants remaining.

End time: Mon Dec 4 21:48:55 2017

This doesn't occur in an earlier version,

PLINK v1.90b3y 64-bit (4 Nov 2015) https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to test2.log.
Options in effect:
--fam dos_pts_PROM_mix_am-qc.hg19.ch.fl.chr9_141_144.out.dosage.fam
--make-just-fam
--memory 500
--out test2

32096 MB RAM detected; reserving 500 MB for main workspace.
3451 people (0 males, 3451 females) loaded from .fam.
3451 phenotype values loaded from .fam.
Using 1 thread (no multithreaded calculations invoked.
Before main variant filters, 3414 founders and 37 nonfounders present.
Among remaining phenotypes, 1698 are cases and 1753 are controls.
--make-just-fam to test2.fam ... done.

I am guessing that --allow-no-vars would function as a work-around.

Also, is it possible to export a new .fam file when you filter down a dosage file?

e.g. to get a new family file after removing subjects:
plink --dosage filename.fam --fam filename.fam --remove remove.subjects --write-dosage --out dose_revised

Thanks
Adam

Alternative phenotypes are not respected

Command: "plink --bfile input --pheno alt.pheno --assoc"
gives different results for 1.07 and 1.9 with 1.9 giving wrong ones. At least for 1,2,-9 coded case/control phenotypes, the values from alt.pheno are not used in the association calculation. Instead, the original phenotype from input is used.

The alt.pheno file is read, as '--all-pheno' gives the correct name of the phenotype but the phenotype values are lost somewhere.

Beta or OR in logistic regression

Dear Chang,

I am using the following command for gwas analysis.
plink --dosage $gprobs.file --fam $fam --covar $cov --covar-name PC1-PC5 --out $out

Does the BETA column in the output file represents the regression coefficient or the OR value? Is the SE column for the effect or for the OR? I tried to search the answers in the source code but haven't found the clue.

Thank you very much in advance.

Best,
Siyang

Common copy number polymorphism Results

Hi,

I called CNV using GenomeSTRiP software, I analyzed the CNV data via plink(v1.07) --gfile command,
and in the only results plink.gvar.summary FIELD and VALUE columns , what is the meaning of CNV yes or no?

What to do to get other information like the P and OR value from Basic case/control association test ?

Thank you
Best

Name clash with plink from ssh clone putty

Hi,
I am involved in Debian Med project which provide a GNU/Linux distribution for biomedical research. I am making a package of plink2 [1] for integration in official Debian repository, but as you know, there is a name clash with plink from ssh clone putty. So, to avoid the name clash with the first plink, plink2 and plink from ssh clone putty, maybe it could be useful to change the default name of the binary to plink2 or something like that.

At http://bugs.debian.org/503367 and http://bugs.debian.org/771154#25 you can read the full discussion about a name clash between one component of the frequently used ssh software putty and plink.

Best regards,
Dylan

[1] http://anonscm.debian.org/cgit/debian-med/plink2.git/

Plink hangs

(I am new to using plink and not formally trained in bioinformatics), first time trying to use plink it was connecting to web for a long time without anything happening, so i tried --noweb. Without realizing my error I am now stuck. Plink hangs and I can not write any commands, please advise!
See below where it gets stuck

/Users/linnmaristorengen/plink_mac/plink ; exit;
PLINK v1.90b5.2 64-bit (9 Jan 2018) www.cog-genomics.org/plink/1.9/
(C) 2005-2018 Shaun Purcell, Christopher Chang GNU General Public License v3

plink [input flag(s)...] {command flag(s)...} {other flag(s)...}
plink --help {flag name(s)...}

Commands include --make-bed, --recode, --flip-scan, --merge-list,
--write-snplist, --list-duplicate-vars, --freqx, --missing, --test-mishap,
--hardy, --mendel, --ibc, --impute-sex, --indep-pairphase, --r2, --show-tags,
--blocks, --distance, --genome, --homozyg, --make-rel, --make-grm-gz,
--rel-cutoff, --cluster, --pca, --neighbour, --ibs-test, --regress-distance,
--model, --bd, --gxe, --logistic, --dosage, --lasso, --test-missing,
--make-perm-pheno, --tdt, --qfam, --annotate, --clump, --gene-report,
--meta-analysis, --epistasis, --fast-epistasis, and --score.

'plink --help | more' describes all functions (warning: long).
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process executed]

--update-ids: 1 person updated. How update FID in .fam and .ped files?

Hi,

I converted my .cvf file into .bed/.fam/.bim format. For that I had to use --const-fid 0 because I was having this error message: Multiple instances of '_' in sample ID.

Then, all the families ID (FID) were set to '0'.

This is, however, causing me problems when I try to use Mega2, which throw me an error message because all FIDs are 0 and this is wrong because Mega2 is reading that all individuals belong to the same family. Anyway, what happens is that I need to edit FID so that each individuals as an unique FID (i.e FAM1, FAM2, FAM3..etc). Doing so, Mega2 will understand that all the individuals are unrelated (and hopefully I won't receive any error messages!).

I tried what it is explained here: (in the section 'update individuals information'). Specifically, I prepared a .txt file with four columns: old FID, old IID, new FID, new IID. It looks like this (only three first rows):

0 NWZ_106801_P03_WH01 FAM1 NWZ:106801:P03:WH01
0 NWZ_106801_P01_WD11 FAM2 NWZ:106801:P01:WD11
0 NWZ_106801_P03_WG01 FAM3 NWZ:106801:P03:WG01

Then I used this: $ plink2 -file myplink --update-ids EditFIDandIID.txt --make-bed --out myplinkRFfids

and this was what I got:

PLINK v1.90b3 64-bit (11 Jan 2015) https://www.cog-genomics.org/plink2
(C) 2005-2015 Shaun Purcell, Christopher Chang GNU General Public License v3
Logging to myplinkRFfids.log.
8192 MB RAM detected; reserving 4096 MB for main workspace.
.ped scan complete (for binary autoconversion).
Performing single-pass .bed write (3412 variants, 265 people).
--file: myplinkRFfids-temporary.bed + myplinkRFfids-temporary.bim +
myplinkRFfids-temporary.fam written.
3412 variants loaded from .bim file.
265 people (0 males, 0 females, 265 ambiguous) loaded from .fam.
Ambiguous sex IDs written to myplinkRFfids.nosex .
--update-ids: 1 person updated.
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 265 founders and 0 nonfounders present.
Calculating allele frequencies... done.
Total genotyping rate is 0.99727.
3412 variants and 265 people pass filters and QC.
Note: No phenotypes present.

The problem is that this just updated 1 individuals!, as also showed in the .fam when I open it:

FAM1 NWZ:106801:P03:WH01 0 0 0 -9
0 NWZ_106801_P01_WD11 0 0 0 -9
0 NWZ_106801_P03_WG01 0 0 0 -9

Does anyone knows what am I doing wrong? and what can I do to update FID of all the individuals successfully?

Thanks in advance,

Ángela Parody-Merino

cleanup_chrom_info is deallocating memory already dealloced

cleanup_chrom_info(&chrom_info);
is deallocating memory that has already been deallocated.

$ gdb ../plink-ng/plink
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /blah/plink-ng/plink...done.
(gdb) set args --vcf gdap_pilot.vcf.gz --memory 8000 --make-bed --out gdap_pilot --set-missing-var-ids @:#[b38]$1,$2 --autosome-xy --allow-extra-chr --double-id --biallelic-only --update-sex ../meta/gdap_pilot.sex --split-x b38 --within ../meta/gdap_pilot.clusters
(gdb) run
Starting program: /blah/plink-ng/plink --vcf gdap_pilot.vcf.gz --memory 8000 --make-bed --out gdap_pilot --set-missing-var-ids @:#[b38]$1,$2 --autosome-xy --allow-extra-chr --double-id --biallelic-only --update-sex ../meta/gdap_pilot.sex --split-x b38 --within ../meta/gdap_pilot.clusters
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
PLINK v1.90p 64-bit (8 Mar 2016)           https://www.cog-genomics.org/plink2
(C) 2005-2016 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to gdap_pilot.log.
Options in effect:
  --allow-extra-chr
  --autosome-xy
  --biallelic-only
  --double-id
  --make-bed
  --memory 8000
  --out gdap_pilot
  --set-missing-var-ids @:#[b38],
  --split-x b38
  --update-sex ../meta/gdap_pilot.sex
  --vcf gdap_pilot.vcf.gz
  --within ../meta/gdap_pilot.clusters

257853 MB RAM detected; reserving 8000 MB for main workspace.
--vcf: gdap_pilot-temporary.bed + gdap_pilot-temporary.bim +
gdap_pilot-temporary.fam written.
(2996245 variants skipped.)
35286491 variants loaded from .bim file.
12822357 missing IDs set.
133 people (0 males, 0 females, 133 ambiguous) loaded from .fam.
Ambiguous sex IDs written to gdap_pilot.nosex .
--update-sex: 133 people updated.
--within: 5 clusters loaded, covering a total of 133 people.
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 133 founders and 0 nonfounders present.
Calculating allele frequencies... done.
Warning: 1340294 het. haploid genotypes present (see gdap_pilot.hh ); many
commands treat these as missing.
Warning: Nonmissing nonmale Y chromosome genotype(s) present; many commands
treat these as missing.
Total genotyping rate is 0.985164.
35286491 variants and 133 people pass filters and QC.
Note: No phenotypes present.
--make-bed to gdap_pilot.bed + gdap_pilot.bim + gdap_pilot.fam ... done.

Program received signal SIGSEGV, Segmentation fault.
0x00000000004b23d7 in forget_extra_chrom_names (chrom_info_ptr=0x7fffffff59c0) at plink_common.c:4415
4415          free(nonstd_names[chrom_idx]);

Where the nonstd_names pointer itself is already invalid. Specifically (from another debugging session):

(gdb) print *chrom_info_ptr
$5 = {chrom_mask = 0x0, haploid_mask = 0x2aaaad7ae130, chrom_file_order = 0x2aaaad7ae240, chrom_fo_vidx_start = 0x2aaaad7ae2b0, chrom_idx_to_foidx = 0x2aaaad7ae320, nonstd_names = 0x2aaaad7b0350, nonstd_id_htable = 0x2aaaad7b43b0, chrom_ct = 25, species = 0, 
  xymt_codes = {23, 24, 25, 26}, max_code = 26, autosome_ct = 22, zero_extra_chroms = 0, name_ct = 2033, incl_excl_name_stack = 0x0, is_include_stack = 1, output_encoding = 0}
(gdb) print *0x2aaaad7b0350
Cannot access memory at address 0x2aaaad7b0350
(gdb) print *0x2aaaad7b43b0
Cannot access memory at address 0x2aaaad7b43b0
(gdb) print *0x2aaaad7ae2b0
Cannot access memory at address 0x2aaaad7ae2b0

Segmentation fault in --merge-list

I am trying to merge single chromosome files (converted to .bed after imputation to Thousand Genomes Phase 1), but running into a segfault in merge_fam_id_scan.

The following works:

$ plink --memory 4000 --bfile 58C_01 --bmerge 58C_02 --make-bed --out test
PLINK v1.90b3.38 64-bit (7 Jun 2016)       https://www.cog-genomics.org/plink2
(C) 2005-2016 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to test.log.
Options in effect:
  --bfile 58C_01
  --bmerge 58C_02
  --make-bed
  --memory 4000
  --out test

48251 MB RAM detected; reserving 4000 MB for main workspace.
1478 people loaded from 58C_01.fam.
1478 people to be merged from 58C_02.fam.
Of these, 0 are new, while 1478 are present in the base dataset.
711902 markers loaded from 58C_01.bim.
772778 markers to be merged from 58C_02.bim.
Of these, 772778 are new, while 0 are present in the base dataset.
Warning: Variants 'rs111748052|chr01|886817|886817|CATTTT' and
'rs10465241|chr01|886817|886817|T' have the same position.
Warning: Variants 'rs201179857|chr01|1036876|1036876|TA' and
'rs11578997|chr01|1036876|1036876|A' have the same position.
Warning: Variants 'rs144847714|chr01|3765424|3765424|GT' and
'rs10492943|chr01|3765424|3765424|T' have the same position.
1319 more same-position warnings: see log file.
Performing single-pass merge (1478 people, 1484680 variants).
Merged fileset written to test-merge.bed + test-merge.bim + test-merge.fam .
1484680 variants loaded from .bim file.
1478 people (739 males, 739 females) loaded from .fam.
Using 1 thread (no multithreaded calculations invoked).
Before main variant filters, 1478 founders and 0 nonfounders present.
Calculating allele frequencies... done.
Total genotyping rate is 0.868617.
1484680 variants and 1478 people pass filters and QC.
Note: No phenotypes present.
--make-bed to test.bed + test.bim + test.fam ... done.

But using --merge-list crashes with a segfault:

$ plink --memory 4000 --bfile 58C_01 --merge-list <(echo 58C_02) --make-bed --out test2
$ plink --memory 4000 --merge-list <(echo 58C_01; echo 58C_02) --make-bed --out test2

Both ways fail with the same gdb backtrace:

GNU gdb (GDB) Red Hat Enterprise Linux (7.2-90.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /broad/compbio/aksarkar/.local/bin/plink...(no debugging symbols found)...done.
(gdb) target core core.22642
target core core.22642
[New Thread 22642]
[Thread debugging using libthread_db enabled]
Core was generated by `plink --memory 4000 --merge-list /dev/fd/63 --make-bed --out test2'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000008362b1 in strlen ()
(gdb) bt
bt
#0  0x00000000008362b1 in strlen ()
#1  0x000000000049ddbd in merge_fam_id_scan(char*, char*, unsigned int, unsigned long*, unsigned int*, unsigned int*, ll_entry_struct**, unsigned long long*, unsigned int*, unsigned int*, unsigned int*) ()
#2  0x00000000004c80cd in merge_datasets(char*, char*, char*, char*, char*, char*, char*, char*, char*, unsigned long long, unsigned int, unsigned int, unsigned long long, Chrom_info*) ()
#3  0x0000000000404101 in plink(char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, two_col_params_struct*, two_col_params_struct*, char*, char*, char*, char*, two_col_params_struct*, two_col_params_struct*, two_col_params_struct*, two_col_params_struct*, two_col_params_struct*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, char*, unsigned int, double, double, double, double, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, int, char*, unsigned int, unsigned int, Chrom_info*, Oblig_missing_info*, Family_info*, double, double, unsigned int, unsigned int, double, double, double, double, double, double, double, double, unsigned long long, unsigned long long, unsigned long long, unsigned int, unsigned long, unsigned int, unsigned long, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, double, double, Homozyg_info*, Cluster_info*, unsigned int, unsigned int, Set_info*, Ld_info*, Epi_info*, Clump_info*, Rel_info*, Score_info*, uns---Type <return> to continue, or q <return> to quit---

igned int, unsigned int, unsigned int, unsigned int, int, int, int, char*, char*, char*, range_list_struct*, unsigned int, unsigned int, range_list_struct*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, double, unsigned int, unsigned int, range_list_struct*, range_list_struct*, double, double, double, unsigned int, double, unsigned int, Aperm_info*, unsigned int, unsigned long, unsigned int, double, unsigned int, double, range_list_struct*, unsigned int, unsigned int, unsigned int, int, ll_str_struct**) ()
#4  0x0000000000415fdf in main ()

No remaining variants

Hello,

I'm unsure of how to interpret and proceed with remaining QC steps because of this error? I wanted to create a new bed file to exclude hgdp data whose SNPs were not found in 1000 Genome Phase 3 Chromosome 1 population data.

Code:
plink --noweb --bfile 00_data/hgdp -extract 00_data/1000GP_Phase3/genetic_map_chr1_combined_b37.txt --make-bed --out 01_QC/04_div_ancestry/hgdp.1000-snps

Error:
660873 variants loaded from .bim file. 1043 people (673 males, 370 females) loaded from .fam. Error: No variants remaining after --extract.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.