text: user16874: I was trying to left normalize my vcf file using following command:
  bcftools norm -f reference.fasta -m -any input.vcf > output.norm.vcf
  However this gives the following error:
  Non-ACGTN alternate allele at 1:278165 .. VCF:'-3AGG'
  It looks like the variant caller returned all deletions and insertions like this:
  1   5387285 .   C   +2TG
  1   5387316 .   G   -8TGTGTATC
  
  This file format was produced by SCCaller 2.0.0, there are several unconventional output fields produced by this caller but but the repository isn't maintained.
  Is this an issue of the vcf format or does this means that there is a non-ACGTN character on position 1:278165 in the fasta reference file? I don't see anyting out of the ordinary at this position using IGV.
  What would be the best way forward?
  I tried the following command to extract non-ACGTN allels but it outputs all alleles:
  bcftools view -i 'ALT !~ "^[ACGTN]+$"' input.vcf.gz > errors.vcf
  EDIT: including several lines of vcf file
  CHROM   POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  SAMPLE1
  1   89946   .   A   T   68  .   NS=1    GT:SO:AD:BI:GQ:PL   0/1:False:3,18:0.973:68:273,164,49,117
  1   286158  .   A   +2TG    78  .   NS=1    GT:SO:AD:BI:GQ:PL   0/0:NA:11,10:0.982:78:154,97,175,456
  1   900119  .   A   G   150 .   NS=1    GT:SO:AD:BI:GQ:PL   0/0:False:17,14:0.995:150:214,136,321,657
  1   932613  .   G   -4TTTC  62  .   NS=1    GT:SO:AD:BI:GQ:PL   0/1:NA:4,18:0.998:62:274,165,103,173
  1   1168310 .   T   +2CA    35  .   NS=1    GT:SO:AD:BI:GQ:PL   0/0:NA:18,5:0.985:35:77,55,91,712```
  
  
  
  
  user298: That isn't a valid ALT field according to the VCF standard:
  
  ALT — alternate base(s): Comma-separated list of alternate non-reference alleles. These alleles do not have
  to be called in any of the samples. Options are base Strings made up of the bases A,C,G,T,N (case insensitive)
  or the ‘*’ symbol (allele missing due to overlapping deletion) or a MISSING value ‘.’ (no variant) or an
  angle-bracketed ID String (“”) or a breakend replacement string as described in Section 5.4. If there
  are no alternative alleles, then the MISSING value must be used. In other words, the ALT field must be a
  symbolic allele, or a breakend replacement string, or match the regular expression ^([ACGTNacgtn]+|*|.)$.
  Tools processing VCF files are not required to preserve case in the allele String, except for IDs, which are case
  sensitive. (String; no whitespace, commas, or angle-brackets are permitted in the ID String itself)
  
  So yes, you can have things other than ACTG, N most commonly or . or *. And you can also have things like <DEL> and <DUP> for structural variants. But a + or a digit make no sense and are not allowed so this is not a valid VCF file.
  So, filter them out. You can use something like this:
  zcat input.vcf.gz | awk -F'\t' '/^#/ || $5 ~ /^[ACGTNacgtn]+|\*|\.)$/' |
      bgzip > fixed.vcf.gz
  
  I would also report this as a bug to the developers of your variant caller.
  
original_text: 16874: <p>I was trying to left normalize my vcf file using following command:</p>
  <p><code>bcftools norm -f reference.fasta -m -any input.vcf &gt; output.norm.vcf</code></p>
  <p>However this gives the following error:</p>
  <p><code>Non-ACGTN alternate allele at 1:278165 .. VCF:'-3AGG'</code></p>
  <p>It looks like the variant caller returned all deletions and insertions like this:</p>
  <pre><code>1   5387285 .   C   +2TG
  1   5387316 .   G   -8TGTGTATC
  </code></pre>
  <p>This file format was produced by SCCaller 2.0.0, there are several unconventional output fields produced by this caller but but the repository isn't maintained.</p>
  <p>Is this an issue of the vcf format or does this means that there is a non-ACGTN character on position 1:278165 in the fasta reference file? I don't see anyting out of the ordinary at this position using IGV.</p>
  <p>What would be the best way forward?
  I tried the following command to extract non-ACGTN allels but it outputs all alleles:</p>
  <p><code>bcftools view -i 'ALT !~ &quot;^[ACGTN]+$&quot;' input.vcf.gz &gt; errors.vcf</code></p>
  <p>EDIT: including several lines of vcf file</p>
  <pre><code>CHROM   POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  SAMPLE1
  1   89946   .   A   T   68  .   NS=1    GT:SO:AD:BI:GQ:PL   0/1:False:3,18:0.973:68:273,164,49,117
  1   286158  .   A   +2TG    78  .   NS=1    GT:SO:AD:BI:GQ:PL   0/0:NA:11,10:0.982:78:154,97,175,456
  1   900119  .   A   G   150 .   NS=1    GT:SO:AD:BI:GQ:PL   0/0:False:17,14:0.995:150:214,136,321,657
  1   932613  .   G   -4TTTC  62  .   NS=1    GT:SO:AD:BI:GQ:PL   0/1:NA:4,18:0.998:62:274,165,103,173
  1   1168310 .   T   +2CA    35  .   NS=1    GT:SO:AD:BI:GQ:PL   0/0:NA:18,5:0.985:35:77,55,91,712```
  
  
  </code></pre>
   298: <p>That isn't a valid ALT field according to the <a href="https://samtools.github.io/hts-specs/VCFv4.3.pdf" rel="nofollow noreferrer">VCF standard</a>:</p>
  <blockquote>
  <p>ALT — alternate base(s): Comma-separated list of alternate non-reference alleles. These alleles do not have
  to be called in any of the samples. Options are base Strings made up of the bases A,C,G,T,N (case insensitive)
  or the ‘*’ symbol (allele missing due to overlapping deletion) or a MISSING value ‘.’ (no variant) or an
  angle-bracketed ID String (“”) or a breakend replacement string as described in Section 5.4. If there
  are no alternative alleles, then the MISSING value must be used. In other words, the ALT field must be a
  symbolic allele, or a breakend replacement string, or match the regular expression ^([ACGTNacgtn]+|*|.)$.
  Tools processing VCF files are not required to preserve case in the allele String, except for IDs, which are case
  sensitive. (String; no whitespace, commas, or angle-brackets are permitted in the ID String itself)</p>
  </blockquote>
  <p>So yes, you can have things other than ACTG, <code>N</code> most commonly or <code>.</code> or <code>*</code>. And you can also have things like <code>&lt;DEL&gt;</code> and <code>&lt;DUP&gt;</code> for structural variants. But a <code>+</code> or a digit make no sense and are not allowed so this is not a valid VCF file.</p>
  <p>So, filter them out. You can use something like this:</p>
  <pre><code>zcat input.vcf.gz | awk -F'\t' '/^#/ || $5 ~ /^[ACGTNacgtn]+|\*|\.)$/' |
      bgzip &gt; fixed.vcf.gz
  </code></pre>
  <p>I would also report this as a bug to the developers of your variant caller.</p>
  