-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.rs
92 lines (90 loc) · 2.05 KB
/
build.rs
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
extern crate string_cache_codegen;
use std::env;
use std::path::Path;
use std::fs::File;
fn main() {
let qualifiers = [
"allele",
"anticodon",
"bound_moiety",
"chromosome",
"codon_recognized",
"codon_start",
"country",
"db_xref",
"EC_number",
"estimated_length",
"exception",
"experiment",
"function",
"gap_type",
"gene",
"gene_synonym",
"inference",
"isolation_source",
"label",
"linkage_evidence",
"locus_tag",
"map",
"mobile_element_type",
"mol_type",
"ncRNA_class",
"nomenclature",
"note",
"number",
"old_locus_tag",
"organelle",
"organism",
"product",
"protein_id",
"pseudo",
"recombination_class",
"regulatory_class",
"ribosomal_slippage",
"rpt_type",
"standard_name",
"strain",
"sub_strain",
"tissue_type",
"transcript_id",
"translation",
"transl_except",
"transl_table",
];
let feature_kinds = [
"assembly_gap",
"CDS",
"centromere",
"C_region",
"D-loop",
"D_segment",
"exon",
"gene",
"J_segment",
"misc_feature",
"misc_recomb",
"misc_RNA",
"mobile_element",
"mRNA",
"ncRNA",
"precursor_RNA",
"protein_bind",
"regulatory",
"repeat_region",
"rep_origin",
"rRNA",
"source",
"tmRNA",
"tRNA",
"V_segment",
];
let file = File::create(&Path::new(&env::var("OUT_DIR").unwrap()).join("atoms.rs")).unwrap();
string_cache_codegen::AtomType::new("QualifierKey", "qualifier_key!")
.atoms(qualifiers.iter())
.write_to(&file)
.unwrap();
string_cache_codegen::AtomType::new("FeatureKind", "feature_kind!")
.atoms(feature_kinds.iter())
.write_to(&file)
.unwrap();
}