Commit c3006d80 authored by Bollen's avatar Bollen
Browse files

add optional thermodynamics parameters option in jinja template

parent 25a43952
......@@ -72,17 +72,19 @@ def create_primer3_config(settings_dict: dict,
sequence_template: str,
sequence_target: str,
excluded_region: str,
template_path: Path = TEMPLATE) -> str:
template_path: Path = TEMPLATE,
thermodynamic_params: Optional[Path] = None)-> str:
"""Create primer3 configuration from jinja2 template and settings_dict"""
with template_path.open("r") as thandle:
template = Template(thandle.read())
template = Template(thandle.read(), trim_blocks=True)
return template.render(
{
"seq": sequence_template,
"target": sequence_target,
"excluded_region": excluded_region,
"settings": settings_dict
"settings": settings_dict,
"thermodynamic_params": thermodynamic_params
}
)
......
......@@ -35,4 +35,7 @@ PRIMER_MAX_TM={{ settings.primer_max_tm }}
PRIMER_PAIR_MAX_DIFF_TM={{ settings.primer_pair_max_diff_tm }}
PRIMER_MAX_HAIRPIN_TH={{ settings.primer_max_hairpin_th }}
PRIMER_NUM_RETURN={{ settings.primer_num_return }}
{% if thermodynamic_params %}
PRIMER_THERMODYNAMIC_PARAMETERS_PATH={{ thermodynamic_params }}
{% endif %}
=
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment