1NCBI-BlastOutput2 DEFINITIONS ::=
2BEGIN
3
4BlastOutput2 ::= SEQUENCE {
5	report Report OPTIONAL,
6	error  Err OPTIONAL
7}
8
9BlastXML2 ::= SET OF BlastOutput2
10
11Report ::= SEQUENCE {
12	program VisibleString ,		-- BLAST program: blastp, tblastx etc.
13	version VisibleString ,		-- Program version
14	reference VisibleString ,	-- Steven, David, Tom and others
15	search-target Target,
16	params Parameters,		-- search parameters
17	results Results
18}
19
20Err ::= SEQUENCE {
21	code                    INTEGER,
22	message                 VisibleString OPTIONAL
23}
24
25Target ::= CHOICE {
26	db VisibleString ,			-- BLAST Database name
27	subjects SEQUENCE OF VisibleString 	-- Subject IDs
28}
29
30Results ::=CHOICE {
31    iterations SEQUENCE OF Iteration ,
32                                --  iterative search (psi and delta blast)
33    search Search, 	        --  db search
34    bl2seq SEQUENCE OF Search   --  bl2seq
35}
36
37Iteration ::= SEQUENCE {
38	iter-num INTEGER,	 -- iteration number (use with psiblast)
39	search Search
40}
41
42Search ::= SEQUENCE {
43	query-id VisibleString OPTIONAL,           -- SeqId of query
44	query-title VisibleString OPTIONAL,        -- Definition line of query
45	query-len INTEGER OPTIONAL ,	           -- length of query sequence
46	query-masking SEQUENCE OF Range OPTIONAL,  -- Masked offsets.
47	hits SEQUENCE OF Hit OPTIONAL,	           -- Hits one for every db sequence
48	stat Statistics OPTIONAL,	           -- search statistics
49    	message VisibleString OPTIONAL             -- Some (error?) information
50}
51
52Parameters ::= SEQUENCE {
53	matrix VisibleString OPTIONAL ,	    -- Matrix used (-M)
54	expect REAL ,			    -- Expectation threshold (-e)
55	include REAL OPTIONAL ,		    -- Inclusion threshold (-h)
56	sc-match INTEGER OPTIONAL ,	    -- match score for NT (-r)
57	sc-mismatch INTEGER OPTIONAL ,	    -- mismatch score for NT (-q)
58	gap-open INTEGER OPTIONAL,          -- Gap opening cost (-G)
59	gap-extend INTEGER OPTIONAL,	    -- Gap extension cost (-E)
60	filter VisibleString OPTIONAL,      -- Filtering options (-F)
61	pattern VisibleString OPTIONAL,	    -- PHI-BLAST pattern
62    	entrez-query VisibleString OPTIONAL, -- Limit of request to Entrez query
63	cbs INTEGER OPTIONAL,	 	    -- composition-based stats (numbers correspond to
64					    -- numbering in stand-alone application parameter -comp_based_stats).
65	query-gencode INTEGER OPTIONAL,     -- genetic code for query (blastx or tblastx)
66	db-gencode INTEGER OPTIONAL,	    -- genetic code for db or subjects (tblastn or tblastx)
67	bl2seq-mode VisibleString OPTIONAL  -- bl2seq mode
68}
69
70-- Used to specify start/stop of masking on query.
71Range ::= SEQUENCE {
72	from INTEGER,			-- Beginning of masked range (one-offset)
73	to INTEGER			-- End of masked range (one-offset)
74}
75
76Statistics ::= SEQUENCE {
77	db-num BigInt OPTIONAL,	-- Number of sequences in BLAST db
78	db-len BigInt OPTIONAL, -- Length of BLAST db
79	hsp-len INTEGER ,	-- Effective HSP length
80	eff-space BigInt,	-- Effective search space
81    	kappa REAL,             -- Karlin-Altschul parameter K
82    	lambda REAL,            -- Karlin-Altschul parameter Lambda
83    	entropy REAL            -- Karlin-Altschul parameter H
84}
85
86-- Description of entries for this (possibly non-redundant) sequence.
87HitDescr ::= SEQUENCE {
88	id VisibleString ,	        -- SeqId of subject
89	accession VisibleString OPTIONAL,     -- accession
90	title VisibleString OPTIONAL,   -- title (definition line) of subject
91	taxid INTEGER OPTIONAL,		-- NCBI taxid (9606 for human)
92	sciname VisibleString OPTIONAL	-- binomial scientific name ("Homo sapiens" for human).
93}
94
95Hit ::= SEQUENCE {
96	num INTEGER , 			    -- hit number
97	description SEQUENCE OF HitDescr,   -- ID, title, and taxonomy for each entry in the PIG
98	len INTEGER ,			    -- length of subject
99	hsps SEQUENCE OF Hsp OPTIONAL	    -- all HSP regions for the given subject
100}
101
102Hsp ::= SEQUENCE {
103	num INTEGER  ,			-- HSP number
104	bit-score REAL ,		-- score (in bits) of HSP
105	score REAL ,			-- score of HSP
106	evalue REAL ,			-- e-value of HSP
107	identity INTEGER OPTIONAL ,	-- number of identities in HSP
108	positive INTEGER OPTIONAL ,	-- number of positives in HSP
109	density INTEGER OPTIONAL ,	-- score density
110	pattern-from INTEGER OPTIONAL ,	-- start of PHI-BLAST pattern
111	pattern-to INTEGER OPTIONAL ,	-- end of PHI-BLAST pattern
112	query-from INTEGER ,	        -- start of HSP in query
113	query-to INTEGER ,		-- end of HSP
114	query-strand VisibleString OPTIONAL, -- Strand of query (blastn)
115	query-frame INTEGER OPTIONAL ,	-- translation frame of query (blastx, tblastx)
116	hit-from INTEGER,		-- start of HSP in subject
117	hit-to INTEGER ,		-- end of HSP in subject
118	hit-strand VisibleString OPTIONAL, -- Strand of subject (blastn)
119	hit-frame INTEGER OPTIONAL ,	-- translation frame of subject (tblastn, tblastx)
120	align-len INTEGER OPTIONAL ,	-- length of the alignment used
121	gaps INTEGER OPTIONAL ,		-- number of gaps in HSP
122	qseq VisibleString ,		-- alignment string for the query (with gaps)
123	hseq VisibleString,		-- alignment string for subject (with gaps)
124	midline VisibleString OPTIONAL	-- formating middle line
125}
126
127END
128