1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
use crate::{
    header::{record::value::map::info::Type, Number},
    record::info::field::key::Standard,
};

pub(super) fn definition(key: Standard) -> Option<(Number, Type, &'static str)> {
    match key {
        Standard::AncestralAllele => Some((Number::Count(1), Type::String, "Ancestral allele")),
        Standard::AlleleCount => Some((
            Number::A,
            Type::Integer,
            "Allele count in genotypes, for each ALT allele, in the same order as listed",
        )),
        Standard::TotalReadDepths => {
            Some((Number::R, Type::Integer, "Total read depth for each allele"))
        }
        Standard::ForwardStrandReadDepths => Some((
            Number::R,
            Type::Integer,
            "Read depth for each allele on the forward strand",
        )),
        Standard::ReverseStrandReadDepths => Some((
            Number::R,
            Type::Integer,
            "Read depth for each allele on the reverse strand",
        )),
        Standard::AlleleFrequencies => Some((
            Number::A,
            Type::Float,
            "Allele frequency for each ALT allele in the same order as listed",
        )),
        Standard::TotalAlleleCount => Some((
            Number::Count(1),
            Type::Integer,
            "Total number of alleles in called genotypes",
        )),
        Standard::BaseQuality => Some((Number::Count(1), Type::Float, "RMS base quality")),
        Standard::Cigar => Some((
            Number::A,
            Type::String,
            "Cigar string describing how to align an alternate allele to the reference allele",
        )),
        Standard::IsInDbSnp => Some((Number::Count(0), Type::Flag, "dbSNP membership")),
        Standard::TotalDepth => Some((
            Number::Count(1),
            Type::Integer,
            "Combined depth across samples",
        )),
        Standard::IsInHapMap2 => Some((Number::Count(0), Type::Flag, "HapMap2 membership")),
        Standard::IsInHapMap3 => Some((Number::Count(0), Type::Flag, "HapMap3 membership")),
        Standard::MappingQuality => Some((Number::Count(1), Type::Float, "RMS mapping quality")),
        Standard::ZeroMappingQualityCount => {
            Some((Number::Count(1), Type::Integer, "Number of MAPQ == 0 reads"))
        }
        Standard::SamplesWithDataCount => Some((
            Number::Count(1),
            Type::Integer,
            "Number of samples with data",
        )),
        Standard::StrandBias => Some((Number::Count(4), Type::Integer, "Strand bias")),
        Standard::IsSomaticMutation => Some((Number::Count(0), Type::Flag, "Somatic mutation")),
        Standard::IsValidated => Some((
            Number::Count(0),
            Type::Flag,
            "Validated by follow-up experiment",
        )),
        Standard::IsIn1000Genomes => {
            Some((Number::Count(0), Type::Flag, "1000 Genomes membership"))
        }

        Standard::IsImprecise => Some((
            Number::Count(0),
            Type::Flag,
            "Imprecise structural variation",
        )),
        Standard::IsNovel => Some((
            Number::Count(0),
            Type::Flag,
            "Indicates a novel structural variation",
        )),
        Standard::EndPosition => Some((
            Number::Count(1),
            Type::Integer,
            "End position of the variant described in this record",
        )),
        Standard::SvType => Some((Number::Count(1), Type::String, "Type of structural variant")),
        Standard::SvLengths => Some((
            Number::Unknown,
            Type::Integer,
            "Difference in length between REF and ALT alleles",
        )),
        Standard::PositionConfidenceIntervals => Some((
            Number::Count(2),
            Type::Integer,
            "Confidence interval around POS for imprecise variants",
        )),
        Standard::EndConfidenceIntervals => Some((
            Number::Count(2),
            Type::Integer,
            "Confidence interval around END for imprecise variants",
        )),
        Standard::MicrohomologyLengths => Some((
            Number::Unknown,
            Type::Integer,
            "Length of base pair identical micro-homology at event breakpoints",
        )),
        Standard::MicrohomologySequences => Some((
            Number::Unknown,
            Type::String,
            "Sequence of base pair identical micro-homology at event breakpoints",
        )),
        Standard::BreakpointIds => Some((
            Number::Unknown,
            Type::String,
            "ID of the assembled alternate allele in the assembly file",
        )),
        Standard::MobileElementInfo => Some((
            Number::Count(4),
            Type::String,
            "Mobile element info of the form NAME,START,END,POLARITY",
        )),
        Standard::MobileElementTransductionInfo => Some((
            Number::Count(4),
            Type::String,
            "Mobile element transduction info of the form CHR,START,END,POLARITY",
        )),
        Standard::DbvId => Some((
            Number::Count(1),
            Type::String,
            "ID of this element in Database of Genomic Variation",
        )),
        Standard::DbVarId => Some((
            Number::Count(1),
            Type::String,
            "ID of this element in DBVAR",
        )),
        Standard::DbRipId => Some((
            Number::Count(1),
            Type::String,
            "ID of this element in DBRIP",
        )),
        Standard::MateBreakendIds => Some((Number::Unknown, Type::String, "ID of mate breakends")),
        Standard::PartnerBreakendId => {
            Some((Number::Count(1), Type::String, "ID of partner breakend"))
        }
        Standard::BreakendEventId => Some((
            Number::Count(1),
            Type::String,
            "ID of event associated to breakend",
        )),
        Standard::BreakendConfidenceIntervals => Some((
            Number::Count(2),
            Type::Integer,
            "Confidence interval around the inserted material between breakends",
        )),
        Standard::AdjacentReadDepths => {
            Some((Number::Unknown, Type::Integer, "Read Depth of adjacency"))
        }
        Standard::BreakendCopyNumber => Some((
            Number::Count(1),
            Type::Integer,
            "Copy number of segment containing breakend",
        )),
        Standard::AdjacentCopyNumber => {
            Some((Number::Unknown, Type::Integer, "Copy number of adjacency"))
        }
        Standard::CopyNumberConfidenceIntervals => Some((
            Number::Count(2),
            Type::Integer,
            "Confidence interval around copy number for the segment",
        )),
        Standard::AdjacentCopyNumberConfidenceIntervals => Some((
            Number::Unknown,
            Type::Integer,
            "Confidence interval around copy number for the adjacency",
        )),

        _ => None,
    }
}