5月 16

[转载]Perl vs Python – The Final Battle

原文链接(文章后面的不少回复也值得一看)

You might have already seen a lot of Perl vs Python stuff. So I’m telling you in advance that I’ve too have read them all, and what you’re going to read here would be completely different than what you already have.

Firstly, let me start by saying that Perl and Python are great languages. But they have their own differences, which is precisely why we have two different languages. If they were the same, why have two different languages at all?

The people who are biased against a language are the one who try to write Python in Perl or Perl in Python. They want Perl to work like Python or vice versa. And if you’re intelligent enough, you’ll quickly understand that there is no point in having them both work in the exact same way.

I’ll shout out one basic difference between the two. This is one difference a beginner will likely notice. I won’t mention many of the “advanced differences”, for an experienced programmer doesn’t need my help for that.
Continue reading

5月 15

【转载】初品Bioperl

序:让程序读起来更生动
第一篇:让BioPerl在你的电脑上安家
第二篇:构造一条fasta序列
第三篇:从本地文件中获取fasta序列
第四篇:从本地文件中获取Genbank序列
第五篇:序列格式的转换
第六篇:从远程数据库下载序列之一
第六篇:从远程数据库下载序列之二
第七篇:对象的类型……【阅读全文】

5月 14

【推荐】Perl Programming for Biologists

《Perl Programming for Biologists》以生物学中的实际例子来讲解Perl,循序渐进。全书共设3大部分:初级、中级与高级,有11个章节,内容除涉及标量、数组、散列、循环控制、子例程、文本处理、输入输出、模块等基本内容外,还专门讲解了参考、面向对象的编程以及Bioperl等生物信息学中经常遇到的内容。
虽然是英文版的,但英文非常简单,大多数时候可以流畅阅读。当然,还是建议至少看完一遍小骆驼之后再来看此书。
PS:书中有不少错误,阅读的时候一定要注意奥。……【阅读全文】

4月 26

计算单机版Blat的“percent identity“的Perl代码

单机版Blat的匹配结果中没有percent identity(网络版的Blat输出结果中有)。为了筛选输出结果,常常需要计算每个匹配的percent identity;UCSC的Blat—FAQ中虽然给出了相应的解决办法(http://genome.ucsc.edu/FAQ/FAQblat#blat4),但其代码是用C写的,不利于使用Perl的生物信息学工作人员调用。此处给出相应的perl代码,如下所示(非原创,版权归原作者所有):
Continue reading