This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ERROR::: vcf to PLINK

Hi,

I have a merged vcf file. Now, I am trying to use PLINK with following command. I tried to run this command in different ways at Window and Linux but it is showing following error. This command should generate .map and .ped files. Please advise in this regard.

$plink --file merged-try --recode --out data
OR
$plink --file merged-try.vcf --out data

ERROR: Window
ERROR: No file [ merged-try.ped ] exists.

ERROR: Linux
Error: Failed to open merged-try.map
plink gwas vcfs

1 answer

If I understand correctly, you have a vcf file called merged.try.vcf, right? The correct command should be

$plink --vcf merged-try.vcf --out data

Additional notes: - He is currently running PLINK 1.07, which can't read VCF files at all. He needs to switch to at least PLINK 1.9. - Relatedly, he almost certainly shouldn't be trying to create a .ped + .map fileset in the first place; that file format has been obsolete for more than half a decade. With PLINK 1.9, your command generates a .bed + .bim + .fam PLINK binary fileset, which is a better idea >95% of the time.

I merged all vcfs into one vcf file using bcftools. I am using PLINK version (v1.9). I am following the current PLINK tutorial (http://zzz.bwh.harvard.edu/plink/data.shtml#plink) with the command and it should generate .ped and .map file.

$plink --file mydata

I tried already. I merged all vcfs into one file using bcftools. I am using PLINK version (PLINK v1.90b6.18) and could not find --vcf option in its tutorial.

Message:

** Unused command line option: --vcf
** Unused command line option: merged-try.vcf

No, you are not running PLINK 1.9. Check your system paths. Only PLINK 1.07, not PLINK 1.9, displays "Unused command line option" messages in that manner.

Thank you for your clarification. Yes! you are right, I noticed, the older version in my system. Now, I downloaded Window version PLINK v1.9 from the link https://www.cog-genomics.org/plink2. If I tried following command, it still shows the following error message. Please suggest if I am making mistake in my command.

plink --file merged-try.vcf --make-bed --out data

Picture1

As mentioned, you want to use --vcf not --file

Sorry! it does not work with --vcf. Do you think this error because I have merged my vcfs using bcftools?

Picture2
image uploader

Hi, I got it. It was the issue in my input vcf files, where these contain '_'.

Thank you for your help!

Log in to answer this question.