Skip to content

Commit

Permalink
polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
JenkeScheen committed Apr 5, 2024
1 parent d4d298d commit 420a307
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions choppa/IO/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging, sys
from collections import OrderedDict

logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logger = logging.getLogger()

class FitnessFactory():
Expand Down Expand Up @@ -89,7 +89,7 @@ def read_fitness_csv(self):
return fitness_df


def df_to_basedict(self):
def get_fitness_basedict(self):
"""
Converts a `pandas` fitness dataframe (read by `FitnessFactory.read_fitness_csv`) into
a `fitness basedict` which is essentially just an `OrderedDict`.
Expand Down Expand Up @@ -131,15 +131,10 @@ def df_to_basedict(self):
"wildtype": wt_dict,
"mutants": mutant_list
}
return fitness_basedict



def get_fitness_dict(self):
"""
"""


logger.info(f"Created fitness dictionary as `FitnessFactory` of length {len(fitness_basedict)}")

return fitness_basedict


class ComplexFactory():
Expand All @@ -155,5 +150,5 @@ def check_validity():
from choppa.data.toy_data.resources import TOY_COMPLEX, TOY_FITNESS_DATA_COMPLETE, TOY_FITNESS_DATA_COMPLETE_NOCONF
fitness_df = FitnessFactory(TOY_FITNESS_DATA_COMPLETE_NOCONF,
# confidence_colname="confidence"
).df_to_basedict()
).get_fitness_basedict()

0 comments on commit 420a307

Please sign in to comment.