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