MS

 view release on metacpan or  search on metacpan

lib/MS/Peptide.pm  view on Meta::CPAN

    'N' => '15N',
    'O' => '18O',
);


sub new {

    my ($class, $seq, %args) = @_;

    $seq = uc $seq;
    my $self = bless {seq => $seq} => $class;

    my @atoms = map {atoms('aa', $_)} (split '', $seq);

    $self->{atoms}  = \@atoms;
    $self->{length} = CORE::length $seq;
    $self->{n_mod}  = 0;
    $self->{c_mod}  = 0;

    # these can be undefined if not known or specified
    $self->{prev}  = $args{prev};

lib/MS/Reader.pm  view on Meta::CPAN

use Scalar::Util qw/blessed/;
use PerlIO::gzip;
use MS; # because we need access to the package version

use constant BGZF_MAGIC => pack 'H*', '1f8b0804';

sub new {

    my ($class, $fn, %args) = @_;

    my $self = bless {} => $class;

    $self->{__use_cache} = $args{use_cache} ? 1 : 0; # remember accessed records
    $self->{__paranoid}  = $args{paranoid}  ? 1 : 0; # calc MD5 each time
    $self->{__fn}        = undef; # to allow dunlock even if not loaded
    $self->{__fh}        = undef; # to allow dunlock even if not loaded
    $self->{__version}   = $MS::VERSION;
    $self->{__lock}      = $args{lock} // 0;
    $self->{__app_data}  = {};

    $self->load($fn) if (defined $fn);

lib/MS/Search/DB.pm  view on Meta::CPAN

use URI;
use File::Temp;
use List::Util qw/shuffle/;
use Module::Pluggable
    require => 1, sub_name => 'sources', search_path => ['MS::Search::DB::Source'];

sub new {

    my ($class, $fn) = @_;

    my $self = bless {} => $class;

    $self->add_from_file($fn) if (defined $fn);

    return $self;

}

sub add_decoys {

    my ($self, %args) = @_;

lib/MS/Search/DB/Source/uniprot.pm  view on Meta::CPAN

use warnings;

use HTTP::Tiny;
use URI::Escape;
use FileHandle;

sub new {

    my ($class, %args) = @_;

    my $self = bless {%args} => $class;

    return $self;

}

sub _fetch_fh {

    my ($self) = @_;




( run in 0.262 second using v1.01-cache-2.11-cpan-55f5a4728d2 )