Answers.Body: <p>Firstly, you are trying to set a path into the Documents directory? Thats like for documents.</p>
  <hr />
  <p>Anyway there could be a permission issue. The quickest way is simply set a path within .bashrc or .profile whatever into ~/bin
  and then use</p>
  <pre><code>ln -si /Users/ray/Documents/School/bioinformatics/sratoolkit.2.11.2-mac64/bin/prefetch ~/bin
  </code></pre>
  <p>... for each compiled program.</p>
  <pre><code>$ prefetch 
  </code></pre>
  <p>should then work.
  This creates a symbolic link in <code>~/bin</code> so when you type the program in your commandline prompt it will fire, without wiring it via a custom bin. If there is a permission issue a permission error will be quickly flagged.</p>
  <hr />
  <p>The best way is to use Anaconda because its within the <a href="https://anaconda.org/bioconda/sra-tools" rel="nofollow noreferrer">Anaconda collection</a> and simplifies everything on three counts, viz:</p>
  <ul>
  <li>in answer to your question all configurations are automated</li>
  <li>it is easy to automate all updates</li>
  <li>it offers a virtual environment where code can't mess with your system</li>
  <li>whenever you want to download other packages its the same approach</li>
  </ul>
  <p>Thus all you have to do is download and install <a href="https://www.anaconda.com/products/individual" rel="nofollow noreferrer">Anaconda</a> or <a href="https://docs.conda.io/en/latest/miniconda.html" rel="nofollow noreferrer">miniconda</a>. From this point everything is done using conda, either:</p>
  <pre><code>conda install -c bioconda sra-tools
  conda install -c bioconda/label/cf201901 sra-tools
  </code></pre>
  <p>If one fails the other one will work. Then simply,</p>
  <pre><code>conda activate 
  </code></pre>
  <p>SRA is now fully configured and ready to go. To get out of the conda virtual environment,</p>
  <pre><code>conda deactivate 
  </code></pre>
  <p>If you use Anaconda alot it is better to make a specific environment for SRA and not use the core environment, but thats another question.</p>
  <p>Anaconda installs in two different locations depending on whether you install the GUI version, which makes maintenance and environments a bit easier. In the later case I think its <code>/opt</code> (but forget), otherwise the commandline version is <code>~/anadonda3</code>.</p>
  <hr />
  <p>I see your using a virtual environment via <code>homebrew</code>. Anaconda is separate, its the same idea, but its better.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-22T11:41:22.220Z
Answers.Text: Fixed it by installing anaconda. It does look like sra-toolkit is not compiled for Apple Silicon yet so Apple x86_64 miniconda is the only architecture that sra-toolkit will work with on MacOS.
Answers.UserDisplayName: mangoTango
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-22T16:58:39.230Z
Answers.Text: Ah right, the M1 chip compatibiility issue. Good to hear that Anaconda has got around the issue.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-20T00:35:52.723Z
Answers.LastActivityDate: 2022-01-20T01:05:54.527Z
Answers.LastEditDate: 2022-01-20T01:05:54.527Z
Answers.UserDisplayName: M__
Body: <p>I would like to add the SRA toolkit to my path under macOS 12.1.</p>
  <p>After downloading the SRA directory, decompressing, and adding to the path, the directory does not seem to be available e.g. I'm attempting to add it to my path with</p>
  <pre><code>export path=(/Users/ray/Documents/School/bioinformatics/sratoolkit.2.11.2-mac64/bin)
  </code></pre>
  <p>and it does not work. For example if I type</p>
  <pre><code> `ray@dynamic-xx-xxx-xxx-xx ~ % which prefetch
  </code></pre>
  <p>prefetch not found` macOS gives me prefetch not found.  The result of my path is</p>
  <pre><code>`ray@dynamic-10-125-206-18 ~ % echo $PATH
  /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin` 
  </code></pre>
  <p>Is there a way to add it to my path so it works?</p>
  
Tags: <sratoolkit>
Title: How do I set my path for the SRA toolkit under macOS 12.1?
ThreadText: # How do I set my path for the SRA toolkit under macOS 12.1?
  
  (Asked by: username_0 on 2022-01-19)
  
  I would like to add the SRA toolkit to my path under macOS 12.1.
  
  After downloading the SRA directory, decompressing, and adding to the path, the directory does not seem to be available e.g. I'm attempting to add it to my path with
  
  ```
  export path=(/Users/ray/Documents/School/bioinformatics/sratoolkit.2.11.2-mac64/bin)
  
  ```
  
  and it does not work. For example if I type
  
  ```
   `ray@dynamic-xx-xxx-xxx-xx ~ % which prefetch
  
  ```
  
  prefetch not found` macOS gives me prefetch not found. The result of my path is
  
  ```
  `ray@dynamic-10-125-206-18 ~ % echo $PATH
  /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin` 
  
  ```
  
  Is there a way to add it to my path so it works?
  
  **Tags:** sratoolkit
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-01-20. Score: 0 | Accepted answer
  
  Firstly, you are trying to set a path into the Documents directory? Thats like for documents.
  
  ---
  
  Anyway there could be a permission issue. The quickest way is simply set a path within .bashrc or .profile whatever into ~/bin
  and then use
  
  ```
  ln -si /Users/ray/Documents/School/bioinformatics/sratoolkit.2.11.2-mac64/bin/prefetch ~/bin
  
  ```
  
  ... for each compiled program.
  
  ```
  $ prefetch 
  
  ```
  
  should then work.
  This creates a symbolic link in `~/bin` so when you type the program in your commandline prompt it will fire, without wiring it via a custom bin. If there is a permission issue a permission error will be quickly flagged.
  
  ---
  
  The best way is to use Anaconda because its within the [Anaconda collection](https://anaconda.org/bioconda/sra-tools) and simplifies everything on three counts, viz:
  
  * in answer to your question all configurations are automated
  * it is easy to automate all updates
  * it offers a virtual environment where code can't mess with your system
  * whenever you want to download other packages its the same approach
  
  Thus all you have to do is download and install [Anaconda](https://www.anaconda.com/products/individual) or [miniconda](https://docs.conda.io/en/latest/miniconda.html). From this point everything is done using conda, either:
  
  ```
  conda install -c bioconda sra-tools
  conda install -c bioconda/label/cf201901 sra-tools
  
  ```
  
  If one fails the other one will work. Then simply,
  
  ```
  conda activate 
  
  ```
  
  SRA is now fully configured and ready to go. To get out of the conda virtual environment,
  
  ```
  conda deactivate 
  
  ```
  
  If you use Anaconda alot it is better to make a specific environment for SRA and not use the core environment, but thats another question.
  
  Anaconda installs in two different locations depending on whether you install the GUI version, which makes maintenance and environments a bit easier. In the later case I think its `/opt` (but forget), otherwise the commandline version is `~/anadonda3`.
  
  ---
  
  I see your using a virtual environment via `homebrew`. Anaconda is separate, its the same idea, but its better.
  
  > **Comments:**
  > **username_0**: Fixed it by installing anaconda. It does look like sra-toolkit is not compiled for Apple Silicon yet so Apple x86_64 miniconda is the only architecture that sra-toolkit will work with on MacOS.  
  > **username_1**: Ah right, the M1 chip compatibiility issue. Good to hear that Anaconda has got around the issue.  
  
  ---
  
  