#!/usr/bin/env python# -*- coding: utf-8 -*-## This file is part of the `pypath` python module## Copyright 2014-2023# EMBL, EMBL-EBI, Uniklinik RWTH Aachen, Heidelberg University## Authors: see the file `README.rst`# Contact: Dénes Türei (turei.denes@gmail.com)## Distributed under the GPLv3 License.# See accompanying file LICENSE.txt or copy at# https://www.gnu.org/licenses/gpl-3.0.html## Website: https://pypath.omnipathdb.org/#importosimportcopyfrompypath.shareimportsessionas_session_modfrompypath.shareimportsettingsas_settings_modfrompypath.omnipathimportappas_app_mod_logger=_session_mod.Logger(name='omnipath.init')_log=_logger._log_log('Welcome to the OmniPath database manager app.')
[docs]definit(**kwargs):param=(copy.deepcopy(globals()['OP_DB_ARGS'])if'OP_DB_ARGS'inglobals()else{})_log('You can customize the database building process by ''setting parameters in the `OP_DB_ARGS` global variable ''or by calling `init` again with keyword arguments or after ''setting values in the `pypath.share.settings` module.''You can define your own databases following the examples in ''`pypath/omnipath/databases/builtins.json`. ''See more details in `pypath/omnipath/databases/db_template.json` ''and the code of method ''`pypath.omnipath.app.DatabaseManager.load_dataset`.')param.update(kwargs)globals()['db']=_app_mod.DatabaseManager(**param)