/usr/lib/ncbi-vdb/ncbi/clip.vschema is in libncbi-vdb2 2.8.2-2+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | /*===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
/*==========================================================================
* NCBI Sequence Read Archive schema
*/
version 1;
include '/usr/lib/ncbi-vdb/ncbi/sra.vschema';
include '/usr/lib/ncbi-vdb/ncbi/spotname.vschema';
/*--------------------------------------------------------------------------
* NCBI:SRA:tbl:clip
* common clip column processing
* shared by 454 and ion-torrent
*
* uses spotdesc because it has a dependency upon spot_len
*
* history:
* 1.0.1 - base explicitly upon spotdesc #1.0.1
* 1.0.2 - base explicitly upon spotdesc #1.0.2
*/
table NCBI:SRA:tbl:clip #1.0.2 = INSDC:SRA:tbl:spotdesc #1.0.2
{
/* CLIP_ADAPTER_LEFT, CLIP_ADAPTER_RIGHT
* adapter clips in 1-based coordinates
* when value is 0, implies that they are NOT SET
*/
column INSDC:coord:one CLIP_ADAPTER_LEFT = out_clip_adapt_left;
column INSDC:coord:one CLIP_ADAPTER_RIGHT = out_clip_adapt_right;
// casts are required to allow multple storage formats
INSDC:coord:one out_clip_adapt_left = cast ( .CLIP_ADAPTER_LEFT );
INSDC:coord:one out_clip_adapt_right = cast ( .CLIP_ADAPTER_RIGHT );
/* CLIP_QUALITY_LEFT, CLIP_QUALITY_RIGHT
* quality clips in 1-based coordinates
* when value is 0, implies that they are NOT SET
*/
column INSDC:coord:one CLIP_QUALITY_LEFT = out_clip_qual_left;
column INSDC:coord:one CLIP_QUALITY_RIGHT = out_clip_qual_right;
// casts are required to allow multple storage formats
INSDC:coord:one out_clip_qual_left
= cast ( .CLIP_QUALITY_LEFT )
| < INSDC:coord:one > echo < 1 > ();
INSDC:coord:one out_clip_qual_right
= cast ( .CLIP_QUALITY_RIGHT )
| cast ( spot_len );
// support for reading 16-bit clips, as in v1 schema
readonly column U16 CLIP_ADAPTER_LEFT
= .CLIP_ADAPTER_LEFT
| cast ( out_clip_adapt_left );
readonly column U16 CLIP_ADAPTER_RIGHT
= .CLIP_ADAPTER_RIGHT
| cast ( out_clip_adapt_right );
readonly column U16 CLIP_QUALITY_LEFT = cast ( out_clip_qual_left );
readonly column U16 CLIP_QUALITY_RIGHT = cast ( out_clip_qual_right );
/* CLIP-MANIA
*/
// 1-based fully-closed right edge is row-length
INSDC:coord:one spot_right = ( INSDC:coord:one ) spot_len;
// processed 1-based coordinates >= 1
INSDC:coord:one lim_clip_adapt_left
= < INSDC:coord:one > clip < 1, 0x7FFFFFFF > ( out_clip_adapt_left );
INSDC:coord:one max_clip_adapt_right
= < INSDC:coord:one, INSDC:coord:one > map < 0, 0x7FFFFFFF > ( out_clip_adapt_right );
INSDC:coord:one lim_clip_adapt_right
= < INSDC:coord:one > min ( spot_right, max_clip_adapt_right );
INSDC:coord:one lim_clip_qual_left
= < INSDC:coord:one > clip < 1, 0x7FFFFFFF > ( out_clip_qual_left );
INSDC:coord:one max_clip_qual_right
= < INSDC:coord:one, INSDC:coord:one > map < 0, 0x7FFFFFFF > ( out_clip_qual_right );
INSDC:coord:one lim_clip_qual_right
= < INSDC:coord:one > min ( spot_right, max_clip_qual_right );
// read-only columns with 0-based coordinates
readonly column INSDC:coord:zero CLIP_ADAPTER_LEFT
= ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_adapt_left );
readonly column INSDC:coord:zero CLIP_ADAPTER_RIGHT
= ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_adapt_right );
readonly column INSDC:coord:zero CLIP_QUALITY_LEFT
= ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_qual_left );
readonly column INSDC:coord:zero CLIP_QUALITY_RIGHT
= ( INSDC:coord:zero ) < I32 > diff < 1 > ( lim_clip_qual_right );
// combined clips
INSDC:coord:one max_clip_left
= < INSDC:coord:one > max ( lim_clip_adapt_left, lim_clip_qual_left )
| lim_clip_adapt_left
| lim_clip_qual_left;
INSDC:coord:zero max_zclip_left
= ( INSDC:coord:zero ) < I32 > diff < 1 > ( max_clip_left );
INSDC:coord:one min_clip_right
= < INSDC:coord:one > min ( lim_clip_adapt_right, lim_clip_qual_right )
| lim_clip_adapt_right
| lim_clip_qual_right;
/* TRIMMED SEQUENCE
* need to find the 0-based trim_start and trim_len
*/
INSDC:coord:zero bio_start
= NCBI:SRA:bio_start ( out_read_start, out_read_type );
INSDC:coord:zero trim_start
= < INSDC:coord:zero > max ( bio_start, max_zclip_left )
| bio_start;
INSDC:coord:zero bio_end
= NCBI:SRA:bio_end < false > ( out_read_start, out_read_type, out_read_len );
I32 trim_stop
= < I32 > max ( min_clip_right, trim_start )
| spot_right;
INSDC:coord:len trim_len
= ( INSDC:coord:len ) < I32 > diff ( trim_stop, trim_start );
};
|