This file is indexed.

/usr/lib/ncbi-vdb/align/seq.vschema is in libncbi-vdb2 2.8.2-2+dfsg-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
/*===========================================================================
*
*                            PUBLIC DOMAIN NOTICE
*               National Center for Biotechnology Information
*
*  This software/database is a "United States Government Work" under the
*  terms of the United States Copyright Act.  It was written as part of
*  the author's official duties as a United States Government employee and
*  thus cannot be copyrighted.  This software/database is freely available
*  to the public for use. The National Library of Medicine and the U.S.
*  Government have not placed any restriction on its use or reproduction.
*
*  Although all reasonable efforts have been taken to ensure the accuracy
*  and reliability of the software and data, the NLM and the U.S.
*  Government do not and cannot warrant the performance or results that
*  may be obtained by using this software or data. The NLM and the U.S.
*  Government disclaim all warranties, express or implied, including
*  warranties of performance, merchantability or fitness for any particular
*  purpose.
*
*  Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/

/*==========================================================================
 * Sequence schema
 */
version 1;

include '/usr/lib/ncbi-vdb/vdb/vdb.vschema';
include '/usr/lib/ncbi-vdb/ncbi/seq.vschema';


/* cmp_base_space
 *  table representing compressed reads in base space,
 *  where the bases are only stored for unaligned reads
 */
table NCBI:align:tbl:cmp_base_space #1
    = INSDC:tbl:sequence #1.0.1
    , NCBI:tbl:dcmp_base_space #1
{
    /* CMP_READ
     *  read compressed against a reference sequence
     */

    // default is IUPAC character representation
    extern default column INSDC:dna:text CMP_READ
    {
        read = out_cmp_dna_text;
        validate = < INSDC:dna:text > compare ( in_cmp_dna_text, out_cmp_dna_text );
    }

    // 4na representation
    extern column INSDC:4na:bin CMP_READ = out_cmp_4na_bin;
    extern column INSDC:4na:packed CMP_READ = out_cmp_4na_packed;

    // x2na representation - 2na with ambiguity
    extern column INSDC:x2na:bin CMP_READ = out_cmp_x2na_bin;

    // 2na representation - 2na with no ambiguity
    extern column INSDC:2na:bin CMP_READ = out_cmp_2na_bin;
    extern column INSDC:2na:packed CMP_READ = out_cmp_2na_packed;


    /* input processing rules
     */

    // compressed input text
    INSDC:dna:text in_cmp_dna_text
        = < INSDC:dna:text, INSDC:dna:text > map < '.acmgrsvtwyhkdbn','NACMGRSVTWYHKDBN' > ( CMP_READ );

    // compressed input 4na bin
    INSDC:4na:bin in_cmp_4na_bin
        = < INSDC:4na:bin > range_validate < 0, 15 > ( CMP_READ )
        | ( INSDC:4na:bin ) unpack ( in_cmp_4na_packed )
        | < INSDC:dna:text, INSDC:4na:bin > map < INSDC:4na:map:CHARSET, INSDC:4na:map:BINSET > ( in_cmp_dna_text )
        | < INSDC:x2na:bin, INSDC:4na:bin > map < INSDC:x2na:map:BINSET, [ 1, 2, 4, 8, 15 ] > ( in_cmp_x2na_bin );

    // compressed input 4na packed
    INSDC:4na:packed in_cmp_4na_packed = CMP_READ;

    // compressed input x2na bin
    INSDC:x2na:bin in_cmp_x2na_bin
        = < INSDC:x2na:bin > range_validate < 0, 4 > ( CMP_READ )
        | < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( in_cmp_4na_bin );

    // compressed input 2na bin
    INSDC:2na:bin in_cmp_2na_bin
        = < INSDC:2na:bin > range_validate < 0, 3 > ( CMP_READ )
        | ( INSDC:2na:bin ) unpack ( in_cmp_2na_packed )
        | INSDC:SEQ:rand_4na_2na ( in_cmp_4na_bin );

    // compressed input 2na packed
    INSDC:2na:packed in_cmp_2na_packed = CMP_READ;

    // input 4na alt-read ( ambiguities )
    INSDC:4na:bin in_cmp_alt_4na_bin
        = < INSDC:4na:bin, INSDC:4na:bin > map < INSDC:4na:map:BINSET, [ 15,0,0,3,0,5,6,7,0,9,10,11,12,13,14,15 ] > ( in_cmp_4na_bin );

    // preparing a feed into stats column
    U8 in_cmp_stats_bin = in_cmp_2na_bin;


    /* physical columns
     */

    physical column INSDC:2na:packed .CMP_READ
        = in_cmp_2na_packed
        | ( INSDC:2na:packed ) pack ( in_cmp_2na_bin );

    physical column < INSDC:4na:bin > zip_encoding .CMP_ALTREAD
        = < INSDC:4na:bin > trim < 0, 0 > ( in_cmp_alt_4na_bin );


    /* output processing rules
     */

    // output 2na packed
    INSDC:2na:packed out_cmp_2na_packed = .CMP_READ;

    // unambiguous unpacked 2na
    INSDC:2na:bin out_cmp_2na_bin
        = ( INSDC:2na:bin ) unpack ( out_cmp_2na_packed );

    // output x2na bin
    INSDC:x2na:bin out_cmp_x2na_bin
        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_cmp_4na_bin );

    // output 2na->4na bin
    INSDC:4na:bin out_cmp_2na_4na_bin
        = < INSDC:2na:bin, INSDC:4na:bin > map < INSDC:2na:map:BINSET, [ 1, 2, 4, 8 ] > ( out_cmp_2na_bin );

    // output 4na bin
    INSDC:4na:bin out_cmp_4na_bin
        = < INSDC:4na:bin > bit_or < ALIGN_RIGHT > ( out_cmp_2na_4na_bin, .CMP_ALTREAD )
        | out_cmp_2na_4na_bin;

    // synthesized packed 4na
    INSDC:4na:packed out_cmp_4na_packed
        = ( INSDC:4na:packed ) pack ( out_cmp_4na_bin );

    // output text
    INSDC:dna:text out_cmp_dna_text
        = < INSDC:4na:bin, INSDC:dna:text > map < INSDC:4na:map:BINSET, INSDC:4na:map:CHARSET > ( out_cmp_4na_bin );


    /* decompressed sequences
     *   source is out_dcmp_4na_bin - a virtual production
     */

    // synthesize x2na_bin, 2na_bin and 2na_packed
    INSDC:x2na:bin out_dcmp_x2na_bin
        = < INSDC:4na:bin, INSDC:x2na:bin > map < INSDC:4na:map:BINSET, [ 4,0,1,4,2,4,4,4,3,4,4,4,4,4,4,4 ] > ( out_dcmp_4na_bin );
    INSDC:2na:bin out_dcmp_2na_bin
        = < INSDC:x2na:bin, INSDC:2na:bin > map < [ 0,1,2,3,4 ], [ 0,1,2,3,0 ] > ( out_dcmp_x2na_bin );
    INSDC:2na:packed out_dcmp_2na_packed
        = ( INSDC:2na:packed ) pack ( out_dcmp_2na_bin );


	/* INSDC:tbl:sequence inherited productions
	 *  cs_native
	 *  out_cs_key
	 *  out_signal
	 *  out_2cs_bin
	 *  out_2na_bin
	 *  out_4na_bin
	 *  out_dna_text
	 *  out_x2cs_bin
	 *  out_x2na_bin
	 *  out_2cs_packed
	 *  out_2na_packed
	 *  out_4na_packed
	 *  out_color_text
	 *  out_color_matrix
	 */

	/* NCBI:tbl:dcmp_base_space inherited productions
	 *  out_dcmp_4na_bin
	 */
}


/* cmp_color_space
 *  table representing compressed reads in color space,
 *  where the colors are only stored for unaligned reads
 */
table NCBI:align:tbl:cmp_color_space #1 =
    INSDC:tbl:sequence #1.0.1, NCBI:tbl:dcmp_color_space #1
{
    /* CMP_CSREAD
     *  read compressed against a reference sequence
     */

    // default is IUPAC character representation
    extern default column INSDC:color:text CMP_CSREAD = out_cmp_color_text;

    // x2cs representation - 2cs with ambiguity
    extern column INSDC:x2cs:bin CMP_CSREAD = out_cmp_x2cs_bin;

    // 2cs representation - 2cs with no ambiguity
    extern column INSDC:2cs:bin CMP_CSREAD = out_cmp_2cs_bin;
    extern column INSDC:2cs:packed CMP_CSREAD = out_cmp_2cs_packed;


    /* input processing rules
     */

    // compressed input text
    INSDC:color:text in_cmp_color_text = CMP_CSREAD;

    // compressed input x2cs bin
    INSDC:x2cs:bin in_cmp_x2cs_bin
        = < INSDC:x2cs:bin > range_validate < 0, 4 > ( CMP_CSREAD )
        | < INSDC:color:text, INSDC:x2cs:bin > map < INSDC:x2cs:map:CHARSET, INSDC:x2cs:map:BINSET > ( in_cmp_color_text );

    // compressed input 2cs bin
    INSDC:2cs:bin in_cmp_2cs_bin
        = < INSDC:2cs:bin > range_validate < 0, 3 > ( CMP_CSREAD )
        | ( INSDC:2cs:bin ) unpack ( in_cmp_2cs_packed )
        | < INSDC:x2cs:bin, INSDC:2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 1, 2, 3, 0 ] > ( in_cmp_x2cs_bin );

    // compressed input 2cs packed
    INSDC:2cs:packed in_cmp_2cs_packed = CMP_CSREAD;

    // compressed input x2cs alt-read ( ambiguities )
    INSDC:x2cs:bin in_cmp_alt_x2cs_bin
        = < INSDC:x2cs:bin, INSDC:x2cs:bin > map < INSDC:x2cs:map:BINSET, [ 0, 0, 0, 0, 4 ] > ( in_cmp_x2cs_bin );

    // preparing a feed into stats column
    U8 in_cmp_stats_bin = in_cmp_2cs_bin;


    /* physical columns
     */

    physical column INSDC:2cs:packed .CMP_CSREAD
        = in_cmp_2cs_packed
        | ( INSDC:2cs:packed ) pack ( in_cmp_2cs_bin );

    physical column < INSDC:x2cs:bin > zip_encoding .CMP_ALTCSREAD
        = < INSDC:x2cs:bin > trim < 0, 0 > ( in_cmp_alt_x2cs_bin );


    /* output processing rules
     */

    // compressed output 2cs packed
    INSDC:2cs:packed out_cmp_2cs_packed = .CMP_CSREAD;

    // unambiguous unpacked 2cs
    INSDC:2cs:bin out_cmp_2cs_bin
        = ( INSDC:2cs:bin ) unpack ( out_cmp_2cs_packed );

    // unpacked 2cs with ambiguity
    INSDC:x2cs:bin out_cmp_x2cs_bin
        = ( INSDC:x2cs:bin ) < U8 > bit_or < ALIGN_RIGHT > ( out_cmp_2cs_bin, .CMP_ALTCSREAD )
        | ( INSDC:x2cs:bin ) out_cmp_2cs_bin;

    // output text
    INSDC:color:text out_cmp_color_text
        = < INSDC:x2cs:bin, INSDC:color:text > map <  INSDC:x2cs:map:BINSET, INSDC:x2cs:map:CHARSET > ( out_cmp_x2cs_bin );


    /* decompressed sequences
     *   sources are out_dcmp_x2cs_bin - virtual production
     */

    // synthesize 2cs_bin and 2cs_packed
    INSDC:2cs:bin out_dcmp_2cs_bin
        = < INSDC:x2cs:bin, INSDC:2cs:bin > map < [ 0,1,2,3,4 ], [ 0,1,2,3,0 ] > ( out_dcmp_x2cs_bin );
    INSDC:2cs:packed out_dcmp_2cs_packed
        = ( INSDC:2cs:packed ) pack ( out_dcmp_2cs_bin );


	/* INSDC:tbl:sequence inherited productions
	 *  cs_native
	 *  out_cs_key
	 *  out_signal
	 *  out_2cs_bin
	 *  out_2na_bin
	 *  out_4na_bin
	 *  out_dna_text
	 *  out_x2cs_bin
	 *  out_x2na_bin
	 *  out_2cs_packed
	 *  out_2na_packed
	 *  out_4na_packed
	 *  out_color_text
	 *  out_qual_phred
	 *  out_color_matrix
	 *  out_qual_text_phred_33
	 *  out_qual_text_phred_64
	 */

	/* NCBI:tbl:dcmp_color_space inherited productions
	 *  out_dcmp_x2cs_bin
	 */
}