Skip to content
Snippets Groups Projects
Commit a581abb1 authored by Le, Mia's avatar Le, Mia
Browse files

CONFIG kommentare eingefügt

parent 0908a7b4
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ class AlgorithmWrapper(object): ...@@ -10,7 +10,7 @@ class AlgorithmWrapper(object):
def __init__(self): def __init__(self):
self.uid = '0000' self.uid = '0000'
self.name = '' self.name = ''
self.weight = 1 self.weight = default_weight #CONFIG default_weight = 1
self.output_dir = '' self.output_dir = ''
self.ppi_network = Graph() self.ppi_network = Graph()
self.seeds = list() self.seeds = list()
......
...@@ -26,7 +26,7 @@ class DiamondWrapper(AlgorithmWrapper): ...@@ -26,7 +26,7 @@ class DiamondWrapper(AlgorithmWrapper):
out_filename = self.name_file('out') # name the outputfile out_filename = self.name_file('out') # name the outputfile
algo_output = f'{self.output_dir}/{out_filename}' # specify the output location algo_output = f'{self.output_dir}/{out_filename}' # specify the output location
command = f'{diamond} {ppi} {seeds} {nof_predictions} 1 {algo_output}' command = f'{diamond} {ppi} {seeds} {nof_predictions} {alpha} {algo_output}' #CONFIG alpha = 1
subprocess.call(command, shell=True, stdout=subprocess.PIPE) subprocess.call(command, shell=True, stdout=subprocess.PIPE)
print(f"DIAMOnD results saved in {algo_output}") print(f"DIAMOnD results saved in {algo_output}")
return self.extract_output(algo_output) return self.extract_output(algo_output)
...@@ -63,7 +63,7 @@ class DiamondWrapper(AlgorithmWrapper): ...@@ -63,7 +63,7 @@ class DiamondWrapper(AlgorithmWrapper):
# do not predict too much when there are not enough seeds # do not predict too much when there are not enough seeds
nof_seeds = len(self.seeds) nof_seeds = len(self.seeds)
nof_preds = min([nof_seeds * 10, 200]) nof_preds = min([nof_seeds * pred_factor, max_preds]) #CONFIG pred_factor = 10, max_preds = 100
print(f'With {nof_seeds} seeds, {self.name} will try to predict {nof_preds} active modules.') print(f'With {nof_seeds} seeds, {self.name} will try to predict {nof_preds} active modules.')
inputparams.append(nof_preds) inputparams.append(nof_preds)
return inputparams return inputparams
......
...@@ -28,10 +28,10 @@ class DominoWrapper(AlgorithmWrapper): ...@@ -28,10 +28,10 @@ class DominoWrapper(AlgorithmWrapper):
slices_file = inputparams[2] slices_file = inputparams[2]
command = f'domino -a {seeds} -n {ppi} -s {slices_file} -o {self.output_dir} -v false' command = f'domino -a {seeds} -n {ppi} -s {slices_file} -o {self.output_dir} -v visualization_flag' #CONFIG: visualization_flag = False
subprocess.call(command, shell=True, stdout=subprocess.PIPE) subprocess.call(command, shell=True, stdout=subprocess.PIPE)
outputname = (os.path.basename(seeds)).rsplit(".")[0] outputname = (os.path.basename(seeds)).rsplit(".")[0]
algo_output = f'{self.output_dir}/{outputname}/modules.out' algo_output = f'{self.output_dir}/{outputname}/{output_name}' #CONFIG output_name = 'modules.out'
outputfilename = self.name_file('out', 'out') outputfilename = self.name_file('out', 'out')
command = f'mv {algo_output} {self.output_dir}/{outputfilename}' command = f'mv {algo_output} {self.output_dir}/{outputfilename}'
......
...@@ -41,7 +41,7 @@ class RobustWrapper(AlgorithmWrapper): ...@@ -41,7 +41,7 @@ class RobustWrapper(AlgorithmWrapper):
out_filename = self.name_file('out') out_filename = self.name_file('out')
algo_output = f'{self.output_dir}/{out_filename}' algo_output = f'{self.output_dir}/{out_filename}'
# algo_output = f'./ms.graphml' # algo_output = f'./ms.graphml'
command = f'{robust} {ppi} {seeds} {algo_output} 0.25 0.9 30 0.1' command = f'{robust} {ppi} {seeds} {algo_output} 0.25 0.9 30 0.1' #CONFIG according to robust documentation https://github.com/bionetslab/robust
subprocess.call(command, shell=True, stdout=subprocess.PIPE) subprocess.call(command, shell=True, stdout=subprocess.PIPE)
print(f"Robust results saved in {algo_output}") print(f"Robust results saved in {algo_output}")
return self.extract_output(algo_output) return self.extract_output(algo_output)
......
...@@ -46,7 +46,7 @@ def main(ppi_network, seeds, tools, tool_weights, consensus, evaluate, ...@@ -46,7 +46,7 @@ def main(ppi_network, seeds, tools, tool_weights, consensus, evaluate,
# set weights for seed genes in ppi_graph # set weights for seed genes in ppi_graph
for seed in seed_lst: for seed in seed_lst:
ppi_graph.vertex_properties["cami_score"][seed] = 10.0 ppi_graph.vertex_properties["cami_score"][seed] = seed_score #CONFIG seed_score = 10.0
# change directory to ~/cami/cami (home of cami.py) # change directory to ~/cami/cami (home of cami.py)
cami_home = sys.argv[0].rsplit('/', 1) cami_home = sys.argv[0].rsplit('/', 1)
......
...@@ -9,5 +9,5 @@ chdir((sys.argv[0].rsplit('/', 1))[0]) ...@@ -9,5 +9,5 @@ chdir((sys.argv[0].rsplit('/', 1))[0])
networkfile = "../data/input/networks/example_network.tsv" networkfile = "../data/input/networks/example_network.tsv"
seedfile = "../data/input/seeds/example_seeds.txt" seedfile = "../data/input/seeds/example_seeds.txt"
identifier = "example_run" identifier = "example_run"
command = f'./cami.py -n {networkfile} -s {seedfile} -id {identifier} -img -d --f;' command = f'./cami.py -n {networkfile} -s {seedfile} -id {identifier} -ncbi -img -d --f;'
subprocess.call(command, shell=True) subprocess.call(command, shell=True)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment