# PATH

In the case you are not working on your own data, SRA tool kit is a set of executable in the Linux Terminal to download (fetch) the sequencing files from [SRA/GEO](https://www.ncbi.nlm.nih.gov/sra), the largest NGS raw data database.  First of all, it is not totally necessary to install this particular tool kit because there are separate packages that perform the exact same tasks.  But in case you opt for this, which I do, you can refer to these links

<https://github.com/ncbi/sra-tools/wiki/02.-Installing-SRA-Toolkit>\
<https://www.ncbi.nlm.nih.gov/sra/docs/sradownload/>

Assigning the PATH to point to the SRA-Toolkit location is the first thing I learnt how to work with Linux.  Humanly speaking, when you type in a program name and try to run it in the terminal, you need to first let the system know where to look for the executable files.  For example, I need to `prefetch` the sequencing raw data named SRA0000001.  The `prefetch` executable is located at /home/user/sratoolkit/bin.  So I need to type in

`prefetch SRA0000001`

But then what you might get is an error message of "what is prefetch?" because the terminal will never search for this `prefetch` guy (the executable) in /home/user/sratoolkit/bin until you told it to do so.  The way to assign this directory in the future search is to do

`export PATH=$PATH:/home/user/sratoolkit/bin`

It looks easy right?  The catch is when you ended this session by restarting the terminal, checking the PATH environment by `echo $PATH`, chances are the `/home/user/sratoolkit/bin` line is gone.

GONE.

I then head to my best friend, Google.

<https://askubuntu.com/questions/1195236/how-to-permanently-change-a-path-variable-in-debian>

There are several text editors in Linux, the one that I liked is nano, but suit yourself with anyone of your liking.  Just open this \~/.bashrc file and add the line `export PATH="/home/user/sratoolkit/bin:$PATH"` ***AT THE END OF THE FILE*** and then ***REOPEN*** your terminal.&#x20;

Don't ask me why at the end of the file, why this file, why reopen, \[del]and why do I bother to live\[/del].  Cause I am more than exhausted by the time I found my solution.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nks.gitbook.io/rna-seq/4.-setting-up-terminal/path.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
