Author: bugman Date: Wed Oct 14 14:52:55 2009 New Revision: 9766 URL: http://svn.gna.org/viewcvs/relax?rev=9766&view=rev Log: Citation ID strings are now handled by the bmrb.citation() user function. Modified: branches/bmrb/data/exp_info.py branches/bmrb/generic_fns/exp_info.py branches/bmrb/prompt/bmrb.py Modified: branches/bmrb/data/exp_info.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/data/exp_info.py?rev=9766&r1=9765&r2=9766&view=diff ============================================================================== --- branches/bmrb/data/exp_info.py (original) +++ branches/bmrb/data/exp_info.py Wed Oct 14 14:52:55 2009 @@ -43,9 +43,11 @@ self.blacklist = ["citations", "software"] - def add_citation(self, authors=None, doi=None, pubmed_id=None, full_citation=None, title=None, status=None, type=None, journal_abbrev=None, journal_full=None, volume=None, issue=None, page_first=None, page_last=None, year=None): + def add_citation(self, cite_id=None, authors=None, doi=None, pubmed_id=None, full_citation=None, title=None, status=None, type=None, journal_abbrev=None, journal_full=None, volume=None, issue=None, page_first=None, page_last=None, year=None): """Store a citation. + @keyword cite_id: The citation ID string. + @type cite_id: str @keyword authors: The list of authors. Each author element is a list of four elements: the first name, last name, first initial, and middle initials. @type authors: list of lists of str @keyword doi: The DOI number, e.g. "10.1000/182". @@ -99,6 +101,7 @@ cite.element_desc = "Literature citation" # Set the attributes. + cite.cite_id = cite_id cite.authors = authors cite.doi = doi cite.pubmed_id = pubmed_id Modified: branches/bmrb/generic_fns/exp_info.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/exp_info.py?rev=9766&r1=9765&r2=9766&view=diff ============================================================================== --- branches/bmrb/generic_fns/exp_info.py (original) +++ branches/bmrb/generic_fns/exp_info.py Wed Oct 14 14:52:55 2009 @@ -129,9 +129,11 @@ raise RelaxError("relax cannot be the only program used in the analysis - spectral analysis programs, etc. must also have been used. Please use the relevant BMRB user functions to specify these.") -def citation(authors=None, doi=None, pubmed_id=None, full_citation=None, title=None, status=None, type=None, journal_abbrev=None, journal_full=None, volume=None, issue=None, page_first=None, page_last=None, year=None): +def citation(cite_id=None, authors=None, doi=None, pubmed_id=None, full_citation=None, title=None, status=None, type=None, journal_abbrev=None, journal_full=None, volume=None, issue=None, page_first=None, page_last=None, year=None): """Store a citation. + @keyword cite_id: The citation ID string. + @type cite_id: str @keyword authors: The list of authors. Each author element is a list of four elements: the first name, last name, first initial, and middle initials. @type authors: list of lists of str @keyword doi: The DOI number, e.g. "10.1000/182". @@ -167,7 +169,7 @@ cdp.exp_info = ExpInfo() # Place the data in the container. - return cdp.exp_info.add_citation(authors=authors, doi=doi, pubmed_id=pubmed_id, full_citation=full_citation, title=title, status=status, type=type, journal_abbrev=journal_abbrev, journal_full=journal_full, volume=volume, issue=issue, page_first=page_first, page_last=page_last, year=year) + cdp.exp_info.add_citation(cite_id=cite_id, authors=authors, doi=doi, pubmed_id=pubmed_id, full_citation=full_citation, title=title, status=status, type=type, journal_abbrev=journal_abbrev, journal_full=journal_full, volume=volume, issue=issue, page_first=page_first, page_last=page_last, year=year) def software(name=None, version=None, url=None, vendor_name=None, cite_ids=None, tasks=None): Modified: branches/bmrb/prompt/bmrb.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/prompt/bmrb.py?rev=9766&r1=9765&r2=9766&view=diff ============================================================================== --- branches/bmrb/prompt/bmrb.py (original) +++ branches/bmrb/prompt/bmrb.py Wed Oct 14 14:52:55 2009 @@ -37,11 +37,13 @@ class BMRB(User_fn_class): """Class for interfacing with the BMRB (http://www.bmrb.wisc.edu/).""" - def citation(self, authors=None, doi=None, pubmed_id=None, full_citation=None, title=None, status='published', type='journal', journal_abbrev=None, journal_full=None, volume=None, issue=None, page_first=None, page_last=None, year=None): + def citation(self, cite_id=None, authors=None, doi=None, pubmed_id=None, full_citation=None, title=None, status='published', type='journal', journal_abbrev=None, journal_full=None, volume=None, issue=None, page_first=None, page_last=None, year=None): """Specify a citation to be added the BMRB data file. Keyword Arguments ~~~~~~~~~~~~~~~~~ + + cite_id: The citation ID string. authors: The list of authors. Each author element is a list of four elements: the first name, last name, first initial, and middle initials. @@ -125,7 +127,8 @@ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "bmrb.citation(" - text = text + "authors=" + repr(authors) + text = text + "cite_id=" + repr(cite_id) + text = text + ", authors=" + repr(authors) text = text + ", doi=" + repr(doi) text = text + ", pubmed_id=" + repr(pubmed_id) text = text + ", full_citation=" + repr(full_citation) @@ -142,6 +145,7 @@ print(text) # The argument checks. + check.is_str(cite_id, 'citation ID string') check.is_str_list(authors, 'authors', list_of_lists=True) check.is_str(doi, 'DOI number', can_be_none=True) check.is_str(pubmed_id, 'Pubmed ID number', can_be_none=True) @@ -158,7 +162,7 @@ check.is_int(year, 'publication year') # Execute the functional code. - return exp_info.citation(authors=authors, doi=doi, pubmed_id=pubmed_id, full_citation=full_citation, title=title, status=status, type=type, journal_abbrev=journal_abbrev, journal_full=journal_full, volume=volume, issue=issue, page_first=page_first, page_last=page_last, year=year) + exp_info.citation(cite_id=cite_id, authors=authors, doi=doi, pubmed_id=pubmed_id, full_citation=full_citation, title=title, status=status, type=type, journal_abbrev=journal_abbrev, journal_full=journal_full, volume=volume, issue=issue, page_first=page_first, page_last=page_last, year=year) def display(self, version='3.1'):