comparison libs/sratoolkit.2.8.0-centos_linux64/schema/ncbi/seq-graph.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 * seq-graph style named annotations
29 */
30 version 1;
31
32 include 'vdb/vdb.vschema';
33
34
35 /*--------------------------------------------------------------------------
36 * types
37 * constants
38 */
39
40 // example usage of data type:
41 typedef utf8 NCBI:SeqGraph:sid;
42 typedef utf8 NCBI:SeqGraph:name;
43 typedef U32 NCBI:SeqGraph:len;
44 typedef U32 NCBI:SeqGraph:scale;
45 typedef I64 NCBI:SeqGraph:value;
46 typedef NCBI:SeqGraph:value NCBI:SeqGraph:start;
47 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q0; // min
48 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q10; // 10th quantile
49 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q50; // median
50 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q90; // 90th quantile
51 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_q100; // max
52 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q0; // min zoomed to 100bp segment
53 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q10; // 10th quantile zoomed to 100bp segment
54 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q50; // median zoomed to 100bp segment
55 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q90; // 90th quantile zoomed to 100bp segment
56 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_zoom_q100; // max zoomed to 100bp segment
57 typedef NCBI:SeqGraph:value NCBI:SeqGraph:gr_num_switches; // number of value switches in graph
58
59
60 /*--------------------------------------------------------------------------
61 * tables
62 */
63 table NCBI:SeqGraph:tbl:seqgraph #1.0
64 {
65 /* SID
66 * Sequence id (Accession.version).
67 * Indexed.
68 */
69 extern column NCBI:SeqGraph:sid SID
70 = ( NCBI:SeqGraph:sid ) idx:text:project #1.0 < 'sid' > ( .SID );
71 physical column < NCBI:SeqGraph:sid > zip_encoding .SID
72 = ( NCBI:SeqGraph:sid ) idx:text:insert #1.0 < 'sid' > ( SID );
73
74 /* NAME
75 * Sequence name (which resolves into SID using assembly information)
76 * Indexed.
77 */
78 extern column NCBI:SeqGraph:name NAME
79 = ( NCBI:SeqGraph:name ) idx:text:project #1.0 < 'name' > ( .NAME );
80 physical column < NCBI:SeqGraph:name > zip_encoding .NAME
81 = ( NCBI:SeqGraph:name ) idx:text:insert #1.0 < 'name' > ( NAME );
82
83 /* START
84 * Sequence offset for the segment saved in this row.
85 * In most cases this can be calculated from row id and LEN below.
86 */
87 extern column < NCBI:SeqGraph:start > izip_encoding START;
88
89 /* LEN
90 * MAX_SEQ_LEN is used in our refseq schema
91 * CHUNK_SIZE might be preferred
92 * Mostly a constant ( = 5000), except for the last row for each sequence.
93 */
94 extern column < NCBI:SeqGraph:len > izip_encoding LEN;
95
96 /* SCALE
97 * Scaling factor for graph values.
98 * Mostly needed in order to store values as integers when actual values
99 * are real with a certain precision.
100 */
101 extern column < NCBI:SeqGraph:scale > izip_encoding SCALE;
102
103 /* GRAPH
104 * intensity values
105 */
106 extern column < NCBI:SeqGraph:value > izip_encoding GRAPH;
107
108
109 /* GR_Q0
110 * Minimal value for the row
111 */
112 extern column < NCBI:SeqGraph:gr_q0 > izip_encoding GR_Q0;
113
114
115 /* GR_Q10
116 * 10th quantile value for the row
117 */
118 extern column < NCBI:SeqGraph:gr_q10 > izip_encoding GR_Q10;
119
120
121 /* GR_Q50
122 * Median value for the row
123 */
124 extern column < NCBI:SeqGraph:gr_q50 > izip_encoding GR_Q50;
125
126
127 /* GR_Q90
128 * 90th quantile value for the row
129 */
130 extern column < NCBI:SeqGraph:gr_q90 > izip_encoding GR_Q90;
131
132
133 /* GR_Q100
134 * Maximal value for the row
135 */
136 extern column < NCBI:SeqGraph:gr_q100 > izip_encoding GR_Q100;
137
138 /* GR_ZOOM_Q0
139 * Minimal values for 100bp segments of the graph chunk
140 */
141 extern column < NCBI:SeqGraph:gr_zoom_q0 > izip_encoding GR_ZOOM_Q0;
142
143
144 /* GR_ZOOM_Q10
145 * 10th quantile values for 100bp segments of the graph chunk
146 */
147 extern column < NCBI:SeqGraph:gr_zoom_q10 > izip_encoding GR_ZOOM_Q10;
148
149
150 /* GR_ZOOM_Q50
151 * Median values for 100bp segments of the graph chunk
152 */
153 extern column < NCBI:SeqGraph:gr_zoom_q50 > izip_encoding GR_ZOOM_Q50;
154
155
156 /* GR_ZOOM_Q90
157 * 90th quantile values for 100bp segments of the graph chunk
158 */
159 extern column < NCBI:SeqGraph:gr_zoom_q90 > izip_encoding GR_ZOOM_Q90;
160
161
162 /* GR_ZOOM_Q100
163 * Maximal values for 100bp segments of the graph chunk
164 */
165 extern column < NCBI:SeqGraph:gr_zoom_q100 > izip_encoding GR_ZOOM_Q100;
166
167 /* NUM_SWITCHES
168 * Number of value switches within the graph. Helps client make the decision how better to
169 * represent the graph in ASN.1 (Seq-graph or Seq-table).
170 */
171 extern column < NCBI:SeqGraph:gr_num_switches > izip_encoding NUM_SWITCHES;
172 };
173
174
175 database NCBI:SeqGraph:database:kmergraph #1.0
176 {
177 table NCBI:SeqGraph:tbl:seqgraph #1.0 LEFT;
178 table NCBI:SeqGraph:tbl:seqgraph #1.0 RIGHT;
179 table NCBI:SeqGraph:tbl:seqgraph #1.0 SUM;
180 }