1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """The bmrb user function definitions."""
24
25
26 import dep_check
27 if dep_check.wx_module:
28 from wx import FD_OPEN, FD_SAVE
29 else:
30 FD_OPEN = -1
31 FD_SAVE = -1
32
33
34 from graphics import WIZARD_IMAGE_PATH
35 from pipe_control import bmrb, exp_info, pipes
36 from user_functions.data import Uf_info; uf_info = Uf_info()
37 from user_functions.objects import Desc_container
38
39
40
41 uf_class = uf_info.add_class('bmrb')
42 uf_class.title = "Class for interfacing with the BMRB (http://www.bmrb.wisc.edu/)."
43 uf_class.menu_text = "&bmrb"
44 uf_class.gui_icon = "relax.bmrb"
45
46
47 uf = uf_info.add_uf('bmrb.citation')
48 uf.title = "Specify a citation to be added the BMRB data file."
49 uf.title_short = "Add a citation."
50 uf.add_keyarg(
51 name = "cite_id",
52 py_type = "str",
53 desc_short = "citation ID",
54 desc = "The citation ID string."
55 )
56 uf.add_keyarg(
57 name = "authors",
58 py_type = "str_list_of_lists",
59 desc_short = "author list",
60 desc = "The list of authors. Each author element is a list of four elements (the first name, last name, first initial, and middle initials).",
61 list_titles = ["First name", "Last name", "First initial", "Middle initials"]
62 )
63 uf.add_keyarg(
64 name = "doi",
65 py_type = "str",
66 desc_short = "DOI number",
67 desc = "The DOI number, e.g. '10.1000/182'.",
68 can_be_none = True
69 )
70 uf.add_keyarg(
71 name = "pubmed_id",
72 py_type = "str",
73 desc_short = "Pubmed ID number",
74 desc = "The identification code assigned to the publication by PubMed.",
75 can_be_none = True
76 )
77 uf.add_keyarg(
78 name = "full_citation",
79 py_type = "str",
80 desc_short = "full citation",
81 desc = "The full citation as given in a reference list."
82 )
83 uf.add_keyarg(
84 name = "title",
85 py_type = "str",
86 desc_short = "publication title",
87 desc = "The title of the publication."
88 )
89 uf.add_keyarg(
90 name = "status",
91 default = "published",
92 py_type = "str",
93 desc_short = "publication status",
94 desc = "The status of the publication. This can be a value such as 'published', 'submitted', etc."
95 )
96 uf.add_keyarg(
97 name = "type",
98 default = "journal",
99 py_type = "str",
100 desc_short = "publication type",
101 desc = "The type of publication, for example 'journal'."
102 )
103 uf.add_keyarg(
104 name = "journal_abbrev",
105 py_type = "str",
106 desc_short = "journal abbreviation",
107 desc = "The standard journal abbreviation.",
108 can_be_none = True
109 )
110 uf.add_keyarg(
111 name = "journal_full",
112 py_type = "str",
113 desc_short = "full journal name",
114 desc = "The full journal name.",
115 can_be_none = True
116 )
117 uf.add_keyarg(
118 name = "volume",
119 py_type = "int",
120 desc_short = "volume",
121 desc = "The volume number.",
122 can_be_none = True
123 )
124 uf.add_keyarg(
125 name = "issue",
126 py_type = "int",
127 desc_short = "issue",
128 desc = "The issue number.",
129 can_be_none = True
130 )
131 uf.add_keyarg(
132 name = "page_first",
133 py_type = "int",
134 desc_short = "first page number",
135 desc = "The first page number.",
136 can_be_none = True
137 )
138 uf.add_keyarg(
139 name = "page_last",
140 py_type = "int",
141 desc_short = "last page number",
142 desc = "The last page number.",
143 can_be_none = True
144 )
145 uf.add_keyarg(
146 name = "year",
147 py_type = "int",
148 max = 3000,
149 desc_short = "publication year",
150 desc = "The publication year."
151 )
152
153 uf.desc.append(Desc_container())
154 uf.desc[-1].add_paragraph("The full_citation should be in a format similar to that used in a journal article by either cutting and pasting from another document or by typing. Please include author names, title, journal, page numbers, and year or equivalent information for the type of publication given.")
155 uf.desc[-1].add_paragraph("The journal status can only be one of:")
156 uf.desc[-1].add_list_element("'preparation',")
157 uf.desc[-1].add_list_element("'in press',")
158 uf.desc[-1].add_list_element("'published',")
159 uf.desc[-1].add_list_element("'retracted',")
160 uf.desc[-1].add_list_element("'submitted'.")
161 uf.desc[-1].add_paragraph("The citation type can only be one of:")
162 uf.desc[-1].add_list_element("'abstract',")
163 uf.desc[-1].add_list_element("'BMRB only',")
164 uf.desc[-1].add_list_element("'book',")
165 uf.desc[-1].add_list_element("'book chapter',")
166 uf.desc[-1].add_list_element("'internet',")
167 uf.desc[-1].add_list_element("'journal',")
168 uf.desc[-1].add_list_element("'personal communication',")
169 uf.desc[-1].add_list_element("'thesis'.")
170 uf.desc[-1].add_paragraph("The standard journal abbreviation is that defined by the Chemical Abstract Services for the journal where the data are or will be published. If the data in the deposition are related to a J. Biomol. NMR paper, the value must be 'J. Biomol. NMR' to alert the BMRB annotators so that the deposition is properly processed. If the depositor truly does not know the journal, a value of 'not known' or 'na' is acceptable.")
171
172 uf.desc.append(Desc_container("Prompt examples"))
173 uf.desc[-1].add_paragraph("To add the citation \"d'Auvergne E. J., Gooley P. R. (2007). Set theory formulation of the model-free problem and the diffusion seeded model-free paradigm. Mol. Biosyst., 3(7), 483-494.\", type:")
174 uf.desc[-1].add_prompt("relax> bmrb.citation(authors=[[\"Edward\", \"d'Auvergne\", \"E.\", \"J.\"], [\"Paul\", \"Gooley\", \"P.\", \"R.\"]], doi=\"10.1039/b702202f\", pubmed_id=\"17579774\", full_citation=\"d'Auvergne E. J., Gooley P. R. (2007). Set theory formulation of the model-free problem and the diffusion seeded model-free paradigm. Mol. Biosyst., 3(7), 483-494.\", title=\"Set theory formulation of the model-free problem and the diffusion seeded model-free paradigm.\", status=\"published\", type=\"journal\", journal_abbrev=\"Mol. Biosyst.\", journal_full=\"Molecular Biosystems\", volume=3, issue=7, page_first=483, page_last=498, year=2007)")
175 uf.backend = exp_info.citation
176 uf.menu_text = "&citation"
177 uf.gui_icon = "oxygen.actions.documentation"
178 uf.wizard_height_desc = 180
179 uf.wizard_size = (1000, 750)
180 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
181
182
183
184 uf = uf_info.add_uf('bmrb.display')
185 uf.title = "Display the BMRB data in NMR-STAR format."
186 uf.title_short = "Display the BMRB data."
187 uf.display = True
188 uf.add_keyarg(
189 name = "version",
190 default = "3.1",
191 py_type = "str",
192 desc_short = "NMR-STAR dictionary version",
193 desc = "The version of the BMRB NMR-STAR format to display.",
194 wiz_element_type = "combo",
195 wiz_combo_choices = [
196 "2.1",
197 "3.0",
198 "3.1"
199 ],
200 wiz_read_only = True
201 )
202
203 uf.desc.append(Desc_container())
204 uf.desc[-1].add_paragraph("This will print the BMRB NMR-STAR formatted data to STDOUT.")
205 uf.backend = bmrb.display
206 uf.menu_text = "&display"
207 uf.gui_icon = "oxygen.actions.document-preview"
208 uf.wizard_size = (700, 500)
209 uf.wizard_apply_button = False
210 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
211
212
213
214 uf = uf_info.add_uf('bmrb.read')
215 uf.title = "Read BMRB files in the NMR-STAR format."
216 uf.title_short = "Reading of BMRB files."
217 uf.add_keyarg(
218 name = "file",
219 py_type = "str",
220 arg_type = "file sel",
221 desc_short = "file name",
222 desc = "The name of the BMRB NMR-STAR formatted file to read.",
223 wiz_filesel_style = FD_OPEN
224 )
225 uf.add_keyarg(
226 name = "dir",
227 py_type = "str",
228 arg_type = "dir",
229 desc_short = "directory name",
230 desc = "The directory where the file is located.",
231 can_be_none = True
232 )
233 uf.add_keyarg(
234 name = "version",
235 py_type = "str",
236 desc_short = "NMR-STAR dictionary version",
237 desc = "The version of the BMRB NMR-STAR format to read. This is not necessary as the version is normally auto-detected.",
238 can_be_none = True
239 )
240 uf.add_keyarg(
241 name = "sample_conditions",
242 py_type = "str",
243 desc_short = "sample conditions label",
244 desc = "The sample conditions label in the NMR-STAR file to restrict loading to.",
245 can_be_none = True
246 )
247
248 uf.desc.append(Desc_container())
249 uf.desc[-1].add_paragraph("This will allow most of the data from a BMRB NMR-STAR formatted file to be loaded into the relax data store. Note that an empty data pipe should be created for storing the data, and that currently only model-free data pipes can be used. Also, only one sample condition can be read per relax data pipe. Therefore if one of the sample conditions is not specified and multiple conditions exist in the NMR-STAR file, an error will be raised.")
250 uf.backend = bmrb.read
251 uf.menu_text = "&read"
252 uf.gui_icon = "oxygen.actions.document-open"
253 uf.wizard_height_desc = 300
254 uf.wizard_size = (800, 600)
255 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
256
257
258
259 uf = uf_info.add_uf('bmrb.script')
260 uf.title = "Specify the scripts used in the analysis."
261 uf.title_short = "Analysis scripts."
262 uf.add_keyarg(
263 name = "file",
264 py_type = "str",
265 arg_type = "file sel",
266 desc_short = "script file",
267 desc = "The name of the script file.",
268 wiz_filesel_style = FD_OPEN
269 )
270 uf.add_keyarg(
271 name = "dir",
272 py_type = "str",
273 arg_type = "dir",
274 desc_short = "directory name",
275 desc = "The directory where the file is located.",
276 can_be_none = True
277 )
278 uf.add_keyarg(
279 name = "analysis_type",
280 py_type = "str",
281 desc_short = "analysis type",
282 desc = "The type of analysis performed.",
283 wiz_element_type = "combo",
284 wiz_combo_choices = pipes.PIPE_DESC_LIST,
285 wiz_combo_data = pipes.VALID_TYPES
286 )
287 uf.add_keyarg(
288 name = "model_selection",
289 py_type = "str",
290 desc_short = "model selection",
291 desc = "The model selection technique used, if relevant. For example 'AIC' model selection.",
292 wiz_element_type = "combo",
293 wiz_combo_choices = [
294 "AIC - Akaike's Information Criteria.",
295 "AICc - Small sample size corrected AIC.",
296 "BIC - Bayesian or Schwarz Information Criteria.",
297 "Bootstrap - Bootstrap model selection.",
298 "CV - Single-item-out cross-validation.",
299 "Expect - The expected overall discrepancy (the true values of the parameters are required).",
300 "Farrow - Old model-free method by Farrow et al., 1994.",
301 "Palmer - Old model-free method by Mandel et al., 1995.",
302 "Overall - The realised overall discrepancy (the true values of the parameters are required)."
303 ],
304 wiz_combo_data = ["AIC", "AICc", "BIC", "BIC", "Bootstrap", "CV", "Expect", "Farrow", "Palmer", "Overall"],
305 wiz_read_only = False,
306 can_be_none = True
307 )
308 uf.add_keyarg(
309 name = "engine",
310 default = "relax",
311 py_type = "str",
312 desc_short = "software engine",
313 desc = "The software engine used in the analysis.",
314 wiz_element_type = "combo",
315 wiz_combo_choices = ["relax", "modelfree4", "dasha", "curvefit"],
316 wiz_read_only = False
317 )
318 uf.add_keyarg(
319 name = "model_elim",
320 default = False,
321 py_type = "bool",
322 desc_short = "model elimination flag",
323 desc = "A model-free specific flag specifying if model elimination was performed."
324 )
325 uf.add_keyarg(
326 name = "universal_solution",
327 default = False,
328 py_type = "bool",
329 desc_short = "universal solution flag",
330 desc = "A model-free specific flag specifying if the universal solution was sought after."
331 )
332
333 uf.desc.append(Desc_container())
334 uf.desc[-1].add_paragraph("This user function allows scripts used in the analysis to be included in the BMRB deposition. The following addition information may need to be specified with the script.")
335 uf.desc[-1].add_paragraph("The analysis type must be set. Allowable values include all the data pipe types used in relax, ie:")
336 uf.desc[-1].add_item_list_element("'frame order'", "The Frame Order theories,")
337 uf.desc[-1].add_item_list_element("'jw'", "Reduced spectral density mapping,")
338 uf.desc[-1].add_item_list_element("'mf'", "Model-free analysis,")
339 uf.desc[-1].add_item_list_element("'N-state'", "N-state model of domain motions,")
340 uf.desc[-1].add_item_list_element("'noe'", "Steady state NOE calculation,")
341 uf.desc[-1].add_item_list_element("'relax_fit'", "Relaxation curve fitting,")
342 uf.desc[-1].add_paragraph("The model selection technique only needs to be set if the script selects between different mathematical models. This can be anything, but the following are recommended:")
343 uf.desc[-1].add_item_list_element("'AIC'", "Akaike's Information Criteria.")
344 uf.desc[-1].add_item_list_element("'AICc'", "Small sample size corrected AIC.")
345 uf.desc[-1].add_item_list_element("'BIC'", "Bayesian or Schwarz Information Criteria.")
346 uf.desc[-1].add_item_list_element("'Bootstrap'", "Bootstrap model selection.")
347 uf.desc[-1].add_item_list_element("'CV'", "Single-item-out cross-validation.")
348 uf.desc[-1].add_item_list_element("'Expect'", "The expected overall discrepancy (the true values of the parameters are required).")
349 uf.desc[-1].add_item_list_element("'Farrow'", "Old model-free method by Farrow et al., 1994.")
350 uf.desc[-1].add_item_list_element("'Palmer'", "Old model-free method by Mandel et al., 1995.")
351 uf.desc[-1].add_item_list_element("'Overall'", "The realised overall discrepancy (the true values of the parameters are required).")
352 uf.desc[-1].add_paragraph("The engine is the software used in the calculation, optimisation, etc. This can be anything, but those recognised by relax (automatic program info, citations, etc. added) include:")
353 uf.desc[-1].add_item_list_element("'relax'", "hence relax was used for the full analysis.")
354 uf.desc[-1].add_item_list_element("'modelfree4'", "Art Palmer's Modelfree4 program was used for optimising the model-free parameter values.")
355 uf.desc[-1].add_item_list_element("'dasha'", "The Dasha program was used for optimising the model-free parameter values.")
356 uf.desc[-1].add_item_list_element("'curvefit'", "Art Palmer's curvefit program was used to determine the R1 or R2 values.")
357 uf.desc[-1].add_paragraph("The model_elim flag is model-free specific and should be set if the methods from \"d'Auvergne, E. J. and Gooley, P. R. (2006). Model-free model elimination: A new step in the model-free dynamic analysis of NMR relaxation data. J. Biomol. NMR, 35(2), 117-135.\" were used. This should be set to True for the full_analysis.py script.")
358 uf.desc[-1].add_paragraph("The universal_solution flag is model-free specific and should be set if the methods from \"d'Auvergne E. J., Gooley P. R. (2007). Set theory formulation of the model-free problem and the diffusion seeded model-free paradigm. Mol. Biosyst., 3(7), 483-494.\" were used. This should be set to True for the full_analysis.py script.")
359
360 uf.desc.append(Desc_container("Prompt examples"))
361 uf.desc[-1].add_paragraph("For BMRB deposition, to specify that the full_analysis.py script was used, type one of:")
362 uf.desc[-1].add_prompt("relax> bmrb.script('full_analysis.py', 'model-free', 'AIC', 'relax', True, True)")
363 uf.desc[-1].add_prompt("relax> bmrb.script(file='full_analysis.py', dir=None, analysis_type='model-free', model_selection='AIC', engine='relax', model_elim=True, universal_solution=True)")
364 uf.backend = exp_info.script
365 uf.menu_text = "&script"
366 uf.gui_icon = "oxygen.mimetypes.application-x-desktop"
367 uf.wizard_height_desc = 400
368 uf.wizard_size = (1000, 750)
369 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
370
371
372
373 uf = uf_info.add_uf('bmrb.software')
374 uf.title = "Specify the software used in the analysis."
375 uf.title_short = "Analysis software."
376 uf.add_keyarg(
377 name = "name",
378 py_type = "str",
379 desc_short = "program name",
380 desc = "The name of the software program utilised."
381 )
382 uf.add_keyarg(
383 name = "version",
384 py_type = "str",
385 desc_short = "version",
386 desc = "The version of the software, if applicable.",
387 can_be_none = True
388 )
389 uf.add_keyarg(
390 name = "url",
391 py_type = "str",
392 desc_short = "URL",
393 desc = "The web address of the software.",
394 can_be_none = True
395 )
396 uf.add_keyarg(
397 name = "vendor_name",
398 py_type = "str",
399 desc_short = "vendor name",
400 desc = "The name of the company or person behind the program.",
401 can_be_none = True
402 )
403 uf.add_keyarg(
404 name = "cite_ids",
405 py_type = "str_list",
406 desc_short = "citation ID numbers",
407 desc = "A list of the BMRB citation ID numbers.",
408 can_be_none = True
409 )
410 uf.add_keyarg(
411 name = "tasks",
412 py_type = "str_list",
413 desc_short = "tasks",
414 desc = "A list of all the tasks performed by the software.",
415 wiz_element_type = "combo_list",
416 wiz_combo_choices = [
417 'chemical shift assignment',
418 'chemical shift calculation',
419 'collection',
420 'data analysis',
421 'geometry optimization',
422 'peak picking',
423 'processing',
424 'refinement',
425 'structure solution'
426 ],
427 wiz_read_only = False,
428 can_be_none = True
429 )
430
431 uf.desc.append(Desc_container())
432 uf.desc[-1].add_paragraph("This user function allows the software used in the analysis to be specified in full detail.")
433 uf.desc[-1].add_paragraph("For the tasks list, this should be a python list of strings (e.g. ['spectral processing']). Although not restricted to these, the values suggested by the BMRB are:")
434 uf.desc[-1].add_list_element("'chemical shift assignment',")
435 uf.desc[-1].add_list_element("'chemical shift calculation',")
436 uf.desc[-1].add_list_element("'collection',")
437 uf.desc[-1].add_list_element("'data analysis',")
438 uf.desc[-1].add_list_element("'geometry optimization',")
439 uf.desc[-1].add_list_element("'peak picking',")
440 uf.desc[-1].add_list_element("'processing',")
441 uf.desc[-1].add_list_element("'refinement',")
442 uf.desc[-1].add_list_element("'structure solution'")
443
444 uf.desc.append(Desc_container("Prompt examples"))
445 uf.desc[-1].add_paragraph("For BMRB deposition, to say that Sparky was used in the analysis, type:")
446 uf.desc[-1].add_prompt("relax> cite_id = bmrb.citation(authors=[[\"Tom\", \"Goddard\", \"T.\", \"D.\"], [\"D\", \"Kneller\", \"D.\", \"G.\"]], title=\"Goddard, T. D. and Kneller, D. G., SPARKY 3, University of California, San Francisco.\"")
447 uf.desc[-1].add_prompt("relax> bmrb.software(\"Sparky\", version=\"3.110\", url=\"http://www.cgl.ucsf.edu/home/sparky/\", vendor_name=\"Goddard, T. D.\", cite_ids=[cite_id], tasks=[\"spectral analysis\"])")
448 uf.backend = exp_info.software
449 uf.menu_text = "soft&ware"
450 uf.gui_icon = "oxygen.apps.utilities-terminal"
451 uf.wizard_height_desc = 450
452 uf.wizard_size = (900, 750)
453 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
454
455
456
457 uf = uf_info.add_uf('bmrb.software_select')
458 uf.title = "Select the software used in the analysis."
459 uf.title_short = "Utilised software selection."
460 uf.add_keyarg(
461 name = "name",
462 py_type = "str",
463 desc_short = "program name",
464 desc = "The name of the software program utilised.",
465 wiz_element_type = "combo",
466 wiz_combo_choices = ['NMRPipe', 'Sparky'],
467 wiz_read_only = True
468 )
469 uf.add_keyarg(
470 name = "version",
471 py_type = "str",
472 desc_short = "version",
473 desc = "The version of the software, if applicable.",
474 can_be_none = True
475 )
476
477 uf.desc.append(Desc_container())
478 uf.desc[-1].add_paragraph("Rather than specifying all the information directly, this user function allows the software packaged used in the analysis to be selected by name. The programs currently supported are:")
479 uf.desc[-1].add_item_list_element("'NMRPipe'", "http://spin.niddk.nih.gov/NMRPipe/")
480 uf.desc[-1].add_item_list_element("'Sparky'", "http://www.cgl.ucsf.edu/home/sparky/")
481 uf.desc[-1].add_paragraph("More can be added if all relevant information (program name, description, website, original citation, purpose, etc.) is emailed to relax-users@gna.org.")
482 uf.desc[-1].add_paragraph("Note that relax is automatically added to the BMRB file.")
483
484 uf.desc.append(Desc_container("Prompt examples"))
485 uf.desc[-1].add_paragraph("For BMRB deposition, to say that both NMRPipe and Sparky were used prior to relax, type:")
486 uf.desc[-1].add_prompt("relax> bmrb.software_select('NMRPipe')")
487 uf.desc[-1].add_prompt("relax> bmrb.software_select('Sparky', version='3.113')")
488 uf.backend = exp_info.software_select
489 uf.menu_text = "software_se&lect"
490 uf.gui_icon = "oxygen.apps.utilities-terminal"
491 uf.wizard_height_desc = 550
492 uf.wizard_size = (800, 700)
493 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
494
495
496
497 uf = uf_info.add_uf('bmrb.thiol_state')
498 uf.title = "Select the thiol state of the system."
499 uf.title_short = "Thiol state selection."
500 uf.add_keyarg(
501 name = "state",
502 py_type = "str",
503 desc_short = "thiol state",
504 desc = "The thiol state.",
505 wiz_element_type = "combo",
506 wiz_combo_choices = [
507 'all disulfide bound',
508 'all free',
509 'all other bound',
510 'disulfide and other bound',
511 'free and disulfide bound',
512 'free and other bound',
513 'free disulfide and other bound',
514 'not available',
515 'not present',
516 'not reported',
517 'unknown'
518 ],
519 wiz_read_only = False
520 )
521
522 uf.desc.append(Desc_container())
523 uf.desc[-1].add_paragraph("The thiol state can be any text, thought the BMRB suggests the following:")
524 uf.desc[-1].add_list_element("'all disulfide bound',")
525 uf.desc[-1].add_list_element("'all free',")
526 uf.desc[-1].add_list_element("'all other bound',")
527 uf.desc[-1].add_list_element("'disulfide and other bound',")
528 uf.desc[-1].add_list_element("'free and disulfide bound',")
529 uf.desc[-1].add_list_element("'free and other bound',")
530 uf.desc[-1].add_list_element("'free disulfide and other bound',")
531 uf.desc[-1].add_list_element("'not available',")
532 uf.desc[-1].add_list_element("'not present',")
533 uf.desc[-1].add_list_element("'not reported',")
534 uf.desc[-1].add_list_element("'unknown'.")
535 uf.desc[-1].add_paragraph("Alternatively the pure states 'reduced' or 'oxidised' could be specified.")
536
537 uf.desc.append(Desc_container("Prompt examples"))
538 uf.desc[-1].add_paragraph("For BMRB deposition, to say that the protein studied is in the oxidised state, tyype one of:")
539 uf.desc[-1].add_prompt("relax> bmrb.thiol_state('oxidised')")
540 uf.desc[-1].add_prompt("relax> bmrb.thiol_state(state='oxidised')")
541 uf.backend = exp_info.thiol_state
542 uf.menu_text = "&thiol_state"
543 uf.wizard_height_desc = 400
544 uf.wizard_size = (900, 600)
545 uf.wizard_apply_button = False
546 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
547
548
549
550 uf = uf_info.add_uf('bmrb.write')
551 uf.title = "Write the results to a BMRB NMR-STAR formatted file."
552 uf.title_short = "BMRB file writing."
553 uf.add_keyarg(
554 name = "file",
555 py_type = "str",
556 arg_type = "file sel",
557 desc_short = "file name",
558 desc = "The name of the BMRB file to output results to. Optionally this can be a file object, or any object with a write() method.",
559 wiz_filesel_style = FD_SAVE
560 )
561 uf.add_keyarg(
562 name = "dir",
563 default = "pipe_name",
564 py_type = "str",
565 arg_type = "dir",
566 desc_short = "directory name",
567 desc = "The directory name.",
568 can_be_none = True
569 )
570 uf.add_keyarg(
571 name = "version",
572 default = "3.1",
573 py_type = "str",
574 desc_short = "NMR-STAR dictionary version",
575 desc = "The NMR-STAR dictionary format version to create.",
576 wiz_element_type = "combo",
577 wiz_combo_choices = [
578 "2.1",
579 "3.0",
580 "3.1"
581 ],
582 wiz_read_only = True
583 )
584 uf.add_keyarg(
585 name = "force",
586 default = False,
587 py_type = "bool",
588 arg_type = "force flag",
589 desc_short = "force flag",
590 desc = "A flag which if True will cause the any pre-existing file to be overwritten."
591 )
592
593 uf.desc.append(Desc_container())
594 uf.desc[-1].add_paragraph("This will create a NMR-STAR formatted file of the data in the current data pipe for BMRB deposition.")
595 uf.desc[-1].add_paragraph("In the prompt/script UI modes, to place the BMRB file in the current working directory, set dir to None. If dir is set to the special name 'pipe_name', then the results file will be placed into a directory with the same name as the current data pipe.")
596 uf.backend = bmrb.write
597 uf.menu_text = "&write"
598 uf.gui_icon = "oxygen.actions.document-save"
599 uf.wizard_height_desc = 300
600 uf.wizard_size = (800, 600)
601 uf.wizard_apply_button = False
602 uf.wizard_image = WIZARD_IMAGE_PATH + 'bmrb.png'
603