Mercurial > repos > fgiacomoni > downloader_bank_hmdb
view t/lib/hmdb_apiTest.pm @ 2:be504ccbc41c draft default tip
master branch Updating with tag :CI_COMMIT_TAG - - Fxx
author | fgiacomoni |
---|---|
date | Wed, 30 Nov 2022 16:14:27 +0000 |
parents | 7c9269bded0e |
children |
line wrap: on
line source
package hmdb_apiTest ; use diagnostics; # this gives you more debugging information use warnings; # this warns you of bad practices use strict; # this prevents silly errors use Exporter ; use Carp ; use Data::Dumper ; our $VERSION = "1.0"; our @ISA = qw(Exporter); our @EXPORT = qw( getMetaboliteFeaturesTest buildMetabolitesArrayTest setMetaboliteAcurrateMzToModesMzTest); our %EXPORT_TAGS = ( ALL => [qw( getMetaboliteFeaturesTest buildMetabolitesArrayTest setMetaboliteAcurrateMzToModesMzTest)] ); use lib '/Users/fgiacomoni/Inra/labs/perl/downloader-bank-hmdb/lib' ; use hmdb_api qw( :ALL ) ; sub getMetaboliteFeaturesTest { my ($xml) = @_ ; my $oObject = hmdb_api->new() ; my ($res, $nb) = $oObject->getMetaboliteFeatures($xml) ; # print $res ; return ($nb) ; } sub buildMetabolitesArrayTest { my ($met, $header) = @_ ; my $oObject = hmdb_api->new() ; my ($res) = $oObject->buildMetabolitesArray($met, $header) ; # print Dumper $res ; return ($res) ; } ## SUB TEST for sub setMetaboliteAcurrateMzToModesMzTest { # get values my ( $format, $met ) = @_; my $var2 = hmdb_api->new() ; my $var3 = $var2->setMetaboliteAcurrateMzToModesMz($format, $met, 1.007825, 0.0005486, 1) ; return($var3) ; } ## End SUB 1 ;