Skip to content

Commit

Permalink
renamed __set_investigation to __create_investigation
Browse files Browse the repository at this point in the history
  • Loading branch information
terazus committed Mar 20, 2024
1 parent 1fee42b commit fce86a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions isatools/isatab/load/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ def __init__(self, file: TextIO | str, run: bool = True, skip_load_table: bool =
"""
ISATabLoaderMixin.skip_load_tables = skip_load_table
self.__investigation: Investigation
self.__df_dict: dict = {}
self.file: TextIO = file
self.__investigation: Investigation = Investigation()
if run:
self.load()

Expand Down Expand Up @@ -451,10 +451,11 @@ def __set_ontology_source(self, row: Series) -> None:
ontology_source.comments = self.get_comments(self.__df_dict['ontology_sources'])
self.__investigation.ontology_source_references.append(ontology_source)

def __set_investigation(self) -> None:
def __create_investigation(self) -> None:
""" Loads all data regarding the investigation into the Investigation object. Studies and assays are
loaded in a separate private method.
"""
self.__investigation = Investigation()
self.__df_dict['ontology_sources'].apply(lambda r: self.__set_ontology_source(r), axis=1)
ISATabLoaderMixin.ontology_source_map = dict(
map(lambda x: (x.name, x), self.__investigation.ontology_source_references)
Expand All @@ -481,7 +482,7 @@ def __create_studies(self) -> None:

def load(self):
""" Public wrapper to load the investigation file into the Investigation object. """
self.__set_investigation()
self.__create_investigation()
self.__create_studies()


Expand Down

0 comments on commit fce86a1

Please sign in to comment.