To run cells in this notebook, hold down the shift key and hit the Enter key (aka shift-Enter)
ls /mnt
evokerr/ hljordt/ mherrmannsfeldt/ titus/ foenpeng/ lnj204/ qchrist2/ titus2/ haoran/ lost+found/ SRR390202_1.fastq.gz
cd /mnt/titus
/mnt/titus
ls
ecoli.x.salm NC_000913.faa.pnd NC_021814.faa.pin reads.fa filtered.csv NC_000913.faa.pni NC_021814.faa.pnd reads.hist formatdb.log NC_000913.faa.psd NC_021814.faa.pni salm.x.ecoli metagenome.fa NC_000913.faa.psi NC_021814.faa.psd salm.x.ecoli.csv NC_000913.faa NC_000913.faa.psq NC_021814.faa.psi NC_000913.faa.phr NC_021814.faa NC_021814.faa.psq NC_000913.faa.pin NC_021814.faa.phr ortho.csv
import csv
r = csv.reader(open('salm.x.ecoli.csv', 'r'))
scores = []
for row in r:
name1, descr1, name2, descr2, bitscore, evalue = row
bitscore = float(bitscore)
scores.append(bitscore)
print bitscore
99.0
print name1, descr1, name2, descr2
ref|YP_008257983.1| hypothetical protein CFSAN001921_23440 [Salmonella enterica subsp. enterica serovar Typhimurium var. 5- str. CFSAN001921] ref|NP_415918.1| putative hexapeptide repeat acetyltransferase [Escherichia coli str. K-12 substr. MG1655]
hist(scores)
(array([8540, 1378, 642, 227, 101, 56, 16, 8, 8, 3]), array([ 64.7 , 350.93, 637.16, 923.39, 1209.62, 1495.85, 1782.08, 2068.31, 2354.54, 2640.77, 2927. ]), <a list of 10 Patch objects>)