#!usr/bin/perl -w print"\n********Running Fasta34********** \n \n"; print"\n Please enter the file sequence and library present in your path \n\n"; $result = system("c:/perl/sam/fasta34.exe"); print"\n\n*****enter the output file name you have given***\n"; $output = ; open(FASTA,"c:/perl/sam/$output") or die "cant open the output file \n"; #Make this a function #Function1 #open(FASTA,"c:/perl/sam/$output"); #@ tempseq = ; #$flag=0; my $var; my $name; my $match; my $seqname; my @input; my $iteration; my $x = 0; print "Enter your cut off percentage"; $cut = ; while () { #compare the line of matching sequence if($name = m/>>(.{4,6})(.*)/g) { $seqname = $1; $laterhalf = $2; } #print "SKIP A LINE iF A MATCH \n"; next if /^ini/; if ($per = m/(\d+\.\d+)% identity/g) { $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 $input[$x] = "$seqname$laterhalf"; while() { if ($match = m/^($seqname)(.*)/) { #store the match sequence print "$2 \n"; $input[$x] = $2; } if(m/>>/g) { print @input[$x]; #open(OUT2IN,">c:/perl/sam/output1"); #print OUT2IN @input; #$iteration = system("OUT2IN"); $x = $x + 1; seek(FASTA,-100,1); last; } } } } } close (FASTA); print $result;