DecodeGenetics / graphtyper-pipelines

Recommended Graphtyper pipelines
GNU General Public License v3.0
14 stars 4 forks source link

Make test fails "with alleles not defined in VCF record" error #3

Closed glennhickey closed 6 years ago

glennhickey commented 6 years ago

I get the following when running make test (and the same errors when trying to run my own data)

Total wall-clock time copying files to local disk (seconds):
0

Flag meaning:
 - D: Discovery iteration.
 - G: Genotyping-only iteration.
 - V: VCF file was used to initialize the graph.
 - |: Iteration separator.
[D[E:bcf_synced_reader.h:108 operator()] alleles not defined in VCF record.
[D|D[E:bcf_synced_reader.h:108 operator()] alleles not defined in VCF record.

Total wall-clock time of genotyping with Graphtyper (seconds):
2

Total time (seconds):
2

[E::hts_open_format] Failed to open file /tmp/graphtyper_calling.YQio8b/results/20/*.vcf.gz
[bcf_ordered_reader.cpp:51 BCFOrderedReader] Cannot open /tmp/graphtyper_calling.YQio8b/results/20/*.vcf.gz
[bcf_ordered_reader.cpp:58 BCFOrderedReader] Not a VCF/BCF file: -
Makefile:2: recipe for target 'test' failed

As far as I can tell, these errors are coming from vt (see below):

I have the latest graphtyper, graphtyper-pipelines and vt from their respective github masters. graphtyper itself seems to be built correctly and I can run it directly to, say, construct a graph. Are there any version constraints of tools I should be aware of? Do you have an idea what might be behind this error?

++ basename /tmp/graphtyper_calling.YNOsvh/bams/SAMP3.bam
+ /home/hickey/dev/hap.py-install/bin/samtools view -b -o /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/bams/SAMP3.bam\
 /tmp/graphtyper_calling.YNOsvh/bams/SAMP3.bam 20:4800-9699
+ for bamfile in '`cat $bamlist`'
++ basename /tmp/graphtyper_calling.YNOsvh/bams/SAMP4.bam
+ /home/hickey/dev/hap.py-install/bin/samtools view -b -o /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/bams/SAMP4.bam\
 /tmp/graphtyper_calling.YNOsvh/bams/SAMP4.bam 20:4800-9699
+ ls /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/bams/SAMP1.bam /tmp/graphtyper_calling.YNOsvh/20/000005000-00000949\
9/bams/SAMP2.bam /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/bams/SAMP3.bam /tmp/graphtyper_calling.YNOsvh/20/000005\
000-000009499/bams/SAMP4.bam
+ [[ INITIALIZE_GRAPH_WITH_VCF -ne 0 ]]
+ /home/hickey/dev/graphtyper/release-build/bin/graphtyper construct /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/gra\
ph test/reference.fa --log=/tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/gt_log 20:4800-9699
+ /home/hickey/dev/graphtyper/release-build/bin/graphtyper index /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/graph -\
-log=/tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/gt_log
+ echo -n D
+ /home/hickey/dev/graphtyper/release-build/bin/graphtyper call --threads=1 --minimum_variant_support=4 --minimum_variant_supp\
ort_ratio=0.18 /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/graph . --output=/tmp/graphtyper_calling.YNOsvh/20/000005\
000-000009499/it1 --sams=/tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/bamlist --log=/tmp/graphtyper_calling.YNOsvh/20\
/000005000-000009499/gt_log
+ num_var_before=0
+ [[ 0 -ne 0 ]]
+ /home/hickey/dev/vt/vt sort -o /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499/new_region_sorted.vcf.gz /tmp/graphtype\
r_calling.YNOsvh/20/000005000-000009499/it1/SAMP1_variants.vcf.gz
[E:bcf_synced_reader.h:108 operator()] alleles not defined in VCF record.
+ rm -r -f /tmp/graphtyper_calling.YNOsvh/20/000005000-000009499
+ exit
[D|D+ set -o pipefail
hannespetur commented 6 years ago

Hey Glenn,

I could reproduce your problem with the latest version of graphtyper and vt. Not sure if the latest vt version has a new bug or if the latest Graphtyper version is not fully comply-ing with the VCF standard... I will investigate further and let you know.

Hannes

hannespetur commented 6 years ago

Hey again,

BCFTools does not complain when parsing the failed VCF and an older version of vt also parses the file without any problems, so I am guessing this is a recently introduced issue in vt. For me I was able get it to work using vt git hash version 6686b5c (full hash: 6686b5c44515743a764568c7c3a29bdf3f5af3fd ). Can you try to git checkout that vt version, re-build it, and then try again running the graphtyper-pipeline tests?

All the best, Hannes

glennhickey commented 6 years ago

Thanks Hannes! Using that vt got make test working. I think you definitely want to update README.md to reflect this dependency.

hannespetur commented 6 years ago

Great! Yes, I will happily note this in the README and let the vt guys know about this. Thank you for discovering and reporting this issue!

All the best, Hannes