| 1 |
@meta |
| 2 |
Feature: Parsing VCF meta information from the header |
| 3 |
|
| 4 |
Take a header and parse that information as defined by the VCF standard. |
| 5 |
|
| 6 |
Scenario: When parsing a header line |
| 7 |
|
| 8 |
Given the VCF header lines |
| 9 |
""" |
| 10 |
##fileformat=VCFv4.1 |
| 11 |
##fileDate=20140121 |
| 12 |
##phasing=none |
| 13 |
##reference=file:///data/GENOMES/human_GATK_GRCh37/GRCh37_gatk.fasta |
| 14 |
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> |
| 15 |
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Total read depth"> |
| 16 |
##FORMAT=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases"> |
| 17 |
##INFO=<ID=PM,Number=0,Type=Flag,Description="Variant is Precious(Clinical,Pubmed Cited)"> |
| 18 |
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NORMAL TUMOR |
| 19 |
""" |
| 20 |
When I parse the VCF header |
| 21 |
Then I expect vcf.columns to be [CHROM','POS','ID','REF','ALT','QUAL','FILTER','INFO','FORMAT','NORMAL','TUMOR'] |
| 22 |
And I expect vcf.fileformat to be "VCFv4.1" |
| 23 |
And I expect vcf.fileDate to be "20140121" |
| 24 |
And I expect vcf.field['fileDate'] to be "20140121" |
| 25 |
And I expect vcf.phasing to be "none" |
| 26 |
And I expect vcf.reference to be "file:///data/GENOMES/human_GATK_GRCh37/GRCh37_gatk.fasta" |
| 27 |
And I expect vcf.format['GT'] to be {"ID"=>"GT", "Number"=>"1", "Type"=>"String", "Description"=>"Genotype"} |
| 28 |
And I expect vcf.format['DP'] to be {"ID"=>"DP", "Number"=>"1", "Type"=>"Integer", "Description"=>"Total read depth"} |
| 29 |
And I expect vcf.format['DP4'] to be {"ID"=>"DP4", "Number"=>"4", "Type"=>"Integer", "Description"=>"# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases"} |
| 30 |
And I expect vcf.info['PM'] to be {"ID"=>"PM", "Number"=>"0", "Type"=>"Flag", "Description"=>"Variant is Precious(Clinical,Pubmed Cited)"}' |
| 31 |
And I expect vcf.meta to contain all header meta information |
| 32 |
|
| 33 |
Scenario: When parsing the header of somatic_sniper.vcf |
| 34 |
|
| 35 |
Do something |