vcf-consensus Error: Fasta sequence does not match REF
1
0
Entering edit mode
8.3 years ago
colin.kern ★ 1.1k

I'm using this series of commands to get consensus sequences:

samtools mpileup -vf seqs.fa aligned.bam > vcf.gz
tabix -p vcf -f vcf.gz
cat seqs.fa | vcf-consensus vcf.gz > consensus.fa

(I was trying to do this using bcftools/vcfutils.pl but was having a different problem I've finally given up on)

I'm getting this error:

The fasta sequence does not match the REF at XLOC_000009.TCONS_00000016:733. G(GTTATA) in .fa, C in .vcf, frz=0

but if I check the fasta sequence using samtools faidx, it gives the C that's expected:

$ samtools faidx seqs.fa XLOC_000009.TCONS_00000016:733
>XLOC_000009.TCONS_00000016:733
C

These warnings from before the error might be relevant?

The version "4.2" not supported, assuming VCFv4.1
Note: Conflicting variants at (or near) XLOC_000009.TCONS_00000016:725, cannot apply both.

Does anyone know why I'm getting this error and how to fix it?

Edit:

The line in the vcf at this location is:

XLOC_000009.TCONS_00000016      733     .       C       <*>     0       .       DP=14;I16=0,8,0,0,222,6594,0,0,336,14112,0,0,0,0,0,0;QS=1,0;MQ0F=0      PL      0,24,128

I noticed it's the last line/position for that sequence.

RNA-Seq vcf samtools software error • 3.9k views
ADD COMMENT
0
Entering edit mode
8.3 years ago
microfuge ★ 1.9k

Can you please print the vcf line at the position ? Conflicting variants would mean it is a heterozygous genotype and it does not know which allele to put in the fasta.

ADD COMMENT
0
Entering edit mode

I've added the vcf line to my post.

ADD REPLY
0
Entering edit mode

Hi microfuge, I am getting the same error and I mapping reads from several genotypes to one heterozygous reference and was hoping to get the consensus files for each genotype. Does this error mean it is not possible to get the consensus for each genotype individually?

ADD REPLY

Login before adding your answer.

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