[Bio] / FortyEight / rp_make_PHOBIUS_attributes.pl Repository:
ViewVC logotype

View of /FortyEight/rp_make_PHOBIUS_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Thu Oct 11 17:04:41 2007 UTC (12 years, 8 months ago) by mkubal
Branch: MAIN
v1

my $jobdir = shift(@ARGV);
my $genome = shift(@ARGV);
my $date = localtime();

opendir(DIR,$jobdir."/$genome");
open(PHOB,">$jobdir/rp/$genome/PHOBIUS_attributes_for_$genome.txt");

my @files = readdir(DIR);

print PHOB "$genome\tPhobius_run_on_remote_server\t$date\n";
foreach my $file (@files){
    if ($file =~/($genome.peg.\d+).PHOBIUS_result/){
	my $peg = "fig|".$1;
	open(IN,$jobdir."/$genome/$file");
	my @tm_locations = ();
	while ($_ = <IN>){
	    if($_ =~/SIGNAL\s+(\d+)\s+(\d+)/){
		print PHOB "$peg\tPhobius::signal\t$1-$2\n";
	    }
	    if($_ =~/TRANSMEM\s+(\d+)\s+(\d+)/){
		my $loc = "$1-$2";
	        push(@tm_locations,$loc);
	    }
	}
	close(IN);
	if(scalar(@tm_locations) > 0){
	    my $loc_string = join(",",@tm_locations);
	    print PHOB "$peg\tPhobius::transmembrane\t$loc_string\n";
	}
    }
}

close(PHOB);

`rm $jobdir/$genome/*.PHOBIUS_result`;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3