Converting PLINK files to VCF
1
1
Entering edit mode
2.1 years ago
lauracampi ▴ 10

Hi everyone! I am trying to convert my bed,bim,fam files to VCF in order to do an imputation (Michigan Server).

I am using the code:

plink --file GCP5geno (in) --recode vcf --out Genome_Care

and I get the warning:

Warning: "At least one VCF allele code violates the official specification; other tools may not accept the file. (Valid codes must either start with a '<', only contain characters in {A,C,G,T,N,a,c,g,t,n}, be an isolated '*', or represent a breakend.)"

However, the output is a vcf file that seems to be correct up to chromosome 6 (2.6GB file), and my .bim file has information from chr1 to chr26 (including sexual chr and mitochondrial). Does anyone know why I am loosing all my SNPs from chr7 to chr26? I have reviewed the input files and do not have any special characters.

Thank you in advance for your kind cooperation!

bim PLINK VCF • 1.5k views
ADD COMMENT
0
Entering edit mode

Please post the full .log file from your failed run.

ADD REPLY
0
Entering edit mode

PLINK v1.90b6.17 64-bit (28 Apr 2020) Options in effect:

--bfile european.samples_0.0442_cutoff_maf0.01_qc8

--out european_qc8_imputation

--recode vcf

Start time: Thu Apr 7 14:36:58 2022

Random number seed: 1649335018

95302 MB RAM detected; reserving 47651 MB for main workspace. 730665 variants loaded from .bim file. 2611 people (1162 males, 1447 females, 2 ambiguous) loaded from .fam. Ambiguous sex IDs written to european_qc8_imputation.nosex . 2507 phenotype values loaded from .fam. Warning: Ignoring phenotypes of missing-sex samples. If you don't want those phenotypes to be ignored, use the --allow-no-sex flag. Using 1 thread (no multithreaded calculations invoked).

Before main variant filters, 2580 founders and 31 nonfounders present. Calculating allele frequencies... done. Warning: 4929 het. haploid genotypes present (see european_qc8_imputation.hh ); many commands treat these as missing. Total genotyping rate is 0.998729. 730665 variants and 2611 people pass filters and QC. Among remaining phenotypes, 1158 are cases and 1349 are controls. (104 phenotypes are missing.)

--recode vcf to european_qc8_imputation.vcf ... done. Warning: At least one VCF allele code violates the official specification; other tools may not accept the file. (Valid codes must either start with a '<', only contain characters in {A,C,G,T,N,a,c,g,t,n}, be an isolated '*', or represent a breakend.)

End time: Thu Apr 7 14:37:23 2022

ADD REPLY
0
Entering edit mode

What is the output of wc -l european_qc8_imputation.vcf?

ADD REPLY
0
Entering edit mode
2.0 years ago
totoroGirl • 0

Try —snps-only just-acgt

This will filter out any non atgc but you lose non-conforming alleles (including ins or dels which can be changed into vcf code of <INS> and < DEL>

Does your vcf have snp only?

Signs such as - or + or 0 etc may throw this exception in my experience.

Could you head the vcf and show?

ADD COMMENT

Login before adding your answer.

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