Edinburgh-Genome-Foundry / DnaWeaver

A route planner for DNA assembly
https://dnaweaver.genomefoundry.org
MIT License
29 stars 9 forks source link

File Not Found Error during assembly_report execution #13

Open igemmadrid2021 opened 2 years ago

igemmadrid2021 commented 2 years ago

Hello! I discovered DNA Weaver quite recently and started diving into the documentation to learn how to use it.

The documentation and provided examples are quite useful, however I've found myself trapped into a situation that is not contemplated within the frequently asked questions or other support topics.

I think it could be useful to include this, and other common issues within a "Common Issues" section or similar.

The problem I am finding is the following:

Whenever I try to execute an script from the "tests" or "examples" folder, the script stops indicating the same error:

` File "C:\Users\fmjor\Desktop\DnaWeaver-master\examples\scenarios\example_with_adapters\example_with_adapters.py", line 97, in assembly_report = quote.to_assembly_plan_report()

File "C:\ProgramData\Anaconda3\lib\site-packages\dnaweaver\DnaQuote\ExportsMixin.py", line 163, in to_assembly_plan_report self.compute_fragments_final_locations()

File "C:\ProgramData\Anaconda3\lib\site-packages\dnaweaver\DnaQuote\PostProcessingMixin.py", line 64, in compute_fragments_final_locations results = blast_sequence(

File "C:\ProgramData\Anaconda3\lib\site-packages\dnaweaver\biotools\sequence_homologies.py", line 82, in blast_sequence p = subprocess.Popen(

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 105, in init super(SubprocessPopen, self).init(*args, **kwargs)

File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 854, in init self._execute_child(args, executable, preexec_fn, close_fds,

File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

FileNotFoundError: [WinError 2] The system can not found the specified file`

I guess this message is indicating that the program can not find the required files for BLAST and other operations. But I wonder if it could be possible to fix it.

Thanks i advance!

Zulko commented 2 years ago

Note that while the error says "file not found", it could be the BLAST program itself that is actually not found. Did you install BLAST on your computer and so do you have a blast command accessible from the terminal?

igemmadrid2021 commented 2 years ago

@Zulko Thank you for your quick answer!

Yes, I had ncbi blast+ installed and also pyblast3 and biopython. Actually after removing all the installations and re-installing again I manage to fix the issue with the unfound files. However, now it seems that the os.remove line in the sequence alignemtn script (blast_sequence) is having some trouble with that.

`File "C:\ProgramData\Anaconda3\libsite-packages\dnaweaver\biotools[sequence_homologies.py](http://sequence_homologies.py/)", line 121, in blast_sequence os.remove(xml_name)

PermissionError: [WinError 32] The process does not have access to the file because it is being used by another process: 'C:\Users\fmjor\AppData\Local\Temp\tmpcg0sdkys.xml`

I am starting getting used with the inter-talk between python and windows, but I am really looking forward to learn in the process and implement DNAWeaver as well as other scripts from the BioFoundry within my lab workflows.

Thanks in advance for all the help!

EDIT: I have tried to run the same code in Linux and it goes super smooth. It may be an issue with the os module and windows.