-->

Monday, March 14, 2016

Enter the dna sequence and find its length and

a) reverse the dna ,
b) convert into uppercase letters
c)count the GC content of the sequence and Convert DNA into RNA

code
print "Please Enter the DNA sequence: ";
$DNA=<STDIN>;
chomp $DNA;
print the scalar
print $DNA,"\n";
$revDNA = reverse($DNA);
$DNAlength = length($DNA);
$$upperCaseDNA = uc($DNA);
$lowerCaseDNA = lc($DNA);
$GC = ($DNA =~ tr/GCgc//);
$perGC = int(($GC/length($DNA))*100);
print "The GC content is $perGC percent\n";
$RNA = ($DNA =~ tr/Tt/Uu/);
print $RNA,"\n";

No comments:

Post a Comment

JavaScript Free Code