agglovar.merge.config.strategy ============================== .. py:module:: agglovar.merge.config.strategy .. autoapi-nested-parse:: Intersect strategy definitions. The intersect strategy contains a full intersect specification including the strategy type and list of stages. Classes ------- .. autoapisummary:: agglovar.merge.config.strategy.IntersectStrategy Module Contents --------------- .. py:class:: IntersectStrategy(intersect_strategy: Optional[str]) Bases: :py:obj:`object` A configured intersect strategy. Takes the AST output from the parser and generates a configuration object. :ivar strategy_type: Intersect strategy type. If None, then the configuration object is in an undefined or uninitialized state and must not be used until initialized. :ivar stage_list: List of intersect stages. :ivar default_match_stage: Default match stage object applied to all stages (if there are none). .. py:method:: __repr__() -> str Get a string representation. .. py:method:: __str__() -> str Get a string representation formatted for display. .. py:method:: clear() -> None Clear all merge stages and global options. .. py:method:: set_config_string(config_string: str, clear: bool = True) -> None Configure this intersect strategy using a configuration string. The string is parsed according to an intersect definition grammar and used to configure this object. :param config_string: Configuration string. Must not be Null or empty. :param clear: If true, clear any existing configuration. If false and an existing configuration exists, then global options are overridden and new intersect stages are added to existing ones already in this configuration object. :raises ValueError: If configuration fails for any reason. This may or may not leave the configuration object in an undefined state. If the "strategy" attribute is None after calling this method, then the configuration object is in an undefined state and must not be used; otherwise, a failure occurred before the object was altered and the object state is unchanged by this method call. .. py:method:: set_strategy_type(strategy_type: str) -> None Set the strategy type. :param strategy_type: A string strategy type to use, such as "nr" (for non-redundant strategy). Must not be missing or empty, must contain only alphanumeric characters and underscores, and may not start with a digit. :raises ValueError: If strategy type is missing or empty, if the strategy string is not alphanumeric, or if the strategy string starts with a digit. .. py:attribute:: default_match_stage :type: agglovar.merge.config.stage.IntersectStageMatch | None .. py:property:: has_vcf_temp :type: bool Determine if any merge stage uses a VCF temporary file. .. py:property:: is_any_match :type: bool Determine if any match stages are present. .. py:attribute:: stage_list :type: list[agglovar.merge.config.stage.IntersectStage] .. py:attribute:: strategy_type :type: str | None