Goal: Merge abundance.tsv files from kallisto into TPM and est_counts heatmaps
%cd ../data/
!wget http://histo.ucsf.edu/BMS270/BMS270_2019/data/GSE88801_kallisto.tar.gz
!wget 'http://histo.ucsf.edu/BMS270/BMS270_2019/data/Mucci2.transcriptome.fasta.gz'
!mkdir GSE88801
%cd GSE88801/
!tar -zxvf ../GSE88801_kallisto.tar.gz
%cd ../data/GSE88801/GSM2348248
!ls
!head abundance.tsv
data = open("abundance.tsv").readlines()
len(data)
data[-1]
data[100]
data = []
est_counts = []
tpm = []
from csv import reader, excel_tab
fp = reader(open("abundance.tsv"),dialect=excel_tab)
next(fp)
for i in fp:
data.append(i)
tpm.append(float(i[-1]))
est_counts.append(float(i[-2]))
%matplotlib nbagg
import matplotlib.pyplot as plt
plt.plot(sorted(tpm))