-
程序代码
-
结果输出
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/usr/bin/perl use strict; use warnings; my $dna = "ACGGGCGGCACGGGAAAAAATTTTTAACTCTTACGCG"; my $revcom = reverse $dna; $revcom =~ tr /ACGT/TGCA/; print "Input DNA:n$dnanReverse complementary DNA:n$revcomnn"; my $gc = $revcom =~ tr/GC//; my $gc_content = sprintf( "%.2F", $gc / length($revcom) * 100 ); print "GC number:t$gcn"; print "GC content:t${gc_content}%n"; |
1 2 3 4 5 6 7 | Input DNA: ACGGGCGGCACGGGAAAAAATTTTTAACTCTTACGCG Reverse complementary DNA: CGCGTAAGAGTTAAAAATTTTTTCCCGTGCCGCCCGT GC number: 18 GC content: 48.65% |