This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcftools merge files problem

I'm trying to merge two vcf files, however i receive an error message

vcf-merge SNPs_AXL_Australian_m.vcf.gz SNPs_AXL_Australian_w.vcf.gz > combined

Using column name 'SS6004477' for SNPs_AXL_Australian_m.vcf.gz:SS6004477
Using column name 'SS6004478' for SNPs_AXL_Australian_w.vcf.gz:SS6004478
Wrong number of values in SS6004477/PL at 19:41725108 .. nAlleles=1, nValues=3.
Expected 1 values for diploid genotypes or 1 for haploid genotypes.

at Vcf.pm line 172, <__ANONIO__> line 2.
Vcf::throw('Vcf4_1=HASH(0x7fe63b238a48)', 'Wrong number of values in SS6004477/PL at 19:41725108 .. nAll...') called at Vcf.pm line 1767
VcfReader::parse_AGtags('Vcf4_1=HASH(0x7fe63b238a48)', 'HASH(0x7fe63b12fd30)') called at /Users/lucashenriquesviscardi/Downloads/vcftools_0.1.13/bin/vcf-merge line 464
main::merge_vcf_files('HASH(0x7fe63b82bea8)') called at /Users/lucashenriquesviscardi/Downloads/vcftools_0.1.13/bin/vcf-merge line 12

I tried also with bcftools merge option but I still stuck in here, does anyone have any idea how deal with it?

vcftools bcftools merge

"Wrong number of values in SS6004477/PL at 19:41725108 .. nAlleles=1, nValues=3." "Wrong number of values in SS6004477/PL at 19:41725108"

So you have too many values at bp 19:41725108

doing grep "19:41725108" yourvcffile > tempfile.txt

then you check what is wrong

I check this line already, but I believe that all this information is needed to merge two different populations...

#file 1
  #CHROM    POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  SS6004472
  19    41725108    .   G   .   123.27  .   AC=0;AF=0.00;AN=2;DP=31;MQ=60.00;MQ0=0;pSC=0.378          GT:DP:GQ:PL:A:C:G:T:IR    0/0:31:93.28:0,93,1162:0,0:0,0:13,18:0,0:0

 

#file 2
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  SS6004477
19  41725108    .   G   .   126.3   .   AC=0;AF=0.00;AN=2;DP=34;MQ=60.00;MQ0=0;pSC=0.378    GT:DP:GQ:PL:A:C:G:T:IR  0/0:34:96.3:0,96,1233:0,0:0,0:16,18:0,0:0

Then try to remove this line and merge again... does this works?

grep -v "19:41725108" yourvcffile > tempfile.vcf

Still not working:

 Incorrect number of PL fields (3) at 19:41725109, cannot merge.

0 answers

No answers yet.

Log in to answer this question.