Commit 366e57ad authored by kulvait's avatar kulvait

Utils to process easily the python scripts for the pipeline

parent 21f0b01f
#Utils to easily process files in the pipeline
import os
#Reads params file and possibly updates the dictionary params with its contents
def readParamsFile(f, params = None):
if params is None:
params={}
try:
with open(f) as p:
for l in p:
l = l.strip()
if not l.startswith("#") and "=" in l:
name, var = l.partition("=")[::2]
params[name.strip()] = var.strip()
return(params)
except IOError:
print("Could not read params file %s"%f)
return(params)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment