phac-nml / mob-suite

MOB-suite: Software tools for clustering, reconstruction and typing of plasmids from draft assemblies
Apache License 2.0
111 stars 31 forks source link

runerror #140

Closed 17863952296 closed 1 year ago

17863952296 commented 1 year ago

when I run the command: mob_recon -n 8 --infile mob_suite/filtered_1000.fasta --outdir mob_suite/ --force the results is following : 2023-06-15 11:01:47,173 mob_suite.mob_recon INFO: MOB-recon version 3.0.3 [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/mob_recon.py:983] 2023-06-15 11:01:47,175 mob_suite.mob_recon INFO: SUCCESS: Found program blastn at /usr/bin/blastn [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/utils.py:590] 2023-06-15 11:01:47,176 mob_suite.mob_recon INFO: SUCCESS: Found program makeblastdb at /usr/bin/makeblastdb [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/utils.py:590] 2023-06-15 11:01:47,177 mob_suite.mob_recon INFO: SUCCESS: Found program tblastn at /usr/bin/tblastn [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/utils.py:590] 2023-06-15 11:01:47,178 mob_suite.mob_recon INFO: Processing fasta file mob_suite/filtered_1000.fasta [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/mob_recon.py:1004] 2023-06-15 11:01:47,178 mob_suite.mob_recon INFO: Analysis directory mob_suite/ [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/mob_recon.py:1005] 2023-06-15 11:01:47,290 root INFO: Creating Lock file /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/databases/ETE3_DB.lock [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/utils.py:450] 2023-06-15 11:01:47,290 root INFO: Testing ETE3 taxonomy db /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/databases/taxa.sqlite [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/utils.py:459] 2023-06-15 11:01:47,292 root INFO: Lock file removed. [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/utils.py:466] 2023-06-15 11:01:57,447 mob_suite.mob_recon INFO: Writing cleaned header input fasta file from mob_suite/filtered_1000.fasta to mob_suite/__tmp/fixed.input.fasta [in /usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/mob_recon.py:1105] Traceback (most recent call last): File "/usr/local/bin/mob_recon", line 33, in sys.exit(load_entry_point('mob-suite==3.0.3', 'console_scripts', 'mob_recon')()) File "/usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/mob_recon.py", line 1106, in main fix_fasta_header(input_fasta, fixed_fasta) File "/usr/local/lib/python3.9/dist-packages/mob_suite-3.0.3-py3.9.egg/mob_suite/utils.py", line 816, in fix_fasta_header with open(in_fasta, "r") as handle: FileNotFoundError: [Errno 2] No such file or directory: 'mob_suite/filtered_1000.fasta

jrober84 commented 1 year ago

Your issue is that you are reading and writing to the same file and in the process your file was clobbered. change your --outdir mob_suite/results and this won't be an issue