Install bash_kernel for jupyter

https://github.com/eco32i/bash_kernel

Follow the instructions in the repo. Don't forget to activate your environment before installing.

This fork will produce incremental output when run inside jupyter notebook. The original kernel waits until the cell execution is done and then outputs all at once.

Download and install the latest release of kallisto

For Mac OS:


In [ ]:
wget https://github.com/pachterlab/kallisto/releases/download/v0.43.0/kallisto_mac-v0.43.0.tar.gz

For linux:


In [1]:
wget https://github.com/pachterlab/kallisto/releases/download/v0.43.0/kallisto_linux-v0.43.0.tar.gz


--2016-08-18 13:15:12--  https://github.com/pachterlab/kallisto/releases/download/v0.43.0/kallisto_linux-v0.43.0.tar.gz
Resolving github.com (github.com)... 192.30.253.113
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/26562905/51636bb2-29d5-11e6-8ef1-fb93c87aabd5.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160818%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160818T171512Z&X-Amz-Expires=300&X-Amz-Signature=e2530c2d687720e9ad19dd2ff68d5fa0097a9f997a855bd1f4761b5e0d6c4aef&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dkallisto_linux-v0.43.0.tar.gz&response-content-type=application%2Foctet-stream [following]
--2016-08-18 13:15:12--  https://github-cloud.s3.amazonaws.com/releases/26562905/51636bb2-29d5-11e6-8ef1-fb93c87aabd5.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20160818%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20160818T171512Z&X-Amz-Expires=300&X-Amz-Signature=e2530c2d687720e9ad19dd2ff68d5fa0097a9f997a855bd1f4761b5e0d6c4aef&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dkallisto_linux-v0.43.0.tar.gz&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 52.216.65.8
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|52.216.65.8|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10986965 (10M) [application/octet-stream]
Saving to: ‘kallisto_linux-v0.43.0.tar.gz’

kallisto_linux-v0.4 100%[===================>]  10.48M  2.60MB/s    in 4.2s    

2016-08-18 13:15:17 (2.51 MB/s) - ‘kallisto_linux-v0.43.0.tar.gz’ saved [10986965/10986965]

Put kallisto somewhere on your $PATH


In [2]:
%%bash

mv kallisto_linux-v0.43.0.tar.gz ~/bin
cd ~/bin
tar -xzvf kallisto_linux-v0.43.0.tar.gz


bash: fg: %%bash: no such job
kallisto_linux-v0.43.0/
kallisto_linux-v0.43.0/license.txt
kallisto_linux-v0.43.0/kallisto
kallisto_linux-v0.43.0/test/
kallisto_linux-v0.43.0/test/ind
kallisto_linux-v0.43.0/test/reads_2.fastq.gz
kallisto_linux-v0.43.0/test/transcripts.fasta.gz
kallisto_linux-v0.43.0/test/out/
kallisto_linux-v0.43.0/test/out/abundance.h5
kallisto_linux-v0.43.0/test/out/run_info.json
kallisto_linux-v0.43.0/test/out/abundance.tsv
kallisto_linux-v0.43.0/test/README.md
kallisto_linux-v0.43.0/test/kallisto_bin_Debug_0.42.4
kallisto_linux-v0.43.0/test/Snakefile
kallisto_linux-v0.43.0/test/reads_1.fastq.gz
kallisto_linux-v0.43.0/README.md

Download C.elegans transcriptome reference


In [2]:
wget -P ../data http://bio.math.berkeley.edu/kallisto/transcriptomes/Caenorhabditis_elegans.WBcel235.rel79.cdna.all.fa.gz


--2016-08-24 14:51:44--  http://bio.math.berkeley.edu/kallisto/transcriptomes/Caenorhabditis_elegans.WBcel235.rel79.cdna.all.fa.gz
Resolving bio.math.berkeley.edu (bio.math.berkeley.edu)... 128.32.213.142
Connecting to bio.math.berkeley.edu (bio.math.berkeley.edu)|128.32.213.142|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11989469 (11M) [application/x-gzip]
Saving to: ‘../data/Caenorhabditis_elegans.WBcel235.rel79.cdna.all.fa.gz’

Caenorhabditis_eleg 100%[===================>]  11.43M   282KB/s    in 32s     

2016-08-24 14:52:16 (371 KB/s) - ‘../data/Caenorhabditis_elegans.WBcel235.rel79.cdna.all.fa.gz’ saved [11989469/11989469]

Download and install the latest release of sleuth

Install R kernel for jupyter

You'll need to install R first if it's not installed on your system. The easiest way is to use conda.

Then follow the instructions on sleuth github repo to complete the installation.

Download data


In [1]:
#dirs="lo05 lo09 lo03 lo11"
dirs="lo11"

for d in $dirs
do
    mkdir ../data/$d
    wget -P ../data/$d http://lab.nudlerlab.info/data/$d/R1.fastq.gz
    wget -P ../data/$d http://lab.nudlerlab.info/data/$d/R2.fastq.gz
    #mv $d ../data
done


--2016-08-24 14:13:57--  http://lab.nudlerlab.info/data/lo11/R1.fastq.gz
Resolving lab.nudlerlab.info (lab.nudlerlab.info)... 66.172.33.26
Connecting to lab.nudlerlab.info (lab.nudlerlab.info)|66.172.33.26|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 471828058 (450M) [application/octet-stream]
Saving to: ‘../data/lo11/R1.fastq.gz’

R1.fastq.gz         100%[===================>] 449.97M   866KB/s    in 6m 58s  

2016-08-24 14:20:55 (1.08 MB/s) - ‘../data/lo11/R1.fastq.gz’ saved [471828058/471828058]

--2016-08-24 14:20:55--  http://lab.nudlerlab.info/data/lo11/R2.fastq.gz
Resolving lab.nudlerlab.info (lab.nudlerlab.info)... 66.172.33.26
Connecting to lab.nudlerlab.info (lab.nudlerlab.info)|66.172.33.26|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 483476391 (461M) [application/octet-stream]
Saving to: ‘../data/lo11/R2.fastq.gz’

R2.fastq.gz         100%[===================>] 461.08M  2.22MB/s    in 4m 10s  

2016-08-24 14:25:05 (1.84 MB/s) - ‘../data/lo11/R2.fastq.gz’ saved [483476391/483476391]


In [3]:
ls ../data | grep ^lo


lo03
lo05
lo09
lo11

In [4]:
ls -lah ../data


total 17M
drwxrwxr-x 8 ilya ilya 4.0K Aug 24 15:10 .
drwxrwxr-x 5 ilya ilya 4.0K Jul 16 11:19 ..
-rw-rw-r-- 1 ilya ilya 779K Aug  2 14:44 ACAGTG.UTR_heatmap.txt.gz
-rw-rw-r-- 1 ilya ilya 765K Aug  2 14:44 ATCACG.UTR_heatmap.txt.gz
-rw-rw-r-- 1 ilya ilya  12M May  2  2015 Caenorhabditis_elegans.WBcel235.rel79.cdna.all.fa.gz
-rw-rw-r-- 1 ilya ilya 1.1M Aug  2 14:44 CGATGT.UTR_heatmap.txt.gz
-rw-rw-r-- 1 ilya ilya 500K Jul 16 11:19 contigs.fasta
-rw-rw-r-- 1 ilya ilya 603K Jul 16 11:19 dfm.csv
-rw-rw-r-- 1 ilya ilya  644 Jul 16 11:19 dHSR1.fa
drwxrwxr-x 2 ilya ilya 4.0K Aug 18 13:25 dirs
-rw-rw-r-- 1 ilya ilya 1.2M Aug  2 14:44 GCCAAT.UTR_heatmap.txt.gz
-rw-rw-r-- 1 ilya ilya 5.4K Jul 16 11:19 gradtimes.txt
-rw-rw-r-- 1 ilya ilya  445 Jul 16 11:19 hHSR-435.fa
-rw-rw-r-- 1 ilya ilya  611 Jul 16 11:19 hHSR.fa
drwxrwxr-x 6 ilya ilya 4.0K Aug 24 15:10 kallisto
drwxrwxr-x 2 ilya ilya 4.0K Aug 18 14:19 lo03
drwxrwxr-x 2 ilya ilya 4.0K Aug 18 13:34 lo05
drwxrwxr-x 2 ilya ilya 4.0K Aug 18 13:47 lo09
drwxrwxr-x 2 ilya ilya 4.0K Aug 24 14:20 lo11
-rw-rw-r-- 1 ilya ilya 4.0K Jul 16 11:19 ROSE1_25.txt
-rw-rw-r-- 1 ilya ilya 4.2K Jul 16 11:19 ROSE1_26.txt
-rw-rw-r-- 1 ilya ilya 4.3K Jul 16 11:19 ROSE1_27.txt
-rw-rw-r-- 1 ilya ilya 4.4K Jul 16 11:19 ROSE1_28.txt
-rw-rw-r-- 1 ilya ilya 4.5K Jul 16 11:19 ROSE1_29.txt
-rw-rw-r-- 1 ilya ilya 4.7K Jul 16 11:19 ROSE1_30.txt
-rw-rw-r-- 1 ilya ilya 5.0K Jul 16 11:19 ROSE1_31.txt
-rw-rw-r-- 1 ilya ilya 5.2K Jul 16 11:19 ROSE1_32.txt
-rw-rw-r-- 1 ilya ilya 5.7K Jul 16 11:19 ROSE1_33.txt
-rw-rw-r-- 1 ilya ilya 6.0K Jul 16 11:19 ROSE1_34.txt
-rw-rw-r-- 1 ilya ilya 6.5K Jul 16 11:19 ROSE1_35.txt
-rw-rw-r-- 1 ilya ilya 6.7K Jul 16 11:19 ROSE1_36.txt
-rw-rw-r-- 1 ilya ilya 7.1K Jul 16 11:19 ROSE1_37.txt
-rw-rw-r-- 1 ilya ilya 7.8K Jul 16 11:19 ROSE1_38.txt
-rw-rw-r-- 1 ilya ilya 8.1K Jul 16 11:19 ROSE1_39.txt
-rw-rw-r-- 1 ilya ilya 8.2K Jul 16 11:19 ROSE1_40.txt
-rw-rw-r-- 1 ilya ilya 8.6K Jul 16 11:19 ROSE1_41.txt
-rw-rw-r-- 1 ilya ilya 8.8K Jul 16 11:19 ROSE1_42.txt
-rw-rw-r-- 1 ilya ilya 9.3K Jul 16 11:19 ROSE1_43.txt
-rw-rw-r-- 1 ilya ilya  10K Jul 16 11:19 ROSE1_44.txt
-rw-rw-r-- 1 ilya ilya  11K Jul 16 11:19 ROSE1_45.txt
-rw-rw-r-- 1 ilya ilya  11K Jul 16 11:19 ROSE1_46.txt
-rw-rw-r-- 1 ilya ilya  12K Jul 16 11:52 ROSE1_dp.ps
-rw-rw-r-- 1 ilya ilya  126 Jul 16 11:19 rose.fa

In [ ]: