~ubuntu-branches/ubuntu/trusty/bioperl/trusty-proposed

« back to all changes in this revision

Viewing changes to Bio/Matrix/PSM/IO/mast.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: mast.pm,v 1.21.4.2 2006/10/02 23:10:22 sendu Exp $
 
1
# $Id: mast.pm 11480 2007-06-14 14:16:21Z sendu $
2
2
 
3
3
=head1 NAME
4
4
 
61
61
=head2 new
62
62
 
63
63
 Title   : new
64
 
 Usage   : my $psmIO =  new Bio::Matrix::PSM::IO(-format=>'mast', 
 
64
 Usage   : my $psmIO =  Bio::Matrix::PSM::IO->new(-format=>'mast', 
65
65
                                                                               -file=>$file);
66
66
 Function: Associates a file with the appropriate parser
67
67
 Throws  : Throws if the file passed is in HTML format or if 
174
174
                        warn "Malformed data found: $line\n";
175
175
                        next;
176
176
                }
177
 
                $instances{$id}=new Bio::Matrix::PSM::InstanceSite (-id=>$id,
 
177
                $instances{$id}=Bio::Matrix::PSM::InstanceSite->new(-id=>$id,
178
178
                                                                                                                                                          -desc=>$key,
179
179
                                                                                                                                                          -score=>$eval, 
180
180
                                                                                                                                                          -width=>$len,
245
245
        my $width=$index{$id};
246
246
    #We don't know the sequence, but we know the length
247
247
        my $seq='N' x ($width*$self->{_factor}); #Future version will have to parse Section tree nad get the real seq
248
 
        my $instance=new Bio::Matrix::PSM::InstanceSite 
 
248
        my $instance=Bio::Matrix::PSM::InstanceSite->new 
249
249
            ( -id=>"$id\@$sid", 
250
250
              -mid=>$id, 
251
251
              -accession_number=>$sid,
259
259
        push @instances,$instance;
260
260
        $pos+=$index{$id}*$self->{_factor};
261
261
    }
262
 
    my $psm= new Bio::Matrix::PSM::Psm (-instances=> \@instances, 
 
262
    my $psm= Bio::Matrix::PSM::Psm->new(-instances=> \@instances, 
263
263
                                        -e_val    => $eval, 
264
264
                                        -id       => $sid);
265
265
    $self->_pushback($line);