home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / blast2 / client / blast18.asn next >
Encoding:
Text File  |  1996-07-05  |  14.8 KB  |  381 lines  |  [TEXT/R*ch]

  1. --$Revision: 4.0 $
  2. --DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT
  3. --********************************************************************
  4. --
  5. --  BLAST Interface, 1.8
  6. --  revised April 1995 by Tom Madden and Jim Ostell
  7. --
  8. --  original author:
  9. --  Warren Gish
  10. --  September 1993
  11. --  For a good look, set tabstops every 4 columns
  12. --
  13. --  
  14. --
  15. --********************************************************************
  16. --DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT-DRAFT
  17.  
  18. NCBI-BLAST-1 DEFINITIONS ::=
  19. BEGIN
  20.  
  21. EXPORTS
  22.                 BLAST0-Preface,
  23.                 BLAST0-Job-desc,
  24.                 BLAST0-Job-progress,
  25.                 BLAST0-Sequence,
  26.                 BLAST0-KA-Blk,
  27.                 BLAST0-Db-Desc,
  28.                 BLAST0-Result,
  29.                 BLAST0-Matrix,
  30.                 BLAST0-Warning,
  31.                 BLAST0-Status,
  32.         BLAST0-Outblk;
  33.  
  34. IMPORTS
  35.     Seq-align-set, Score-set FROM NCBI-Seqalign;
  36.  
  37. BLAST0-Request ::= CHOICE { -- list of possible client messages to the server
  38.     hello    VisibleString, -- a client-selectable session name for themselves
  39.     motd    NULL, -- request messages-of-the-day
  40.     prog-info    NULL, -- request a list of programs available on this server
  41.     usage-info    VisibleString, -- gets a BLAST0-Preface that includes
  42.             -- the valid options (prog-usage) for this program.
  43.     db-info        NULL, -- request a list of databases
  44.     matrix-info    NULL,    -- request a sequence of BLAST0-Matrix, without
  45.                 -- the actual scores.
  46.     matrix-get VisibleString,  -- get one BLAST0-Matrix, with scores.
  47.     search    BLAST0-Search,
  48.     goodbye        NULL    -- hang-up
  49.     }
  50.  
  51. BLAST0-Search ::= SEQUENCE {
  52.     program        VisibleString,
  53.     database    VisibleString,
  54.     query        BLAST0-Sequence,
  55.     options        SEQUENCE OF VisibleString OPTIONAL, 
  56.     -- BLAST command line options, see the BLAST manunal pages 
  57.     -- for a list of these.
  58.     --
  59.     -- listed below are BOOLEANS that determine the number and type of 
  60.     -- elements returned in the BLAST0-Response. 
  61.     --
  62.     return-matrix    BOOLEAN DEFAULT TRUE,
  63.     -- should the matrix used be sent?  Only needed if an alignment
  64.     -- showing positive/negative interactions between aligned residues
  65.     -- will be presented.
  66.     return-query    BOOLEAN DEFAULT TRUE,
  67.     -- if TRUE, the original query is returned in BLAST0-Response.query  .
  68.     return-BLAST0result    BOOLEAN DEFAULT TRUE,
  69.     -- if TRUE, a BLAST0-Result is sent back in BLAST0-Response.result; 
  70.     -- if not true, a Seq-align-set is returned in BLAST0-Response.seqalign
  71.     -- (see comment in the BLAST0-Response definition concerning the 
  72.     -- type of Seq-align returned).
  73.     return-query-seq-in-seg    BOOLEAN DEFAULT TRUE,
  74.     -- if TRUE, part of the query sequence, useful for an alignment,
  75.     -- is returned in the BLAST0-Sequence that is referenced by 
  76.     -- BLAST0-HSP.segs.
  77.     return-db-seq-in-seg    BOOLEAN DEFAULT TRUE
  78.     -- if TRUE, part of the database sequence, useful for an alignment,
  79.     -- is returned in the BLAST0-Sequence that is referenced by 
  80.     -- BLAST0-HSP.segs.
  81.     }
  82.  
  83. BLAST0-Response ::= CHOICE { -- list of possible server messages to client
  84.     hello    VisibleString, -- server version and session identification data
  85.     motd    VisibleString,     -- the message of the day, new lines are
  86.                 -- indicated by tildes ("~")
  87.     prog-info    SEQUENCE OF BLAST0-Preface, -- list of programs
  88.     usage-info    BLAST0-Preface, -- includes valid options for program
  89.     db-info    SEQUENCE OF BLAST0-Db-Desc, -- response to BLAST0-Request.db-info
  90.     matrix-info SEQUENCE OF BLAST0-Matrix, -- does not include scores
  91.     ack        BLAST0-Ack, -- final response to search
  92.     goodbye    BLAST0-Ack, -- server-initiated close of connection
  93.  
  94.     -- For the blast service, the application programs that perform the search
  95.     -- are independent entities from the server daemon itself that may
  96.     -- abort/crash for any one of a variety of reasons.
  97.     -- Response to a Search request thus consists of a procession of choices
  98.     -- of the following discrete messages, from "queued" through "status",
  99.     -- with each one (except "queued") generated by the application program;
  100.     -- the complete response to a Search request is finally indicated
  101.     -- when the client receives an "ack" generated by the blast network
  102.     -- service daemon.  If the "ack" is received without a previous "status",
  103.     -- the client should assume that a severe problem occurred
  104.     -- in the application program and any output that was received
  105.     -- should be considered dubious in quality.
  106.     -- See BLAST0-Outblk for a description of how these discrete messages
  107.     -- can be bundled together for archival purposes.
  108.     queued    BLAST0-Queued, -- series of these when a search has been queued
  109.     preface    BLAST0-Preface, -- description of program used for search,
  110.     query    BLAST0-Sequence, -- the original query sequence 
  111.     dbdesc    BLAST0-Db-Desc, -- description of database used for search,
  112.     matrix    SEQUENCE OF BLAST0-Matrix, -- the scoring scheme(s) used
  113.     kablk    SEQUENCE OF BLAST0-KA-Blk, -- Karlin-Altschul statistics data block
  114.     job-start        BLAST0-Job-desc,
  115.     job-progress    BLAST0-Job-progress,
  116.     job-done        BLAST0-Job-progress,
  117.     score-defs    SEQUENCE OF BLAST0-Score-Info,
  118.     -- The score-defs assign integer numbers to each of the different
  119.     -- score definitions that are used as part of the BLAST0-Result 
  120.     -- or the Seq-align.  
  121.     result    BLAST0-Result,
  122.     seqalign Seq-align-set,
  123.     -- Either a BLAST0-Result (result) or a Seq-align-set (seqalign) 
  124.     -- is returned.  The behavior is determined by the BOOLEAN 
  125.     -- BLAST0-search.return-BLAST0result.  If a seqalign is 
  126.     -- returned, then the Seq-align is of type dense-diag if the 
  127.     -- query and subject sequence have the same length (i.e., if 
  128.     -- both are nucleotide or protein as in blastn, blastp, and blastx); 
  129.     -- a set of Seq-align of type Std-seg is returned if the query and
  130.     -- subject have different lengths, as in blastx or tblastn.
  131.     parms    SEQUENCE OF VisibleString, -- BLAST parameters of search
  132.     stats    SEQUENCE OF VisibleString, -- accumulated search statistics
  133.     warning    BLAST0-Warning, -- see enum in .h files of blast function lib
  134.     status    BLAST0-Status -- see enum in .h files of blast function lib
  135.     }
  136.  
  137. BLAST0-Job-desc ::= SEQUENCE {
  138.     jid    ENUMERATED { -- job identifier
  139.         not-set    (0),
  140.         neighborhood (1), -- generating blast neighborhood
  141.         search (2), -- database search
  142.         threecomps (3) -- blast3 comparisons to find three-way alignments
  143.         },
  144.     desc    VisibleString, -- short description of job
  145.     size    INTEGER -- no. of units of work in job (0 if unknown)
  146.     }
  147.  
  148. BLAST0-Job-progress ::= SEQUENCE { -- doubles as an "I'm alive" message
  149.     done    INTEGER, -- no. of units of work completed thusfar
  150.     positives    INTEGER -- no. of successful jobs (e.g., no. of seqs matched)
  151.     }
  152.  
  153. BLAST0-Preface ::= SEQUENCE {
  154.     program    VisibleString, -- name of server program
  155.     desc    VisibleString, -- concise description of program
  156.     version    VisibleString OPTIONAL, -- version number of server program
  157.     dev-date    VisibleString OPTIONAL, -- development date of server program
  158.     bld-date    VisibleString OPTIONAL, -- build date of server program
  159.     cit        SEQUENCE OF VisibleString OPTIONAL, -- journal or other citations
  160.     notice    SEQUENCE OF VisibleString OPTIONAL, -- cautionaries about program
  161.     prog-usage    SEQUENCE OF VisibleString OPTIONAL, -- information
  162.             -- about valid options for this program 
  163.     susage    BLAST0-Seq-usage, -- how subject database sequences are used
  164.     qusage    BLAST0-Seq-usage  -- how query sequences are used
  165.     }
  166.  
  167. BLAST0-KA-Blk ::= SEQUENCE { -- Karlin-Altschul statistics parameter block
  168.     matid    INTEGER, -- Matrix identifier (0, 1, 2, 3,...)
  169.  
  170. -- "frames" is the reading frame in each sequence {-3, -2, -1, 0, +1, +2, +3}.
  171. -- There are as many frames listed as the value of n-way above.
  172. -- For the typical BLAST search, there will be just two; for BLAST3 there
  173. -- will be three.
  174. -- A reading frame of 0 might be specified in a variety of cases:
  175. --  if the original sequence is protein (e.g., the query with BLASTP);
  176. --  if the original sequence is nucleic acid and this KA-Blk is to be
  177. --    applied uniformly to all reading frames (as in the database with TBLASTN).
  178. -- Untranslated nucleotide sequences may have frames of +1 or -1.
  179.     frames    SEQUENCE OF INTEGER, -- query 1st, subject 2nd (see n-way, though)
  180.  
  181.     -- Lambda, K, and H are computed under a variety of assumptions
  182.     -- (residue composition, scoring system).  Values < 0 are reported
  183.     -- when the computation failed or when the user did not provide a value.
  184.     -- (for a description of lambda, k and h see Karlin and Altschul,
  185.     -- Proc. Natl. Acad. Sci. USA, 87:2264-68 (1990)).
  186.     lambda    REAL, 
  187.     k        REAL, 
  188.     h        REAL 
  189.     }
  190.  
  191.  
  192. BLAST0-Db-Desc ::= SEQUENCE {
  193.     name    VisibleString,
  194.     type    BLAST0-Alphatype,
  195.     def        VisibleString OPTIONAL, -- full definition
  196.     rel-date    VisibleString OPTIONAL, -- date of release from the curator
  197.     bld-date    VisibleString OPTIONAL, -- date of build (brought on-line)
  198.     count    INTEGER OPTIONAL, -- no. of sequences in database
  199.     totlen    INTEGER  OPTIONAL, -- total no. of letters or residues in database
  200.     maxlen    INTEGER OPTIONAL -- max. no. of letters or residues in any one seq
  201.     }
  202.  
  203. BLAST0-Result ::= SEQUENCE {
  204.     hist    BLAST0-Histogram OPTIONAL,
  205.         count   INTEGER, 
  206.         -- no. of hitlists (e.g., the no. of db sequences matched)
  207.     hitlists    SEQUENCE OF BLAST0-HitList
  208.         -- each subject sequence has it's own BLAST0-HitList 
  209.     }
  210.  
  211. -- Used to produce Histogram in the traditional BLAST output (with H=1).
  212. BLAST0-Histogram ::= SEQUENCE {
  213.     expect    REAL,
  214.     observed    INTEGER,
  215.     base    INTEGER,
  216.     nbars    INTEGER,
  217.     bar    SEQUENCE OF BLAST0-Histogram-bar
  218.     }
  219.  
  220. BLAST0-Histogram-bar ::= SEQUENCE {
  221.     x    REAL,
  222.         -- theoret. E value, before the search, 1st column in Histogram
  223.     n    INTEGER
  224.         -- real. E value, after the search, 2nd column in Histogram
  225.         -- The 3rd histogram column is found by subtracting the value
  226.         -- in the 2nd column from the value in the 2nd column for the
  227.         -- next row.
  228.     }
  229.  
  230. -- BLAST0-HitList is a list of the HSPs involving a set of sequences.
  231. BLAST0-HitList ::= SEQUENCE {
  232.     count    INTEGER, -- no. of hsps contained in this BLAST0-HitList
  233.     -- also the number of hits on a single database sequence.
  234.     kablk    SEQUENCE OF BLAST0-KA-Blk OPTIONAL, 
  235.     -- one for each scoring system
  236.     hsps    SEQUENCE OF BLAST0-HSP,
  237.     seqs    SEQUENCE OF BLAST0-Sequence
  238.     }
  239.  
  240. -- BLAST0-HSP (High-scoring Segment Pair) is the fundamental unit of BLAST output
  241. BLAST0-HSP ::= SEQUENCE {
  242.     matid    INTEGER, -- scoring matrix identifier
  243.     -- the score reported below contain an Object-id that references
  244.     -- different types of scores (e.g., p-value, BLAST "score")
  245.     -- by an integer.  The structure BLAST0-Score-Info, returned as
  246.     -- part of the BLAST0-Response, provides the mapping between
  247.     -- this integer and the type of score.
  248.     scores    Score-set,   -- this is the equivalent of SEQUENCE OF Score
  249.     len        INTEGER, -- length of each segment (in the alignment alphabet)
  250.     segs    SEQUENCE OF BLAST0-Segment
  251.     }
  252.  
  253. BLAST0-Segment ::= SEQUENCE {
  254.     loc        BLAST0-Seq-interval,
  255.     str        BLAST0-Seq-data OPTIONAL,
  256.     str-raw    BLAST0-Seq-data OPTIONAL -- str prior to translation
  257.     }
  258.  
  259. BLAST0-Sequence ::= SEQUENCE {
  260.     desc    SEQUENCE OF BLAST0-Seq-desc,
  261.     length    INTEGER, -- length of complete sequence (untranslated)
  262.     gcode    INTEGER OPTIONAL, -- genetic code
  263.     seq        BLAST0-Seq-data OPTIONAL
  264.     }
  265.  
  266. BLAST0-Seq-desc ::= SEQUENCE {
  267.     id        BLAST0-Seq-id,
  268.     defline    VisibleString OPTIONAL
  269.     }
  270.  
  271. BLAST0-Seq-id ::= SET OF CHOICE {
  272.     giid    INTEGER, -- zero if no giid is available
  273.     textid    VisibleString -- other ids, in "long FASTA" syntax
  274.     }
  275.  
  276. BLAST0-Seq-data ::= CHOICE {
  277.     ncbistdaa    OCTET STRING, -- standard amino acid alphabet (NCBIstdaa)
  278.     ncbi2na        OCTET STRING, -- standard nucleic acid alphabet (NCBI2na)
  279.     ncbi4na        OCTET STRING -- alternate nucleic acid alphabet (NCBI4na)
  280.     }
  281.  
  282. BLAST0-Seq-interval ::= SEQUENCE {
  283.     strand    ENUMERATED {
  284.         plus (1), -- interval is on the plus strand
  285.         minus (2), -- interval is on the complementary, minus strand
  286.         both (3), -- "from" and "to" are specified relative to plus strand
  287.         plus-rf (5), -- restricted to reading frame implied by "from"
  288.         minus-rf (6) -- restricted to reading frame implied by "from"
  289.         } OPTIONAL, -- only specified when nt. or translated nt. is involved.
  290. -- Restricted means the interval applies only to the implied reading frame.
  291. -- When needed, the reading frame is found by computing "from" modulo 3 + 1.
  292.     from    INTEGER, -- zero-based offset
  293.     to    INTEGER  -- zero-based offset
  294.     }
  295.  
  296. -- A particular scoring scheme is referenced in the BLAST0-Result and 
  297. -- the Seq-align-set only by an integer.  BLAST0-Score-Info provides a 
  298. -- mapping between the integer ("sid") and the name and/or
  299. -- definition of a scoring scheme.
  300. BLAST0-Score-Info ::= SEQUENCE {
  301.     sid        INTEGER,
  302.     tag        VisibleString, -- short name
  303.     desc    VisibleString OPTIONAL    -- longer description
  304.     }
  305.  
  306. BLAST0-Alphatype ::= ENUMERATED {
  307.     not-set (0),
  308.     amino-acid (1),
  309.     nucleic-acid (2),
  310.     other (255)
  311.     }
  312.  
  313. BLAST0-Seq-usage ::= SEQUENCE {
  314.     raw        BLAST0-Alphatype, -- the input sequence type
  315.     cooked    BLAST0-Alphatype -- the sequence type actually searched
  316.     }
  317.  
  318. BLAST0-Alpha-ID ::= ENUMERATED {
  319.     ncbi4na        (4), -- 4 bit nucleotide code
  320.     ncbistdaa    (11) -- consecutive codes for standard amino acids, 0-25
  321.     }
  322.  
  323. BLAST0-Matrix ::= SEQUENCE { -- substitution scoring matrix
  324.     matid    INTEGER,
  325.     name    VisibleString, -- name for this scoring system
  326.     comments    SEQUENCE OF VisibleString OPTIONAL,
  327.     qalpha    BLAST0-Alpha-ID, -- query alphabet
  328.     salpha    BLAST0-Alpha-ID, -- subject/database alphabet
  329.     scores    CHOICE { -- length of sequence = sizeof(qalpha) X sizeof(salpha)
  330.         scaled-ints    SEQUENCE { -- scaled integer scores
  331.             scale    REAL, -- multiply ints by scale, 0 means unscaled
  332.             ints    SEQUENCE OF INTEGER -- presented in qalpha-major order
  333.             -- NOTE! undefined scores are indicated by the special
  334.             -- value -2147483648 (INT4_MIN) before scaling
  335.             },
  336.         reals    SEQUENCE OF REAL -- presented in qalpha-major order
  337.         -- NOTE! undefined scores are indicated by the special value -1.e32
  338.         } OPTIONAL -- omit scores when just associating matid with matrix name
  339.     }
  340.  
  341. -- BLAST0-Status is a general message for acknowledgments, warnings, and errors
  342. BLAST0-Status ::= SEQUENCE {
  343.     code    INTEGER, -- program exit status, warning message identifier, etc.
  344.     -- code 0 means no error
  345.     reason    VisibleString OPTIONAL -- description of non-zero code
  346.     }
  347.  
  348. BLAST0-Warning ::= BLAST0-Status
  349.  
  350. BLAST0-Queued ::= SEQUENCE { -- doubles as "I'm alive" message
  351.     name    VisibleString, -- name of this queue
  352.     length    INTEGER -- no. of requests ahead of this one in the queue
  353.     }
  354.  
  355. BLAST0-Ack ::= SEQUENCE { -- acknowledgment
  356.     code    INTEGER,
  357.     reason    VisibleString OPTIONAL
  358.     }
  359.  
  360. -- BLAST0-Outblk is a model of complete blast application program output
  361. -- as it might be archived for future reference; however during an actual search
  362. -- the choices are produced as separate, distinct BLAST0-Responses. 
  363. BLAST0-Outblk ::= SET OF CHOICE {
  364.     preface    BLAST0-Preface,
  365.     query    BLAST0-Sequence,
  366.     dbdesc    BLAST0-Db-Desc,
  367.     matrix    SEQUENCE OF BLAST0-Matrix, -- the scoring scheme(s) used (optional)
  368.     kablk    SEQUENCE OF BLAST0-KA-Blk, -- Karlin-Altschul data block
  369.     job-start        BLAST0-Job-desc,
  370.     job-progress    BLAST0-Job-progress,
  371.     job-done        BLAST0-Job-progress,
  372.     result    BLAST0-Result,
  373.     parms    SEQUENCE OF VisibleString, -- parameters of search
  374.     stats    SEQUENCE OF VisibleString, -- accumulated search statistics
  375.     warning    BLAST0-Warning,
  376.     status    BLAST0-Status
  377.     }
  378.  
  379.  
  380. END
  381.