Installing Python on Ubuntu.

Installing Biopython on Ubuntu.

Dealing with vcf and gatk modules to evntually use in a Python pipeline script. The documentation for those are here:

Here are the Linux command lines to setup the Python virtualenv (virtual environment) and install pip (python installation package):

flcellogrl@purplebanyan:~$ sudo apt-get install python-pip python-dev build-essential 
flcellogrl@purplebanyan:~$ sudo pip install --upgrade pip 
flcellogrl@purplebanyan:~$ sudo pip install --upgrade virtualenv 

then, use the virtualenv and pip to setup the virtual environment (bioinformatics) and install the packages you want:

flcellogrl@purplebanyan:~$ virtualenv -p /usr/bin/python3 bioinformatics

flcellogrl@purplebanyan:~$ source bioinformatics/bin/activate

***note how the commandline changes***

(bioinformatics)flcellogrl@purplebanyan:~$ pip install pyvcf 

(bioinformatics)flcellogrl@purplebanyan:~/bioinformatics$ python
(bioinformatics)flcellogrl@purplebanyan:~$ pip install --upgrade bcbio-nextgen

Now you want to setup an IDLE use you can use the bioinformatics virtualenv.

You should be able to just do this:
flcellogrl@purplebanyan:~$ bioinformatics/

First mark it as executable, like this:

chmod u+x bioinformatics/

Now, the Python modules are all installed and ready to be used.

About Lisa Johnson

PhD candidate at UC Davis in Molecular, Cellular, and Integrative Physiology
This entry was posted in Python, Ubuntu, virtualenv. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s