Question: How to recode VCF from bed bim and fam files in plink with filter?
gravatar for DN93
6 weeks ago by
DN930 wrote:

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.

linux snp plink bim vcf • 150 views
ADD COMMENTlink modified 5 weeks ago • written 6 weeks ago by DN930
gravatar for chrchang523
6 weeks ago by
United States
chrchang5234.9k wrote:
  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 COMMENTlink written 6 weeks ago by chrchang5234.9k

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 REPLYlink modified 5 weeks ago • written 5 weeks ago by DN930

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 REPLYlink modified 5 weeks ago • written 5 weeks ago by chrchang5234.9k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2244 users visited in the last hour