added foundation option some_molecules
This commit is contained in:
@@ -29,11 +29,13 @@ def load_config(input_folder="input/", section="default"):
|
||||
print(f"No {configFilePath} provided.")
|
||||
|
||||
|
||||
def conc_df_from_file(input_path="input/", foundation="vivo_average"):
|
||||
def conc_df_from_file(input_path="input/", foundation="vivo_average",
|
||||
include_molecules=[]):
|
||||
sections = load_config(input_path, "")
|
||||
"""Generates concentration dataframe for mc method.
|
||||
Supports different variation types (absolute/delta/relative)
|
||||
Returns data_frame of different concentrations"""
|
||||
Returns data_frame of different concentrations.
|
||||
include_molecules needed for option some_molecules"""
|
||||
# Load all relevant sections
|
||||
list_parser_parameter = []
|
||||
|
||||
@@ -64,6 +66,15 @@ def conc_df_from_file(input_path="input/", foundation="vivo_average"):
|
||||
df_foundation[molecule] = 0
|
||||
except:
|
||||
print("No basis/fit_conc_result.csv file supplied")
|
||||
if foundation == "some_molecules":
|
||||
try:
|
||||
df_foundation = pd.read_csv(
|
||||
"basis/fit_conc_result.csv").mean().to_frame().transpose()
|
||||
for molecule in molecule_names:
|
||||
if molecule not in include_molecules:
|
||||
df_foundation[molecule] = 0
|
||||
except:
|
||||
print("No basis/fit_conc_result.csv file supplied")
|
||||
else:
|
||||
print("Only foundation mode vivo_average not chosen")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user