# BioMirror/Transfac.pm =head1 NAME BioMirror::Transfac -- BioMirror::Data packages for Transfac databank =cut package BioMirror::TransfacSite; @ISA = qw( BioMirror::Data ); sub new { my $class= shift; my $self = $class->SUPER::new( srsdb => 'TFSITE', name => 'Transfac Site',## tfsite makeflags => $BioMirror::Data::kFromSource|$BioMirror::Data::kDoSrsIndex, dosummary => 0, source => { comment => 'Transfac from www.transfac.org', url => 'http://me:somepass@www.transfac.org/somewhere/transfac*.tar.Z', }, mirror_dir => undef, ## can't mirror this one, restricted expanded_dir => '$dpath/transfac/', data => [ 'site.dat', ], @_ ); return $self; } sub getRelease { ##VV TRANSFAC CELL TABLE, Rel.3.5 07-12-1998 ##VV TRANSFAC CLASS TABLE, Rel.3.5 07-12-1998 ##VV TRANSFAC FACTOR TABLE, Rel.3.5 07-12-1998 ##VV TRANSFAC/TRRD GENE TABLE, Rel.3.5 07-12-1998 ##VV TRANSFAC MATRIX TABLE, Rel.3.5 07-12-1998 ##VV TRANSFAC SITE TABLE, Rel.3.5 07-12-1998 my $self= shift; my $rel= undef; my $df= BioMirror::replaceVars( $self->expanded_dir . ${$self->data}[0]); my $buf= $self->readChunk($df); if ($buf =~ m/TRANSFAC[A-Z\/ ]+ TABLE, Rel.\s*([0-9\.]+) ([0-9-]+)/) { $rel= "$1, $2"; } return $rel; } package BioMirror::TransfacFactor; @ISA = qw( BioMirror::TransfacSite ); sub new { my $class= shift; my $self = $class->SUPER::new( srsdb => 'TFFACTOR', ## tffactor name => 'Transfac Factor', dosummary => 0, sourceflags => $BioMirror::Data::kSuperSource, data => [ 'factor.dat', ], @_ ); return $self; } package BioMirror::TransfacCell; @ISA = qw( BioMirror::TransfacSite ); sub new { my $class= shift; my $self = $class->SUPER::new( srsdb => 'TFCELL',## tfcell name => 'Transfac Cell', dosummary => 0, sourceflags => $BioMirror::Data::kSuperSource, data => [ 'cell.dat', ], @_ ); return $self; } package BioMirror::TransfacClass; @ISA = qw( BioMirror::TransfacSite ); sub new { my $class= shift; my $self = $class->SUPER::new( srsdb => 'TFCLASS',## tfclass name => 'Transfac Class', dosummary => 0, sourceflags => $BioMirror::Data::kSuperSource, data => [ 'class.dat', ], @_ ); return $self; } package BioMirror::TransfacMatrix; @ISA = qw( BioMirror::TransfacSite ); sub new { my $class= shift; my $self = $class->SUPER::new( srsdb => 'TFMATRIX',## tfmatrix name => 'Transfac Matrix', dosummary => 0, sourceflags => $BioMirror::Data::kSuperSource, data => [ 'matrix.dat', ], @_ ); return $self; } package BioMirror::TransfacGene; @ISA = qw( BioMirror::TransfacSite ); sub new { my $class= shift; my $self = $class->SUPER::new( srsdb => 'TFGENE',## tfgene name => 'Transfac Gene', dosummary => 0, sourceflags => $BioMirror::Data::kSuperSource, data => [ 'gene.dat', ], @_ ); return $self; } #------------- 1;