openvariant.plugins package#

Subpackages#

Submodules#

openvariant.plugins.context module#

class openvariant.plugins.context.Context(row: dict, field_name: str, file_path: str)[source]

Bases: object

Base class that each context must inherit from

openvariant.plugins.plugin module#

class openvariant.plugins.plugin.Plugin[source]

Bases: object

Base class that each plugin must inherit from

run(argument)[source]

This is a main function (required) which OpenVariant will call every time that this plugin is described in an annotation file.

Module contents#

class openvariant.plugins.Alteration_typeContext(row: dict, field_name: str, file_path: str)[source]

Bases: openvariant.plugins.context.Context

The context of this plugin will be the simplest one, without any added property or methods.

row

The row that data transformation will be applied.

Type

dict

field_name

Name of the corresponding column that was described on the annotation schema.

Type

str

file_path

Path of the Input file that is being parsed.

Type

str

class openvariant.plugins.Alteration_typePlugin[source]

Bases: openvariant.plugins.plugin.Plugin

This plugin identifies the alteration type. Classifies the alteration type: checking POSITION, REF and ALT fields.

run(context: openvariant.plugins.alteration_type.alteration_type.Alteration_typeContext) str[source]

Extract alteration type from the input row.

Parameters

context (Alteration_typeContext) – Representation of the row to be parsed.

Returns

The value of ALT_TYPE field.

Return type

str

class openvariant.plugins.Context(row: dict, field_name: str, file_path: str)[source]

Bases: object

Base class that each context must inherit from

class openvariant.plugins.Get_afContext(row: dict, field_name: str, file_path: str)[source]

Bases: openvariant.plugins.context.Context

Get_afContext class generated by OpenVariant

row

Main method to execute data transformation in each row.

Type

dict

field_name

Name of the corresponding column that was described on the annotation schema.

Type

str

file_path

Path of the Input file that is being parsed.

Type

str

class openvariant.plugins.Get_afPlugin[source]

Bases: openvariant.plugins.plugin.Plugin

This plugin get alternate allele frequency of a sample in a .vcf. It will be in located in ‘subAF’ field and will get the float number with regexp.

run(context: Get_afContext)[source]

Main method to execute data transformation in each row.

run(context: openvariant.plugins.get_AF.get_AF.Get_afContext) str[source]

Extract allele frequency from the input row.

Parameters

context (Get_afContext) – Representation of the row to be parsed.

Returns

The value of the field transformed.

Return type

float or int or str

class openvariant.plugins.LiftoverContext(row: dict, field_name: str, file_path: str)[source]

Bases: openvariant.plugins.context.Context

LiftoverContext class generated by OpenVariant

row

Main method to execute data transformation in each row.

Type

dict

field_name

Name of the corresponding column that was described on the annotation schema.

Type

str

file_path

Path of the Input file that is being parsed.

Type

str

class openvariant.plugins.LiftoverPlugin[source]

Bases: openvariant.plugins.plugin.Plugin

LiftoverPlugin class generated by OpenVariant

run(context: LiftoverContext)[source]

Main method to execute data transformation in each row.

run(context: openvariant.plugins.liftover.liftover.LiftoverContext) dict[source]

Data transformation of a single row

Parameters

context (LiftoverContext) – Representation of the row to be parsed.

Returns

The value of the field transformed.

Return type

float or int or str

class openvariant.plugins.Plugin[source]

Bases: object

Base class that each plugin must inherit from

run(argument)[source]

This is a main function (required) which OpenVariant will call every time that this plugin is described in an annotation file.