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

Genotyping, Phenotyping, Karyotyping!

We are going to discuss here about three different typing! They are genotyping, phenotyping and karyotyping. Before learning about them let us learn what is genotype, phenotype and karyotype!

Genotype refers to the genetic make up of an organism. Generally the genes of an organism. The genotype of an organism can be represented as BB or Bb or bb based on the gene. If a person is having two recessive CFTR genes, then he will be getting cytic fibrosis. Genotype of an organism has also effect over the phenotype. Thus, genotype is representing the alleles of a gene in general. Genotyping is generally done based on PCR or hybridization.

Phenotype refers to the visible characters like structure, color and also the biochemical characters. This is based on the phenotype. Phenotyping can be done using biochemical assays.

Karyotype refers to the number of structure of chromosomes in an organism. karyotyping is done by staining and visualising the cells under microscope.

Isolation of monocytes from PBMC (Peripheral Blood Mononuclear Cells) - Principle and protocol

Whenever I'm made to realise that I'm not clear enough or good at something, I try to make myself clear with it. It happened today, during my laboratory examination, I was asked to perform monocyte isolation from a given blood sample, but, unfortunately, I was not very clear with the principle behind it.(but, still I managed to complete the experiment as I know the protocol, but, knowing the principle behind each step of the protocol clearly is very important, isn't it?). But, nothing is wrong in it, I made myself clear with it now. That's good, right?

So, let me share with you some basic principle and protocol for isolating monocyte from blood sample.

For isolating monocytes, initially we must isolate PBMC (Peripheral bood mono nuclear cells) from the blood sample. Here, let us make few terminologies clear before starting with the principle.

Peripheral blood sample - It is the blood sample obtained from acral areas of body (in general, it is the blood collected from ha…

One year into PhD - my BTS experience!

Dear readers,
I apologize that I stopped writing since last year. I don't have any great excuse other than poor planning. I was lost on my way to understand marine biology. As you might be knowing, I switched field, moved from my focus over bacteria and human disease related studies to climate change and marine biology. However, my research focus continues to be in molecular biology. Long story short, I was learning all about climate change, ocean acidification, ocean, marine animals in the past year. I even learnt how to spawn and culture oysters. How cool is it? Not cool?! Well, I think it is cool! 
I can setup mini Ocean acidification systems which mimics the future acidified ocean conditions; I even gained some plumbing related skills. This was totally a new experience and I thoroughly enjoyed it. However, I had a tough summer in a rural fishing village in China, learning how to grow oysters from the Chinese oyster farmers (for those who do not know what I am doing: I am doin…