pydna_epbd package#
Subpackages#
- pydna_epbd.monitors package
- Submodules
- pydna_epbd.monitors.all_monitors module
- pydna_epbd.monitors.bubble_monitor module
- pydna_epbd.monitors.coord_monitor module
- pydna_epbd.monitors.coord_monitor_verbose module
- pydna_epbd.monitors.energy_monitor module
- pydna_epbd.monitors.flipping_monitor module
- pydna_epbd.monitors.flipping_monitor_verbose module
- pydna_epbd.monitors.melting_and_fraction_many_monitor module
- pydna_epbd.monitors.melting_and_fraction_monitor module
- pydna_epbd.monitors.monitor module
- Module contents
- pydna_epbd.simulation package
Submodules#
pydna_epbd.configs module#
- class pydna_epbd.configs.InputConfigs(temperature: float, sequences: list, outputs_dir: str, n_iterations: int, n_preheating_steps: int, n_steps_after_preheating: int, n_nodes: int, save_full=False, save_runtime=False)[source]#
Bases:
object
This initializes an input configuration object to use throughout the simulation process.
- Parameters:
temperature (float) – In Kelvin scale.
sequences (list) – List of tuples of sequences in [(“output_dir”, “seq_id”, “seq”)] format
outputs_dir (str) – The directory path to save the simulation outputs.
n_iterations (int) – The number of independent iterations with different initial conditions.
n_preheating_steps (int) – The number of preheating steps.
n_steps_after_preheating (int) – The number of post preheating steps.
n_nodes (int) – The computing nodes where the input sequences are divided equally for faster execution of bulk sequences.
save_full (bool, optional) – Whether or not save the full outputs of the simulation. If True, first axis denotes n_iterations. Defaults to False.
save_runtime (bool, optional) – Whether or not save the runtime for each sequence. Defaults to False.
pydna_epbd.input_reader module#
- pydna_epbd.input_reader.read_all_sequences(input_seqs_dir, is_first_col_id, flanks, outputs_dir)[source]#
Read all sequences for the simulation.
- Parameters:
input_seqs_dir (str) – Directory that contains files containing DNA sequences.
is_first_col_id (bool) – Whether or not the first column of the sequence containing file determines sequence id.
flanks (str) – Flanks are added at both sides of all input sequences.
outputs_dir (str) – The output directory for saving simulation outputs.
- Returns:
A list containing all sequences in the input directory.
- Return type:
list
- pydna_epbd.input_reader.read_configurations(configuration_filepath)[source]#
Read the configs from the input configuration file.
- Parameters:
configuration_filepath (str) – The configurations needed to run MCMC simulations. The structure of the configs are given in the Readme file.
- Returns:
The class containing specific format for running the simulations.
- Return type:
- pydna_epbd.input_reader.read_sequences_from_a_file(input_seqs_dir, filename_with_ext, is_first_col_id, flanks, outputs_dir)[source]#
Read DNA sequences from one input file. This also creates output directories for saving simulation outputs.
- Parameters:
input_seqs_dir (str) – Directory that contains DNA sequences file.
filename_with_ext (str) – Filename with extension.
is_first_col_id (bool) – Whether or not the first column of the sequence containing file determines sequence id.
flanks (str) – Flanks are added at both sides of all input sequences.
outputs_dir (str) – The output directory for saving simulation outputs.
- Returns:
A list of tuples containing all sequences in the input sequence file with seq-id and output directory. If seq-id is not present, 1-indexed incrementally generated seq-id will be attached. Format: [(“seq_output_dir”, “seq_id”, “seq”)]
- Return type:
list