Commit c1267eb4 authored by Lucas Bourneuf's avatar Lucas Bourneuf

improve doc

parent 9a02df7d
......@@ -10,7 +10,7 @@ bs.single_image_from_filenames(
)
# We can also load all scripts in a given dir
# We could also load all scripts in a given dir (without garantee over script order)
scripts = list(bs.build_scripts_from_dir('scripts/'))
# Or from a single filename
......@@ -22,7 +22,7 @@ final_context = bs.run(scripts[:3])
print(final_context)
bs.compile_to_single_image(final_context, outfile='example.png')
# note that scripts are complex objects, that have options :
# note that scripts are complex objects, that have options:
a_script = next(bs.build_scripts_from_file('scripts/compute_score.py'))
print(f"Script {a_script.name} have options:", a_script.options)
print(" Current values are:", a_script.options_values)
......
"""Description of that compute score"""
from itertools import combinations
......@@ -5,6 +6,11 @@ NAME = "Ranker"
OUTPUTS = "score/3"
def run_on(models, *, multiplier:float=2):
"""This doc allows to populate documentation of options
multiplier -- factor to apply on scores
"""
for model in models:
for (geneA, valA), (geneB, valB) in combinations(model.get('gene', ()), r=2):
score = abs(float(valA) - float(valB)) * float(multiplier)
......
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