Closed nick-youngblut closed 2 years ago
FastAAI errors when using a directory path for -o
(e.g., /path/to/output/directory/
), instead of just an output directory name (e.g., fastaai_output
):
$ fastaai aai_index --threads 8 -g genomes -o tmp/test_out
Starting from genomes
FastAAI is formatting your files to be saved to your database.
Error: can't open output file test_out/predicted_proteins/TAS386.temp.
Error: can't open output file test_out/predicted_proteins/TAS122.temp.
Error: can't open output file test_out/predicted_proteins/TAS067.temp.
Error: can't open output file test_out/predicted_proteins/TAS386.temp.
Error: can't open output file test_out/predicted_proteins/TAS122.temp.
Error: can't open output file test_out/predicted_proteins/TAS067.temp.
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 961, in do_advance
input_file_object.preprocess()
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 881, in preprocess
self.genome_to_protein()
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 673, in genome_to_protein
temp_output.unlink()
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/pathlib.py", line 1309, in unlink
self._accessor.unlink(self)
FileNotFoundError: [Errno 2] No such file or directory: 'test_out/predicted_proteins/TAS067.temp'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/bin/fastaai", line 8, in <module>
sys.exit(main())
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 3715, in main
aai_index(genomes, proteins, hmms, db_name, output, threads, gf, pf, hf, verbose, do_stdev, mem, efficient)
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 3316, in aai_index
success = build_db(genomes, proteins, hmms, db_name, output, threads, gf, pf, hf, verbose)
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 1622, in build_db
success = add_inputs(output, final_database, existing_genome_IDs, threads, verbose, prep_args)
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 1305, in add_inputs
inputs = advance_inputs(genomes = genomes, proteins = proteins, hmms = hmms, genomes_file = gf, proteins_file = pf, hmms_file = hf, output = output_path, threads = threads, verbose = verbose, db_name = db_name)
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/site-packages/fastaai/FastAAI.py", line 1102, in advance_inputs
for res in pool.imap(do_advance, inputs):
File "/tmp/global2/nyoungblut/code/dev/ll_pipelines/llg/tmp/fastAAI/fastaai_env/lib/python3.7/multiprocessing/pool.py", line 748, in next
raise value
FileNotFoundError: [Errno 2] No such file or directory: 'test_out/predicted_proteins/TAS067.temp'
FastAAI also cannot create a full directory path:
FastAAI tried to make output directory: 'tmp/test_out' but failed.
Using os.makedirs
would fix this.
I just opened FastAAI for issues and I'm migrating this thread over there.
I don't believe that the FastAAI issues thread will be looping you in automatically, so I'm notifying you here. I have a reply up on that issues thread.
I don't believe that the FastAAI issues thread will be looping you in automatically, so I'm notifying you here. I have a reply up on that issues thread.
If you use @nick-youngblut, then I should get a notification
Since Issues are not available for FastAAI, I'm posting my issue here. I'll switch it over to the appropriate repo when it is possible.
Setup
Conda env setup as in the instructions.
Using prodigal-generated amino acid sequences.
fastAAI run:
Error
The error is due to input file names that include a
-
. For example:Ruminococcus_bromii_strain_AM46-2B.faa