Mercurial > repos > charles_s_test > seqsero2
comparison libs/sratoolkit.2.8.0-centos_linux64/schema/sra/pevents.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 Likelihood & Event schema | |
| 29 */ | |
| 30 version 1; | |
| 31 include 'vdb/vdb.vschema'; | |
| 32 | |
| 33 typedef U8 INSDC:phred; | |
| 34 typedef ascii INSDC:event:text; | |
| 35 const INSDC:event:text INSDC:event:CHARSET = "ACGT0123B+-"; | |
| 36 const INSDC:event:text INSDC:event:ACCEPTSET = "ACGTacgt0123B+-"; | |
| 37 | |
| 38 extern function < U32 dim > | |
| 39 U32 NCBI:SRA:sort_order #1.0 ( F32[dim] likelihoods ); | |
| 40 | |
| 41 extern function < U32 dim > | |
| 42 F32 NCBI:SRA:reorder #1.0 ( U32 sort_order, F32[dim] likelihoods ); | |
| 43 | |
| 44 extern function < U32 dim > | |
| 45 F32 NCBI:SRA:restore_order #1.0 ( U32 sort_order, F32[dim] likelihoods ); | |
| 46 | |
| 47 extern function < U32 sdim, U32 rdim > | |
| 48 INSDC:phred[rdim] NCBI:SRA:likelihood_to_phred #1.0 ( F32 like_scale, F32[sdim] likelihoods ); | |
| 49 | |
| 50 extern function < U32 sdim, U32 rdim > | |
| 51 F32[rdim] NCBI:SRA:phred_to_likelihood #1.0 ( F32 like_scale, F32[sdim] phred ); | |
| 52 | |
| 53 table NCBI:SRA:tbl:pevents #1.0 | |
| 54 { | |
| 55 // event labels - single character events | |
| 56 extern column | |
| 57 INSDC:event:text PEVENTS = .PEVENTS; | |
| 58 | |
| 59 physical column < INSDC:event:text > | |
| 60 zip_encoding #1.0 .PEVENTS = PEVENTS; | |
| 61 | |
| 62 // likelihoods | |
| 63 extern default column | |
| 64 F32[4] LIKELIHOODS = likelihoods; | |
| 65 extern readonly column | |
| 66 INSDC:phred[4] LIKELIHOODS = phred; | |
| 67 | |
| 68 U32 sort_encode = NCBI:SRA:sort_order < 4 > ( LIKELIHOODS ); | |
| 69 | |
| 70 physical column < U32 > | |
| 71 zip_encoding #1.0 < Z_RLE > .SORT_ORDER = sort_encode; | |
| 72 | |
| 73 F32 reorder = NCBI:SRA:reorder < 4 > ( sort_encode, LIKELIHOODS ); | |
| 74 F32 like_scale = vdb:fixed_vec_sum < F32, 4 > ( reorder ); | |
| 75 | |
| 76 physical column < F32 > | |
| 77 fzip_encoding #1.0 < 4 > .SCALE = like_scale; | |
| 78 | |
| 79 INSDC:phred cut_phred = NCBI:SRA:likelihood_to_phred #1.0 < 4, 3 > ( like_scale, reorder ); | |
| 80 | |
| 81 physical column < INSDC:phred > | |
| 82 zip_encoding #1.0 < 5 > .PHRED = cut_phred; | |
| 83 | |
| 84 // normalization scaling factors | |
| 85 extern readonly column | |
| 86 F32 LIKELIHOOD_NORM = .SCALE; | |
| 87 | |
| 88 // phred scores | |
| 89 extern readonly column | |
| 90 INSDC:phred[4] PHRED = phred; | |
| 91 }; |
