comparison libs/sratoolkit.2.8.0-centos_linux64/schema/ncbi/stats.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 * NCBI Sequence Read Archive schema
29 */
30 version 1;
31
32 include 'insdc/sra.vschema';
33
34
35 /*--------------------------------------------------------------------------
36 * types
37 */
38 typeset NCBI:SRA:stats:qual_type
39 {
40 INSDC:quality:phred,
41 INSDC:quality:log_odds,
42 INSDC:quality:log_odds [ 4 ]
43 };
44
45
46 /*--------------------------------------------------------------------------
47 * functions
48 */
49
50 /*
51 trigger to build meta statistics: spot count, base count, etc.
52 */
53 extern function U8 NCBI:SRA:stats_trigger #1
54 ( U8 read_bin, U32 read_len, INSDC:SRA:xread_type read_type * ascii spot_group );
55
56 /* trigger to build meta statistics from compressed reads
57 */
58 extern function
59 U8 NCBI:SRA:cmp_stats_trigger #1 ( B8 cmp_read_bin, NCBI:SRA:stats:qual_type qual_bin,
60 U32 read_len, INSDC:SRA:xread_type read_type * ascii spot_group );
61
62 extern function
63 U8 NCBI:SRA:cmpf_stats_trigger #1 ( B8 cmp_read_bin, U32 spot_len,
64 U32 read_len, INSDC:SRA:xread_type read_type * ascii spot_group );
65
66
67 /* trigger to build phred_quality statistics in meta
68 */
69 extern function
70 U8 NCBI:SRA:phred_stats_trigger #1 ( INSDC:quality:phred qual_bin );
71
72 /*--------------------------------------------------------------------------
73 * table
74 */
75
76 /* stats
77 * holds sequence statistics
78 *
79 * history:
80 * 1.0.1 - explicitly interit from sra #1.0.1
81 * 1.1.0 - incorporate stats from compressed read
82 * 1.1.1 - sra #1.0.2
83 * 1.1.2 - sra #1.0.3 + cmp_base_count or to base_count
84 */
85 table NCBI:SRA:tbl:stats #1.2.0 = INSDC:SRA:tbl:stats #1.1, INSDC:SRA:tbl:sra #1.0.3
86 {
87 INSDC:SRA:spotid_t min_spot_id
88 = < INSDC:SRA:spotid_t > meta:value < "STATS/TABLE/SPOT_MIN" > ();
89
90 INSDC:SRA:spotid_t max_spot_id
91 = < INSDC:SRA:spotid_t > meta:value < "STATS/TABLE/SPOT_MAX" > ();
92
93 U64 spot_count
94 = < U64 > meta:value < "STATS/TABLE/SPOT_COUNT" > ();
95
96 U64 base_count
97 = < U64 > meta:value < "STATS/TABLE/BASE_COUNT" > ();
98
99 U64 bio_base_count
100 = < U64 > meta:value < "STATS/TABLE/BIO_BASE_COUNT" > ();
101
102 U64 cmp_base_count
103 = < U64 > meta:value < "STATS/TABLE/CMP_BASE_COUNT" > () | base_count;
104
105 trigger meta_stats
106 = NCBI:SRA:stats_trigger ( in_stats_bin, in_read_len, in_read_type, in_spot_group )
107 | NCBI:SRA:stats_trigger ( in_stats_bin, in_read_len, in_read_type )
108 | NCBI:SRA:cmp_stats_trigger ( in_cmp_stats_bin, in_stats_qual, in_read_len, in_read_type, in_spot_group )
109 | NCBI:SRA:cmp_stats_trigger ( in_cmp_stats_bin, in_stats_qual, in_read_len, in_read_type )
110 | NCBI:SRA:cmpf_stats_trigger ( in_cmp_stats_bin, in_spot_len, in_read_len, in_read_type, in_spot_group )
111 | NCBI:SRA:cmpf_stats_trigger ( in_cmp_stats_bin, in_spot_len, in_read_len, in_read_type );
112
113 trigger qual_stats
114 = NCBI:SRA:phred_stats_trigger #1 ( in_qual_phred );
115
116 /* INSDC:SRA:tbl:stats inherited virtual productions
117 * in_stats_bin
118 */
119 };