# topology

class integron_finder.topology.Topology(seq_nb, cmd_topo, gembase=False, topology_file=None)

  Class to parse and handle replicons topologies

  __getitem__(replicon_id)
    Parameters:

      replicon_id (str) – The id of the replicon.

    Returns:

      the topology for the replicon corresponding to the replicon_id

  __init__(seq_nb, cmd_topo, gembase=False, topology_file=None)
    Parameters:

      - default (str) – the default topology

      - topology_file – the path to the file where topology for replicon are specified

  __weakref__

    list of weak references to the object

  _gembase_replicon_default_topo(seqid)
    Parameters:

      seqid (str) – the id of the replicon

    Returns:

      The default topology corresponding to the repliocon seqid in gembase format.

    Return type:

      str ‘circ’ | ‘lin’

  _parse(topology_file)

    Parse a topology file where topology is specified for replicons on each line a topology is specified for a replicon the syntax of each line is

        replicon_id topology

    the allowed value for toplogy are ‘circ’, ‘circular’, ‘lin’, ‘linear’

    Parameters:

      topology_file (str) – The path to the topology file

  _parse_topology(topo)

    Parse a field topology in topology file the authorized values are circular, linear or circ, lin, or in uppercase

    Parameters:

      topo – the field corresponding to topology in topology file

    Returns:

      the topology in “normed” format ‘circ’ or ‘lin’

    Return type:

      str