0

I am trying to repeat the "Indexing a reference genome" step of this tutorial.

However, when I run the command

../bowtie2-master/bowtie2-build ./bowtie2-master/example/reference/lambda_virus.fa lambda_virus

This error happens:

  File "../bowtie2-master/bowtie2-build", line 90, in <module>
    main()
  File "../bowtie2-master/bowtie2-build", line 87, in main
    sys.exit(subprocess.call(list(argv)))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Output of pwd:

/Users/ltelles/Desktop/documents_desktop/bioinformatics/bowtie2_example_project

What is going on and how can I fix it? Thank's!

Peter - Reinstate Monica
  • 15,048
  • 4
  • 37
  • 62
Luís Telles
  • 694
  • 3
  • 13
  • What happens if you use the exact path instead of a relative one? – Saites Feb 06 '20 at 18:37
  • Just tried it here. Same thing. – Luís Telles Feb 06 '20 at 19:10
  • Did you configure your PATH with `bowtie2`, `bowtie2-build`, and `bowtie2-inspect` and then restart the shell? `bowtie2-build` is a wrapper script that's starting a new process, so the executables need to be on the path in a way that they can be found without considering the current directory. See [here](https://stackoverflow.com/questions/13786797/python-subprocess-call-no-such-file-or-directory) and [here](https://stackoverflow.com/questions/51426618/subprocess-py-no-such-file-or-directory) for similar examples. – Saites Feb 06 '20 at 20:15
  • I tried configuring the PATH and also adding a variable $BT2_HOME as suggested by the tutorial. Both ways didn't work and I receive the following message: ```zsh: no such file or directory: /User/ltelles/Desktop/documents_desktop/bioinformatics/bowtie2-master/bowtie2-build``` but the file ```bowtie2-build``` is there indeed, I checked. Perhaps it is somewhat related to the huge amount of warnings I got when tying to run ```make``` in the bowtie2 folder. – Luís Telles Feb 06 '20 at 22:56
  • 1
    I now believe the problem was being caused because I downloaded bowtie's archives to my Desktop and the Desktop folder was being synced with iCloud. Each time iCloud synced it was taking my archives and deleting them from my computer. – Luís Telles Feb 08 '20 at 16:02

0 Answers0