Skip to content

Commit

Permalink
refactor: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
christinehc committed Dec 18, 2024
1 parent ee8e60a commit 84d1c66
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions build_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,10 @@
from typing import Optional
import pandas as pd
from tqdm import tqdm
from sampleChemMapping.mapping import get_mapping_file
from sampleChemMapping.src.mapping import load_mapping_reference, get_mapping_file


def collectFiles(
data_dir: str = "https://raw.githubusercontent.com/PNNL-CompBio/srpAnalytics/main/data",
filename: str = "srp_build_files.csv",
) -> pd.DataFrame:
"""Collect files to be fed into each module upon build file update.
Parameters
----------
data_dir : str, optional
_description_, by default "https://raw.githubusercontent.com/PNNL-CompBio/srpAnalytics/main/data"
filename : str, optional
_description_, by default "srp_build_files.csv"
Returns
-------
pandas.DataFrame
_description_
"""
df = pd.read_csv(os.path.join(data_dir, filename))
return df


# TODO: Write this function
# TODO: Write this functions
def fitCurveFiles(morpho_behavior_tuples):
"""
get new curve fits, list of tuples of morpho/behavior pairs
Expand Down Expand Up @@ -77,9 +55,8 @@ def combineFiles(location_list: pd.DataFrame, ftype: str) -> pd.DataFrame:
for loc in location_list.location:
f = pd.read_csv(loc)[required_cols[ftype]]
dflist.append(f)
fulldf = pd.concat(dflist)
fulldf = fulldf.drop_duplicates()
return fulldf
df = pd.concat(dflist).drop_duplicates()
return df


def runSampMap(
Expand All @@ -103,7 +80,6 @@ def runSampMap(
f" --chem_id={cid}"
f" --ep_map={emap}"
f" --chem_class={cclass}"
f" --comptox_file={ctfile}"
f" --sample_files={fses}"
f" --chem_desc={descfile}"
f" --sample_map={smap}"
Expand All @@ -118,7 +94,7 @@ def runSampMap(

tqdm.write("\nRunning sample mapping with the following parameters:\n")
tqdm.write(f"{cmd}\n")
# os.system(cmd)
os.system(cmd)
tqdm.write("ls -la . \n")
os.system(f"ls -la {output_dir}")
##now we validate the files that came out.
Expand Down Expand Up @@ -171,7 +147,7 @@ def main():
this wrapping script is placed into every docker image to pull the files
from the repo and initiate the appropriate call to the underlying code.
"""
df = collectFiles()
df = load_mapping_reference()

####
# file parsing - collects all files we might need for the tool below
Expand Down

0 comments on commit 84d1c66

Please sign in to comment.