def setup_script(self, file=None, dir=None, cite_ids=None, text=None, analysis_type=None, model_selection=None, engine=None, model_elim=False, universal_solution=False): """Specify the scripts used in the analysis. @keyword file: The name of the script file. @type file: str @keyword dir: The directory containing the file (defaults to the current directory if None). @type dir: None or str @keyword cite_ids: The citation ID numbers. @type cite_ids: None or str @param text: The script text. @type text: str @keyword analysis_type: The type of analysis performed. @type analysis_type: str @keyword model_selection: The model selection technique used, if relevant. @type model_selection: None or str @keyword engine: The software engine used in the analysis. @type engine: str @keyword model_elim: A model-free specific flag specifying if model elimination was performed. @type model_elim: bool @keyword universal_solution: A model-free specific flag specifying if the universal solution was sought after. @type universal_solution: bool """ # Initialise the container if needed. if not hasattr(self, "scripts"): # The list. self.scripts = RelaxListType() # The name of the container. self.scripts.list_name = "script_list" # The description of the container. self.scripts.list_desc = "List of scripts used for the analysis" # Init the container. script = Element() # The name of the container. script.name = "script" # The description of the container. script.desc = "Script used for the analysis" # Set the attributes. script.file = file script.dir = dir script.cite_ids = cite_ids script.text = text script.analysis_type = analysis_type script.model_selection = model_selection script.engine = engine script.model_elim = model_elim script.universal_solution = universal_solution # Append the container. self.scripts.append(script)
def software_setup(self, name, version=None, url=None, vendor_name=None, cite_ids=None, tasks=None): """Set up the software information. @param name: The name of the software program. @type name: str @keyword version: The program version. @type version: None or str @keyword url: The program's URL. @type url: None or str @keyword vendor_name: The name of the company or person behind the program. @type vendor_name: str @keyword cite_ids: The citation ID numbers. @type cite_ids: None or str @keyword tasks: The tasks performed by the program. @type tasks: list of str """ # Initialise the container if needed. if not hasattr(self, "software"): # The list. self.software = RelaxListType() # The name of the container. self.software.list_name = "software_list" # The description of the container. self.software.list_desc = "List of software programs used in the analysis" # Init the container. software = Element() # The name of the container. software.name = "software" # The description of the container. software.desc = "Software program used in the analysis" # Set the attributes. software.software_name = name software.url = url software.version = version software.vendor_name = vendor_name software.cite_ids = cite_ids software.tasks = tasks # Append the container. self.software.append(software)
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". @type doi: None or str @keyword pubmed_id: The identification code assigned to the publication by PubMed. @type pubmed_id: None or int @keyword full_citation: A full citation 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. @type full_citation: str @keyword title: The title of the publication. @type title: str @keyword status: The publication status. Can be one of in "preparation", "in press", "published", "retracted", or "submitted". @type status: str @keyword type: The publication type. Can be one of "abstract", "BMRB only", "book", "book chapter", "internet", "journal", "personal communication", or "thesis". @type type: str @keyword journal_abbrev: A standard journal abbreviation as 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. @type journal_abbrev: str @keyword journal_full: The full journal name. @type journal_full: str @keyword volume: The volume number. @type volume: int @keyword issue: The issue number. @type issue: int @keyword page_first: The first page number. @type page_first: int @keyword page_last: The last page number. @type page_last: int @keyword year: The publication year. @type year: int """ # Initialise the list container if needed. if not hasattr(self, "citations"): # The list. self.citations = RelaxListType() # The name of the container. self.citations.list_name = "citation_list" # The description of the container. self.citations.list_desc = "List of citations" # Init the container. cite = Element() # The name of the container. cite.name = "citation" # The description of the container. cite.desc = "Literature citation" # Set the attributes. cite.cite_id = cite_id cite.authors = authors cite.doi = doi cite.pubmed_id = pubmed_id cite.full_citation = full_citation cite.title = title cite.status = status cite.type = type cite.journal_abbrev = journal_abbrev cite.journal_full = journal_full cite.volume = volume cite.issue = issue cite.page_first = page_first cite.page_last = page_last cite.year = year # Append the container. self.citations.append(cite)