Skip to content

Commit

Permalink
Rename functions
Browse files Browse the repository at this point in the history
  • Loading branch information
veghp committed Sep 30, 2024
1 parent 8d888dc commit 6a85743
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions plateo/applications/doe.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
from ..parsers.picklist_from_tables import columnnames


def volumetable_from_valuetable(valuetable, source_plate):
def convert_valuetable_to_volumetable(valuetable, source_plate):
# 1 microliter = 1e-6 L
pass


def valuetable_from_csv(filename):
def import_valuetable_from_csv(filename):
valuetable = pandas.read_csv(filename, index_col=0)

return valuetable


def dataframe_from_volume_table(volumetable, source_plate, dest_plate):
def convert_volumetable_to_actiontable(volumetable, source_plate, dest_plate):
"""Convert a volume-based transfer table into an action-based format."""

factor_wells_dict = {}
Expand Down Expand Up @@ -58,12 +58,12 @@ def dataframe_from_volume_table(volumetable, source_plate, dest_plate):
]
transfer_list += [transfer]

dataframe = pandas.DataFrame(columns=columnnames, data=transfer_list)
actiontable = pandas.DataFrame(columns=columnnames, data=transfer_list)

return dataframe
return actiontable


def volumetable_from_csv_file(filename, unit=1e-6):
def import_volumetable_from_csv_file(filename, unit=1e-6):
# 1 microliter = 1e-6 L
volumetable = pandas.read_csv(filename, index_col=0)
volumetable = volumetable * unit
Expand Down
10 changes: 5 additions & 5 deletions tests/test_doe.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import pandas

from plateo.applications.doe import (
dataframe_from_volume_table,
volumetable_from_csv_file,
convert_volumetable_to_actiontable,
import_volumetable_from_csv_file,
)
from plateo.parsers import plate_from_content_spreadsheet
from plateo.containers import Plate96
Expand All @@ -14,14 +14,14 @@


def test_volumetable_from_csv_file():
assert type(volumetable_from_csv_file(volumetable_path)) == pandas.DataFrame
assert type(import_volumetable_from_csv_file(volumetable_path)) == pandas.DataFrame


def test_dataframe_from_volume_table():
volumetable = volumetable_from_csv_file(volumetable_path)
volumetable = import_volumetable_from_csv_file(volumetable_path)
source_plate = plate_from_content_spreadsheet(source_plate_path)
dest_plate = Plate96(name="dest")
dataframe = dataframe_from_volume_table(
dataframe = convert_volumetable_to_actiontable(
volumetable=volumetable, source_plate=source_plate, dest_plate=dest_plate
)

Expand Down

0 comments on commit 6a85743

Please sign in to comment.