Skip to content

Commit

Permalink
Isolate variant argument parsing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
thalassemia committed Sep 21, 2024
1 parent aadd8f2 commit 4c95167
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions runscripts/create_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,13 @@ def main():
type=str,
help="Path to folder where variant sim_data and metadata are written.",
)
config = SimConfig(parser=parser)
config.update_from_cli()
args = parser.parse_args()
with open(default_config, "r") as f:
config = json.load(f)
if args.config is not None:
with open(os.path.join(args.config), "r") as f:
SimConfig.merge_config_dicts(config, json.load(f))
SimConfig.merge_config_dicts(config, vars(args))

print("Loading sim_data...")
with open(os.path.join(config["kb"], "simData.cPickle"), "rb") as f:
Expand Down

0 comments on commit 4c95167

Please sign in to comment.