[Bio] / FigKernelScripts / svr_in_fasta.pl Repository:
ViewVC logotype

View of /FigKernelScripts/svr_in_fasta.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.1 - (download) (as text) (annotate)
Sun Feb 24 15:21:29 2013 UTC (6 years, 8 months ago) by overbeek
Branch: MAIN
CVS Tags: rast_rel_2014_0729, rast_rel_2014_0912, HEAD
compute correspondences for a pan genome

use strict;
use Data::Dumper;
use Carp;

# This is a SAS Component

=head1 svr_in_fasta

This little script just takes a fasta file of PEGs as input and
outputs a 3-column table [PEG,function,sequence].


    svr_in_fasta < fasta.file | cut -f1,2  

would be normally used to see the functions of the sequences
in a fgasta file.


use gjoseqlib;

my @seqs = &gjoseqlib::read_fasta();
use SAPserver;
my $sapO = SAPserver->new;
my @pegs = map { $_->[0] } @seqs;
my $seqH = $sapO->ids_to_functions( -ids => \@pegs );
foreach $_ (@seqs)
    my $func = $seqH->{$_->[0]};
    if (! $func) { $func = "hypothetical protein" }
    print join("\t",($_->[0],$func,$_->[2])),"\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3