def main(): """Print Reactome version in downloaded DAG.""" fout_py = 'src/reactomepy/data/reactome_version.py' with open(fout_py, 'w') as prt: prt_docstr_module('Reactome version in DAG', prt) # CYPHER: MATCH (v:DBInfo) RETURN v version = get_version(get_gdbdr()) prt.write('VERSION = {V}\n'.format(V=version)) prt_copyright_comment(prt) print(' Version {V} WROTE: {PY}\n'.format(PY=fout_py, V=version))
def main(): """Does this repo have the current version of the Reactome Knowledgebase?""" # Reactome version from Content Service obj = ContentService() ver_curr = obj.get_version() print('\n Current Reactome Knowledgebase Version:') print(' {VER:3} <- Latest version from Content Service'.format( VER=ver_curr)) # Reactome version from locally loaded Reactome DAG ver_local = get_version(get_gdbdr()) print( ' {VER:3} <- version from locally loaded DAG'.format(VER=ver_local)) print( ' {VER:3} <- Version in this repo: src/reactomepy/data/reactome_version.py\n\n' .format(VER=VERSION)) assert ver_local == ver_curr, 'VERSION: LOCAL DAG({A}) != CONTENT SERVICE({E})'.format( E=ver_curr, A=ver_local) assert VERSION == ver_curr, 'PLEASE DOWNLOAD THE MOST RECENT REACTOME KNOWLEDGEBASE' assert obj.get_databasename() == 'reactome', 'UNEXPECTED DATABASE NAME' assert isinstance(ver_curr, int), 'BAD VERSION VALUE'
def prt_referencedatabase(): """Print all ReferenceDatabase in Reactome.""" fout_referencedatabase_py = 'src/reactomepy/data/referencedatabase2nt.py' obj = ReferenceDatabases(get_gdbdr()) obj.wrpy_referencedatabase_nts(fout_referencedatabase_py)
def prt_disease(): """Print all disease in Reactome.""" obj = Diseases(get_gdbdr()) fout_disease_py = 'src/reactomepy/data/disease_definitions.py' obj.wrpy_disease2fld(fout_disease_py, 'definition', 'DISEASE2DEFN')
def main(): """Save the participating molecules for each pathway into a Python module.""" fout_py = 'src/reactomepy/data/pwy/pwy2uniprot.py' obj = PathwayMolecules(get_gdbdr()) obj.wrpy_pw2molecules(fout_py, 'UniProt')