Skip to content

Commit

Permalink
Ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyTLin committed Jun 4, 2024
1 parent c1c6357 commit b9eee24
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions bicytok/test/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
import numpy as np
import pandas as pd

from bicytok.selectivityFuncs import calcReceptorAbundances, optimizeSelectivityAffs, get_affs
from bicytok.selectivityFuncs import (
calcReceptorAbundances,
optimizeSelectivityAffs,
get_affs,
)
from bicytok.MBmodel import cytBindingModel


Expand All @@ -31,10 +35,30 @@ def test_optimize_design():


def test_binding_model():
assert cytBindingModel(recCount=np.array([4000., 3400.]), recXaffs=get_affs(np.array([8., 8.])),
dose=0.1, vals=np.array([[1, 1]])) == 4.070165414304938e-5
assert cytBindingModel(recCount=np.array([6000., 2100.]), recXaffs=get_affs(np.array([7.6, 8.2])),
dose=1., vals=np.array([[4, 4]])) == 0.0009870173680610606
assert cytBindingModel(recCount=np.array([4000., 3400., 5700., 33800.]),
recXaffs=get_affs(np.array([8.9, 7.0, 8.0, 8.0])), dose=0.1,
vals=np.array([[1, 4, 4, 4]])) == 0.017104443169046135
assert (
cytBindingModel(
recCount=np.array([4000.0, 3400.0]),
recXaffs=get_affs(np.array([8.0, 8.0])),
dose=0.1,
vals=np.array([[1, 1]]),
)
== 4.070165414304938e-5
)
assert (
cytBindingModel(
recCount=np.array([6000.0, 2100.0]),
recXaffs=get_affs(np.array([7.6, 8.2])),
dose=1.0,
vals=np.array([[4, 4]]),
)
== 0.0009870173680610606
)
assert (
cytBindingModel(
recCount=np.array([4000.0, 3400.0, 5700.0, 33800.0]),
recXaffs=get_affs(np.array([8.9, 7.0, 8.0, 8.0])),
dose=0.1,
vals=np.array([[1, 4, 4, 4]]),
)
== 0.017104443169046135
)

0 comments on commit b9eee24

Please sign in to comment.