This PR replaces the parse_yaml.sh function to use python to read and convert yaml variables into shell variables. The original parse_yaml.sh function was very particular about inputted yaml and could not handle yaml lists or comments/ spaces on the same line as a variable. This led to very buggy behavior for some users.
Reading it with python is much more dependable and also allows conversion of lists to bash arrays nicely.
The only complication is that we need to read two variables (CondaFile and CondaEnv) prior to running the new parse_yaml.py function as we need to load the python environment first. I added two shell commands to extract these values in run_imi.sh. These commands extract the variables without grabbing comments or spaces on the same line.
Name and Institution (Required)
Name: Lucas Estrada Institution: Harvard ACMG
Describe the update
This PR replaces the parse_yaml.sh function to use python to read and convert yaml variables into shell variables. The original parse_yaml.sh function was very particular about inputted yaml and could not handle yaml lists or comments/ spaces on the same line as a variable. This led to very buggy behavior for some users.
Reading it with python is much more dependable and also allows conversion of lists to bash arrays nicely.
The only complication is that we need to read two variables (
CondaFile
andCondaEnv
) prior to running the new parse_yaml.py function as we need to load the python environment first. I added two shell commands to extract these values in run_imi.sh. These commands extract the variables without grabbing comments or spaces on the same line.