Alexandre Masselot
and 1 contributors


General framework for ms spectra


my $sp=InSilicoSpectro::Spectra::MSSpectra->new(%h|ExpSpectrum|MSSpectra)

$sp->source ([$filename])

Set or get the source file (where the data is)


Set or get the original file (where the data was)

$sp->format ([$strinf])

Set or get the source file format


Set or get the title

$sp->defaultCharge ([$string])

Set or get the defaultCharge

$sp->setSampleInfo(name, value);

set a name/value for sample info


get a sampleinfo value



set to 1 (default) will activate the use of FileCached system


Copyright (C) 2004-2005 Geneva Bioinformatics

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


Alexandre Masselot,

read subs

Alow opening data from various format


Reads the spectra from $this->source , with type from $this{format}. If the latest is not defined, it will try to mgf ()


Try to guess the spectra format (if it is not yet defined) based on the file extension stores in the argument {source}. However, if you wish to load for example .dta file from a directory, it will not determine it automatically.

If the format was already specified, it will not try to guess it.


To allow charge incertitude, the package manage multi charges as on int. For example '2+ AND 3+' will be stored as (2^2+2^3)=12. Subroutines to convert string 2 chargeMask are exported as static (they do not belong to one particuliar spectra