MS

 view release on metacpan or  search on metacpan

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

package MS::Reader::MzIdentML::Peptide;

use strict;
use warnings;

use parent qw/MS::Reader::MzIdentML::SequenceItem/;

sub id         { return $_[0]->{id}         } 
sub seq        { return $_[0]->{PeptideSequence}->{pcdata} }
sub mods       { return $_[0]->{Modification} }

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

MS::Reader::MzIdentML::Peptide - mzIdentML peptide object

=head1 SYNOPSIS

    my $pep = $search->fetch_peptide_by_id('PEP_1');

    say $pep->id;
    say $pep->seq;
    for (@{ $pep->mods }) {
        say $_->{monoisotopicMassDelta};
    }

=head1 DESCRIPTION

The C<MS::Reader::MzIdentML::Peptide> class represents a <Peptide> element in
the search results. This is a specific peptide isoform with known sequence and
modifications, and can be referenced elsewhere in the results.

=head1 METHODS

=head2 id

    my $id = $pep->id;

Returns the peptide ID, which is a unique identifier within the results file

=head2 seq

    my $seq = $pep->seq;

Returns the peptide sequence as a one-letter IUPAC string

=head2 mods

    my $mods = $pep->mods;

Returns a reference to an array of modifications, each of which is a nested
hash structure. The details of this structure are currently undocumented and
need to be deduced using C<Data::Dumper> to be utilized. At some point a
Modification class will be implemented to make utilization of this data
easier.

=head1 CAVEATS AND BUGS

The API is in alpha stage and is not guaranteed to be stable.

Please reports bugs or feature requests through the issue tracker at
L<https://github.com/jvolkening/p5-MS/issues>.



( run in 2.607 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )