comparison libs/sratoolkit.2.8.0-centos_linux64/schema/csra2/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 'vdb/vdb.vschema';
33 include 'insdc/insdc.vschema';
34 include 'insdc/sra.vschema';
35
36
37 /*--------------------------------------------------------------------------
38 * functions
39 */
40
41 extern function
42 U8 NCBI:csra2:stats_trigger #1 ( B8 read_bin * ascii read_group );
43
44 extern function
45 U8 NCBI:csra2:phred_stats_trigger #1 ( INSDC:quality:phred qual_bin )
46 = NCBI:SRA:phred_stats_trigger;
47
48 /*--------------------------------------------------------------------------
49 * table
50 */
51
52 table NCBI:csra2:tbl:read_stats #1
53 {
54 readonly column I64 MIN_READ_ID = min_read_id;
55 readonly column I64 MAX_READ_ID = max_read_id;
56 readonly column U64 READ_COUNT = read_count;
57 readonly column U64 BASE_COUNT = base_count;
58
59 /* introduce compatibility names */
60 readonly column INSDC:SRA:spotid_t MIN_SPOT_ID = cast ( min_read_id );
61 readonly column INSDC:SRA:spotid_t MAX_SPOT_ID = cast ( max_read_id );
62 readonly column U64 SPOT_COUNT = read_count;
63
64 /* reading rules */
65 I64 min_read_id
66 = < I64 > meta:value < "STATS/TABLE/READ_MIN" > ()
67 | < I64 > meta:value < "STATS/TABLE/SPOT_MIN" > ()
68 | < I64 > echo < 1 > ()
69 ;
70 I64 max_read_id
71 = < I64 > meta:value < "STATS/TABLE/READ_MAX" > ()
72 | < I64 > meta:value < "STATS/TABLE/SPOT_MAX" > ()
73 | cast ( read_count )
74 ;
75 U64 read_count
76 = < U64 > meta:value < "STATS/TABLE/READ_COUNT" > ()
77 | < U64 > meta:value < "STATS/TABLE/SPOT_COUNT" > ()
78 ;
79 U64 base_count
80 = < U64 > meta:value < "STATS/TABLE/BASE_COUNT" > ()
81 ;
82
83 /* triggers */
84 trigger meta_stats
85 = NCBI:csra2:stats_trigger ( in_stats_seq, in_stats_read_group )
86 | NCBI:csra2:stats_trigger ( in_stats_seq )
87 ;
88
89 trigger qual_stats
90 = NCBI:csra2:phred_stats_trigger #1 ( in_stats_qual_phred )
91 ;
92 }