The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Metabolomics::Fragment::Annotation - Perl extension for fragment annotation in metabolomics

VERSION

Version 0.5.2

SYNOPSIS

        Note that this documentation is intended as a reference to the module.

    Metabolomics::Banks::MaConDa is allowing to build a contaminant database usefull to clean your LC-MS filtered peak list:
        my $oBank = Metabolomics::Banks::MaConDa->new() ;                                                               # init the bank object
                $oBank->getContaminantsExtensiveFromSource() ;                                                                  # get theorical contaminants from the extensive version of MaConDa database
                $oNewBank->buildTheoPeakBankFromContaminants($queryMode) ;                                              # build theorical bank (ION | NEUTRAL)
    
    Metabolomics::Banks::BloodExposome is giving access to a local Blood Exposome database (Cf publication here L<https://doi.org/10.1289/EHP4713>):
        my $oBank = Metabolomics::Banks::BloodExposome->new() ;                                                 # init the bank object
                $oBank->getMetabolitesFromSource($source) ;                                                                             # get theorical metabolites from local database version
            $oBank->buildTheoPeakBankFromEntries($IonMode) ;                                                            # produce the new theorical bank depending of chosen acquisition mode
    
    Metabolomics::Banks::AbInitioFragments is used abinitio fragment, adduct and isotope annotation:
    
        my $oBank = Metabolomics::Banks::AbInitioFragments->new() ;                                             # init the bank object
                $oBank->getFragmentsFromSource() ;                                                                                              # get theorical fragment/adduct/isotopes loses or adds
                $oBank->buildTheoPeakBankFromFragments($mzMolecule, $mode, $stateMolecule) ;    # produce the new theorical bank from neutral (or not) molecule mass
                
                
        When resources are built, Metabolomics::Fragment::Annotation drive the annotation process:
                $oBank->parsingMsFragments($inputFile, $asHeader, $mzCol) ;                                     # get exprimental mz listing to annotate
                my $oAnalysis = Metabolomics::Fragment::Annotation->new($oBank) ;                               # init analysis object
                $oAnalysis->compareExpMzToTheoMzList('PPM', $ppmError) ;                                                # compare theorical bank vs experimental bank
    

DESCRIPTION

        Metabolomics::Fragment::Annotation is a full package for Perl dev allowing MS fragments annotation with ab initio database, contaminant and public metabolites ressources.
        

EXPORT

SUBROUTINES/METHODS

METHOD new

        ## Description : new
        ## Input : $self
        ## Ouput : bless $self ;
        ## Usage : new() ;

METHOD compareExpMzToTheoMzList

        ## Description : comparing two lists of mzs (theo and experimental) with a mz delta
        ## Input : $deltaValue, $deltaType
        ## Output : $oAnalysis with annotation results
        ## Usage : $oAnalysis->compareExpMzToTheoMzList ( $deltaValue, $deltaType ) ;
        

METHOD writeTabularWithPeakBankObject

        ## Description : write a full tabular file from a template and mapping peak bank objects features
        ## Input : $oBank, $templateTabular, $tabular
        ## Output : $tabular
        ## Usage : my ( $tabular ) = $oBank->writeTabularWithPeakBankObject ( $templateTabular, $tabular ) ;
        

METHOD writeFullTabularWithPeakBankObject

        ## Description : write a output containing the input data and new column concerning annotation work
        ## Input : $oBank, $inputData, $templateTabular, $tabular
        ## Output : $tabular
        ## Usage : my ( $tabular ) = $oBank->writeFullTabularWithPeakBankObject ( $inputData, $templateTabular, $tabular ) ;
        

METHOD _getPeaksToAnnotated

        ## Description : get a specific list of peaks from the Annotation analysis object
        ## Input : $self, $type
        ## Output : $peakList
        ## Usage : my ( $peakList ) = $oAnalysis->_getPeakList ($type) ;
        

METHOD _getTEMPLATE_TABULAR_FIELDS

        ## Description : get all fields of the tabular template file
        ## Input : $template
        ## Output : $fields
        ## Usage : my ( $fields ) = _getTEMPLATE_TABULAR_FIELDS ( $template ) ;
        

METHOD _mapPeakListWithTemplateFields

        ## Description : map any PeakList with any template fields from tabular
        ## Input : $fields, $peakList
        ## Output : $rows
        ## Usage : my ( $rows ) = _mapPeakListWithTemplateFields ( $fields, $peakList ) ;
        

METHOD _mz_delta_conversion

        ## Description : returns the minimum and maximum mass according to the delta
        ## Input : \$mass, \$delta_type, \$mz_delta
        ## Output : \$min, \$max
        ## Usage : ($min, $max)= mz_delta_conversion($mass, $delta_type, $mz_delta) ;
        

METHOD _computeMzDeltaInMmu

        ## Description : compute a delta (Da) between exp. mz and calc. mz
        ## based on http://www.waters.com/waters/en_GB/Mass-Accuracy-and-Resolution/nav.htm?cid=10091028&locale=en_GB
        ## Other ref : https://www.sciencedirect.com/science/article/pii/S1044030510004022
        ## Input : $expMz, $calcMz
        ## Output : $mzDeltaDa
        ## Usage : my ( $mzDeltaDa ) = _computeMzDeltaInMmu ( $expMz, $calcMz ) ;
        

METHOD computeMzDeltaInPpm

        ## Description : compute a delta (PPM) between exp. mz and calc. mz - Δm/Monoisotopic calculated exact mass ×106 
        ## Input : $expMz, $calcMz
        ## Output : $mzDeltaPpm
        ## Usage : my ( $mzDeltaPpm ) = computeMzDeltaInPpm ( $expMz, $calcMz ) ;
        

AUTHOR

Franck Giacomoni, <franck.giacomoni at inra.fr>

SEE ALSO

All information about FragNot should be find here: https://services.pfem.clermont.inra.fr/gitlab/fgiacomoni/fragnot

BUGS

Please report any bugs or feature requests to bug-metabolomics-fragnot at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Metabolomics-FragNot. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Metabolomics::Fragment::Annotation

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

CeCILL Copyright (C) 2019 by Franck Giacomoni

Initiated by Franck Giacomoni

followed by INRA PFEM team

Web Site = INRA PFEM