#
A
B
C
#
D
E
F
#
####
First temp file should have this in it.
#
A
B
C
####
Second temp file should have this in it.
#
D
E
F
####
#!/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
####
#!/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();
sub tempProteinFamFileCreator
{
my $infile = $count."_ProFam"; #iterates through all the protein family files with the count variable
open (my $INFILE,"<", $infile);
my $flag = 0;
open (my $TEMPfa,">",'temp');
while(<$INFILE>)
{
if ($_ =~/^#/ && $flag == 0)
{
$flag++;
}
else
{
if ($_ =~/^[\w\d]+/)
{
chomp $_;
print $TEMPfa "$_\n";
}
if (($_ =~/^#/ && $flag == 1) || $_ =~/^>File/)
{
close ($TEMPfa);
MuscleHMMERsearch();
TableParser();
open (my $TEMPfa,">",'temp');
}
}
}
close ($INFILE); #closes the $INFILE handle
} #end of subroutine tempProteinFamFileCreator