Skip to content

module

info

info(module_name, local=False, outer=None, **kwargs)

info.

PARAMETER DESCRIPTION
module_name

Module name

TYPE: str

local

True will search the module in local installation. False will fetch the module's information from the OakVar store.

TYPE: bool DEFAULT: False

outer

If set, tabulated output will be sent to it. For example, sys.stdout.

DEFAULT: None

kwargs

DEFAULT: {}

RETURNS DESCRIPTION
Optional[Dict[str, Any]]

None if the module is not found. The module's information as a dict if found.

Examples:

Print clinvar module's information to the terminal and get the same information as a dict.

>>> clinvar_info = oakvar.api.module.info("clinvar", outer=sys.stdout)

install

install(module_names=[], urls=None, modules_dir=None, overwrite=False, clean=False, force_data=False, yes=False, skip_dependencies=False, skip_data=False, no_fetch=False, file=None, outer=None, stage_handler=None, system_worker_state=None)

Install modules.

PARAMETER DESCRIPTION
module_names

Module names

TYPE: List[str] DEFAULT: []

urls

URLs of module zip files. If given, module_names also should be given to specify the module name of each URL.

TYPE: Optional[str] DEFAULT: None

yes

True will skip a confirmation prompt.

TYPE: bool DEFAULT: False

no_fetch

True will skip fetching the latest the OakVar store cache.

TYPE: bool DEFAULT: False

overwrite

True will overwrite the module even if the same version.

TYPE: bool DEFAULT: False

force_data

True will re-install module data.

TYPE: bool DEFAULT: False

skip_data

True will skip installing module data.

TYPE: bool DEFAULT: False

modules_dir

custom OakVar modules directory

TYPE: Optional[Path] DEFAULT: None

skip_dependencies

True will bypass installing dependencies.

TYPE: bool DEFAULT: False

clean

clean

TYPE: bool DEFAULT: False

stage_handler

DEFAULT: None

system_worker_state

DEFAULT: None

outer

DEFAULT: None

RETURNS DESCRIPTION
Optional[bool]

None if no problem. False if there was a problem.

installbase

installbase(no_fetch=False, conf=None, overwrite=False, modules_dir=None, system_worker_state=None, outer=None)

Installs OakVar system/default modules.

PARAMETER DESCRIPTION
no_fetch

True will skip fetching the latest the OakVar store cache.

TYPE: bool DEFAULT: False

overwrite

True will overwrite the module even if the same version.

TYPE: bool DEFAULT: False

modules_dir

custom OakVar modules directory

TYPE: Optional[Path] DEFAULT: None

conf

Custom system configuration as a dict

TYPE: Optional[dict] DEFAULT: None

outer

DEFAULT: None

system_worker_state

DEFAULT: None

RETURNS DESCRIPTION
Optional[bool]

None if successful. False if not.

ls

ls(module_names=['.*'], module_types=[], search_store=False, tags=[], nameonly=False, humanized_size=False, outer=None, **kwargs)

List installed and available OakVar modules.

PARAMETER DESCRIPTION
module_names

Module names

TYPE: List[str] DEFAULT: ['.*']

module_types

Module types

TYPE: List[str] DEFAULT: []

search_store

True will search not yet installed modules on the OakVar store. False for only locally installed modules.

TYPE: bool DEFAULT: False

humanized_size

True will show humanized module size.

TYPE: bool DEFAULT: False

tags

Module tags to search. Regular expression can be used.

TYPE: List[str] DEFAULT: []

nameonly

True will return module names only.

TYPE: bool DEFAULT: False

outer

DEFAULT: None

RETURNS DESCRIPTION
List[Dict[str, Any]]

List of Dict, each element of which has an installed module's information.

Examples:

Get the information on the installed ClinVar module.

>>> oakvar.api.module.ls(module_names=["clinvar"])

Search for all reporter modules in the OakVar store.

>>> oakvar.api.module.ls(module_types=["reporter"], search_store=True)

Search the OakVar store for modules with "allele" in their tags.

>>> oakvar.api.module.ls(tags=[".*allele.*"], search_store=True)

pack

pack(module_name, outdir=None, code_only=False, split=False, outer=None)

Packs a module's code and optionally data to register it with OakVar store. This will produce zip files. They are supposed to be uploaded to somewhere on the web, and oakvar.api.store.register is used to register the module in the OakVar store. After this, the module will be available to all OakVar users worldwide.

PARAMETER DESCRIPTION
module_name

Module name

TYPE: str

outdir

Directory to store the module pack zip files. Default is the current working directory.

TYPE: Optional[Path] DEFAULT: None

code_only

True will pack only the code. Useful if only updated code will be registered.

TYPE: bool DEFAULT: False

split

True will split the code and data zip files by 100MB.

TYPE: bool DEFAULT: False

outer

DEFAULT: None

RETURNS DESCRIPTION
Optional[Dict[str, Optional[Path]]]

None if the module does not exist. A dict of { "code": [Path], "data": [Path] } if successful.}

uninstall

uninstall(module_names=None, yes=False, outer=None)

Uninstall modules.

PARAMETER DESCRIPTION
module_names

Modules names

TYPE: Optional[List[str]] DEFAULT: None

yes

True to skip a confirmation prompt.

TYPE: bool DEFAULT: False

outer

DEFAULT: None

RETURNS DESCRIPTION
bool

True if successful. False if not.

update

update(module_name_patterns=[], yes=False, no_fetch=False, force_data=False, modules_dir=None, outer=None, system_worker_state=None)

Update installed modules.

PARAMETER DESCRIPTION
module_name_patterns

Module name patterns. For example, ["clin.*"] will check clinvar, clingen, etc.

TYPE: List[str] DEFAULT: []

yes

True to skip a confirmation prompt.

TYPE: bool DEFAULT: False

no_fetch

True will skip fetching the latest the OakVar store cache.

TYPE: bool DEFAULT: False

force_data

True will re-install module data.

TYPE: bool DEFAULT: False

modules_dir

custom OakVar modules directory

TYPE: Optional[Path] DEFAULT: None

system_worker_state

DEFAULT: None

outer

DEFAULT: None

RETURNS DESCRIPTION
bool

True if update was successful. False if not.