# HG changeset patch
# User fgiacomoni
# Date 1537369770 14400
# Node ID c32280662103fd81bd64c3e366950c6a7cf64331
# Parent 97788e4bf3fc386674f46be37c128063880108e1
Master branch Updating - - Fxx
diff -r 97788e4bf3fc -r c32280662103 conf_hmdb.cfg
--- a/conf_hmdb.cfg Sat Jan 20 17:36:51 2018 -0500
+++ b/conf_hmdb.cfg Wed Sep 19 11:09:30 2018 -0400
@@ -1,11 +1,11 @@
## Conf file for wsdl_hmdb.pl script
#
## Version -- edited by F.Giacomoni
-VERSION=2016-11-28
+VERSION=2018-06-13
#
## ARGVT
# Hmdb limits per job (max is 700)
-HMDB_LIMITS=200
+HMDB_LIMITS=50
## Maximum query filtered (default is 20 - min : 1 / max 50)
HMDB_MAX_QUERY=20
## Galaxy url for HTML JS and CSS path
diff -r 97788e4bf3fc -r c32280662103 lib/hmdb.pm
--- a/lib/hmdb.pm Sat Jan 20 17:36:51 2018 -0500
+++ b/lib/hmdb.pm Wed Sep 19 11:09:30 2018 -0400
@@ -225,7 +225,7 @@
my $ua = LWP::UserAgent->new( keep_alive => 10 );
$ua->agent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36");
- $ua->timeout(240);
+ $ua->timeout(2400) ;
my $req = HTTP::Request->new(
POST => 'http://specdb.wishartlab.com/ms/search.csv');
diff -r 97788e4bf3fc -r c32280662103 t/hmdb_managerTest.pl
--- a/t/hmdb_managerTest.pl Sat Jan 20 17:36:51 2018 -0500
+++ b/t/hmdb_managerTest.pl Wed Sep 19 11:09:30 2018 -0400
@@ -130,6 +130,78 @@
is_deeply ( parse_hmdb_csv_resultsTest ( [], [] ),
[],
'Method \'parse_hmdb_csv_results\' works with a empty csv output/mz list and returns an empty but well formatted array' ) ;
+
+ ## Other example... from mz 265.0567515
+ print "\n** Test $current_test parse_hmdb_csv_results with mz 265.0567515 and the correct inputs for hmdb outputs parsing (csv format) **\n" ; $current_test++;
+ is_deeply ( parse_hmdb_csv_resultsTest (
+ [
+ 'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)',
+ '265.0567515,HMDB0059667,3-Methylsulfolene,n/a,C5H8O2S,132.02450019,2M+H,+,265.056276,2',
+ '265.0567515,HMDB0038767,Camelliaside b,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
+ '265.0567515,HMDB0039759,Kaempferol 3-(2g-apiosylrobinobioside),n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
+ '265.0567515,HMDB0040875,Isoschaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
+ '265.0567515,HMDB0040878,Schaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
+ '265.0567515,HMDB0059600,erythro-5-Phosphonooxy-L-lysine,C03366,C6H15N2O6P,242.066772734,M+Na,+,265.055991,3',
+ '265.0567515,HMDB0061174,"2,4-Imidazolidinedione, 3-ethyl-5-(4-hydroxyphenyl)-",n/a,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3',
+ '265.0567515,HMDB0015571,Oxitriptan,C00643,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3',
+ '265.0567515,HMDB0000472,5-hydroxy-l-tryptophan,C01017,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3',
+ '265.0567515,HMDB0030584,Silidianin,n/a,C25H24O10,484.136946988,M+2Na,+,265.057691,4',
+ ],
+ ['265.0567515'],
+ 5
+ ),
+ [
+ [
+ {
+ 'ENTRY_DELTA' => '2',
+ 'ENTRY_FORMULA' => 'C5H8O2S',
+ 'ENTRY_ENTRY_ID' => 'HMDB0059667',
+ 'ENTRY_ADDUCT_MZ' => '265.056276',
+ 'ENTRY_ADDUCT_TYPE' => '+',
+ 'ENTRY_CPD_MZ' => '132.02450019',
+ 'ENTRY_ADDUCT' => '2M+H'
+ },
+ {
+ 'ENTRY_ADDUCT_MZ' => '265.056128',
+ 'ENTRY_ENTRY_ID' => 'HMDB0038767',
+ 'ENTRY_ADDUCT_TYPE' => '+',
+ 'ENTRY_CPD_MZ' => '726.200729034',
+ 'ENTRY_ADDUCT' => 'M+3Na',
+ 'ENTRY_DELTA' => '2',
+ 'ENTRY_FORMULA' => 'C32H38O19'
+ },
+ {
+ 'ENTRY_DELTA' => '2',
+ 'ENTRY_FORMULA' => 'C32H38O19',
+ 'ENTRY_ENTRY_ID' => 'HMDB0039759',
+ 'ENTRY_ADDUCT_MZ' => '265.056128',
+ 'ENTRY_ADDUCT_TYPE' => '+',
+ 'ENTRY_CPD_MZ' => '726.200729034',
+ 'ENTRY_ADDUCT' => 'M+3Na'
+ },
+ {
+ 'ENTRY_FORMULA' => 'C32H38O19',
+ 'ENTRY_DELTA' => '2',
+ 'ENTRY_ADDUCT_TYPE' => '+',
+ 'ENTRY_ADDUCT_MZ' => '265.056128',
+ 'ENTRY_ENTRY_ID' => 'HMDB0040875',
+ 'ENTRY_CPD_MZ' => '726.200729034',
+ 'ENTRY_ADDUCT' => 'M+3Na'
+ },
+ {
+ 'ENTRY_ADDUCT_TYPE' => '+',
+ 'ENTRY_ENTRY_ID' => 'HMDB0040878',
+ 'ENTRY_ADDUCT_MZ' => '265.056128',
+ 'ENTRY_ADDUCT' => 'M+3Na',
+ 'ENTRY_CPD_MZ' => '726.200729034',
+ 'ENTRY_FORMULA' => 'C32H38O19',
+ 'ENTRY_DELTA' => '2'
+ }
+ ]
+ ],
+ 'Method \'parse_hmdb_csv_results\' works with a well-formated csv output and returns a a well formated array' ) ;
+
+
}
diff -r 97788e4bf3fc -r c32280662103 t/lib/hmdbTest.pm
--- a/t/lib/hmdbTest.pm Sat Jan 20 17:36:51 2018 -0500
+++ b/t/lib/hmdbTest.pm Wed Sep 19 11:09:30 2018 -0400
@@ -75,7 +75,7 @@
my $oHmdb = lib::hmdb->new() ;
my $result = $oHmdb->parse_hmdb_csv_results($hmdb_pages, $mzs, $max) ; ## hash format result
-
+ print Dumper $result ;
return($result) ;
}
diff -r 97788e4bf3fc -r c32280662103 wsdl_hmdb.xml
--- a/wsdl_hmdb.xml Sat Jan 20 17:36:51 2018 -0500
+++ b/wsdl_hmdb.xml Wed Sep 19 11:09:30 2018 -0400
@@ -8,9 +8,9 @@
perl-lwp-simple
perl-libwww-perl
perl-html-template
- perl-uri
- perl-text-csv
- perl-xml-twig
+ perl-uri
+ perl-text-csv
+ perl-xml-twig