phac-nml / irida-plugin-amr-detection

IRIDA Plugin for AMR Detection
Apache License 2.0
3 stars 3 forks source link

RGI must only use local database #15

Open innovate-invent opened 3 years ago

innovate-invent commented 3 years ago

If the --local flag is not set it will try to write to the rgi package folder, this is incompatible with most deployments.

Please specify a locally installed database in the tools config. This will require a database to be loaded using the RGI Galaxy Data Manager with a predetermined database name.

https://github.com/phac-nml/irida-plugin-amr-detection/blob/a69ae8be45e4a895f79dd6bfaf84c3fe155d28e4/src/main/resources/workflows/0.2.0/irida_workflow_structure.ga#L296

Traceback (most recent call last):
  File "/usr/local/bin/rgi", line 4, in <module>
    MainBase()
  File "/usr/local/lib/python3.6/site-packages/app/MainBase.py", line 81, in __init__
    getattr(self, args.command)()
  File "/usr/local/lib/python3.6/site-packages/app/MainBase.py", line 86, in main
    self.main_run(args)
  File "/usr/local/lib/python3.6/site-packages/app/MainBase.py", line 120, in main_run
    rgi_obj.run()
  File "/usr/local/lib/python3.6/site-packages/app/RGI.py", line 197, in run
    self.create_databases()
  File "/usr/local/lib/python3.6/site-packages/app/RGI.py", line 191, in create_databases
    db_obj.build_databases()
  File "/usr/local/lib/python3.6/site-packages/app/Database.py", line 22, in build_databases
    self.write_fasta_from_json()
  File "/usr/local/lib/python3.6/site-packages/app/Database.py", line 68, in write_fasta_from_json
    with open(os.path.join(self.db, "proteindb.fsa"), 'w') as fout:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.6/site-packages/app/_db/proteindb.fsa'

https://github.com/arpcard/rgi/issues/155

innovate-invent commented 3 years ago

Alternatively https://github.com/arpcard/rgi_wrapper/pull/16

But the default functionality really shouldn't be depended on