Mercurial > repos > charles_s_test > seqsero2
comparison libs/sratoolkit.2.8.0-centos_linux64/schema/sra/abi.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 ABI Sequence Read Archive schema | |
| 29 */ | |
| 30 version 1; | |
| 31 | |
| 32 include 'ncbi/sra.vschema'; | |
| 33 include 'ncbi/spotname.vschema'; | |
| 34 | |
| 35 | |
| 36 /*-------------------------------------------------------------------------- | |
| 37 * NCBI:SRA:ABI | |
| 38 * ABI SRA Platform | |
| 39 */ | |
| 40 | |
| 41 /* tokenize_spot_name | |
| 42 * scans name on input | |
| 43 * tokenizes into parts | |
| 44 */ | |
| 45 extern function NCBI:SRA:spot_name_token | |
| 46 NCBI:SRA:ABI:tokenize_spot_name #1 ( ascii name ); | |
| 47 | |
| 48 | |
| 49 /* NCBI:SRA:ABI:common | |
| 50 * basic table interface based upon ABI's pipelines | |
| 51 * | |
| 52 * history: | |
| 53 * 1.0.1 - base explicitly upon changes to sra #1.0.1 | |
| 54 * 1.0.2 - base explicitly upon sra #1.0.2 | |
| 55 * 1.0.3 - base explicitly upon sra #1.0.3 | |
| 56 */ | |
| 57 table NCBI:SRA:ABI:common #1.0.3 = INSDC:SRA:tbl:sra #1.0.3 | |
| 58 { | |
| 59 // platform name is always 'ABSOLID' | |
| 60 ascii platform_name | |
| 61 = < ascii > echo < "ABSOLID" > (); | |
| 62 | |
| 63 /* TRIMMED SEQUENCE | |
| 64 * need to find the 0-based trim_start and trim_len | |
| 65 */ | |
| 66 INSDC:coord:zero bio_start = NCBI:SRA:bio_start ( out_read_start, out_read_type ); | |
| 67 INSDC:coord:zero trim_start = bio_start; | |
| 68 U32 trim_left = ( U32 ) trim_start; | |
| 69 INSDC:coord:len trim_len = ( INSDC:coord:len ) < U32 > diff ( spot_len, trim_left ); | |
| 70 | |
| 71 /* COORDINATES | |
| 72 * in addition to X and Y, | |
| 73 * ABI has PANEL | |
| 74 */ | |
| 75 column INSDC:coord:val PANEL = out_panel_coord; | |
| 76 | |
| 77 // signal | |
| 78 column NCBI:fsamp4 SIGNAL | |
| 79 = out_signal; | |
| 80 | |
| 81 NCBI:fsamp4 out_signal = ( NCBI:fsamp4 ) | |
| 82 < NCBI:SRA:swapped_fsamp4 > NCBI:SRA:swap ( out_signal_swapped, out_x2cs_bin ); | |
| 83 | |
| 84 | |
| 85 /* INSDC:tbl:sequence inherited productions | |
| 86 * cs_native | |
| 87 * in_cs_key | |
| 88 * out_cs_key | |
| 89 * out_signal_swapped | |
| 90 * out_2cs_bin | |
| 91 * out_2na_bin | |
| 92 * out_4na_bin | |
| 93 * out_dna_text | |
| 94 * out_x2cs_bin | |
| 95 * out_x2na_bin | |
| 96 * in_color_text | |
| 97 * out_2cs_packed | |
| 98 * out_2na_packed | |
| 99 * out_4na_packed | |
| 100 * out_color_text | |
| 101 * out_qual_phred | |
| 102 * out_color_matrix | |
| 103 */ | |
| 104 | |
| 105 /* INSDC:SRA:tbl:spotname inherited productions | |
| 106 * out_x_coord | |
| 107 * out_y_coord | |
| 108 * out_name_fmt | |
| 109 * out_spot_name | |
| 110 * spot_ids_found | |
| 111 */ | |
| 112 | |
| 113 /* INSDC:SRA:tbl:spotdesc inherited productions | |
| 114 * out_label | |
| 115 * out_nreads | |
| 116 * out_read_len | |
| 117 * out_label_len | |
| 118 * out_rd_filter | |
| 119 * out_read_type | |
| 120 * out_read_start | |
| 121 * out_label_start | |
| 122 * static_fixed_spot_len | |
| 123 */ | |
| 124 | |
| 125 /* INSDC:SRA:tbl:stats inherited productions | |
| 126 * base_count | |
| 127 * spot_count | |
| 128 * max_spot_id | |
| 129 * min_spot_id | |
| 130 * in_stats_bin | |
| 131 * bio_base_count | |
| 132 */ | |
| 133 | |
| 134 /* INSDC:SRA:tbl:sra inherited productions | |
| 135 * out_platform | |
| 136 */ | |
| 137 | |
| 138 /* NCBI:SRA:ABI:common productions | |
| 139 * out_panel_coord | |
| 140 */ | |
| 141 }; | |
| 142 | |
| 143 | |
| 144 /* NCBI:SRA:ABI:tbl:v2 #1 | |
| 145 * normalized v2 table | |
| 146 * | |
| 147 * history: | |
| 148 * 1.0.1 - changes to sra #1.0.1 | |
| 149 * 1.0.2 - changes to common #1.0.2 | |
| 150 * 1.0.3 - sra #2.1.2, color_space #2.0.2, common #1.0.3 | |
| 151 * 1.0.4 - updated ancestry | |
| 152 */ | |
| 153 physical NCBI:SRA:swapped_fsamp4 NCBI:SRA:ABI:encoding:SIGNAL #2 | |
| 154 { | |
| 155 decode { return NCBI:SRA:fsamp4:decode #2 ( @ ); } | |
| 156 encode { return NCBI:SRA:fsamp4:encode #2 < 14, 10 > ( @ ); } | |
| 157 } | |
| 158 | |
| 159 table NCBI:SRA:ABI:tbl:v2 #1.0.4 | |
| 160 = NCBI:SRA:tbl:sra #2.1.3 | |
| 161 , NCBI:tbl:color_space #2.1.0 | |
| 162 , NCBI:tbl:phred_quality #2.0.4 | |
| 163 , NCBI:SRA:ABI:common #1.0.3 | |
| 164 { | |
| 165 /* NAME tokenizing and coordinates | |
| 166 * most work happens in skeyname table | |
| 167 * we still obtain PANEL from name | |
| 168 */ | |
| 169 INSDC:coord:val out_panel_coord = ( INSDC:coord:val ) | |
| 170 NCBI:SRA:extract_name_coord < NCBI:SRA:name_token:T > ( _out_name, out_spot_name_tok ); | |
| 171 NCBI:SRA:spot_name_token out_spot_name_tok | |
| 172 = NCBI:SRA:ABI:tokenize_spot_name ( _out_name ); | |
| 173 | |
| 174 NCBI:SRA:spot_name_token in_spot_name_tok | |
| 175 = NCBI:SRA:ABI:tokenize_spot_name ( NAME ); | |
| 176 | |
| 177 | |
| 178 /* SIGNAL | |
| 179 * optional, no longer archived | |
| 180 */ | |
| 181 | |
| 182 // support for individual color inputs | |
| 183 extern column NCBI:fsamp1 FTC | |
| 184 { | |
| 185 read = out_ftc; | |
| 186 validate = < F32 > no_compare #1 ( in_ftc, out_ftc ); | |
| 187 } | |
| 188 NCBI:fsamp1 in_ftc = FTC; | |
| 189 NCBI:fsamp1 out_ftc | |
| 190 = ( NCBI:fsamp1 ) < F32 > cut < 0 > ( out_signal ); | |
| 191 | |
| 192 extern column NCBI:fsamp1 FAM | |
| 193 { | |
| 194 read = out_fam; | |
| 195 validate = < F32 > no_compare #1 ( in_fam, out_fam ); | |
| 196 } | |
| 197 NCBI:fsamp1 in_fam = FAM; | |
| 198 NCBI:fsamp1 out_fam | |
| 199 = ( NCBI:fsamp1 ) < F32 > cut < 0 > ( out_signal ); | |
| 200 | |
| 201 extern column NCBI:fsamp1 CY3 | |
| 202 { | |
| 203 read = out_cy3; | |
| 204 validate = < F32 > no_compare #1 ( in_cy3, out_cy3 ); | |
| 205 } | |
| 206 NCBI:fsamp1 in_cy3 = CY3; | |
| 207 NCBI:fsamp1 out_cy3 | |
| 208 = ( NCBI:fsamp1 ) < F32 > cut < 1 > ( out_signal ); | |
| 209 | |
| 210 extern column NCBI:fsamp1 TXR | |
| 211 { | |
| 212 read = out_txr; | |
| 213 validate = < F32 > no_compare #1 ( in_txr, out_txr ); | |
| 214 } | |
| 215 NCBI:fsamp1 in_txr = TXR; | |
| 216 NCBI:fsamp1 out_txr | |
| 217 = ( NCBI:fsamp1 ) < F32 > cut < 2 > ( out_signal ); | |
| 218 | |
| 219 extern column NCBI:fsamp1 CY5 | |
| 220 { | |
| 221 read = out_cy5; | |
| 222 validate = < F32 > no_compare #1 ( in_cy5, out_cy5 ); | |
| 223 } | |
| 224 NCBI:fsamp1 in_cy5 = CY5; | |
| 225 NCBI:fsamp1 out_cy5 | |
| 226 = ( NCBI:fsamp1 ) < F32 > cut < 3 > ( out_signal ); | |
| 227 | |
| 228 // intermediate input (writing) production | |
| 229 NCBI:fsamp4 in_signal | |
| 230 = SIGNAL | |
| 231 | ( NCBI:fsamp4 ) < F32 > paste ( in_ftc, in_cy3, in_txr, in_cy5 ) | |
| 232 | ( NCBI:fsamp4 ) < F32 > paste ( in_fam, in_cy3, in_txr, in_cy5 ); | |
| 233 | |
| 234 // overridden output production | |
| 235 NCBI:SRA:swapped_fsamp4 out_signal_swapped = .SIGNAL; | |
| 236 | |
| 237 // rule for writing SIGNAL | |
| 238 physical column NCBI:SRA:ABI:encoding:SIGNAL #2 .SIGNAL | |
| 239 = ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_signal, in_x2cs_bin ) | |
| 240 | ( NCBI:SRA:swapped_fsamp4 ) < NCBI:fsamp4 > NCBI:SRA:swap ( in_signal, in_2cs_bin ); | |
| 241 }; |
