[Bio] / Sprout / Sprout.pm Repository:
ViewVC logotype

Diff of /Sprout/Sprout.pm

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

revision 1.82, Sat Sep 2 07:00:54 2006 UTC revision 1.83, Wed Sep 6 19:30:22 2006 UTC
# Line 3442  Line 3442 
3442      return %retVal;      return %retVal;
3443  }  }
3444    
3445    =head3 ReadGroupFile
3446    
3447    C<< my %groupData = Sprout::ReadGroupFile($groupFileName); >>
3448    
3449    Read in the data from the specified group file. The group file contains information
3450    about each of the NMPDR groups.
3451    
3452    =over 4
3453    
3454    =item name
3455    
3456    Name of the group.
3457    
3458    =item page
3459    
3460    Name of the group's page on the web site (e.g. C<campy.php> for
3461    Campylobacter)
3462    
3463    =item genus
3464    
3465    Genus of the group
3466    
3467    =item species
3468    
3469    Species of the group, or an empty string if the group is for an entire
3470    genus. If the group contains more than one species, the species names
3471    should be separated by commas.
3472    
3473    =back
3474    
3475    The parameters to this method are as follows
3476    
3477    =over 4
3478    
3479    =item groupFile
3480    
3481    Name of the file containing the group data.
3482    
3483    =item RETURN
3484    
3485    Returns a hash keyed on group name. The value of each hash
3486    
3487    =back
3488    
3489    =cut
3490    
3491    sub ReadGroupFile {
3492        # Get the parameters.
3493        my ($groupFileName) = @_;
3494        # Declare the return variable.
3495        my %retVal;
3496        # Read the group file.
3497        my @groupLines = Tracer::GetFile($groupFileName);
3498        for my $groupLine (@groupLines) {
3499            my ($name, $page, $genus, $species) = split(/\t/, $groupLine);
3500            $retVal{$name} = [$page, $genus, $species];
3501        }
3502        # Return the result.
3503        return %retVal;
3504    }
3505    
3506  =head2 Internal Utility Methods  =head2 Internal Utility Methods
3507    
3508  =head3 ParseAssignment  =head3 ParseAssignment

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3