Perl reverse complement a DNA

sub reverse_complement {
my $dna = shift;
# reverse the DNA sequence
my $revcomp = reverse($dna);
# complement the reversed DNA sequence
$revcomp =~ tr/ACGTacgtRYKMSWrykmswBDHVbdhv/TGCAtgcaYRMKSWyrmkswVHDBvhdb/;
return $revcomp;
}

    原文作者:Waste_Land
    原文地址: https://www.jianshu.com/p/294e0ccfe760
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞