RGI auto_load not working properly system wide
raphenya opened this issue · 2 comments
raphenya commented
Command used: rgi auto_load --debug --clean
Log:
INFO 2022-10-17 13:16:49,025 : {
"local_database": false,
"clean": true,
"debug": true
}
INFO 2022-10-17 13:16:49,026 : card cannonical version: 3.2.5
INFO 2022-10-17 13:16:49,026 : card variants version: 4.0.0
Redirecting output to ‘wget-log’.
Redirecting output to ‘wget-log.1’.
INtar: Error opening archive: Failed to open '/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/variants'
gunzip: can't stat: /Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_variants/*.gz (/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_variants/*.gz.gz): No such file or directory
Traceback (most recent call last):
File "/Users/amos/miniconda3/envs/rgi600/bin/rgi", line 4, in <module>
MainBase()
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 83, in __init__
getattr(self, args.command)()
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 223, in card_annotation
self.card_annotation_run(args)
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 230, in card_annotation_run
app.card_annotation.main(args)
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/card_annotation.py", line 14, in main
with open(os.path.join(args.input), 'r') as jfile:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_data/card.json'
Traceback (most recent call last):
File "/Users/amos/miniconda3/envs/rgi600/bin/rgi", line 4, in <module>
MainBase()
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 83, in __init__
getattr(self, args.command)()
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 235, in wildcard_annotation
self.wildcard_annotation_run(args)
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 242, in wildcard_annotation_run
app.wildcard_annotation.main(args)
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/wildcard_annotation.py", line 32, in main
prev_models = get_model(args.input_directory)
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/wildcard_annotation.py", line 48, in get_model
raise e
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/wildcard_annotation.py", line 42, in get_model
with open(os.path.join(input_directory, "index-for-model-sequences.txt"), 'r') as ifile:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_variants/index-for-model-sequences.txt'
INFO 2022-10-17 13:24:04,388 : Remove: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/index-for-model-sequences.txt
INFO 2022-10-17 13:24:04,389 : Remove: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/card_wildcard_reference_all.fasta
INFO 2022-10-17 13:24:04,390 : Remove: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/card_wildcard_reference.fasta
INFO 2022-10-17 13:24:04,415 : Remove: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/61mer_database.json
INFO 2022-10-17 13:24:04,455 : Remove: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/card_reference.fasta
INFO 2022-10-17 13:24:04,455 : Remove: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/amr_61mer.txt
INFO 2022-10-17 13:24:04,582 : Remove: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/card_reference_all.fasta
INFO 2022-10-17 13:24:04,583 : Cleaned directory: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/
INFO 2022-10-17 13:24:04,583 : Cleaned directory: /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_db/
INFO 2022-10-17 13:24:06,248 : file /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data/loaded_databases.json exists load
INFO 2022-10-17 13:24:06,248 : {
"card_json": "/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_data/card.json",
"card_annotation": "card_database_v3.2.5.fasta",
"card_annotation_all_models": "card_database_v3.2.5_all.fasta",
"wildcard_annotation": "wildcard_database_v4.0.0.fasta",
"wildcard_annotation_all_models": "wildcard_database_v4.0.0_all.fasta",
"wildcard_index": "/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_variants/index-for-model-sequences.txt",
"wildcard_version": "4.0.0",
"baits_annotation": null,
"baits_index": null,
"kmer_database": "/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_variants/61_kmer_db.json",
"amr_kmers": "/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_variants/all_amr_61mers.txt",
"kmer_size": "61",
"local_database": false,
"debug": true
}
Traceback (most recent call last):
File "/Users/amos/miniconda3/envs/rgi600/bin/rgi", line 4, in <module>
MainBase()
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 83, in __init__
getattr(self, args.command)()
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 154, in load
self.load_run(args)
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/MainBase.py", line 161, in load_run
app.load.main(args)
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/load.py", line 113, in main
if validate_file(args.card_json) == False:
File "/Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/load.py", line 59, in validate_file
with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_data/card.json'
card_canonical: 3.2.5 | card_canonical_model_type_used: homolog;variant;rRNA;overexpression;knockout | card_variants: 4.0.0 | card_variants_model_type_used: homolog;variant;rRNA;overexpression;knockout | kmer_sizes: 61
rm: /Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/data: No such file or directory
rm: /Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/variants: No such file or directory
rm: /Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_data/*: No such file or directory
rm: /Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_variants/*: No such file or directory
rm: /Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4/card_data: No such file or directory
rm: card_database_v3.2.5.fasta: No such file or directory
rm: card_database_v3.2.5_all.fasta: No such file or directory
rm: wildcard_database_v4.0.0.fasta: No such file or directory
rm: wildcard_database_v4.0.0_all.fasta: No such file or directory
Directory '/Users/amos/Desktop/test_rgi600/rgi_autoload_sl6a65l4' created
=================================== DOWNLOAD CARD CANONICAL DATA ===================================
=================================== DOWNLOAD CARD VARIANTS DATA ===================================
=================================== CARD CANONICAL ANNOTATIONS ===================================
=================================== CARD VARIANTS ANNOTATIONS ===================================
=================================== CLEAN OLD DATABASES ===================================
=================================== LOAD DATABASES ===================================
=================================== CHECK LOADED DATABASES ===================================
=================================== CLEAN UP ===================================
=================================== DONE ===================================
Results
Data directory (system wide):
ls /Users/amos/miniconda3/envs/rgi600/lib/python3.7/site-packages/app/_data
__init__.py __pycache__ card.json loaded_databases.json
Data directory (local):
ls localDB
16s_rRNA.txt amr_61mer.txt card_reference_all.fasta index-for-model-sequences.txt protein.db.phr proteindb.fsa
23s_rRNA.txt card.json card_wildcard_reference.fasta loaded_databases.json protein.db.pin rnadb.fsa
61mer_database.json card_reference.fasta card_wildcard_reference_all.fasta protein.db.dmnd protein.db.psq
These should contain same files after rgi auto_load
raphenya commented
Tested the rgi auto_load
using rgi version 6.0.3 (mamba version 1.4.2, conda version 23.3.1, Ubuntu 18.04.6) and it works fine.
raphenya commented
Also, tested on MacOS with no issues both running python version 3.8.