Skip to main content

Posts

Showing posts with the label Perl

Exon Chaining source code in Perl (Dynamic programming)

Exon Chaining Problem: Can't tell lucky or not the same problem is can be found in Uva online judge for programming.When our team attend a contest in a university in bangladesh this modified version of this problem is given .(11908 Skyscraper) . In Bio-informatics it is a set of exon is given now create the amino acid from which the needed protein can be found. Input >> here cuttings from start to end with score is given. Output >> Give the maximum Allginment Score and selected chunk. Code is given bellow (perl): ************************************************************************************* INPUT >> 2 3 3 1 5 5 4 8 6 6 12 10 9 10 1 7 17 12 11 15 7 13 14 0 16 18 4 OUTPUT>> 21 use strict; use warnings; main(@ARGV); sub main {   my $line;   my $co = 0;   my ($i,$ans);   open(MYDATA,"in1.txt");   my @G = [(1...10),(1...4)];   while($line = <MYDATA>)   {     chomp($line...

Bio-informatics Edit distance source code for alignment of two genome Sequence in perl

Edit distance problem(By modified LCS): If input is >> A AAAA Then output is >> ------A AAAA where --- means insert. Delete can be handle in same way and replace also. Complex one is>> ATCGA TGAC out >> A T C G A - -  T  - G A C Now the code is in perl and is given bellow.... *********************************************************************************** main(@ARGV); my $co = 0; my($x,$y); sub main {   my @line;   my @a;   my @b;   my $c = 0;   open(MYDATA,"in.txt");   while($line = <MYDATA>)   {     chomp($line);     if($c == 0)     {        @a = split'',$line;     }     else     {        @b = split'',$line;     }     ++$c;   }   close MYDATA;    lcs(\@a,\@b);  ...

Introduction to Bioinformatics Algorithm Partial Digest source code in Perl

Partial Digest Problem : Its a common known problem in bio-informatics where chunk of DNA with deferent length is given.Our work is to find out in what position this chunk is cut-up.I completed this problem by backtracking in Perl language where multiple solution can be found.The code is given here.You should first understand the problem than use this code.(For your good)I use Introduction to Bio-informatics Algorithm Book as reference. ************************************************************************************* use strict; use warnings; main(@ARGV); sub main {     # here value is the  set of piece which cut from entire length  and flag use for just check which piece used and which     # piece not used before and unsed is counter for how much piece are not  used still now , inti is the starting point and     # end is end point of entire length  and at the end point are the array which contain st...