首先下载并安装GO::TermFinder
perl -MCPAN -e shell
cpan> install GO::TermFinder
安装完成之后,至example下载GoView.conf, *.pl,以及examples.html文件。其实这些也已经安装在了本机,你也可以在安装目录下找到。
这里主要介绍使用batchGOView.pl来直接生成报告文件。我们先看一眼batchGoView.pl的原代码。
#读取配置文件 my $confFile = shift; my $conf = &ReadConfFile($confFile); #依据配置文件高置参数 my $ontology = GO::OntologyProvider::OboParser->new(ontologyFile => $conf->{'ontologyFile'}, aspect => $conf->{'aspect'}); my $annotation = GO::AnnotationProvider::AnnotationParser->new(annotationFile=>$conf->{'annotationFile'}); …… my $termFinder = GO::TermFinder->new(annotationProvider=> $annotation, ontologyProvider => $ontology, aspect => $conf->{'aspect'}, @additionalArgs); #生成报告文件 my $report = GO::TermFinderReport::Html->new(); &GenerateFrameset;#报告文件规范 …… #依次读取文件并分析 foreach my $file (@ARGV){ print "Analyzing $file\n"; # 从文件中读取基因列表,从这个命令中我们可以看出,基因文件的格式必须是每行一个基因名这样的格式,中间无空行。 my @genes = GenesFromFile($file); # 进行从基因名到GO名目的映射。 my @pvalues = $termFinder->findTerms(genes => \@genes, calculateFDR => $conf->{'calculateFDR'}); # 调用GO::View module来生成报告所需的图片。 my $goView = GO::View->new(-ontologyProvider => $ontology, -annotationProvider => $annotation, -termFinder => \@pvalues, -aspect => $conf->{'aspect'}, -configFile => $confFile, -imageDir => $conf->{'outDir'}, -imageLabel => "Batch GO::View", -nodeUrl => $conf->{'goidUrl'}, -geneUrl => $conf->{'geneUrl'}, -pvalueCutOff => $conf->{'pvalueCutOff'}); # 而后将这些结果整合到html中来,以便查看。 my $imageFile; if ($goView->graph) { $imageFile = $goView->showGraph; } my $htmlFile = &GenerateHTMLFile($file, $goView->imageMap, \@pvalues, scalar($termFinder->genesDatabaseIds), "Terms for $file"); print $listFh a({-href => $htmlFile, -target => 'result'}, $htmlFile), br; } ……
[......]
我们知道使用css当中的text-align:justify就可以实现两端对齐了。比如下面这
<div style="text-align: justify; width: 300px">In olden times when wishing still helped one, there lived a king whose daughters were all beautiful; and the youngest was so beautiful that the sun itself, which has seen so much, was astonished whenever it shone in her face. Close by the king's castle lay a great dark forest, and under an old lime-tree in the forest was a well, and when the day was very warm, the king's child went out to the forest and sat down by the fountain; and when she was bored she took a golden ball, and threw it up on high and caught it; and this ball was her favorite plaything.</div>
我们知道,这种排版很类似Office Word的排版方式。如果有类似TEX的排版,对于这些非等宽字体,就会更好看了。Bram Stein就为我们用javascript实现了这样的功能。
比较我们可以发现,使用javascript的话,排版会更紧凑。其实它更强大之处还在于图文混排。当然那需要更强的图层控制能力。
[......]
上次介绍的荧光按钮其实是其于这一次的代码基础上加上了背景特效而已。那么一个漂亮的CSS3按钮应该如何实现呢?
其实很简单。首先确定按钮风格。CSS3的色彩模式为RGBA,RGB大家都很熟悉,A呢其实就是透明度。看代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | .button, .button:visited { background: #222 url(overlay.png) repeat-x; display: inline-block; padding: 5px 10px 6px; color: #fff; text-decoration: none; -moz-border-radius: 6px; -webkit-border-radius: 6px; -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.6); -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.6); text-shadow: 0 -1px 1px rgba(0,0,0,0.25); border-bottom: 1px solid rgba(0,0,0,0.25); position: relative; cursor: pointer } |
然后确定按钮的大小。分成small, medium 和 large。
1195666d1[......]
在safari 4以上的效果最好,FireFox 3.5效果一般。
HTML5标准推出,强调整合的媒体播放器,传说中系统占用率更小。而且这一概念得到了许多人的赞同。但是随着Flash10的推出,人们又开始对这一问题重新进行思考。
Jan Ozer 是一名媒体编码技术员,从1990年开始就一直在这一领域工作,已经出版了13本相关的书。最近,他在Mac和windows上使用几种常用的浏览器对HTML5及Flash10进行了比较,结果和想象的有一些不同,并不是所有时刻HTML5都胜出。Flash的前途会随着技术的进步而保持长青树吗?测试的结果都公布在了StreamingLearningCenter.com.
这里,我们摘录其中关键的表格数据,给你一个快速的印象:
[......]






近期评论