# PACKAGE - # TODO USER: prepare a new package (manually) and add it's URI here - make sure it is empty when running script!
EP_PACKAGE_ID='https://envipath.org/package/de0cdca1-c3ff-44ed-8ffd-f29c269bfa55'# Test package
# List of output packages used for Sludge TP paper
# EP_PACKAGE_ID = 'https://envipath.org/package/0915fad3-b889-4aa8-ac98-0707b717be57' # Package for results using BBD - ML - ECC - 2022 model
# EP_PACKAGE_ID = 'https://envipath.org/package/80cf58b1-21e2-4c28-9cc6-dc69c6445bdf' # Package for results using BBD+SOIL - ML - ECC - 2022 model
# EP_PACKAGE_ID = 'https://envipath.org/package/7d64aa85-2e3c-413f-a538-4d5f2bfd4662' # Package for results using BBD+SLUDGE - ML - ECC - 2022 model
# EP_PACKAGE_ID = 'https://envipath.org/package/11f2acd5-5209-4d49-ad77-93f6f6965886' # Package for results using BBD+SOIL+SLUDGE - ML - ECC - 2022 model
#---------------------------#
# PATHWAY SEARCH SETTINGS #
#---------------------------#
# These are the default settings used for the Sludge TP paper.
# They can be modified to direct the pathway search towards a specific objective.
# Maximum number of TPs to predict
MAX_TP=20
# Lower probability threshold
PROBABILITY_THRESHOLD=0# any value equal to or lower than the threshold will be excluded
# Set probabilities of 0 to 0.01 to continue having a weighting scheme downstream of the pathway
INCLUDE_0_PROBABILITIES=False
# Follow moiety - only compounds containing moiety in SMILES will be expanded
MOIETY=""# e.g., "C(F)(F)F"
# To prioritize small compounds in the queue
SORT_TPS_BY_SIZE=False
# Follow labeled atoms
FOLLOW_LABELED_ATOM=False
ATOM_LABEL='14'
# Print as a reaction file additionally to the list of TPs
PRINT_REACTION_FILE=True
#---------------------------#
# FILE PATH SETTINGS #
#---------------------------#
# Input/output files
INPUT_FILE_PATH='input/input_structures.tsv'
OUTPUT_DIRECTORY='output/'
OUTPUT_FILE_TAG='TEST'
#---------------------------#
# CONNECT TO ENVIPATH #
#---------------------------#
eP=enviPath(INSTANCE_HOST)
password=getpass.getpass()
eP.login(USERNAME,password)
#---------------------------#
# FUNCTIONS #
#---------------------------#
def__main__(rr_id,pkg_id,tag):
"""
Main function, predicts pathways for a list of input smiles
Output: pathways are saved to specified enviPath package, TP list as .tsv file to output folder
:param rr_id: URI of enviPath relative reasoning mode to be used
:param pkg_id: URI of enviPath package to store resulting pathways
:param tag: string tag to attach to output files for identification