bowang-lab / BIONIC

Biological Network Integration using Convolutions
MIT License
58 stars 4 forks source link

Network name directory "*" errors out #52

Closed addiewc closed 1 year ago

addiewc commented 1 year ago

For v0.2.5, running over a directory of networks by including "*" leads to an error.

For instance: if the config myconfig.json includes net_names: ["my_network_directory/*"], then running bionic myconfig.json produces the following error: FileNotFoundError: [Errno 2] File my_network_directory/* does not exist: 'my_network_directory/*'

duncster94 commented 1 year ago

Hi, when specifying an asterisk path you should just pass the path itself, not inside a list (i.e. net_names: "my_network_directory/*"). This isn't clear from the documentation so I will update it.

Also I realized there is a bug in the _resolve_asterisk_path method of config_parser.py. It should return [p for p in directory.iterdir() if not p.is_dir()]. If you are using the Poetry version of BIONIC then you can just change this line. I will update the codebase and push a new version with the bug fix so if you're using the wheel version then you can just wait for that.

addiewc commented 1 year ago

Great, thank you! I had tried both versions (with and without the list), but both had issues. Hopefully this fixes it now!

duncster94 commented 1 year ago

54 closes this.