Skip to content

Commit

Permalink
Added extra parameter for run
Browse files Browse the repository at this point in the history
  • Loading branch information
Roxanne Wolthuis committed Nov 1, 2021
1 parent 1c7f676 commit 31498ab
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions juno-amr.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Documentation: -
"""

#imports
import sys
import argparse
import os
Expand Down Expand Up @@ -77,7 +76,6 @@ def get_user_arguments(self):
help="Path to the directory you want to use as an output directory, if non is given the default will be an output directory in the Juno-amr folder"
)

#TODO decide on fasta or fastq
self.parser.add_argument(
"-i",
"--input",
Expand Down Expand Up @@ -317,12 +315,10 @@ def create_yaml_file(self):
yaml.dump(config, file)

def run_snakemake_api(self):
#Get cores from config
open_config_parameters = open("config/database_config.yaml")
parsed_config = yaml.load(open_config_parameters, Loader=yaml.FullLoader)
cores = parsed_config['db-cores']

#Get output dir from other config
open_config_parameters = open("config/user_parameters.yaml")
parsed_config = yaml.load(open_config_parameters, Loader=yaml.FullLoader)
self.output_file_path = parsed_config['Parameters']['output_dir']
Expand All @@ -337,8 +333,7 @@ def run_snakemake_api(self):
nodes = cores,
keepgoing = True,
conda_frontend='mamba',
cluster =f"bsub -q {self.queue} -n {{threads}} -o {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.out -e {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.err -M {{resources.mem_mb}}M"
#drmaa_log_dir = f"{self.output_file_path}/log/drmaa"
cluster =f"bsub -q {self.queue} -W 60 -n {{threads}} -o {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.out -e {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.err -M {{resources.mem_mb}}M"
)

elif self.dict_arguments["dryrun"] is True:
Expand All @@ -352,8 +347,7 @@ def run_snakemake_api(self):
nodes = cores,
keepgoing = True,
conda_frontend='mamba',
cluster =f"bsub -q {self.queue} -n {{threads}} -o {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.out -e {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.err -M {{resources.mem_mb}}M"
#drmaa_log_dir = f"{self.output_file_path}/log/drmaa"
cluster =f"bsub -q {self.queue} -W 60 -n {{threads}} -o {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.out -e {self.output_file_path}/log/cluster/{{name}}_{{wildcards}}_{{jobid}}.err -M {{resources.mem_mb}}M"
)

def main():
Expand Down

0 comments on commit 31498ab

Please sign in to comment.