bcgsc / mavis

Merging, Annotation, Validation, and Illustration of Structural variants
http://mavis.bcgsc.ca
GNU General Public License v3.0
74 stars 14 forks source link

Optional parameters are required #310

Closed zhemingfan closed 2 years ago

zhemingfan commented 2 years ago

Currently, values like template_metadata is a required file as seen in https://github.com/bcgsc/mavis/blob/develop_v3/src/mavis/annotate/file_io.py#L348 and https://github.com/bcgsc/mavis/blob/develop_v3/src/mavis/annotate/main.py#L66

However, we want this to be an optional input, if possible.

  File "/projects/.../bin/mavis", line 33, in <module>
    sys.exit(load_entry_point('mavis', 'console_scripts', 'mavis')())
  File "/projects/.../MAVIS/mavis/src/mavis/main.py", line 301, in main
    raise err
  File "/projects/.../MAVIS/mavis/src/mavis/main.py", line 246, in main
    annotate_main.main(
  File "/projects/.../MAVIS/mavis/src/mavis/annotate/main.py", line 126, in main
    template_metadata = ReferenceFile.load_from_config(config, 'template_metadata', eager_load=True)
  File "/projects/.../MAVIS/mavis/src/mavis/annotate/file_io.py", line 431, in load_from_config
    return ReferenceFile(file_type, *config[f'reference.{file_type}'], **kwargs)