serialization¶
This module is a technical module where we can find the different way to serialize the results:
the Systems found
The best solutions (best combination of systems)
The rejected clusters
-
class
macsypy.serialization.
SystemSerializer
[source]¶ handle the different way to serialize a system
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
class
macsypy.serialization.
TsvSolutionSerializer
[source]¶ Handle Solution (list of Systems) serialization in tsv format
-
__weakref__
¶ list of weak references to the object (if defined)
-
serialize
(solution, sol_id, hit_system_tracker)[source]¶ - Parameters
solution (list of
macsypy.system.System
object) – the solution to serializehit_system_tracker (
macsypy.system.HitSystemTracker
object) –
- Returns
a serialisation of this solution (a list of systems) in tabulated separated value format each line represent a hit and have the same structure as system serialization
macsypy.serialization.TsvSystemSerializer.serialize()
but with an extra column sol_id which is a technical id to identified the different solutions.
-
-
class
macsypy.serialization.
TsvSystemSerializer
[source]¶ Handle System serialization in tsv format
-
serialize
(system, hit_system_tracker)[source]¶ - Returns
a serialisation of this system in tabulated separated value format each line represent a hit and have the following structure:
replicon\thit_id\tgene_name\thit_pos\tmodel_fqn\tsys_id\tsys_loci\tsys_wholeness\tsys_score \tsys_occ\thit_gene_ref.alternate_of\thit_status\thit_seq_len\thit_i_eval\thit_score\thit_profile_cov \thit_seq_cov\tit_begin_match\thit_end_match
- Return type
str
-