mailr9848 - in /branches/bmrb: generic_fns/exp_info.py specific_fns/model_free/bmrb.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 29, 2009 - 14:53:
Author: bugman
Date: Thu Oct 29 14:53:47 2009
New Revision: 9848

URL: http://svn.gna.org/viewcvs/relax?rev=9848&view=rev
Log:
The scripts are now being placed by relax into the BMRB file.


Modified:
    branches/bmrb/generic_fns/exp_info.py
    branches/bmrb/specific_fns/model_free/bmrb.py

Modified: branches/bmrb/generic_fns/exp_info.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/exp_info.py?rev=9848&r1=9847&r2=9848&view=diff
==============================================================================
--- branches/bmrb/generic_fns/exp_info.py (original)
+++ branches/bmrb/generic_fns/exp_info.py Thu Oct 29 14:53:47 2009
@@ -113,6 +113,28 @@
             star.citations.add(citation_label=citations.cite_id, 
authors=citations.authors, doi=citations.doi, pubmed_id=citations.pubmed_id, 
full_citation=citations.full_citation, title=citations.title, 
status=citations.status, type=citations.type, 
journal_abbrev=citations.journal_abbrev, journal_full=citations.journal_full, 
volume=citations.volume, issue=citations.issue, 
page_first=citations.page_first, page_last=citations.page_last, 
year=citations.year)
 
 
+def bmrb_write_methods(star):
+    """Generate the Software saveframe records.
+
+    @param star:        The NMR-STAR dictionary object.
+    @type star:         NMR_STAR instance
+    @return:            A list BMRB software IDs and a list of software 
labels.
+    @rtype:             tuple of list of int and list of str
+    """
+
+    # The scripts.
+    if hasattr(cdp, 'exp_info') and hasattr(cdp.exp_info, 'scripts'):
+        for script in cdp.exp_info.scripts:
+            # Get the citation ID numbers.
+            cite_id_nums = []
+            if script.cite_ids:
+                for cite in script.cite_ids:
+                    cite_id_nums.append(cdp.exp_info.get_cite_id_num(cite))
+
+            # The method info.
+            star.method.add(name=script.file, details=None, 
cite_ids=cite_id_nums, file_name=script.file, file_text=script.text)
+
+
 def bmrb_write_software(star):
     """Generate the Software saveframe records.
 

Modified: branches/bmrb/specific_fns/model_free/bmrb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/bmrb/specific_fns/model_free/bmrb.py?rev=9848&r1=9847&r2=9848&view=diff
==============================================================================
--- branches/bmrb/specific_fns/model_free/bmrb.py (original)
+++ branches/bmrb/specific_fns/model_free/bmrb.py Thu Oct 29 14:53:47 2009
@@ -249,6 +249,9 @@
         # Create Supergroup 4:  The experimental descriptions saveframes.
         #################################################################
 
+        # Generate the method saveframes.
+        exp_info.bmrb_write_methods(star)
+
         # Generate the software saveframe.
         software_ids, software_labels = exp_info.bmrb_write_software(star)
 




Related Messages


Powered by MHonArc, Updated Thu Oct 29 15:00:02 2009