NAME

InSilicoSpectro::InSilico::ModRes Residue modifications package

SYNOPSIS

#read all modres definitions in the default file ({phenyx.config.modres})
InSilicoSpectro::InSilico::ModRes::init();

#or, if the ohenyx system is not installed
InSilicoSpectro::InSilico::ModRes::init("some/path/to/defatultdef.xml");

#print all the modifications
foreach (InSilicoSpectro::InSilico::ModRes::getList()){
  $_->print();
}

#given a swissprot FT valkue, return the related modres
foreach ('PHOSPHORYLATION', 'ACETYLATION (IN ISOFORM SHORT))', 'PHOSPHORYLATION', 'ACETYLATION', 'SULFATION'){
  print "$_ => ".InSilicoSpectro::InSilico::ModRes::getModifFromSprotFT($_)->get('name')."\n";
}

DESCRIPTION

Manage all what is related to residue modifications (masses, positions, SwissProt annotations...)

FUNCTIONS

Initialization

init([$files, [$files, [...]]])

Opens the given files or try to locate the file ${phenyx.config.modres} and stores all the modif in the dictionnary

getFromDico(name)

A dictionnary holds all the enzymes, based on their key

getList()

Returns a list of all the enzymes, sorted by name

registerModResHandler([\&sub])

get/set a subroutine to be called whenever a new modres is instanciated (for example, register into MassCalaculator

METHODS

my $mr=InSilicoSpectro::InSilico::ModRes->new([$h])

$h contains a pointer to a hash for definition

$mr->name([$str])

Set the name if an argument is given.

Returns the name value

$mr->regexp([$str]);

Set the modif regular expression from a string (or return this regular expression if no argument is given)

$mr->cTerm([$val]); =head3 $mr->nTerm([$val]);

Set if the modif is peptide C/N terminus (or just returns the current status is no value is passed to the function)

$mr->protCTerm([$val]); =head3 $mr->protNTerm([$val]);

Set if the modif is protein C/N terminus (or just returns the current status is no value is passed to the function)

$mr->seq2pos($seq);

returns an array of position where the modif can appear on sequence $seq.

This array contains

[-1] if it can be attributed nterm
[length $seq] if it can be attributer cterm
else, a list of indices, starting at 0 for the first AA of the sequence

$mr->set($name, $val)

Set an instance paramter.

$mr->get($name)

Get an instance parameter.

$mr->getXMLTwigElt()

return an XML::Twig::Elt object containing the modres

EXAMPLES

see t/InSilico/tesModRes.pl script

SEE ALSO

Phenyx::Config::GlobalParam

COPYRIGHT

Copyright (C) 2004-2005 Geneva Bioinformatics www.genebio.com

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

AUTHORS

Alexandre Masselot, www.genebio.com