XrefParser SGDParser
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
File::Basename
POSIX qw ( strftime )
Inherit
XrefParser::BaseParser
Synopsis
No synopsis!
Description
No description!
Methods
run
No description
Code
Methods description
None available.
Methods code
rundescriptionprevnextTop
sub run {
  my $self = shift if (defined(caller(1)));

  my $source_id = shift;
  my $species_id = shift;
  my $files_ref  = shift;
  my $rel_file   = shift;
  my $verbose = shift;

  my $file = @{$files_ref}[0];

  if(!defined($source_id)){
    $source_id = XrefParser::BaseParser->get_source_id_for_filename($file);
  }
  if(!defined($species_id)){
    $species_id = XrefParser::BaseParser->get_species_id_for_filename($file);
  }
  
 

  my $sgd_io = $self->get_filehandle($file);

  if ( !defined $sgd_io ) {
    print STDERR "ERROR: Could not open $file\n";
    return 1;    # 1 is an error
} my $xref_count =0; my $syn_count =0; while ( $_ = $sgd_io->getline() ) { chomp; my ($locus_name, $alias_name, $desc, $gene_prod, $phenotype, $orf_name, $sgd_id) = split(/\t/,$_); my (@syn) = split(/\|/,$alias_name); $self->add_xref($sgd_id,"",$locus_name,$desc,$source_id,$species_id,"MISC"); $xref_count++; foreach my $synonym (@syn){ $self->add_to_syn($sgd_id, $source_id, $synonym, $species_id); $syn_count++; } } $sgd_io->close(); print $xref_count." SGD Xrefs added with $syn_count synonyms\n" if($verbose); return 0; #successful
} 1;
}
General documentation
No general documentation available.