Skip to content
Snippets Groups Projects
Commit b3b55e09 authored by Ticlla Ccenhua Monica Roxana's avatar Ticlla Ccenhua Monica Roxana
Browse files

correct bug when setting connfiguration with --configfile at execution, and...

correct bug when setting connfiguration with --configfile at execution, and allow use of environmental variable PWD in config.yaml
parent 9f608d89
Branches
No related tags found
No related merge requests found
......@@ -50,8 +50,9 @@ else:
## Configuration of MetaSnK
##----------------------------------------------------------------------------##
try:
configfile_path = config['configfile_path']
print("Configuration file: {}".format(configfile_path), file=sys.stderr)
config['RAW_DIR']
#configfile_path = config['configfile_path']
print("Configuration file provided at execution!", file=sys.stderr)
except:
print("Configuration file config.yaml not especified at execution!", file=sys.stderr)
try:
......@@ -66,12 +67,16 @@ except:
configfile_path = workflow_path + "/config.yaml"
configfile: configfile_path
print("... Configuration file: {}".format(configfile_path), file=sys.stderr)
finally:
print("Configuration of MetaSnk:", file=sys.stderr)
my_temp=[print(" {}:{}\n".format(key,value), file=sys.stderr) for key,value in config.items()]
##----------------------------------------------------------------------------##
## Define paths and local variables
##----------------------------------------------------------------------------##
RAW_FASTQ_DIR = config['RAW_DIR']
OUT_DIR = config['OUT_DIR']
PWD = os.environ["PWD"]
RAW_FASTQ_DIR = eval(config['RAW_DIR'])
OUT_DIR = eval(config['OUT_DIR'])
METASNK_DB_DIR = os.environ["METASNK_DBS"]
SHUB_PREQC_SIF = 'shub://mticlla/MetagenomicSnake:preqc_v0_1'
SHUB_METAPROF_SIF = 'shub://mticlla/OmicSingularities:metaprof'
......
......@@ -11,9 +11,9 @@
#
# Absolute PATH to folder where to find fastq files
RAW_DIR: '/home/mticlla/Documents/Git_repositories/metagenomicsnake_testdata/data/raw'
RAW_DIR: "PWD+'/data/raw'"
# Absolute PATH to folder where to place output files
OUT_DIR: '/home/mticlla/Documents/Git_repositories/metagenomicsnake_testdata/data/interim/MetaSnk'
OUT_DIR: "PWD+'/data/interim/MetaSnk'"
#
SAMPLE_UNITS:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment