#!/usr/bin/perl5.8.8 use strict; use warnings; print "Enter file to process\t"; my $count = <>; #captures input from STNDIN and finds the file associated with that number chomp $count; tempProteinFamFileCreator(); #creates a temp file with protein family sub tempProteinFamFileCreator { my $infile = $count."_ProFam"; #iterates through all the protein family files with the count variable open (my $INFILE,"<", $infile); my $flag = 0; while(<$INFILE>) { my $TEMPfa; if ($_ =~/^#/ && $flag == 0) { open ($TEMPfa,">", 'temp'); $flag++; } if ($_ =~/^[\w\d]+/) { chomp $_; print $TEMPfa "$_\n"; } if (($_ =~/^#/ && $flag == 1) || $_ =~/^>File/) { close ($TEMPfa); MuscleHMMERsearch(); TableParser(); } } close ($INFILE); #closes the $INFILE handle } #end of subroutine tempProteinFamFileCreator