Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion MaBoSS/src/MaBoSS_BB/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

# Do not change this line
BB_SOURCE_PATH=os.path.dirname(os.path.abspath(__file__))
CONTAINER_ENGINE = os.environ["CONTAINER_ENGINE"]

# Update the following lines:
# - Assets folder within the Building Block
ASSETS_PATH = os.path.join(BB_SOURCE_PATH, "assets")
# - Container definition for MaBoSS Building Block
CONTAINER_NAME = "maboss.sif"
MABOSS_CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
if CONTAINER_ENGINE == "SINGULARITY":
MABOSS_CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
CONTAINER_OPTIONS = "[unassigned]"
elif CONTAINER_ENGINE == "UDOCKER":
MABOSS_CONTAINER = CONTAINER_NAME.split(".")[0]
home_directory = os.environ["HOME"]
CONTAINER_OPTIONS = "-v " + home_directory + ":" + home_directory + " --rm"
else:
raise Exception("UNSUPPORTED CONTAINER ENGINE: %s (must be SINGULARITY or UDOCKER)" % CONTAINER_ENGINE)
6 changes: 4 additions & 2 deletions MaBoSS/src/MaBoSS_BB/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
from permedcoe import TMPDIR

# Import single container and assets definitions
from MaBoSS_BB.definitions import CONTAINER_ENGINE
from MaBoSS_BB.definitions import MABOSS_CONTAINER
from MaBoSS_BB.definitions import CONTAINER_OPTIONS
from MaBoSS_BB.definitions import ASSETS_PATH
from MaBoSS_BB.definitions import COMPUTING_UNITS

Expand All @@ -20,7 +22,7 @@


@constraint(computing_units=COMPUTING_UNITS)
@container(engine="SINGULARITY", image=MABOSS_CONTAINER)
@container(engine=CONTAINER_ENGINE, image=MABOSS_CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=MABOSS_BINARY)
@task(data_folder=DIRECTORY_IN, ko_file=FILE_OUT)
def MaBoSS_analysis(
Expand All @@ -38,7 +40,7 @@ def MaBoSS_analysis(


@constraint(computing_units=COMPUTING_UNITS)
@container(engine="SINGULARITY", image=MABOSS_CONTAINER)
@container(engine=CONTAINER_ENGINE, image=MABOSS_CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=MABOSS_SENSITIVIY_ANALYSIS_BINARY)
@task(
model_folder=DIRECTORY_IN,
Expand Down
11 changes: 10 additions & 1 deletion PhysiBoSS/src/PhysiBoSS_BB/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

# Do not change this line
BB_SOURCE_PATH=os.path.dirname(os.path.abspath(__file__))
CONTAINER_ENGINE = os.environ["CONTAINER_ENGINE"]

# Update the following lines:
# - Assets folder within the Building Block
ASSETS_PATH = os.path.join(BB_SOURCE_PATH, "assets")
# - Container definition for Meta Analysis Building Block
CONTAINER_NAME = "physicell_covid19.sif"
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
if CONTAINER_ENGINE == "SINGULARITY":
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
CONTAINER_OPTIONS = "[unassigned]"
elif CONTAINER_ENGINE == "UDOCKER":
CONTAINER = CONTAINER_NAME.split(".")[0]
home_directory = os.environ["HOME"]
CONTAINER_OPTIONS = "-v " + home_directory + ":" + home_directory + " --rm"
else:
raise Exception("UNSUPPORTED CONTAINER ENGINE: %s (must be SINGULARITY or UDOCKER)" % CONTAINER_ENGINE)
8 changes: 5 additions & 3 deletions PhysiBoSS/src/PhysiBoSS_BB/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
from permedcoe import TMPDIR

# Import single container and assets definitions
from PhysiBoSS_BB.definitions import CONTAINER
from PhysiBoSS_BB.definitions import ASSETS_PATH
from PhysiBoSS_BB.definitions import CONTAINER_ENGINE
from PhysiBoSS_BB.definitions import CONTAINER
from PhysiBoSS_BB.definitions import CONTAINER_OPTIONS
from PhysiBoSS_BB.definitions import COMPUTING_UNITS

# Globals# Globals
Expand All @@ -21,7 +23,7 @@
PHYSIBOSS_ANALYSE_REPLICATES_BINARY = os.path.join(ASSETS_PATH, "PhysiBoSS_analyse_replicates.sh")

@constraint(computing_units=COMPUTING_UNITS)
@container(engine="SINGULARITY", image=CONTAINER)
@container(engine=CONTAINER_ENGINE, image=CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=PHYSIBOSS_MODEL_BINARY)
@task(
model_dir=DIRECTORY_IN,
Expand Down Expand Up @@ -86,7 +88,7 @@ def physiboss_analyse_replicates(


@constraint(computing_units=COMPUTING_UNITS)
@container(engine="SINGULARITY", image=CONTAINER)
@container(engine=CONTAINER_ENGINE, image=CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=PHYSIBOSS_BINARY)
@task(
bnd_file=FILE_IN,
Expand Down
12 changes: 11 additions & 1 deletion meta_analysis/src/meta_analysis_BB/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@

# Do not change this line
BB_SOURCE_PATH=os.path.dirname(os.path.abspath(__file__))
CONTAINER_ENGINE = os.environ["CONTAINER_ENGINE"]

# Update the following lines:
# - Assets folder within the Building Block
ASSETS_PATH = os.path.join(BB_SOURCE_PATH, "assets")
# - Container definition for Meta Analysis Building Block
CONTAINER_NAME = "meta_analysis.sif"
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
if CONTAINER_ENGINE == "SINGULARITY":
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
CONTAINER_OPTIONS = "[unassigned]"
elif CONTAINER_ENGINE == "UDOCKER":
CONTAINER = CONTAINER_NAME.split(".")[0]
home_directory = os.environ["HOME"]
CONTAINER_OPTIONS = "-v " + home_directory + ":" + home_directory + " --rm"
else:
raise Exception("UNSUPPORTED CONTAINER ENGINE: %s (must be SINGULARITY or UDOCKER)" % CONTAINER_ENGINE)

6 changes: 4 additions & 2 deletions meta_analysis/src/meta_analysis_BB/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
from permedcoe import TMPDIR

# Import single container and assets definitions
from meta_analysis_BB.definitions import CONTAINER
from meta_analysis_BB.definitions import ASSETS_PATH
from meta_analysis_BB.definitions import CONTAINER_ENGINE
from meta_analysis_BB.definitions import CONTAINER
from meta_analysis_BB.definitions import CONTAINER_OPTIONS
from meta_analysis_BB.definitions import COMPUTING_UNITS

# Globals
META_ANALYSIS_BINARY = os.path.join(ASSETS_PATH, "meta_analysis.sh")


# @constraint(computing_units=COMPUTING_UNITS)
@container(engine="SINGULARITY", image=CONTAINER)
@container(engine=CONTAINER_ENGINE, image=CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=META_ANALYSIS_BINARY)
@task(meta_file=FILE_IN,
out_dir=DIRECTORY_IN,
Expand Down
11 changes: 10 additions & 1 deletion personalize_patient/src/personalize_patient_BB/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

# Do not change this line
BB_SOURCE_PATH=os.path.dirname(os.path.abspath(__file__))
CONTAINER_ENGINE = os.environ["CONTAINER_ENGINE"]

# Update the following lines:
# - Assets folder within the Building Block
ASSETS_PATH = os.path.join(BB_SOURCE_PATH, "assets")
# - Container definition for Personalize Patient Building Block
CONTAINER_NAME = "physicell_covid19.sif"
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
if CONTAINER_ENGINE == "SINGULARITY":
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
CONTAINER_OPTIONS = "[unassigned]"
elif CONTAINER_ENGINE == "UDOCKER":
CONTAINER = CONTAINER_NAME.split(".")[0]
home_directory = os.environ["HOME"]
CONTAINER_OPTIONS = "-v " + home_directory + ":" + home_directory + " --rm"
else:
raise Exception("UNSUPPORTED CONTAINER ENGINE: %s (must be SINGULARITY or UDOCKER)" % CONTAINER_ENGINE)
8 changes: 5 additions & 3 deletions personalize_patient/src/personalize_patient_BB/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
from permedcoe import TMPDIR

# Import single container and assets definitions
from personalize_patient_BB.definitions import CONTAINER
from personalize_patient_BB.definitions import ASSETS_PATH
from personalize_patient_BB.definitions import CONTAINER_ENGINE
from personalize_patient_BB.definitions import CONTAINER
from personalize_patient_BB.definitions import CONTAINER_OPTIONS
from personalize_patient_BB.definitions import COMPUTING_UNITS

# Globals
Expand All @@ -20,7 +22,7 @@


# @constraint(computing_units=COMPUTING_UNITS)
@container(engine="SINGULARITY", image=CONTAINER)
@container(engine=CONTAINER_ENGINE, image=CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=PERSONALIZE_PATIENT_BINARY)
@task(norm_data=FILE_IN, cells=FILE_IN, model_output_dir=DIRECTORY_OUT, personalized_result=FILE_OUT, ko=FILE_IN)
def personalize_patient(tmpdir=TMPDIR,
Expand Down Expand Up @@ -56,7 +58,7 @@ def personalize_patient(tmpdir=TMPDIR,
pass


@container(engine="SINGULARITY", image=CONTAINER)
@container(engine=CONTAINER_ENGINE, image=CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=PERSONALIZE_CELLLINE_BINARY)
@task(expression_data=FILE_IN, cnv_data=FILE_IN, mutation_data=FILE_IN, model_bnd=FILE_IN, model_cfg=FILE_IN, model_output_dir=DIRECTORY_OUT)
def personalize_patient_cellline(tmpdir=TMPDIR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

# Do not change this line
BB_SOURCE_PATH=os.path.dirname(os.path.abspath(__file__))
CONTAINER_ENGINE = os.environ["CONTAINER_ENGINE"]

# Update the following lines:
# - Assets folder within the Building Block
ASSETS_PATH = os.path.join(BB_SOURCE_PATH, "assets")
# - Container definition for Meta Analysis Building Block
CONTAINER_NAME = "single_cell.sif"
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
if CONTAINER_ENGINE == "SINGULARITY":
CONTAINER = os.path.join(CONTAINER_PATH, CONTAINER_NAME)
CONTAINER_OPTIONS = "[unassigned]"
elif CONTAINER_ENGINE == "UDOCKER":
CONTAINER = CONTAINER_NAME.split(".")[0]
home_directory = os.environ["HOME"]
CONTAINER_OPTIONS = "-v " + home_directory + ":" + home_directory + " --rm"
else:
raise Exception("UNSUPPORTED CONTAINER ENGINE: %s (must be SINGULARITY or UDOCKER)" % CONTAINER_ENGINE)
6 changes: 4 additions & 2 deletions single_cell_processing/src/single_cell_processing_BB/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
from permedcoe import TMPDIR

# Import single container and assets definitions
from single_cell_processing_BB.definitions import CONTAINER
from single_cell_processing_BB.definitions import ASSETS_PATH
from single_cell_processing_BB.definitions import CONTAINER_ENGINE
from single_cell_processing_BB.definitions import CONTAINER
from single_cell_processing_BB.definitions import CONTAINER_OPTIONS
from single_cell_processing_BB.definitions import COMPUTING_UNITS

# Globals
SINGLE_CELL_PROCESSING_BINARY = os.path.join(ASSETS_PATH, "single_cell_processing_individual.sh")


@constraint(computing_units=COMPUTING_UNITS)
@container(engine="SINGULARITY", image=CONTAINER)
@container(engine=CONTAINER_ENGINE, image=CONTAINER, options=CONTAINER_OPTIONS)
@binary(binary=SINGLE_CELL_PROCESSING_BINARY)
@task(
p_file=FILE_IN,
Expand Down