tseemann / snippy

:scissors: :zap: Rapid haploid variant calling and core genome alignment
GNU General Public License v2.0
472 stars 115 forks source link

"Variant is not consistent: U00096.3:965-968 - TGCT(REF) vs (FASTA)" error #408

Open VadimDu opened 4 years ago

VadimDu commented 4 years ago

Hello @tseemann and all users,

I am running snippy with basic configurations and keep getting the following error (even when change the reference from FASTA to GenBank):

[variant_manip.cpp:75 is_ref_consistent] Variant is not consistent: U00096.3:965-968 - TGCT(REF) vs (FASTA) [normalize.cpp:178 normalize] Normalization not performed due to inconsistent reference sequences. (use -n option to relax this) [main_vcfview] Error: cannot write to (null)

The result is always "Identified 0 variants", needless to say that the target species is present in high abundance in the sample. I might be missing something, any help is much appreciated.

Thank you very for the assistance, Best regards Vadim

fengyuchengdu commented 4 years ago

[variant_manip.cpp:75 is_ref_consistent] Variant is not consistent: SCKP140071_chr:355431-355441 - GAAAAAAAGTC(REF) vs GATCCTGCTGG(FASTA) [normalize.cpp:178 normalize] Normalization not performed due to inconsistent reference sequences. (use -n option to relax this)

Pretty much the same. Never had this error before.

VadimDu commented 4 years ago

Hi @fengyuchengdu

Thanks for your replay. So I understand that you did use snippy before, on the same data? and never got this error? maybe there was some version changes in one of the dependencies.

fengyuchengdu commented 4 years ago

Hi @VadimDu After some tests, the error seems to arise from the recent update (2015.11.10-h5ef6573_4) of dependency vt. I solved the problem by rolling vt back to version 2015.11.10-he941832_3.

eam12 commented 4 years ago

Just updated to 4.6.0 and now I'm getting the same error for a bunch of samples that ran perfectly before...

[variant_manip.cpp:75 is_ref_consistent] Variant is not consistent: CP016412.1:973613-973615 - GCG(REF) vs CGC(FASTA) [normalize.cpp:178 normalize] Normalization not performed due to inconsistent reference sequences. (use -n option to relax this) [main_vcfview] Error: cannot write to (null)

VadimDu commented 4 years ago

Hi @eam12

I was managed to fix this error thanks to the solution by @ktmeaton from issue #410 (by downgrading dependency [vt]) - look there.

eam12 commented 4 years ago

Thanks, @VadimDu! Seems to be working now.

wanyuac commented 4 years ago

I had the same issue with @VadimDu and solved the problem as @fengyuchengdu has suggested. Specifically, my Snippy version is v4.6.0, installed through anaconda. The default version of vt was 2015.11.10 h5ef6573_4. The vt command compianed about inconsistent reference. As a result, the following command in the snippy pipeline produced an empty VCF and did not call any variant eventually (a severe problem of false negatives!)

bcftools view --include 'FMT/GT="1/1" && QUAL>=100 && FMT/DP>=10 && (FMT/AO)/(FMT/DP)>=0' snps.raw.vcf  | vt normalize -r reference/ref.fa - | bcftools annotate --remove '^INFO/TYPE,^INFO/DP,^INFO/RO,^INFO/AO,^INFO/AB,^FORMAT/GT,^FORMAT/DP,^FORMAT/RO,^FORMAT/AO,^FORMAT/QR,^FORMAT/QA,^FORMAT/GL' > snps_filt_manual.vcf

Command lines I have used to solve this problem were copied from Issue 410.

conda create --name snippy2
conda install --name snippy2 -c bioconda/label/cf201901 vt==2015.11.10  # vt 2015.11.10 he941832_3 bioconda/label/cf201901
conda install --name snippy2 -c bioconda snippy

Of note, we cannot use the option -n of vt normalize to circumvent this issue as indels will be skipped and not be normalised in this way, which goes against the purpose of using vt in the snippy pipeline.

andersgs commented 4 years ago

This is a known bug that we are in process of fixing. In the mean time, we do recommend downgrading. Thank you.

AmanuelZewdu commented 3 years ago

hi dear How can i downgrade the dependency vi?

AmanuelZewdu commented 3 years ago

Thanks, @VadimDu! Seems to be working now.

hi dear how can i downgrade the dependency vi?