读研时买了很多书,大部分都没时间看,《什么是数学》就是其中的一本。 这两天翻看了一点。
《第二章:数学中的数系》讲到了当年的伟大发现,一个正方形的对角线与它的边是不可公度的。而由不可公度线段,引入的无理数概念,引入负数,在17世纪都是个另人不安的事情,无理数是个巨大的飞跃,
73页中的图10,给出了 $\sqrt{2}$的几何作图。
我用R尝试把它画出来:
读研时买了很多书,大部分都没时间看,《什么是数学》就是其中的一本。 这两天翻看了一点。
《第二章:数学中的数系》讲到了当年的伟大发现,一个正方形的对角线与它的边是不可公度的。而由不可公度线段,引入的无理数概念,引入负数,在17世纪都是个另人不安的事情,无理数是个巨大的飞跃,
73页中的图10,给出了 $\sqrt{2}$的几何作图。
我用R尝试把它画出来:
虽然R提供了很多作图函数,但自己实现一下,是非常好的体验,而且能够让我们了解其中的细节。
最近在读<Modern Applied Statistics With S-PLUS>,115页讲到Q-Q图时,书中给出了一个Trellis的实现。(Trellis是S/S-PLUS的可视化系统,在R里的对等实现是lattice包)。
我们知道一组数字,可以算4分位数,分别是25%, 50%(中位数), 75%,它等于该组数字中所有数值由小到大排列后第X%的数字,事实上每个数字都可以对应一个X%,Q-Q图很简单,把样本数据和理论分布算出来的quantiles,画个散点图而已。分别用base graph和ggplot2实现,图中三个图分别由系统函数qqnorm,和这里定义的qqplot, qqplot2画出来。
开完了IBW这个会,感觉比较面向学生,会议前的龙星课程,倒是不错,我就冲着它的题目过去的,我想听的是概率图模型和系统生物学,结果只有最后一天,早上讲了点bayesian network,下午讲了会GSEA,BN讲的只是基本的概念,GSEA讲的内容还不到位,只讲到fisher’s test做enrichment analysis,并没有讲如何把表达量通过某些方法把它转化为统计量,再进行enrichment analysis,没有考虑表达量,是不叫GSEA的,提出GSEA的那篇PNAS文章,讲的就是expression+prior knowledge (gene set)。
几天的时间,基本上是讲Hidden Markov Model用于序列比对,Prof Tang以前是在Waterman那里做post-doc,估计也是搞了很长时间的序列。我对这块兴趣不大。
上了几天的课,http://ibw2011.fmmu.edu.cn/schedule.htm 今天就上完了,只完成了project 1,想写gibbs sampling,但是没搞明白,汗。
这个纯属练习用,没啥实用价值。
Course Projects:
Project 1: Implementation of a simple gene finder
GOAL
Build a simple codon-usage based gene finder for finding genes in E.coli.
Procedure
Collect 100 gene sequences from the bacterium E. coli in the genbank (http://www.ncbi.nlm.nihh.gov). Compute the codon usage table based on these genes (and the translated protein sequences from them); Build a probabilistic model based on the codon usages; Implement a random sequence model in which the nucleotide frequency is computed from the 100 E. coli genes. For a given DNA sequence (and one selected reading frame), compare your model with a random sequence model; Results that you should submit:
Two FASTA files for the collected 100 genes and 100 translated protein sequences; The printed codon usage table; A program named ECgnfinder, running with the syntax as ECgnfinder –i inputfile
Inputfile stands for the name of input file, which should contain one DNA sequence in FASTA file format; the program should be able to report an error message if the input file is in the wrong format.
The output should be printed to the standard output as (xxx stands for the likelihood)
ORF1: xxx ORF2: xxx
买了苹果机,一直放在家里没用,准备开会带去用,拿过来装几个软件。
校园网用锐捷是个比较讨厌的东西。当年在华农,光这认证就搞了很久。
现在开源的认证客户端多了,搞起来也方便了,现在在linux下用的xmuruijie,就比当年mystar好用。
估计xmuruijie也是可以在苹果机上用的,依赖python,搞不好还有些modules要装,懒得去弄,搜了一下,找到mentohust,当然需要改一下mac address,用万能的ifconfig搞定。
为了编译软件,必要先装xcode,这个大家伙,4G多,中午挂到吃晚饭才下完。 然后就可以装各种open source的软件。
mac上有fink支持debian一样的apt-get,还有原生的macport,gentoo的portage也支持,我选择使用netbsd的pkgsrc来安装各种开源软件。
以前用过比较长时间的netbsd,用着比较顺手。
Ewan Birney最近的一篇博文(Five statistical things I wished I had been taught 20 years ago )讲述了统计对于生物学的重要性。
一开始从RA Fisher讲起,说生物压根就是统计。Fisher是个农业学家,他所建立的那些统计方法,都是从生物学问题出发。
Ewan所谈及的五个方面分别是:
1. Non parametric statistics. These are statistical tests which make a bare minimum of assumptions of underlying distributions; in biology we are rarely confident that we know the underlying distribution, and hand waving about central limit theorem can only get you so far. Wherever possible you should use a non parameteric test. This is Mann-Whitney (or Wilcoxon if you prefer) for testing “medians” (Medians is in quotes because this is not quite true. They test something which is closely related to the median) of two distributions, Spearman’s Rho (rather pearson’s r2) for correlation, and the Kruskal test rather than ANOVAs (though if I get this right, you can’t in Kruskal do the more sophisticated nested models you can do with ANOVA). Finally, don’t forget the rather wonderful Kolmogorov-Smirnov (I always think it sounds like really good vodka) test of whether two sets of observations come from the same distribution. All of these methods have a basic theme of doing things on the rank of items in a distribution, not the actual level. So - if in doubt, do things on the rank of metric, rather than the metric itself.