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

View of /FortyEight/rp_make_similar_to_human_attributes.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Fri May 2 16:54:53 2008 UTC (12 years, 1 month ago) by mkubal
Branch: MAIN
for new RAST genomes

use Data::Dumper;
use Carp;
use FIG_Config;

use FIGV;

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

if(! -d "$jobdir/rp/$genome/attributes"){
    `mkdir $jobdir/rp/$genome/attributes`;
}

my $fig = new FIGV("$jobdir/rp/$genome");

if($fig->is_prokaryotic($genome)){
    my $of = $genome.".sim2human.txt";
    open(IN,"/vol/seed-attributes/computation_results/Sim2Human/$of");
    open(OUT,">$jobdir/rp/$genome/attributes/similar_to_human.txt");
    my %sim;
    while($_ = <IN>){
	if($_ =~/(fig\|\d+.\d+.peg.\d+)/){
	    my $peg = $1;
	    $sim{$peg} = 1;
	}
    }
    close(IN);

    my @pegs = $fig->pegs_of($genome);
    foreach my $peg (@pegs){
	if($sim{$peg}){
	    print OUT "$peg\tsimilar_to_human\tyes\n";
	}
	else{
	    print OUT "$peg\tsimilar_to_human\tno\n";
	}
    }
    $date = `date`;
    chomp($date);
    print OUT "$genome\tsimilar_to_human_computed_for_all_pegs\t$date\n";
    close(OUT);
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3