ERROR::: vcf to PLINK
1
0
Entering edit mode
3.1 years ago
Kumar ▴ 170

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 • 2.3k views
ADD COMMENT
0
Entering edit mode
3.1 years ago
Sam ★ 4.7k

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
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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
ADD REPLY
0
Entering edit mode

That is the regular PLINK documentation (and you're misreading it), not a tutorial. A tutorial is posted at http://zzz.bwh.harvard.edu/plink/tutorial.shtml , and mirrored at https://www.cog-genomics.org/plink/1.9/resources#teach .

ADD REPLY
0
Entering edit mode

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
ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

Picture2
image uploader

ADD REPLY
0
Entering edit mode

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

Thank you for your help!

ADD REPLY

Login before adding your answer.

Traffic: 2900 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