python 使用技巧

  1. 安装 pip:
    1. 下载:https://bootstrap.pypa.io/get-pip.py
    2. 安装:python get-pip.py
  2. 在windows下使用pip:
    python -m pip
  3. error:Microsoft Visual C++ 9.0 required(Unable to find vcvarsall.bat).
    解决方法:下载 VCForPython27.msi 。
    地址: http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

虞美人

C130720

break

break

少年听雨歌楼上,
红烛昏罗帐。
去年听雨客舟中,
江阔云低,
断雁叫西风。

而今听雨屋檐下,
秋叶已凋零。
悲欢离合总多情,
伊人何处?
总在寒冷清秋。

2132454423561438277

Basic information on S.suis

  1. one of the most prevalent pathogens in swine causing a range of disease syndromes including arthritis (关节炎), meningitis (脑膜炎), pneumonia (肺炎), septicemia (败血症) and endocarditis (心内膜炎), etc. [1]
  2. an zoonotic agent able to induce meningitis, endocarditis, and streptococcal toxic shock-like syndrome in humans. [1]
  3. Thirty three S. Suis serotypes identified on the basis of antigenic differences in their CPS (Capsule Polysacharides). [1]
  4. S. suis 2 mainly infects people who have direct contact with carrier pigs, sick pigs, or raw pork via wounds on the skin, or the mucosa of the mouth, or nasal cavity. [1]
  5. 1642 cases of S. suis human infection had been reported worldwide until Dec. 31, 2013. [1]

[1]. Zhang, Y., Ding, D., Liu, M., Yang, X., Zong, B., Wang, X., Chen, H., Bei, W., and Tan, C. (2016). Effect of the glycosyltransferases on the capsular polysaccharide synthesis of Streptococcus suis serotype 2. Microbiological research.

The elements for building a website – 建站必备

  1. Domain name – 域名
    功能:让对方找到你的网站。
    购买处:西部数码
  2. Web hosting – 主机托管
    功能:放置你的网站主体(包括,文字、图像、声音、脚本等)的地方。
    购买处:hostinger
  3. File manager
    功能:网站文件的上传、下载和修改
    推荐:FileZilla
  4.  Raster graphics editor
    功能:图片编辑
    推荐:photoshop
  5. Browser
    功能:网页效果预览
    推荐:Google Chrome、Firefox
  6. CMS (Content Management System)
    功能:方便用户管理网站内容,发布内容;
    推荐:WordPress

Key points of the analysis of microarray – 基因芯片分析要点

  1. biological replicates – 生物学重复
    Five or more is usually robust for micro-array studies
    五个及以上的样本数对基因芯片研究来说才是具有鲁棒性的。
  2. qPCR validation
    Micro-array may give many false positives so it is usually necessary to validate the differential expression observed in some of the key genes.
    基因芯片可能产生许多的假阳性结果,所以验证部分关键的差异表达基因通常来说是必须的。

Effect of the glycosyltransferases [糖基转移酶] on the CPS [荚膜多糖] synthesis of S.suis 2

  1. The incomplete CPS resulting from deletion of the cps genes in S.suis 2 SC19;
  2. Interplay between S.suis 2 SC19 and different cell lines in vitro changed by these
    genes deletion
    cps2E, cps2G, cps2J and cps2L
  3. More deposition on the mutant strains of complement C3 in porcine serum
    than on WT
  4. Essential role of the cps genes in viability of SC19 in a murine model

Zhang, Y., Ding, D., Liu, M., Yang, X., Zong, B., Wang, X., Chen, H., Bei, W., and Tan, C. (2016). Effect of the glycosyltransferases on the capsular polysaccharide synthesis of Streptococcus suis serotype 2. Microbiological research.

LaTeX 随笔

  1. LaTeX在windows下认识的文件路径是“/”,而使用Perl的File::Spec包得到的路径使用的是“\”;
  2. 生成dvi: latex filename.tex;
  3. 生成pdf: dvipdfm filename.dvi;

KEGG 使用注意事项

  1. bta里的pathway个数在不断增加,过去抓取的和现在的混着用就会出错;
  2. 批量下载KEGG Mapper生成的图像时,由于网络状况可能导致下载不完全,请一定仔细核实数目是否对应,图像是否完整;

KEGG ORTHOLOGY (KO) Database

在KEGG中,分子水平上的功能保存在KO(KEGG Orthology)数据库中。这些功能与直系同源组联系在一起,以此来使得一个特殊物种的实验数据可以被扩展到其他物种。KEGG中的基因组注释是直系同源注释,其方式为,为GENES数据库中的每个基因制定KO identifiers (K numbers) 。对于原始数据,像由RefSeq或者GenBank给出的基因名和描述,即使他们和KO的分配不一致,KEGG也不会做任何修改。

将KO的条目与功能表征的序列数据的实验证据联系在一起的工作,已经开始了,并且现在已经展示在REFERENCE下的SEQUENCE子域中。而且,基因组层面的“KEGG GENES”(http://www.genome.jp/kegg/genes.html)集合已经被扩展,使其可以将蛋白数据也包含在附录中。最终KO数据库将覆盖所有的功能表征蛋白序列信息(另见”KEGG Enzyme”(http://www.genome.jp/kegg/annotation/enzyme.html))。

In KEGG, molecular-level functions are stored in the KO (KEGG Orthology) database and associated with ortholog groups in order to enable extension of experimental evidence in a specific organism to other organisms. Genome annotation in KEGG is ortholog annotaion, assigning KO identifiers (K numbers) to individual genes in the GENES database. No updates are made to original data, such as gene names and descriptions given by RefSeq or GenBank, even if they are inconsistent with the KO assignment.

Major efforts have been initated to associate each KO entry with experimental evidence of functionally characterized sequence data, now shown in the SEQUENCE subfield of the REFERENCE field. Furthermore, the genome-based collection of KEGG GENES has been expanded to allow individual protein data to be included in the addendum category. Eventually the KO database will cover all knowledge on functionally characterized protein sequences (see also KEGG Enzyme).

一般来说,KO对功能直系同源的划分是定义在KEGG分子网络的语境中(KEGG pathway maps, BRITE hierarchies and KEGG modules)。KEGG分子网络实际上是由K numbers标识的网络节点表示的。KOs和相应的分子网络的关系呗存储在下面这个系统中。

KEGG Orthology (KO)

将功能信息和直系同源组关联在一起这个功能是KEGG资源的一个独特的功能。基于有限总量的实验数据生成的对序列相似性的预测被预先定义好在KEGG中。如同在BlastKOALA和其他工具中实现的那样,对KEGG GENES的序列相似性搜索是针对K numbers的。一旦一个K numbers被指定给基因组中的基因,KEGG pathways maps, Brite hierarchies,和KEGG modules都会自动重建。如此一来,就能对较高水平的功能有一个生物学上的科学的诠释。

In general KO grouping of functional orthologs is defined in the context of KEGG molecular networks (KEGG pathway maps, BRITE hierarchies and KEGG modules), which are in fact represented as networks of nodes identified by K numbers. The relationships between KOs and corresponding molecular networks are represented in the following KO system.

KEGG Orthology (KO)The fact that functional information is associated with ortholog groups is a unique aspect of the KEGG resource. The sequence similarity based inference as a generalization of limited amount of experimental evidence is predefined in KEGG. As implemented in BlastKOALA and other tools, the sequence similarity search against KEGG GENES is a search for most appropriate K numbers. Once K numbers are assigned to genes in the genome, the KEGG pathways maps, Brite hierarchies, and KEGG modules are automatically reconstructed, enabling biological interpretation of high-level functions.

DAVID/DAVID-WS使用技巧

DAVID-WS(网络服务)被开发出来,使用户完成任务无需进行人工交互,而是编程接入DAVID,经由状态网络服务实现自动化。

DAVID-WS (web service) has been developed to automate user tasks by providing stateful web services to access DAVID programmatically without the need for human interactions. [1]

DAVID-WS通过保留一个用户在一次查询会话中的状态相关的操作输入,使这些输入能在用户该次会话接下来的操作中被获取,从而达到状态化。用户可以增添基因列表,改变分析背景总体,选择物种和种类,重置数据分析的功能参数,在一次会话中调用所有工具以及按照希望规范输出。

DAVID-WS is made stateful by keeping the state-related input of a user operation in a session context that can be accessed by subsequent user operations within the same session. Users can add lists, change background populations, select species and categories and reset functional parameters for data analysis, as well as query all tools within the same session and format output as desired. [1]

[1] Jiao, X., Sherman, B.T., Huang da, W., Stephens, R., Baseler, M.W., Lane, H.C., and Lempicki, R.A. (2012). DAVID-WS: a stateful web service to facilitate gene/protein list analysis. Bioinformatics 28, 1805-1806.

Perl使用注意及技巧

  1. 位置信息
    1. (子)脚本所在的位置:/home/wangyu/
    File::Spec
    my $path_curf = File::Spec->rel2abs(__FILE__);
    my ($vol, $dirs, $file) = File::Spec->splitpath($path_curf);
    2. 从哪里调用的(主)脚本:/home/wangyu/code
    $ENV{'PWD'}
    3. 程序目前切换(chdir)到哪里了:/lustre/Work
    `pwd`
    注意:`pwd` 的返回值需要chomp去除末尾回车; 解释: 1. 我用a.pl调用b.pl,主脚本为a.pl,子脚本为b.pl; 2. a.pl在/home/wangyu/code/perl, b.pl在/home/wangyu; 3. 使用chdir切换了到/lustre/Work以后,调用b.pl,在b.pl里面,使用三种方式判断路径。
  2. perl -d: 打开调试功能
  3. windows下,html中指定路径:”file:\/\/\/path_to_the_file”;
  4. 对读入的数据进行split前,注意,要用chomp处理;
    因为,读入的数据的末尾的换行符会被分配到最后一串字符里。
    其实际影响案例有:1. 如果一个变量$var包含了换行符,我把这个变量放在system “gzip -d -c $var > filename”,这条命令$var后面的就无法生效,因为在$var已经敲了回车了。
  5. Installation:
    perl -MCPAN -e shell
    install SOAP::Lite
  6. Your Perl is configured to link against libgdbm,but libgdbm.so was not found.:aptitude install libgdbm-dev
  7. Please tell me where I can find your apache src:
  8. Function Round: int($number+0.5)
  9. ‘Unquoted string “..” may clash with future reserved word
    I meet this warning because my filehandle is lowercase with the “warning” on. It’s better to use uppercase as developers wish.
  10. $$: 该脚本的进程号;
  11. 微型Perl: 修改文件内容
     perl -p -i -e 's/from/to/' *.file

    -p:输出本行内容(-n: 不输出本行内容)
    -i:指定备份文件后缀名,如果给出-i选项并且没有指定后缀名,则覆盖原文件 (-i.bak)
    -e:需要运行的perl代码,分号分割,可写多条语句。计数变量可用。
    *.file: 需要修改的文件

  12. 已安装模块备份及重装
    #所有安装的模块信息存储在:
    #/home/nott/.cpan/Bundle/Snapshot_2017_03_10_00.pm
    perl -MCPAN -eautobundle 
    
    #重装
    perl -MCPAN -e 'install Bundle::Snapshot_2017_03_10_00'
    
    
  13. 选择性正则匹配:/(.snp.gz|.snp.tar.gz|.snp)/,匹配上的模式保存在$1
  14. strict refs
    Can't use string as a symbol ref while "strict refs" in use
    Can't use string as a HASH ref while "strict refs" in use
  15. asdf

从孙子兵法理解围棋大龙攻杀的要诀;攻守双方口诀

从孙子兵法理解围棋大龙攻杀的要诀;攻守双方口诀;

守方口诀;“拆张出头抓紧渡,以攻为守大转换,四面楚歌快做眼,走逃无路打打劫”;
攻方口诀:“逼住断开然后镇,攻击以前先补强,封锁取势破眼位,小心对手想打劫”;

对于攻方而言,如果打算攻击对方某处大块棋,要记住,不要先走出剪尾巴之类的贪小便宜。这类小便宜就算是白送的,也不妨等到官子时再吃,在此以前,如果不能攻杀大棋的话,干脆不要碰它。大概是围棋战术中的“不要打草惊蛇,攻击勿靠”。否则对方可以借弃子腾挪,做眼,消了劫材,还得了先手。

所谓“攻杀大棋”不是“必杀大棋”。如同动物世界中狮子杀食,十次攻击中有九次失败,如果每次都要“必杀”,90%的死者就是狮子自已,动物世界的胜负规则就要颠倒过来了。围棋中的野猪流之所以不利于棋艺的长进,原因也正在于此。“攻杀大棋”需要预先做起准备,保证90%不能必杀的情况下,也仍然能得到相应的利益;以免“攻杀不成反输棋”,而能达成“攻杀不成也赢棋”,胜率自然就提高了。此即孙子兵法中,所谓“百战百胜,非善之善之者,不战(必最终混战攻杀)而能屈人之兵,善之善者也”的围棋解意。

由此笔者就得到了攻杀大棋,处于攻方时的战术步骤。第一步是“逼,断,镇”,削弱对方的根基,断开与对方活棋的连接,才谈得上攻杀。如果能把对方一块大棋断成两块弱棋,需要分别耗费先手求活,好是再好没有;第二步“补强,封锁”,只有当对方大棋不能逃出时,才讲得上“攻杀”,封锁的前提是自已周边先补强,以免被对方“以攻为守”;第三步是“压缩,点眼”,攻击点是对方的眼位;死活到此基本上已经开始定形。此时双方一般已经转移战场,这里变成了带若干劫材的大块残子,当劫材也消清光后,就是死子了。

进攻的步骤,归纳起来就是“先逼再封然后点”。防守的步骤就相反地,“拆张出头抓紧渡,以攻为守大转换,四面楚歌快做眼,走逃无路打打劫”。拆是拆开边角,如果同时能逼对方,再好没有;如果被对方镇,就要出头;出头不成的话,先看对方棋形的弱点,那里没有补的,或借攻击之而补强,或者借攻击之而转换,放弃自已被封锁的弱棋;实在逃不掉了,才赶快做眼。一攻一防,要诀就是笔者常说的“守为正着攻为奇”。如果说“攻击是最好的防守”让人痛快,围棋的要点则是“安定自已,就是有力的进攻”。
ps:攻方口诀是“逼住断开然后镇,攻击以前先补强,封锁取势破眼位,小心对手想打劫”;

最后我们回到主题,明确了开发商通过影子银行推高房价是被动后,意味着不做“上兵伐谋,其次伐交”的准备工作,就作“强攻高房价”的“宏观调控”,命中注定的是无效的,而无论主攻方向是开发商,炒房客,还是影子银行。原因就在于,它们是被动的,治“被动”不是治本,甚至能否治标,也存疑问。上兵伐谋,如笔者解释了任志强董藩及反户籍制度等等的民粹,如“高房价拉动经济”这类的谎言,用真相去恶化他们的生存环境,则随后的政策雷霆就会事半功倍。这道是思考题:“伐交”,在针对高房价时,是什么动作呢?