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

Annotation of /FigKernelScripts/call_genes.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download) (as text)

1 : olson 1.1 #!/usr/bin/perl -w
2 :    
3 :     #
4 :     # This is a SAS Component
5 :     #
6 :    
7 :     #
8 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
9 :     # for Interpretations of Genomes. All Rights Reserved.
10 :     #
11 :     # This file is part of the SEED Toolkit.
12 :     #
13 :     # The SEED Toolkit is free software. You can redistribute
14 :     # it and/or modify it under the terms of the SEED Toolkit
15 :     # Public License.
16 :     #
17 :     # You should have received a copy of the SEED Toolkit Public License
18 :     # along with this program; if not write to the University of Chicago
19 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
20 :     # Genomes at veronika@thefig.info or download a copy from
21 :     # http://www.theseed.org/LICENSE.TXT.
22 :     #
23 :    
24 :     use strict;
25 :     use FFserver;
26 :     use Getopt::Long;
27 :     #use Pod::Usage;
28 :    
29 :     =head1 call_genes Script
30 :    
31 :     =head2 Introduction
32 :    
33 :     call_genes [options]
34 :    
35 :     Call Genes using FF server.
36 :    
37 :     This script takes a FASTA file of contigs from the standard input and writes
38 :     the result of calling genes using Glimmer to the standard output.
39 :    
40 :    
41 :     =head2 Command-Line Options
42 :    
43 :     =over 4
44 :    
45 :     =item genetic_code
46 :    
47 :     A number, generally either 11 or 4, representing the genetic code of the
48 :     given contigs.
49 :    
50 :     =item help
51 :    
52 :     Display this command's parameters and options.
53 :    
54 :     =head3 Output Format
55 :    
56 :     The standard output is FASTA file of proteins.
57 :    
58 :    
59 :     =cut
60 :    
61 :     # Get the command-line options and parameters.
62 :     my $genetic_code = 11;
63 :     my $help;
64 :     my $man;
65 :    
66 :     my $rc = GetOptions("genetic_code=i" => \$genetic_code,
67 :     "help" => \$help);
68 :    
69 :     if ($help)
70 :     {
71 :     #pod2usage({-exitval => 1, -verbose => 2, -output => \*STDOUT});
72 :     my $usage = [ "$0 [options]",
73 :     "\t-genetic_code\tgenetic code for this organism (default 11)",
74 :     "\t-help\tdisplay command-line options", ""];
75 :    
76 :     print join "\n", @$usage;
77 :     exit;
78 :     }
79 :    
80 :     # Create a FIGfam server object.
81 :     my $ffServer = FFserver->new();
82 :    
83 :     # Pass the input file to the FIGfam server to get assignments.
84 : olson 1.2 my $ret = $ffServer->call_genes(\*STDIN, $genetic_code);
85 :     my ($fa, $encoded_tbl) = @$ret;
86 :    
87 :     print $fa;
88 :     print STDERR join("\t", @$_), "\n" for @$encoded_tbl;
89 : olson 1.1

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3