[Bio] / Sprout / SimLoad.pl Repository:
ViewVC logotype

Diff of /Sprout/SimLoad.pl

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

revision 1.7, Wed Feb 1 03:18:41 2006 UTC revision 1.8, Wed Feb 1 03:28:11 2006 UTC
# Line 87  Line 87 
87    
88  =over 4  =over 4
89    
90  =item Genome.tbl  =item genome.tbl
91    
92  This is a tab-delimited file that contains the ID of each  This is a tab-delimited file that contains the ID of each
93  genome followed by a description string.  genome followed by a description string.
94    
95  =item Block.tbl, InterGenic_Block.tbl  =item block.tbl, intergenic_block.tbl
96    
97  These are tab-delimited files that associate a gene name  These are tab-delimited files that associate a gene name
98  with each block. The InterGenic file is optional.  with each block. The InterGenic file is optional.
99    
100  =item Region.tbl, InterGenic_Region.tbl  =item region.tbl, intergenic_region.tbl
101    
102  These are tab-delimited files that describe each region  These are tab-delimited files that describe each region
103  of a block. The InterGenic file is optional.  of a block. The InterGenic file is optional.
# Line 106  Line 106 
106    
107  The format of each file is given below.  The format of each file is given below.
108    
109  =head3 Genome.tbl  =head3 genome.tbl
110    
111  The Genome file is copied almost unmodified to the  The Genome file is copied almost unmodified to the
112  load file for the B<Genome> entity. Each record  load file for the B<Genome> entity. Each record
# Line 124  Line 124 
124  A text description of the genome (usually the species name with  A text description of the genome (usually the species name with
125  a strain ID).  a strain ID).
126    
127    =teim groupName
128    
129    The name of the group to which the genome belongs.
130    
131  =back  =back
132    
133  =head3 Block.tbl, InterGenic_Block.tbl  =head3 block.tbl, intergenic_block.tbl
134    
135  These files produce most of the data found in the B<GroupBlock>  These files produce most of the data found in the B<GroupBlock>
136  entity. Each record represents a single block. Blocks either  entity. Each record represents a single block. Blocks either
# Line 149  Line 153 
153    
154  =back  =back
155    
156  =head3 Region.tbl, InterGenic_Region.tbl  =head3 region.tbl, intergenic_region.tbl
157    
158  These files describe the regions in each block. They are  These files describe the regions in each block. They are
159  used to derive the relationships between genomes and  used to derive the relationships between genomes and
# Line 350  Line 354 
354          if (-d $inDirectory) {          if (-d $inDirectory) {
355              # Here we have a directory to process. Check for a genome              # Here we have a directory to process. Check for a genome
356              # file.              # file.
357              my $genomeFileName = "$inDirectory/Genome.tbl";              my $genomeFileName = "$inDirectory/genome.tbl";
358              if (! -e $genomeFileName) {              if (! -e $genomeFileName) {
359                  Trace("$genomeFileName not found. Directory skipped.") if T(1);                  Trace("$genomeFileName not found. Directory skipped.") if T(1);
360              } else {              } else {
# Line 386  Line 390 
390      # Our first task is to copy the genome data to the output directory      # Our first task is to copy the genome data to the output directory
391      # and add the genomes to the genome list.      # and add the genomes to the genome list.
392      my %genomes = ();      my %genomes = ();
393      Open(\*GENOMESIN, "<$inDirectory/Genome.tbl");      Open(\*GENOMESIN, "<$inDirectory/genome.tbl");
394      Open(\*GENOMESOUT, ">>$outDirectory/Genome.dtx");      Open(\*GENOMESOUT, ">>$outDirectory/Genome.dtx");
395      # Count the genomes read and errors found.      # Count the genomes read and errors found.
396      my $genomeCount = 0;      my $genomeCount = 0;
# Line 424  Line 428 
428      Open(\*INCLUDESOUT, ">>$outDirectory/IncludesRegion.dtx");      Open(\*INCLUDESOUT, ">>$outDirectory/IncludesRegion.dtx");
429      # Determine which file sets we'll be processing.      # Determine which file sets we'll be processing.
430      my @fileSets = ();      my @fileSets = ();
431      my @prefixes = ("", "InterGenic_");      my @prefixes = ("", "intergenic_");
432      for my $prefix (@prefixes) {      for my $prefix (@prefixes) {
433          if (-e "$inDirectory/${prefix}Block.tbl") {          if (-e "$inDirectory/${prefix}block.tbl") {
434              push @fileSets, $prefix;              push @fileSets, $prefix;
435          }          }
436      }      }
# Line 436  Line 440 
440      my ($blocksCount, $regionsCount) = (0, 0);      my ($blocksCount, $regionsCount) = (0, 0);
441      # Loop through the useful file sets.      # Loop through the useful file sets.
442      for my $fileSet (@fileSets) {      for my $fileSet (@fileSets) {
443          Open(\*BLOCKSIN, "<$inDirectory/${fileSet}Block.tbl");          Open(\*BLOCKSIN, "<$inDirectory/${fileSet}block.tbl");
444          Open(\*REGIONSIN, "<$inDirectory/${fileSet}Region.tbl");          Open(\*REGIONSIN, "<$inDirectory/${fileSet}region.tbl");
445          Trace("Processing ${fileSet}Blocks.") if T(2);          Trace("Processing ${fileSet}Blocks.") if T(2);
446          # The outer loop processes blocks. This is accomplished by reading          # The outer loop processes blocks. This is accomplished by reading
447          # through the block file. We prime the loop by reading the first          # through the block file. We prime the loop by reading the first

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3