Mercurial > repos > charles_s_test > seqsero2
comparison libs/sratoolkit.2.8.0-centos_linux64/schema/ncbi/ncbi.vschema @ 3:38ad1130d077 draft
planemo upload commit a4fb57231f274270afbfebd47f67df05babffa4a-dirty
author | charles_s_test |
---|---|
date | Mon, 27 Nov 2017 11:21:07 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:0d65b71ff8df | 3:38ad1130d077 |
---|---|
1 /*=========================================================================== | |
2 * | |
3 * PUBLIC DOMAIN NOTICE | |
4 * National Center for Biotechnology Information | |
5 * | |
6 * This software/database is a "United States Government Work" under the | |
7 * terms of the United States Copyright Act. It was written as part of | |
8 * the author's official duties as a United States Government employee and | |
9 * thus cannot be copyrighted. This software/database is freely available | |
10 * to the public for use. The National Library of Medicine and the U.S. | |
11 * Government have not placed any restriction on its use or reproduction. | |
12 * | |
13 * Although all reasonable efforts have been taken to ensure the accuracy | |
14 * and reliability of the software and data, the NLM and the U.S. | |
15 * Government do not and cannot warrant the performance or results that | |
16 * may be obtained by using this software or data. The NLM and the U.S. | |
17 * Government disclaim all warranties, express or implied, including | |
18 * warranties of performance, merchantability or fitness for any particular | |
19 * purpose. | |
20 * | |
21 * Please cite the author in any work or product based on this material. | |
22 * | |
23 * =========================================================================== | |
24 * | |
25 */ | |
26 | |
27 /*========================================================================== | |
28 * VDB Schema intrinsic types and functions | |
29 */ | |
30 version 1; | |
31 | |
32 include 'vdb/vdb.vschema'; | |
33 include 'insdc/insdc.vschema'; | |
34 | |
35 | |
36 /*-------------------------------------------------------------------------- | |
37 * data types | |
38 */ | |
39 | |
40 // N-encoded phred has values limited to 1..63 and 0 used for N | |
41 typedef INSDC:quality:phred NCBI:quality:n_encoded:phred; | |
42 // N-encoded log-odds has values limite to -5..40 and -6 for N | |
43 typedef INSDC:quality:log_odds NCBI:quality:n_encoded:log_odds; | |
44 | |
45 // these types have been restated | |
46 alias INSDC:dna:text INSDC:fasta; | |
47 alias INSDC:4na:packed INSDC:dna:4na; | |
48 alias INSDC:2na:packed INSDC:dna:2na; | |
49 alias INSDC:2na:packed NCBI:2na; | |
50 alias INSDC:2cs:packed INSDC:color:2cs; | |
51 alias INSDC:2cs:packed NCBI:2cs; | |
52 alias INSDC:quality:phred NCBI:qual1; | |
53 alias NCBI:quality:n_encoded:phred NCBI:SRA:enc_qual1; | |
54 | |
55 // 16-bit integer sample data | |
56 typedef I16 NCBI:isamp1; | |
57 | |
58 // 32-bit floating point sample data | |
59 typedef F32 NCBI:fsamp1, NCBI:fsamp4 [ 4 ]; | |
60 | |
61 // ASN.1 | |
62 typedef B8 NCBI:asn:binary; | |
63 typedef ascii NCBI:asn:text; | |
64 | |
65 // GenInfo id - 64 bit because we are almost out of 32 bit ids | |
66 typedef U64 NCBI:gi; | |
67 | |
68 // Taxonomy id | |
69 typedef U32 NCBI:taxid; | |
70 | |
71 // Genbank status | |
72 typedef U32 NCBI:gb_state; | |
73 | |
74 | |
75 /*-------------------------------------------------------------------------- | |
76 * formats | |
77 * many of these formats are older than the current corresponding vdb fmts | |
78 */ | |
79 | |
80 fmtdef merged_t; | |
81 fmtdef fp_encoded_t; | |
82 fmtdef rl_encoded_t; | |
83 fmtdef NCBI:zlib_encoded_t; | |
84 fmtdef NCBI:fp_encoded_t; | |
85 | |
86 | |
87 /*-------------------------------------------------------------------------- | |
88 * functions | |
89 */ | |
90 | |
91 | |
92 /* merge | |
93 * split | |
94 * the original versions of these functions | |
95 * used a slightly different format giving them | |
96 * a different signature from their vdb counterparts. | |
97 * | |
98 * here to maintain backward compatibility for | |
99 * column schema functions | |
100 */ | |
101 extern function | |
102 merged_t NCBI:merge #1.0 ( any in, ... ); | |
103 | |
104 extern function | |
105 any NCBI:split #1.0 < U32 idx > ( merged_t in ) | |
106 = vdb:split; | |
107 | |
108 | |
109 /* cut | |
110 * paste | |
111 * these have no compiler type-checking | |
112 */ | |
113 extern function | |
114 any NCBI:cut #1.0 < U32 idx, ... > ( any in ) | |
115 = vdb:cut; | |
116 | |
117 extern function | |
118 any NCBI:paste #1.0 ( any in, ... ) | |
119 = vdb:paste; | |
120 | |
121 | |
122 /* pack | |
123 * unpack | |
124 * wildcard typed | |
125 */ | |
126 extern function | |
127 any NCBI:pack #1.0 < U32 from, U32 to > ( any in ); | |
128 | |
129 extern function | |
130 any NCBI:unpack #1.0 < U32 from, U32 to > ( any in ); | |
131 | |
132 | |
133 /* fp_decode | |
134 * OBSOLETE | |
135 * here to handle anything encoded with fp_encode | |
136 */ | |
137 extern function | |
138 any NCBI:fp_decode #1.0 ( fp_encoded_t in ); | |
139 | |
140 | |
141 /* fp_extend | |
142 * OBSOLETE | |
143 * here to handle anything encoded with fp_truncate | |
144 */ | |
145 extern function | |
146 any NCBI:fp_extend #1.0 < U32 bits > ( NCBI:fp_encoded_t in ); | |
147 | |
148 | |
149 /* run_length_encode | |
150 * run_length_decode | |
151 */ | |
152 extern function | |
153 rl_encoded_t NCBI:run_length_encode #1.0 ( any in ) | |
154 = vdb:rlencode; | |
155 | |
156 extern function | |
157 any NCBI:run_length_decode #1.0 ( rl_encoded_t in ) | |
158 = vdb:rldecode; | |
159 | |
160 | |
161 /* zlib | |
162 * unzip | |
163 * variation on the formatting | |
164 */ | |
165 extern function | |
166 NCBI:zlib_encoded_t NCBI:zlib #1.0 < * I32 strategy, I32 level > ( any in ) | |
167 = vdb:zip; | |
168 | |
169 extern function | |
170 any NCBI:unzip #1.0 ( NCBI:zlib_encoded_t in ); | |
171 | |
172 | |
173 /* zlib_huffman_compress | |
174 * invokes zlib in huffman + rle mode | |
175 */ | |
176 schema function | |
177 NCBI:zlib_encoded_t NCBI:zlib_huffman_compress #1.0 ( any in ) | |
178 { | |
179 // named as Huffman, but apply RLE as well | |
180 return NCBI:zlib < Z_RLE > ( in ); | |
181 } | |
182 | |
183 /* zlib_compress | |
184 * standard zlib | |
185 */ | |
186 schema function | |
187 NCBI:zlib_encoded_t NCBI:zlib_compress #1.0 ( any in ) | |
188 { | |
189 return NCBI:zlib < Z_DEFAULT_STRATEGY > ( in ); | |
190 } | |
191 | |
192 /* zlib_decompress | |
193 * alternate name for unzip | |
194 */ | |
195 alias NCBI:unzip NCBI:zlib_decompress; |