Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to parse metadata with hypen in the key #35

Open
apraga opened this issue Feb 19, 2023 · 0 comments
Open

Fails to parse metadata with hypen in the key #35

apraga opened this issue Feb 19, 2023 · 0 comments

Comments

@apraga
Copy link

apraga commented Feb 19, 2023

Expected Behavior

Parse a vcf with metadata containg hyphen in the key

##VEP-command-line='vep -i test'

Current Behavior

Fails to parse with ERROR: LoadError: GeneticVariation.VCF.Reader file format error on line 4

Removing the hyphen makes it work.

Possible Solution / Implementation

Steps to Reproduce (for bugs)

Minimal working example.
For this vcf :

##fileformat=VCFv4.1
##FILTER=<ID=PASS,Description="All filters passed">
##contig=<ID=chr1,length=249250621>
##VEP-command-line='vep -i test'
##FORMAT=<ID=BLT,Number=1,Type=String,Description="High-level location type (het|homref|hetalt|homalt|nocall).">
#CHROM	POS	ID	REF	ALT	QUAL	FILTER	INFO	FORMAT	TRUTH	QUERY

The reader

using GeneticVariation
reader = VCF.Reader(open("script/test.vcf"))

fails with

ERROR: LoadError: GeneticVariation.VCF.Reader file format error on line 4
Stacktrace:
 [1] error(::String, ::Int64)
   @ Base ./error.jl:44
 [2] _readheader!(reader::GeneticVariation.VCF.Reader, state::BioCore.Ragel.State{BufferedStreams.BufferedInputStream{IOStream}})
   @ GeneticVariation.VCF ~/.julia/packages/BioCore/YBJvb/src/ReaderHelper.jl:106
 [3] readheader!(reader::GeneticVariation.VCF.Reader)
   @ GeneticVariation.VCF ~/.julia/packages/BioCore/YBJvb/src/ReaderHelper.jl:80
 [4] Reader
   @ ~/.julia/packages/GeneticVariation/r8DAL/src/vcf/reader.jl:15 [inlined]
 [5] GeneticVariation.VCF.Reader(input::IOStream)
   @ GeneticVariation.VCF ~/.julia/packages/GeneticVariation/r8DAL/src/vcf/reader.jl:28
 [6] top-level scope
   @ /Work/Users/XXX/processing/vcf.jl:4
in expression starting at /Work/Users/XXXX/processing/vcf.jl:4

Your Environment

  • Package Version used:
  • Julia Version used: 1.8.5
  • Operating System and version (desktop or mobile): Rocky Linux 8.5
  • Link to your project:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant