File: Match.pm

package info (click to toggle)
psortb 3.0.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 121,044 kB
  • sloc: perl: 3,652; ansic: 698; cpp: 338; sh: 27; makefile: 23
file content (96 lines) | stat: -rw-r--r-- 2,007 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package Bio::Tools::PSort::Profile::Match;

use Bio::Root::Root;
use Carp;

use strict;

our @ISA = qw(Bio::Root::Root);
our $VERSION = '0.01';

sub new {
  my ($class, @args) = @_;
  my $self = $class->SUPER::new(@args);

  # Get the parameters we've been passed.
  my ($id,$loc,$comment,$start,$end) =
    $self->_rearrange([qw(PROFILEID LOCALIZATION COMMENT START END)], @args);

  $self->{localization} = $loc;
  $self->{profile_id}     = $id;
  $self->{comment}      = $comment;
  $self->{match_start}  = $start;
  $self->{match_end}    = $end;

  return $self;
}

sub profile_id {
  my $self = shift;

  return (@_) ? $self->{profile_id} = shift : $self->{profile_id};
}

sub localization {
  my $self = shift;

  return (@_) ? $self->{localization} = shift : $self->{localization};
}

sub comment {
  my $self = shift;

  return (@_) ? $self->{comment} = shift : $self->{comment};
}

sub start {
  my $self = shift;

  return (@_) ? $self->{match_start} = shift : $self->{match_start};
}

sub end {
  my $self = shift;

  return (@_) ? $self->{match_end} = shift : $self->{match_end};
}

=head1 NAME

  Bio::Tools::Motif::Match - Represents a match as reported by the
  Bio::Tools::Motif module.

=head1 SYNOPSIS

  use Bio::Tools::Motif::Match;

  # Create a new object.
  $match = new Bio::Tools::Motif::Match(-motifid => 'P07110',
                                        -localization => 'OuterMembrane',
                                        -comment => 'FIMBRIAL_USHER Pattern',
                                        -start => 314,
                                        -end => 325);

  # Accessor methods.
  $val = $match->motif_id();
  $val = $match->localization();
  $val = $match->comment();
  $val = $match->start();
  $val = $match->end();

=head1 AUTHOR

Cory Spencer <cspencer@sfu.ca>

=head1 SEE ALSO

  Bio::Tools::Motif

=head1 ACKNOWLEGEMENTS

Thanks go out to Fiona Brinkman, Jennifer Gardy and the other members of the
Simon Fraser University Brinkman laboratory.

=cut

1;