Repository navigation
Expand file tree
/
Copy pathseqedit.asn
More file actions
261 lines (235 loc) · 9.76 KB
/
Copy pathseqedit.asn
File metadata and controls
261 lines (235 loc) · 9.76 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
--$Revision$
--********************************************************************
--
-- Sequence editing commands
-- Didenko 2005
--
--
--*********************************************************************
--
-- seqedit.asn
--
-- representation of Sequence editing commands
--
--*********************************************************************
NCBI-SeqEdit DEFINITIONS ::=
BEGIN
IMPORTS Date, Object-id, Dbtag, Int-fuzz FROM NCBI-General
Seq-id FROM NCBI-Seqloc
Seq-descr, Seqdesc, Seq-annot, Bioseq, Annotdesc,
Seq-ext, Seq-hist, Seq-data,
Seq-inst, Annot-descr FROM NCBI-Sequence
Seq-align FROM NCBI-Seqalign
Seq-feat FROM NCBI-Seqfeat
Seq-graph FROM NCBI-Seqres
Bioseq-set, Seq-entry FROM NCBI-Seqset;
SeqEdit-Id ::= CHOICE {
bioseq-id Seq-id,
bioseqset-id INTEGER,
unique-num INTEGER
}
-- Add a new seq-id to bioseq
SeqEdit-Cmd-AddId ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq id
add-id Seq-id -- Seq id to add
}
-- Remove a seq-id from bioseq
SeqEdit-Cmd-RemoveId ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq id
remove-id Seq-id -- Seq id to remove
}
-- Reset ids field of bioseq
SeqEdit-Cmd-ResetIds ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq id
remove-ids SET OF Seq-id -- List of Seq ids to remove
}
-- Change bioseq's attribure
SeqEdit-Cmd-ChangeSeqAttr ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq id
data CHOICE {
inst Seq-inst, -- whole seq-inst object
repr INTEGER, -- repr field of seq-inst object
mol INTEGER, -- mol field of seq-inst object
length INTEGER, -- length field of seq-inst object
fuzz Int-fuzz, -- fuzz field of seq-inst object
topology INTEGER, -- topology field of seq-inst object
strand INTEGER, -- strand field of seq-inst object
ext Seq-ext, -- extr field of seq-inst object
hist Seq-hist, -- hist field of seq-inst object
seq-data Seq-data -- seq-data field of seq-inst object
}
}
-- Reset bioseq's attribute
SeqEdit-Cmd-ResetSeqAttr ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq id
what ENUMERATED {
not-set (0),
inst (1), -- whole seq-inst object
repr (2), -- repr field of seq-inst object
mol (3), -- mol field of seq-inst object
length (4), -- length field of seq-inst object
fuzz (5), -- fuzz field of seq-inst object
topology (6), -- topology field of seq-inst object
strand (7), -- strand field of seq-inst object
ext (8), -- extr field of seq-inst object
hist (9), -- hist field of seq-inst object
seq-data (10) -- seq-data field of seq-inst object
}
}
-- Change bioseq-set's attribute
SeqEdit-Cmd-ChangeSetAttr ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq_set id
data CHOICE {
id Object-id, -- object id
coll Dbtag, -- db tag
level INTEGER, -- level
class INTEGER, -- class
release VisibleString, -- release
date Date -- date
}
}
-- Reset bioseq-set's attibute
SeqEdit-Cmd-ResetSetAttr ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq_set id
what ENUMERATED {
not-set (0),
id (1), -- object id
coll (2), -- db tag
level (3), -- level
class (4), -- class
release (5), -- release
date (6) -- date
}
}
--***************************************************************
-- Add descriptors to an object
SeqEdit-Cmd-AddDescr ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
add-descr Seq-descr -- Descriptors
}
-- Set an objects's descriptors
SeqEdit-Cmd-SetDescr ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
set-descr Seq-descr -- Descriptors
}
-- Reset an objects's descriptors
SeqEdit-Cmd-ResetDescr ::= SEQUENCE {
id SeqEdit-Id -- Bioseq or Bioseq_set id
}
-- Add a descriptor ot an object
SeqEdit-Cmd-AddDesc ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
add-desc Seqdesc -- descriptor
}
-- Remove a descripor from an object
SeqEdit-Cmd-RemoveDesc ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
remove-desc Seqdesc -- descriptor
}
-- Attach a bioseq to seq entry
SeqEdit-Cmd-AttachSeq ::= SEQUENCE {
id SeqEdit-Id, -- Seq entry id
seq Bioseq -- bioseq
}
-- Attach a bioseq-set to seq entry
SeqEdit-Cmd-AttachSet ::= SEQUENCE {
id SeqEdit-Id, -- Seq entry id
set Bioseq-set -- bioseq-set
}
-- Detach an object from seq entry
SeqEdit-Cmd-ResetSeqEntry ::= SEQUENCE {
id SeqEdit-Id -- Seq entry id
}
--***************************************************************
-- Attach a seq entry to bioseq-set
SeqEdit-Cmd-AttachSeqEntry ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq_set id
seq-entry Seq-entry OPTIONAL, -- set entry
index INTEGER -- index
}
-- Remove a seq entry from bioseq-set
SeqEdit-Cmd-RemoveSeqEntry ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq_set id
entry-id SeqEdit-Id -- Seq_entry for deletion
}
--***************************************************************
-- Add an annotation to a bioseq or a bioseq-set
SeqEdit-Cmd-AttachAnnot ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
annot Seq-annot -- complete annotation
}
-- Remove an annotation object from a bioseq or a bioseq-set
SeqEdit-Cmd-RemoveAnnot ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
name VisibleString OPTIONAL, -- Annotation's name
named BOOLEAN, -- TRUE if an annotation is named
data CHOICE { -- object for deletion
feat Seq-feat,
align Seq-align,
graph Seq-graph
}
}
-- Add an annotaion object to a bioseq or a bioseq-set
SeqEdit-Cmd-AddAnnot ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
name VisibleString OPTIONAL, -- Annotation's name
named BOOLEAN, -- TRUE if an annotation is named
search-param CHOICE { -- A search creteria
descr Annot-descr, -- If an annotation does not have any objects,
obj CHOICE { -- use an annotaion descriptor,
feat Seq-feat, -- otherwise use an annot object
align Seq-align,
graph Seq-graph
}
} OPTIONAL,
data CHOICE { -- an annotaion object to add
feat Seq-feat,
align Seq-align,
graph Seq-graph
}
}
-- Replace an annotation object of a bioseq or a bioseq-set
SeqEdit-Cmd-ReplaceAnnot ::= SEQUENCE {
id SeqEdit-Id, -- Bioseq or Bioseq_set id
name VisibleString OPTIONAL, -- Annotation's name
named BOOLEAN, -- TRUE if an annotation is named
data CHOICE {
feat SEQUENCE {
ovalue Seq-feat, -- old value
nvalue Seq-feat -- new value
},
align SEQUENCE {
ovalue Seq-align, -- old value
nvalue Seq-align -- new value
},
graph SEQUENCE {
ovalue Seq-graph, -- old value
nvalue Seq-graph -- new value
}
}
}
--***************************************************************
SeqEdit-Cmd ::= CHOICE {
add-id SeqEdit-Cmd-AddId, -- Add a new seq-id to bioseq
remove-id SeqEdit-Cmd-RemoveId, -- Remove a seq-id from bioseq
reset-ids SeqEdit-Cmd-ResetIds, -- Reset ids field of bioseq
change-seqattr SeqEdit-Cmd-ChangeSeqAttr, -- Change bioseq's attribure
reset-seqattr SeqEdit-Cmd-ResetSeqAttr, -- Reset bioseq's attribute
change-setattr SeqEdit-Cmd-ChangeSetAttr, -- Change bioseq-set's attribure
reset-setattr SeqEdit-Cmd-ResetSetAttr, -- Reset bioseq-set's attribute
add-descr SeqEdit-Cmd-AddDescr, -- Add descriptors to an object
set-descr SeqEdit-Cmd-SetDescr, -- Set an objects's descriptors
reset-descr SeqEdit-Cmd-ResetDescr, -- Reset an objects's descriptors
add-desc SeqEdit-Cmd-AddDesc, -- Add a descriptor ot an object
remove-desc SeqEdit-Cmd-RemoveDesc, -- Remove a descripor from an object
attach-seq SeqEdit-Cmd-AttachSeq, -- Attach a bioseq to seq entry
attach-set SeqEdit-Cmd-AttachSet, -- Attach a bioseq-set to seq entry
reset-seqentry SeqEdit-Cmd-ResetSeqEntry, -- Detach an object from seq entry
attach-seqentry SeqEdit-Cmd-AttachSeqEntry, -- Attach a seq entry to bioseq-set
remove-seqentry SeqEdit-Cmd-RemoveSeqEntry, -- Remove a seq entry from bioseq-set
attach-annot SeqEdit-Cmd-AttachAnnot, -- Add a compelte annotation
remove-annot SeqEdit-Cmd-RemoveAnnot, -- Remove an annotation object
add-annot SeqEdit-Cmd-AddAnnot, -- Add an annotaion object
replace-annot SeqEdit-Cmd-ReplaceAnnot -- Replace an annotation object
}
END