openvariant.plugins package#
Subpackages#
Submodules#
openvariant.plugins.context module#
- class openvariant.plugins.context.Context(row: dict, field_name: str, file_path: str)[source]
Bases:
objectBase class that each context must inherit from
openvariant.plugins.plugin module#
Module contents#
- class openvariant.plugins.Alteration_typeContext(row: dict, field_name: str, file_path: str)[source]
Bases:
openvariant.plugins.context.ContextThe 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.PluginThis 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:
objectBase 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.ContextGet_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.PluginThis 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.ContextLiftoverContext 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.PluginLiftoverPlugin 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