#!usr/bin/perl -w print"\n********Running Fasta34********** \n \n"; print"\n Please enter the file sequence \n"; my $seqfile = ; print "\n Please Enter the library file name \n"; my $library = ; #my $library = defined $ARGV[1] ? $ARGV[1] : "$default_library"; # get library from command line, or use default my $output = "c:/perl/sam/out.fasta"; open(FASTA,"$output") or die "cant open the output file \n"; $result = system("c:/perl/sam/fasta34.exe -Q $seqfile $library -o $output"); #print"\n\n*****enter the output file name you have given***\n"; #$output = ; my $seqname; my $iteration; my $orig = "c:/perl/sam/orginal.fasta"; my $out2in = "c:/perl/sam/output1.aa"; my $compare = "c:/perl/sam/compare.fasta"; print "Enter your cut off percentage"; $cut = ; while () { #compare the line of matching sequence if(m/>>(.{4,6})(.*)/) { $seqname = $1; $laterhalf = $2; } #print "SKIP A LINE iF A MATCH \n"; next if /^ini/; if (m/(\d+\.\d+)% identity/) { $per = $1; #check if match is above the cutoff percentage if ($per > $cut) { #print "\n\n$seqname$laterhalf \n";\ #print "identity match $per % \n"; #store the first line of the input file open(ORG,">>$orig"); open(OUT2IN,">$out2in"); print OUT2IN "$seqname$laterhalf \n"; print ORG "$seqname$laterhalf \n"; while() { if (m/^($seqname)(.*)/) { #store the match sequence print OUT2IN "$2 \n"; print ORG "$2 \n"; } if(m/>>/) { #print "end of given loop"; print "rerunning the fasta program"; $iteration = system("c:/perl/sam/fasta34.exe -Q $out2in $library -O $compare"); open(COMPARE,$compare); seek(FASTA,-100,1); last; } }close(OUT2IN); } } } close (FASTA); close (COMPARE); print $result; #print $iteration;