Error: Random File read failure (PLINK v1.90b4.1 64-bit (30 Mar 2017) )

906 views
Skip to first unread message

Mike Dacre

unread,
May 5, 2017, 6:24:31 PM5/5/17
to plink2-users
Having a strange file read failure.

plink \
--bfile /godot/1000genomes/1000GP_Phase3/ALL.chr6.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes \
--ld-snp rs9273445 \
--r2 in-phase dprime \
--snps rs9273445 rs11568830 rs11568831 rs28746851 rs9271685 rs9271689 rs9272416 rs9274407 rs9274529 rs9274654 rs9274655 rs9274656 rs9274660 rs9271488 rs9271640 rs9271720

Works fine

plink \
--bfile /godot/1000genomes/1000GP_Phase3/ALL.chr6.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes \
--ld-snp rs9273445 \
--r2 in-phase dprime \
--snps rs9273445 rs9272346 rs1063355 rs28383344 rs2858864 rs3828800 rs532098 rs674313 rs9271408 rs9271488 rs9271640 rs9271720 rs9271775 rs9274407


Fails with:

PLINK v1.90b4.1 64-bit (30 Mar 2017)           www.cog-genomics.org/plink/1.9/
(C) 2005-2017 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to plink.log.
Options in effect:
  --bfile /godot/1000genomes/1000GP_Phase3/ALL.chr6.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes
  --ld-snp rs9273445
  --r2 in-phase dprime
  --snps rs9273445 rs9272346 rs1063355 rs28383344 rs2858864 rs3828800 rs532098 rs674313 rs9271408 rs9271488 rs9271640 rs9271720 rs9271775 rs9274407

32119 MB RAM detected; reserving 16059 MB for main workspace.
Allocated 1606 MB successfully, after larger attempt(s) failed.
14 out of 4997829 variants loaded from .bim file.
2504 people (0 males, 0 females, 2504 ambiguous) loaded from .fam.
Ambiguous sex IDs written to plink.nosex .
Using up to 8 threads (change this with --threads).
Before main variant filters, 2504 founders and 0 nonfounders present.
Calculating allele frequencies... done.
14 variants and 2504 people pass filters and QC.
Note: No phenotypes present.
--r2 in-phase dprime... 0% [processing]
Error: File read failure.

Removing the last three snps in --snps seems to fix the error, but it isn't just a number of snps issue, because the top one works fine. Also, reshuffling the snps in the non-working version doesn't change anything.

The file is the 1000genomes chromosome 6 file. I only ever get this error with this file, the other chromosome files work fine. However, I expect more snps on chromosome 6 because of the HLA, so it might just be a numbers thing.

The bfile is built with:

i=ALL.chr6.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz;
j=$(echo $i | sed 's/.vcf.gz//');
vftools --gzvcf $i --plink-tped --out $j &&
plink --tped $j.tped --tfam $j.tfam --out $j

I tried doing that a few times, it doesn't fix the issue. The VCF is straight of the EBI server.

Not sure how to go about debugging this. Any suggestions?

Thanks!

Christopher Chang

unread,
May 5, 2017, 7:22:29 PM5/5/17
to plink2-users
That's probably a --ld-snp bug.  I'll try to replicate the crash on my own; if I fail to do so, I'll post a debug build with extra logging around all the places --r2 might throw a read-failure error.

Mike Dacre

unread,
May 5, 2017, 7:34:19 PM5/5/17
to plink2-users
Great, thanks.

Christopher Chang

unread,
May 8, 2017, 2:09:10 AM5/8/17
to plink2-users
This bug should be fixed in the May 7 builds; let me know if you run into any more problems.


On Friday, May 5, 2017 at 3:24:31 PM UTC-7, Mike Dacre wrote:

Mike Dacre

unread,
May 8, 2017, 9:39:35 PM5/8/17
to plink2-users
Yup, that fixed it, thanks so much!

ga...@igib.in

unread,
Dec 26, 2018, 3:18:12 AM12/26/18
to plink2-users
Hi Chang

I want to convert 1000 genome phase 3 data (vcf format files-.vcf.gz) to plink format files .bed , .bim and .fam. I downloaded plink 1.9 and applied following commands:

plink --vcf ALL.chr1.phase3_shapeit2_mvncall_integrated.genotypes.vcf.gz --keep-allele-order --biallelic-only --vcf-filter --vcf-require-gt --make-bed --out CHR_1_PLINK_1000GP3

When I run this command, I get

32072 MB RAM detected; reserving 16036 MB for main workspace
--vcf: 2199k variants complete.
Error: File read failure.

I get the same error even when I just want to read my vcf file through plink using following command:

plink --vcf ALL.chr1.phase3_shapeit2_mvncall_integrated.genotypes.vcf.gz

When I tried to uncompress my file before conversion, uncompression throwd an error.

Any suggestions?

Christopher Chang

unread,
Dec 26, 2018, 10:49:54 AM12/26/18
to plink2-users
Are other programs (e.g. bcftools) able to process the compressed VCF? If not, the file may be corrupted and you need to re-download it.

ga...@igib.in

unread,
Dec 27, 2018, 1:00:23 AM12/27/18
to plink2-users
Hi Chang, the file was corrupted. I downloaded it again and re-ran the command. Command worked fine this time.


Gauri

Gauri Prasad

unread,
Dec 27, 2018, 11:04:44 PM12/27/18
to plink2-users
Hi I want to merge two 1000 genome phase 3 files of different chromosomes. I used plink v1.9 .
I applied following command:
plink --bfile chr1 --bmerge chr2.bed chr2.bim chr2.fam --make-bed --out merge1_2
It was found that around 11000 markers have same genetic position

And then it showed file read error. What could be the reason and how to solve it. Should I remove those markers or they could be also important downstream analysis. What should I do?

Gauri

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages