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

Diff of /FigKernelScripts/svr_in_runs.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3, Fri Aug 28 18:18:50 2009 UTC revision 1.4, Tue Oct 20 20:22:08 2009 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    use strict;
 use LWP;  
 use Data::Dumper;  
3  use SAPserver;  use SAPserver;
4  use Getopt::Long;  use Getopt::Long;
5    
6    #   This is a SAS component.
7    
8    =head1 svr_in_runs
9    
10    Make sequences of genes into operons.
11    
12    This script takes as input groups of genes and finds all the operons containing
13    genes in each group. For the purposes of this script, an operon is a sequence of
14    genes that are close together on the same contig and pointing in the same direction.
15    The operons may contain other genes in the vicinity of the ones specified in the
16    original input.
17    
18    The input must be a tab-delimited file. Each group should be the last field on
19    a line, and must be specified as a comma-separated list of FIG IDs. The operons
20    will also be rendered as a comma-separated list of FIG IDs. The output will consist
21    of the input lines with operons tacked onto the end. Since a group may
22    contain multiple operons, a single input line may produce multiple output lines.
23    
24    This is a pipe command: the input is taken from the standard input and the output
25    is to the standard output.
26    
27    =head2 Command-Line Options
28    
29    =over 4
30    
31    =item MaxGap
32    
33  # This is a SAS Component  Maximum number of base pairs that can be between to genes in order for them to
34    be considered as part of the same operon. The default is 200.
35    
36    =item JustFirst
37    
38    If specified, then only the first gene in an operon will be included in the output.
39    
40    =item url
41    
42    The URL for the Sapling server, if it is to be different from the default.
43    
44    =back
45    
46    =cut
47    
48      my $MaxGap = 0;      my $MaxGap = 0;
     my $AllowOthers = 0;  
49      my $JustFirst = 0;      my $JustFirst = 0;
50    
51      $0 =~ m/([^\/]+)$/;      $0 =~ m/([^\/]+)$/;
52      my $self = $1;      my $self = $1;
53      my $usage = "$self [--MaxGap=N --AllowOthers --JustFirst < peg groups]";      my $usage = "$self [--MaxGap=N --JustFirst --url=http://... ] <input >output";
54    
55      my $rc = GetOptions("MaxGap=i" => \$MaxGap, "AllowOthers" => \$AllowOthers, "JustFirst" => \$JustFirst);      my $rc = GetOptions("MaxGap=i" => \$MaxGap, "JustFirst" => \$JustFirst);
56    
57      if (!$rc) {      if (!$rc) {
58          die "\n   usage: $usage\n\n";          die "\n   usage: $usage\n\n";
# Line 32  Line 68 
68      if ($MaxGap) {      if ($MaxGap) {
69          $args{-maxGap} = $MaxGap;          $args{-maxGap} = $MaxGap;
70      }      }
     if ($AllowOthers) {  
         $args{-allowOthers} = $AllowOthers;  
     }  
71    
72      my $line;      my $line;
73      while (defined($line = <STDIN>)) {      while (defined($line = <STDIN>)) {
# Line 52  Line 85 
85          }          }
86      }      }
87    
88   exit;  

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3