Misa pipe.pl
Jump to navigation
Jump to search
#! /usr/bin/perl -w
# *************************************************************
# This Programme does the following in sequence
# -> Runs MISA : finds repeats
# -> Runs misa2p3_in.pl : Parse the repeats file and make it ready for primer3
# -> Runs Primer3
# -> Parse Primer3 results and makes a tab delimited output
# Original Author: Author: Thomas Thiel;
# Modified by Rajkumar (itc@rajkumar.in)
# Release: JUL 2008
# *************************************************************
# Libraries
use strict;
# At the top: Time Start
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
# Variables
my $path = "/home/raj/bio";
my $bin = "$path/euca/ssr/bin";
my $ssrdir = "$path/euca/ssr/glo-gra-ssr";
my $infile = "$ssrdir/camal_grand.fa";
my $program = "$path/primer3-1.1.4/src/primer3_core";
# Running the File
chdir $bin;
print "\tFinding Repeats..";
`$bin/misa.pl $infile`;
print "done.\n\tParsing Misa results..";
`$bin/misa2p3_in.pl $infile.misa`;
print "done.\n\tRunning Primer3 core..";
`$program <$infile.p3in >$infile.primer`;
print "done.\n\tParsing results..";
`$bin/parse_p3_results.pl $infile.primer $infile.misa`;
print "done.\n\tAll done Man !\n\n";
# At the End: Time Calculation
my ($sec_,$min_,$hour_,$mday_,$mon_,$year_,$wday_,$yday_,$isdst_) = localtime(time);
my $days = $mday_-$mday;
my $hours = $hour_-$hour;
my $mins = $min_-$min;
my $secs = $sec_-$sec;
print "\n------------------------\nDuration: ";
if ($days>0) { print "$days days";}
if ($hours>0) { print ": $hours hours";}
if ($mins>0) { print ": $mins mins";}
if ($secs>0) { print ": $secs secs";}
print "\n------------------------\n";
# END