Tgcl run.pl

From RAJ INFO
Jump to navigation Jump to search
#! /usr/bin/perl -w

# *************************************************************
# This Programme does the following in sequence
# -> Runs TGICL Program to assemble ESTs
# -> Contigs and Single
# Author: Rajkumar (itc@rajkumar.in)

# *************************************************************

# Libraries
	use strict;
	use Bio::Perl;
	use Bio::SeqIO;

# At the top: Time Start
	my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);

# Variables
	my $path    = "/home/raj/bio";
	my $est     = "$path/euca/ssr/data/globulus_est_repeat.fa";
	my $resdir  = "$path/euca/unigene/result";

	my $tgicl   = "$path/tgicl/tgicl";
	my $cpu     = "4";


# Running the TGICL
	if (-e "$resdir") {`rm -fr $resdir`;}
	if (! -e "$resdir") {`mkdir $resdir`;}
	
	chdir $resdir;

	`$tgicl $est -c $cpu -l 35 -p 90 -M`;
			# -l miminum overlap length (default 40)
			# -M ignore lower-case masking in <fasta_db> sequences
			# -p minimum percent identity for overlaps <PID> (default 94)

	print "\t\nYES MAN.. All Done.\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