How to recode VCF from bed bim and fam files in plink with filter?
1
0
Entering edit mode
5.7 years ago
DN99 ▴ 20

I am trying to create a vcf in plink. Currently as a practice run I have tried this with just looking at chromosome 1 and I have a snpids.txt file with 10 snp ids to filter by :

plink --bed /data/chr1.bed --bim /data/chr1.bim --fam /data/chr1.fam --recode vcf-iid --out new_vcf.vcf --keep-fam /data/chr1.fam --extract /data/snpids.txt --write-snplist

However this goes on to give:

192580 MB RAM detected; reserving 86290 MB for main workspace.
1065753 variants loaded from .bim file.
Error: Failed to open

I assume this means I am not successfully fitlering these files before recoding into a vcf? I am very new to using plink, is it possible I am just ordering the code wrongly? Any guidance would be appreciated.

plink vcf bim linux SNP • 3.1k views
ADD COMMENT
0
Entering edit mode
5.7 years ago
  1. Can you post more of the .log file; at minimum, include the first line which has the version/date?
  2. "Failed to open <filename>" probably means that the filename you provided doesn't exist (which may be because of a typo or a wrong directory). If it just says "Failed to open" without a filename, that's very weird, but I can't say more unless you provide the plink version/date.
ADD COMMENT
0
Entering edit mode

Thank you for your reply. I am using Plink 1.9 from 15 August 2017. I also forgot to mention I am using a limited amount of ram, would this potentially be the cause? And if so do I need to specifiy my variants to filter by before trying to open this files as then I guess it would only search for and take the relevant variants from the file?

ADD REPLY
0
Entering edit mode

Try rerunning this with a more recent plink 1.9 build.

If this fails, double- and triple-check that all your filenames are actually correct. Nothing else you mentioned is relevant. I won’t respond further here unless you provide not only the new .log output, but also the appropriate “ls” command verifying that the files are all there.

ADD REPLY

Login before adding your answer.

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

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

Powered by the version 2.3.6