How to convert multiple .vcf files into single .ped (PLINK compatible files)?
Hi everyone,
I am a newbie to the whole bioinformatics world and I need to analyse WGS data from several case samples. I have now several individual .vcf files and would like to use PLINK for Quality Control analysis, Population Stratification and ultimately GWAS.
As PLINK requires .bim, .fam and .bed files to do such analysis, I need to create a single .ped file from the multiple .vcf files I have.
So, I tried using a for loop:
for file in /path-to-folder-with-all-vcf-files/*.vcf; do plink –vcf ${file} –allow-extra-chr –recode –out /path-where-I-want-to-save-the-new-ped-file/${file}.ped;done’
but my job keeps giving me back the same error:
“Exited with exit code 5.”
and at the end it simply says:
“Error: Missing –vcf parameter.
For more information, try “plink –help <flag name>” or “plink –help | more”.”
I already read the PLINK documentation but I cannot find the mistake.
From what I understand, I am telling –vcf to use ${file} to execute the rest of the commands (–allow-extra-chr, –recode and –out), so why is it telling me there is no parameter?
Or is there another way to convert the multiple .vcf files into a single .ped file that you could recommend?
Thank you in advance for your help!
• 16 views
Read more here: Source link