Hi,
I have edited #CHROM of my .vcf file so it is purely numeric (from 1 to 13635, which correspond to scaffolds#). I need this to avoid a error message on a downstream step. I need to get .ped/.fam format and using plink2 it doesn't allow me to keep these CHROM notation (I need to use --allow-extra-chr, and then it changes all CHROM into 0). Then I found out that vcftools can handle this, but it only works when I convert it into transpose ped/fam (tped/tfam). See below when I try to convert to .ped/.map (unsuccessfully) and how it worked when using --plink-tped:
MacBook-Pro-de-Angela:UsingVCFtools angelaparodymerino$ vcftools --vcf mac3_minDP3_maxmeanDP289_maf005_minQ40_minGQ30_hwe005_265ind_IDs2_CHROM.vcf --out plinkvcf --plink
VCFtools - 0.1.15
(C) Adam Auton and Anthony Marcketta 2009
Parameters as interpreted:
--vcf mac3_minDP3_maxmeanDP289_maf005_minQ40_minGQ30_hwe005_265ind_IDs2_CHROM.vcf
--out plinkvcf
--plink
After filtering, kept 265 out of 265 Individuals
Writing PLINK PED and MAP files ...
Error: Could not open temporary file.
MacBook-Pro-de-Angela:UsingVCFtools angelaparodymerino$ vcftools --vcf mac3_minDP3_maxmeanDP289_maf005_minQ40_minGQ30_hwe005_265ind_IDs2_CHROM.vcf --out plinkvcf --plink-tped
VCFtools - 0.1.15
(C) Adam Auton and Anthony Marcketta 2009
Parameters as interpreted:
--vcf mac3_minDP3_maxmeanDP289_maf005_minQ40_minGQ30_hwe005_265ind_IDs2_CHROM.vcf
--out plinkvcf
--plink-tped
After filtering, kept 265 out of 265 Individuals
Writing PLINK TPED file ... Writing PLINK TFAM file ... Done.
After filtering, kept 3412 out of a possible 3412 Sites
Run Time = 1.00 seconds
However, I need ped/map (not tped/tmap, because it is not an accepted input file in Mega2). The error message says that: "Could not open temporary file". Anyone can help? In short, what I need is to convert my .vcf file into .ped/.map but keeping the CHROM as it is in my .vcf file (numeric and from 1 to 13635). In general I am finding problematic to work without real chromosome information (just with scaffolds) in most of the steps/conversions.
Thanks in advance,
Regards,
Ángela Parody-Merino