Skip to content

oakvar.api

license

license(outer=None)

Shows the OakVar license information.

run

run(
    inputs,
    annotators=[],
    report_types=[],
    reports=[],
    annotators_replace=[],
    excludes=[],
    run_name=[],
    output_dir=[],
    startat=None,
    endat=None,
    skip=[],
    confpath=None,
    conf={},
    genome=None,
    cleandb=False,
    newlog=False,
    note="",
    mp=None,
    keep_temp=False,
    writeadmindb=False,
    job_name=None,
    separatesample=False,
    primary_transcript=["mane"],
    clean=False,
    module_options={},
    system_option={},
    package=None,
    filtersql=None,
    includesample=None,
    excludesample=None,
    filter=None,
    filterpath=None,
    modules_dir=None,
    preparers=[],
    mapper_name=[],
    postaggregators=[],
    vcf2vcf=False,
    logtofile=False,
    loglevel="INFO",
    combine_input=False,
    input_format=None,
    converter_module=None,
    input_encoding=None,
    ignore_sample=False,
    uid=None,
    skip_variant_deduplication=False,
    loop=None,
    outer=None,
)

Performs OakVar pipeline from conversion -> mapping -> annotation -> database generation -> post annotation -> report generation.

PARAMETER DESCRIPTION
inputs

Paths to input files. URLs can be used as well, in which the files will be downloaded.

TYPE: List[Union[Path, str]]

combine_input

If True, all input files will be combined as one input.

TYPE: bool DEFAULT: False

annotators

Annotator modules to run

TYPE: List[str] DEFAULT: []

report_types

Report types. If given, report files of given types will be generated. If vcfreporter is installed in your system, giving vcf will invoke the module.

TYPE: Union[str, List[str]] DEFAULT: []

clean

Cleans all output and intermediate files and then starts the pipeline.

TYPE: bool DEFAULT: False

vcf2vcf

If True, the pipeline will run in vcf2vcf mode, where input and output should be VCF format files and result database files will not be generated. This can increase the speed of the pipeline significantly.

TYPE: bool DEFAULT: False

logtofile

If True, .log and .err log files will be generated for normal and error logs.

TYPE: bool DEFAULT: False

input_format

Overrides automatic detection of input file format.

TYPE: Optional[str] DEFAULT: None

postaggregators

Postaggregator modules to run

TYPE: List[str] DEFAULT: []

preparers

Preparer modules to run

TYPE: List[str] DEFAULT: []

mapper_name

Mapper module to run

TYPE: List[str] DEFAULT: []

output_dir

Output directories. The order of inputs and output_dir elements should match.

TYPE: List[str] DEFAULT: []

startat

Start at the specified step. Options are converter, mapper, annotator, aggregator, postaggregator, and reporter.

TYPE: Optional[str] DEFAULT: None

endat

End at the specified step. Options are converter, mapper, annotator, aggregator, postaggregator, and reporter.

TYPE: Optional[str] DEFAULT: None

skip

Skip the specified steps. Options are converter, mapper, annotator, aggregator, postaggregator, and reporter.

TYPE: List[str] DEFAULT: []

genome

Genome assembly of all input files. If not given, genome assembly will be figured out or default to what is defined in lib/system/consts.py:default_assembly.

TYPE: Optional[str] DEFAULT: None

input_encoding

input_encoding

TYPE: Optional[str] DEFAULT: None

converter_module

converter module folder path

TYPE: Optional[str] DEFAULT: None

mp

Number of cores to use. Default value can be changed by ov config system max_num_concurrent_annotators_per_job <value>.

TYPE: Optional[int] DEFAULT: None

primary_transcript

primary_transcript

TYPE: List[str] DEFAULT: ['mane']

modules_dir

modules_dir

TYPE: Optional[str] DEFAULT: None

run_name

run_name

TYPE: List[str] DEFAULT: []

annotators_replace

annotators_replace

TYPE: List[str] DEFAULT: []

excludes

excludes

TYPE: List[str] DEFAULT: []

confpath

confpath

TYPE: Optional[str] DEFAULT: None

conf

conf

TYPE: dict DEFAULT: {}

cleandb

cleandb

TYPE: bool DEFAULT: False

newlog

newlog

TYPE: bool DEFAULT: False

note

note

TYPE: str DEFAULT: ''

keep_temp

keep_temp

TYPE: bool DEFAULT: False

writeadmindb

writeadmindb

TYPE: bool DEFAULT: False

job_name

job_name

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

separatesample

separatesample

TYPE: bool DEFAULT: False

module_options

module_options

TYPE: Dict DEFAULT: {}

system_option

system_option

TYPE: Dict DEFAULT: {}

package

package

TYPE: Optional[str] DEFAULT: None

filtersql

filtersql

TYPE: Optional[str] DEFAULT: None

includesample

includesample

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

excludesample

excludesample

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

filter

filter

TYPE: Optional[str] DEFAULT: None

filterpath

filterpath

TYPE: Optional[str] DEFAULT: None

loglevel

loglevel

TYPE: str DEFAULT: 'INFO'

uid

uid

TYPE: Optional[str] DEFAULT: None

skip_variant_deduplication

Skip de-duplication of variants.

TYPE: bool DEFAULT: False

loop

DEFAULT: None

outer

DEFAULT: None

RETURNS DESCRIPTION
Optional[Dict[str, Any]]

None or a dict of reporter names and their return values

report

report(
    dbpath,
    report_types=None,
    module_paths=None,
    filterpath=None,
    filter=None,
    filtersql=None,
    filtername=None,
    filterstring=None,
    savepath=None,
    confpath=None,
    conf={},
    nogenelevelonvariantlevel=False,
    inputfiles=None,
    separatesample=False,
    output_dir=None,
    run_name="",
    includesample=[],
    excludesample=None,
    package=None,
    cols=None,
    level=None,
    user=None,
    no_summary=False,
    serveradmindb=None,
    module_options={},
    head_n=None,
    logtofile=False,
    outer=None,
    loop=None,
)

Generates OakVar report files based on an OakVar result database file.

PARAMETER DESCRIPTION
dbpath

Path to an OakVar result database file

TYPE: str

report_types

Report types. For example, if vcfreporter module is installed, "vcf" will invoke the reporter.

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

module_paths

Paths to report modules can be directly given. This option will override report_types. For example, if customreporter module is installed at /home/user/ov_dev/customreporter, this value can be given.

TYPE: Union[str, List[Path]] DEFAULT: None

output_dir

Directory to store reports

TYPE: Optional[str] DEFAULT: None

module_options

Reporter module-specific options. For example, to tell vcfreporter to combine all OakVar result fields under one field, {"vcfreporter": {"type": "combined"}} can be used.

TYPE: Dict[str, Dict] DEFAULT: {}

cols

Result columns to include. By default, all result columns are included in reports. For example, ["base__uid", "base__chrom", "base__pos", "base__ref_base", "base__alt_base", "clinvar__sig"] will include only the variants and ClinVar significances.

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

includesample

Samples to include in filtered reports

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

excludesample

Samples to exclude from filtered reports

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

filterpath

filterpath

TYPE: Optional[str] DEFAULT: None

filter

filter as dict

TYPE: Optional[dict] DEFAULT: None

filtersql

filter sql

TYPE: Optional[str] DEFAULT: None

filtername

filter file

TYPE: Optional[str] DEFAULT: None

filterstring

filter dict as str

TYPE: Optional[str] DEFAULT: None

savepath

savepath

TYPE: Optional[Path] DEFAULT: None

confpath

confpath

TYPE: Optional[str] DEFAULT: None

nogenelevelonvariantlevel

nogenelevelonvariantlevel

TYPE: bool DEFAULT: False

inputfiles

inputfiles

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

separatesample

separatesample

TYPE: bool DEFAULT: False

package

package

TYPE: Optional[str] DEFAULT: None

modules_dir

modules_dir

TYPE: Optional[str]

level

level

TYPE: Optional[str] DEFAULT: None

user

user

TYPE: Optional[str] DEFAULT: None

no_summary

no_summary

TYPE: bool DEFAULT: False

head_n

Make a report with the first n number of variants.

TYPE: Optional[int] DEFAULT: None

serveradmindb

DEFAULT: None

outer

DEFAULT: None

loop

DEFAULT: None

RETURNS DESCRIPTION
Dict[str, Any]

None or a dict of reporter names and their return values

report_issue

report_issue()

Opens a webpage to report issues.

update

update(outer=None)

Updates OakVar to the latest version and sets up OakVar again.

PARAMETER DESCRIPTION
outer

DEFAULT: None

RETURNS DESCRIPTION
bool

True if successful, False if not.

version

version()

Gets OakVar version.