Skip to main content

Perl Programming #5

Hi,
Didn't read the previous perl posts? Go here, perl #1 #2 #3  #4)

In the previous post of perl programming, we learnt how to search an aminoacid in a protein sequence. Now, we are going to look at a program by which the "start and stop codons" in a protein sequence could be easily identified. Here, we go,

Program to identify start and stop codons easily: 

print "enter a file containing Dna sequence\n";
$dnafile=<>;
chomp($dnafile);
unless(open(DNAFILENAME,$dnafile))
{
print "file not found\n";
exit;
}
$dna=<DNAFILENAME>;
$dna=join("",$dna);
$dna=~s/\s//g;
$dna=uc($dna);
$dna=~tr/T/U/;
print "The mrna is:\t",$dna,"\n";
my(%code)=
(
'AUG'=>'Start',
'UGA'=>'Stop',
'UAA'=>'Stop',
'UAG'=>'Stop',
);
for($i=0;$i<(length($dna)-2);$i+=3)
{
$codon=substr($dna,$i,3);
if($codon=~AUG)
{
$out.=$code{$codon};
}
elsif($codon=~UAG)
{
$out.=$code{$codon};
}
elsif($codon=~UAA)
{
$out.=$code{$codon};
}
else
{
$out.=$codon;
}
}
$out=~tr/U/T/;
print "the dna seq is\t",$out;
exit; 


When you run the above program, you would get the result just like this:

PERL
Happy perl-ing, Any doubts, just comment, I'll try to clear.
Bye. :)

Comments

Popular posts from this blog

Lowry Assay Principle and procedure

Though there are several protein assays available, the most preferred one in many laboratories is "Lowry assay". It is effective in the concentration range of 0.01 mg/ml to 1 mg/ml. And, as an additional info, the paper published describing the procedure and principle of Lowry Assay is the most cited paper in the scientific history. (Feeling like, "Wow! I want to publish one to compete with Oliver.H. Lowry"???  :P) Why Lowry?   Though there are several other protein assays, mostly Lowry assay is used in many laboratories. The reasons for preferring Lowry are: sensitivity of the assay, highly reproducible, cost effective, easy to perform. Biuret assay is generally used for higher protein concentrations like tissue samples but, Lowry for less concentrated samples and hence used in most of the molecular biology laboratories where there will be need for assaying comparatively less concentrated protein samples (in most cases where we attempt to produce enzymes). Oth...

Fire in the lab!!! BE CAREFUL!!!! A Lesson learnt!

   That day, we were working in our lab under laminar air flow chamber. we were streaking our plates with E.coli. For sterilizing the loop, we were using 70% ethanol. We also sterilized the L rod which we used for spreading , using the same Ethanol.  One by one, we started streaking and spreading. I completed my turn, and sterilized the L rod by dipping in ethanol once and shown in flame, and placed it in a tray.Mam instructed, " Ethanol will catch fire , if you place the hot rod over it" . One of my friend, did spreading after my turn, she too dipped the rod in ethanol, flamed the rod and instead of placing in the tray she misplaced the hot rod in the ethanol plate!!!! " oooo... fire fire..." immediately ethanol caught fire..!!! My friend who misplaced., she started crying... Mam shouted, " hey girls, guys run out of the lab...," as the tube which carries LPG for the flame was very close to fire. Suddenly, our lab technician acte...

Galaataa at Chemical engg lab!!! :D :D Bang!!!

Venturi meter  Oooo.. Pipes, Flows, Fluid flow rate... A different class of chemical engineering, which i never expected in Biotechnology. Thought that mechanical guys alone read on & deal on this thermodynamics!!! But, I too dealt with this thermodynamics. The chemical engineering lab which includes exercises like, 1) Venturi meter 2) Orifice Meter 3) Rota meter 4) Packed bed 5) Fluidised bed... The list goes on and ends with number 14! But, I do remember only these topics. Completed with the exercise, " FLUID FLOW THROUGH A STRAIGHT CIRCULAR PIPE " in the last lab on thursday!. Here we go with that lab experience.  Noted the reading from manometer and stop clock successfully with my two batch mates! Some data we searched for calculation : 1) Density of Mercury : 13,600 Kg/m^3  2) Viscosity of Water  : 0.001 Kg/(m-s) 3) We were in need of the area of the collecting tank .... A terrible attempt by me, for measuring the width & breadth. ...