设为首页收藏本站
开启辅助访问
切换到窄版

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2537|回复: 1

用Perl获得序列的反向互补序列

[复制链接]
发表于 2011-10-6 00:08:32 | 显示全部楼层 |阅读模式

  1. #! /usr/local/bin/perl -w
  2. # rev_comp.pl
  3. # Find the reverse complement of a sequence
  4. # using EMBOSS's "revseq"
  5. # WI course: Bioinformatics for Biologists - October 2003
  6. # Prompt the user for his/her sequence
  7. print "What is your sequence to reverse complement? ";
  8. # Remove the newline character at the end
  9. chomp ($seqName = <STDIN>);
  10. # Enclose a shell command in backquotes to execute in within a Perl script
  11. $date = `date`;
  12. $rev_comp = `revseq $seqName -filter`;
  13. print "$date";
  14. print "Reverse complement:\n$rev_comp";
复制代码
发表于 2011-10-14 15:02:08 | 显示全部楼层
$seq = shift;
$reseq = reverse $seq;
$reseq =~ tr/ATGCNatgcn/TACGntacgn/;
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|申请友链|小黑屋|手机版|Archiver|生物信息学论坛 ( 蜀ICP备09031721号  

GMT+8, 2017-1-22 18:14 , Processed in 0.119059 second(s), 22 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表