pylogeny.landscapeWriter module

Serialize a phylogenetic landscape into an SQLlite database file made up of three components: all tree IDs and respective scores, the alignment file as a set of sequences, and a representation of the graph as an edge list.

class pylogeny.landscapeWriter.landscapeParser(path)[source]

Bases: object

Encapsulates the construction of a landscape object from a sqlite landscape file.

__init__(path)[source]

Instantiate this parser.

Parameters:path (a string) – the filepath to the landscape file
getName()[source]

Acquire the name of the parsed landscape.

Returns:a string
parse()[source]

Parse the file.

Returns:a tuple of a landscape.landscape object and its name (a string)
class pylogeny.landscapeWriter.landscapeWriter(landscape, name)[source]

Bases: object

Encapsulate the writing of a landscape to a file format.

__init__(landscape, name)[source]

Instantiates this writer.

Parameters:
  • landscape (a landscape.landscape object) – a landscape object
  • name (a string) – the name of this landscape
writeFile(path='.')[source]

Write the landscape serialized file to given path.

Parameters:path (a string) – a directory path, defaulting to the current one
Returns:the relative filepath to the written file

Previous topic

pylogeny.landscape module

Next topic

pylogeny.model module

This Page