You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: unix/running.md
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,3 +88,77 @@ cd ncbi-blast-2.6.0+
88
88
you should have a `bin` directory, go inside and look at the files. You have a bunch of executable files.
89
89
90
90
### Execute a file
91
+
92
+
93
+
Most of the lunix commands that you execute on a regular basis (ls, cp, mkdir) are located in `/usr/bin`, but you don't have to invoke them with their full path: i.e. you dont type `/usr/bin/ls` but just `ls`. This is because `/usr/bin/ls` is in your $PATH.
94
+
95
+
to execute a file that you just downloaded, and is therefore not in your path, you have to type the absolute or relative path to that file. Meaning, for the blast program suite that we just downloaded:
96
+
97
+
`bin/blastn -help`
98
+
99
+
or
100
+
101
+
```
102
+
cd bin
103
+
./blastn -help
104
+
```
105
+
106
+
and that's it!
107
+
But it is not very convenient. You want to be able to execute blast without having to remember where it is. If you have administrator rights (sudo), you can move the software in `/usr/bin`. If you don't you can modify your $PATH in a configuration file called `.bash_profile` that is located in your home.
108
+
109
+
More information on how to correctly modify your PATH [here](http://unix.stackexchange.com/a/26059)
110
+
111
+
## Compiling from source
112
+
113
+
Sometimes pre-compiled binaries are not available. You then have to compile from source: transforming the human-readable code (written in one or another programming language) into machine-readable code (binary)
114
+
115
+
The most common way to do so, if a software package has its source coud available online is
116
+
117
+
```
118
+
./configure
119
+
make
120
+
make install
121
+
```
122
+
123
+
If you don't have the administrator rights, you'll often have to pass an extra argument to ./configure:
124
+
125
+
```
126
+
./configure --prefix="/where_i_want_to_install"
127
+
make
128
+
make install
129
+
```
130
+
131
+
Most of the softwares come with instructions on how to install them. Always read the file called README or INSTALL in the package directory before installing!
132
+
133
+
### Exercice
134
+
135
+
The most popular unix distributions come with a version of python (a programming language) that is not the most recent one. Install from source the most recent version of python in a folder called `bin` in your home directory.
136
+
137
+
You can download the python source code at https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
138
+
139
+
## Install python packages
140
+
141
+
Python is a really popular programming language in the world of bioinformatics. Python has a package manager called `pip` that you can use to install softwares written in python.
142
+
143
+
Please us the python executable you installed in the above exercise!
144
+
145
+
Firstly, get pip:
146
+
147
+
`wget https://bootstrap.pypa.io/get-pip.py`
148
+
149
+
then execute the script
150
+
151
+
`python get-pip.py`
152
+
153
+
Thenm you can use pip to install package, either globally (if you're an administrator):
154
+
155
+
`pip install youtube_dl`
156
+
157
+
or just for you:
158
+
159
+
`pip install --user youtube_dl`
160
+
161
+
## Final exercise
162
+
163
+
One of the oldest and most famous bioinformatics package is called EMBOSS.
164
+
Install EMBOSS in the bin directory of your home. Good luck!
0 commit comments