This file is indexed.

/usr/lib/ncbi-vdb/sra/454.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
/*===========================================================================
*
*                            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.
*
* ===========================================================================
*
*/

/*==========================================================================
 * NCBI 454 Sequence Read Archive schema
 */
version 1;

include '/usr/lib/ncbi-vdb/ncbi/sra.vschema';
include '/usr/lib/ncbi-vdb/ncbi/spotname.vschema';
include '/usr/lib/ncbi-vdb/ncbi/clip.vschema';


/*--------------------------------------------------------------------------
 * functions
 */

/* dynamic_read_desc
 *  uses inputs to determine read type and segmentation
 *
 *  "edit_distance" [ CONST, OPTIONAL ] - a tolerance figure for
 *  linker matching, where 0 requires exact match, 5 is default.
 *
 *  "spot" [ DATA ] - bases for entire spot
 *
 *  "key" [ DATA, CONTROL ] - bases for key sequence. for version 1,
 *  the first base following key is taken as biological start
 *
 *  "linker" [ DATA, CONTROL, OPTIONAL ] - if present, is used to separate
 *  all bases following "key" into mate pair biological reads
 *
 *  returns a trio for each identified read, with read type, start and length
 */
typeset NCBI:SRA:_454_:drdparam_set { ascii, U8, INSDC:2na:packed };
extern function
U32 [ 3 ] NCBI:SRA:_454_:dynamic_read_desc #1 < * U32 edit_distance >
    ( NCBI:SRA:_454_:drdparam_set spot, NCBI:SRA:_454_:drdparam_set key
      * NCBI:SRA:_454_:drdparam_set linker );

const U32 NCBI:SRA:_454_:dyn_read_type  = 0;
const U32 NCBI:SRA:_454_:dyn_read_start = 1;
const U32 NCBI:SRA:_454_:dyn_read_len   = 2;


/* tokenize_spot_name
 *  scans name on input
 *  tokenizes into parts
 */
extern function NCBI:SRA:spot_name_token
    NCBI:SRA:_454_:tokenize_spot_name #1 ( ascii name );


/*--------------------------------------------------------------------------
 * NCBI:SRA:_454_:common
 *  Roche 454 SRA Platform
 *
 * history:
 *  1.0.1 - explictly base upon sra #1.0.1
 *  1.0.2 - bring in clip processing from external table
 *  1.0.3 - base explicitly upon sra #1.0.2, clip #1.0.1
 *  1.0.4 - base explicitly upon sra #1.0.3, clip #1.0.2
 */
table NCBI:SRA:_454_:common #1.0.4 = INSDC:SRA:tbl:sra #1.0.3, NCBI:SRA:tbl:clip #1.0.2
{
    /* PLATFORM
     *  platform name is always 454
     */
    ascii platform_name
        = < ascii > echo < "454" > ();

    /* 454 TECHNICAL SEQUENCES
     */
    column INSDC:dna:text FLOW_CHARS = out_flow_chars;
    INSDC:dna:text in_flow_chars
        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn.', 'ACGTNN' > ( FLOW_CHARS );
    column INSDC:dna:text KEY_SEQUENCE = out_key_sequence;
    INSDC:dna:text in_key_sequence
        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn.', 'ACGTNN' > ( KEY_SEQUENCE );
    column INSDC:dna:text LINKER_SEQUENCE = out_linker_sequence;
    INSDC:dna:text in_linker_sequence
        = < INSDC:dna:text, INSDC:dna:text > map < 'acgtn.', 'ACGTNN' > ( LINKER_SEQUENCE );

    // binary technical sequences
    INSDC:x2na:bin out_flow_bin
        = < INSDC:dna:text, INSDC:x2na:bin > map < INSDC:x2na:map:CHARSET, INSDC:x2na:map:BINSET > ( out_flow_chars );
    INSDC:x2na:bin out_key_bin
        = < INSDC:dna:text, INSDC:x2na:bin > map < INSDC:x2na:map:CHARSET, INSDC:x2na:map:BINSET > ( out_key_sequence );
    INSDC:x2na:bin out_linker_bin
        = < INSDC:dna:text, INSDC:x2na:bin > map < INSDC:x2na:map:CHARSET, INSDC:x2na:map:BINSET > ( out_linker_sequence );

    /* SIGNAL
     *  single channel integer
     */
    column NCBI:isamp1 SIGNAL = out_signal;
    NCBI:isamp1 out_signal = .SIGNAL;


	/* INSDC:tbl:sequence inherited productions
	 *  cs_native
	 *  out_cs_key
	 *  in_dna_text
	 *  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
	 */

	/* INSDC:SRA:tbl:spotname inherited productions
	 *  out_x_coord
	 *  out_y_coord
	 *  out_name_fmt
	 *  out_spot_name
	 *  spot_ids_found
	 */

	/* INSDC:SRA:tbl:spotdesc inherited productions
	 *  trim_len
	 *  out_label
	 *  out_nreads
	 *  trim_start
	 *  out_read_len
	 *  out_label_len
	 *  out_rd_filter
	 *  out_read_type
	 *  out_read_start
	 *  out_label_start
	 *  static_fixed_spot_len
	 */

	/* INSDC:SRA:tbl:stats inherited productions
	 *  base_count
	 *  spot_count
	 *  max_spot_id
	 *  min_spot_id
	 *  in_stats_bin
	 *  bio_base_count
	 */

	/* NCBI:tbl:n_encoding inherited productions
	 *  read_unpack
	 */

	/* NCBI:SRA:_454_:common productions
	 *  .SIGNAL
	 *  .CLIP_ADAPTER_LEFT
	 *  .CLIP_QUALITY_LEFT
	 *  .CLIP_ADAPTER_RIGHT
	 *  .CLIP_QUALITY_RIGHT
	 *  out_flow_chars
	 *  out_key_sequence
	 *  out_linker_sequence
	 */
};


/*--------------------------------------------------------------------------
 * NCBI:SRA:_454_:tbl:v2
 *  Roche 454 SRA Platform
 *
 * history:
 *  1.0.1 - explictly base upon sra #1.0.1 and related changes
 *  1.0.2 - respond to change to 454:common base table #1.0.2
 */

// encodings are declared to have their own version
// so that they may be changed over time independently
physical INSDC:coord:one NCBI:SRA:_454_:encoding:CLIP #2
{
    decode { return ( INSDC:coord:one ) iunzip ( @ ); }
    encode { return izip ( @ ); }
}

physical NCBI:isamp1 NCBI:SRA:_454_:encoding:SIGNAL #2
{
    decode { return ( NCBI:isamp1 ) iunzip ( @ ); }
    encode { return izip ( @ ); }
}

physical INSDC:position:one NCBI:SRA:_454_:encoding:POSITION #2
{
    decode
    {
        I32 pos_1st_deriv = iunzip ( @ );
        return ( INSDC:position:one ) < I32 > integral ( pos_1st_deriv );
    }
    encode
    { 
        I32 pos_1st_deriv = < I32 > deriv ( @ );
        return izip ( pos_1st_deriv ); 
    }
}

/* normalized v2 table
 *
 * history:
 *  1.0.6 - base upon updated ancestry
 *  1.0.7 - base upon updated ancestry
 */
table NCBI:SRA:_454_:tbl:v2 #1.0.7
    = NCBI:SRA:tbl:sra_nopos #2.1.3
    , NCBI:tbl:base_space #2.0.3
    , NCBI:tbl:phred_quality #2.0.3
    , NCBI:SRA:_454_:common #1.0.4
{
    /* NAME tokenizing and coordinates
     *  most work happens in skeyname table
     *  we still obtain REGION from name
     */
    readonly column INSDC:coord:val REGION = ( INSDC:coord:val )
        NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:T > ( _out_name, out_spot_name_tok );
    NCBI:SRA:spot_name_token out_spot_name_tok
        = NCBI:SRA:_454_:tokenize_spot_name ( _out_name );

    NCBI:SRA:spot_name_token in_spot_name_tok
        = NCBI:SRA:_454_:tokenize_spot_name ( NAME );

    // special sequences
    INSDC:dna:text out_flow_chars
        = .FLOW_CHARS
        | < INSDC:dna:text > echo < 'TACG' > ( .SIGNAL )
        | < INSDC:dna:text > echo < 'TACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACG' > ();

    physical column < INSDC:dna:text > zip_encoding
        .FLOW_CHARS = in_flow_chars;

    INSDC:dna:text out_key_sequence
        = .KEY_SEQUENCE
        | < INSDC:dna:text > echo < 'TCAG' > ();

    physical column < INSDC:dna:text > zip_encoding
        .KEY_SEQUENCE = in_key_sequence;

    INSDC:dna:text out_linker_sequence = .LINKER_SEQUENCE;
    physical column < INSDC:dna:text > zip_encoding
        .LINKER_SEQUENCE = in_linker_sequence;

// linker needs to be representable by its own table
// either in metadata or somewhere else

    // position stored as normal 1-based coordinate
    INSDC:position:one out_position = .POSITION;
    physical column NCBI:SRA:_454_:encoding:POSITION #2
        .POSITION = POSITION;

    // clips
    physical column NCBI:SRA:_454_:encoding:CLIP #2
        .CLIP_ADAPTER_LEFT = CLIP_ADAPTER_LEFT;
    physical column NCBI:SRA:_454_:encoding:CLIP #2
        .CLIP_ADAPTER_RIGHT = CLIP_ADAPTER_RIGHT;
    physical column NCBI:SRA:_454_:encoding:CLIP #2
        .CLIP_QUALITY_LEFT = CLIP_QUALITY_LEFT;
    physical column NCBI:SRA:_454_:encoding:CLIP #2
        .CLIP_QUALITY_RIGHT = CLIP_QUALITY_RIGHT;

    // signal
    physical column NCBI:SRA:_454_:encoding:SIGNAL #2
        .SIGNAL = SIGNAL;
};