emodpy_malaria.serialization.replace_genomes module

class emodpy_malaria.serialization.replace_genomes.Genome[source]

Bases: object

Represent a single genome

convert_char_to_int()[source]
create_genome(allele_root_id)[source]
property barcode
property hashcode
set_allele_roots(root)[source]
to_dtk_dict()[source]
to_dtk_map_entry()[source]
emodpy_malaria.serialization.replace_genomes.print_hashcodes(ser_pop)[source]
emodpy_malaria.serialization.replace_genomes.get_next_genome(next_barcode_fn, allele_root_id, ser_pop_genome_map, cache_genome_map)[source]
emodpy_malaria.serialization.replace_genomes.replace_genomes(input_file, next_barcode_fn, output_file)[source]

Replaces genomes in infected individuals and vectors.

Parameters:
  • input_file – Input serialized population file

  • next_barcode_fn – Function that return the next barcode. The function is called once for every infection of an individual and once for every vector in the vector population.

  • output_file – Output file with replaced genomes.

Returns:

Nothing

emodpy_malaria.serialization.replace_genomes.test_replace_genomes(input_fn, get_next_barcode)[source]