/usr/lib/perl5/TFBS/PatternGen/Motif/Matrix.pm is in libtfbs-perl 0.6.0+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | package TFBS::PatternGen::Motif::Matrix;
use vars qw(@ISA);
use strict;
use TFBS::Matrix;
use TFBS::Matrix::PFM;
@ISA = qw(TFBS::Matrix);
sub new {
my ($caller, %args) = @_;
#my $matrix = TFBS::Matrix->new(%args, -matrixtype=>"PFM");
#my $self = bless $matrix, ref($caller) || $caller;
my $self = $caller->SUPER::new(%args, -matrixtype=>"PFM");
$self->{'length'} = $args{'-length'} || scalar @{$self->{'matrix'}->[0]};
$self->{'nr_hits'} = ($args{'-nr_hits'} || undef);
# || $self->throw("No -nr_hits provided.");
# Why was nr_hits required ?? (Boris)
$self->{'sites'}=$args{'-sites'};
# $self->{'tags'} = ($args{'-tags'} || {});
return $self;
}
sub PFM {
my ($self, %args) = @_;
return TFBS::Matrix::PFM->new (-name => "unknown",
-ID => "unknown",
-class=> "unknown",
-tags => { %{$self->{'tags'} } },
%args,
-matrix => $self->_calculate_PFM()
);
}
sub pattern {
my ($self, %args ) = @_;
$self->PFM(%args);
}
sub _calculate_PFM { # simplest case: matrix already IS PFM
my $self = shift;
return [@{$self->{'matrix'}}];
}
sub get_sites{
return @{$_[0]->{'sites'}};
}
1;
|