Mercurial > repos > fgiacomoni > hmdb_ms_search
changeset 14:625fa968d99a draft
Master branch Updating - - Fxx
author | fgiacomoni |
---|---|
date | Thu, 10 Jan 2019 09:10:14 -0500 (2019-01-10) |
parents | 3587cb923890 |
children | beb9619263b0 |
files | lib/csv.pm lib/hmdb.pm test-data/out_test01.txt test-data/out_test02.html test-data/out_test02.tabular test-data/out_test02.txt test-data/out_test03.tabular test-data/out_test03.txt wsdl_hmdb.pl wsdl_hmdb.xml |
diffstat | 10 files changed, 85 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/csv.pm Tue Oct 02 04:59:13 2018 -0400 +++ b/lib/csv.pm Thu Jan 10 09:10:14 2019 -0500 @@ -194,10 +194,44 @@ my $fh = undef ; $csv->eol ("\n"); ## end-of-line string to add to rows +# $csv->quote_char(undef) ; + open $fh, ">:encoding(utf8)", "$file_name" or die "$file_name: $!"; + + my $status = $csv->print ($fh, $_) for @{$rows}; + close $fh or die "$file_name: $!"; + + return(\$file_name) ; +} +## END of SUB + + +=head2 METHOD write_csv_from_hash + + ## Description : write a csv file from simple hash with headers + ## Input : $csv, $file_name, $headers, $arrayofhash + ## Output : $csv_file + ## Usage : my ( $csv_file ) = write_csv_from_arrays( $csv, $file_name, $headers, $arrayofhash ) ; + +=cut +## START of SUB +sub write_csv_from_array_of_hash { + ## Retrieve Values + my $self = shift ; + my ( $csv, $file_name, $headers, $hash ) = @_ ; + + my $fh = undef ; + $csv->eol ("\n"); ## end-of-line string to add to rows $csv->quote_char(undef) ; open $fh, ">:encoding(utf8)", "$file_name" or die "$file_name: $!"; - my $status = $csv->print ($fh, $_) for @{$rows}; + if (defined $headers) { + for my $field (@$headers) { print $fh join('\t', $field), "\n"; } ; + } + + for my $row (keys %{$hash}) { + print $fh join('\t', map { $_, $row->{$_} } sort keys %$row), "\n"; + } + close $fh or die "$file_name: $!"; return(\$file_name) ;
--- a/lib/hmdb.pm Tue Oct 02 04:59:13 2018 -0400 +++ b/lib/hmdb.pm Thu Jan 10 09:10:14 2019 -0500 @@ -195,12 +195,15 @@ croak "No http status is defined for the distant server" ; } else { - unless ( $$status == 200 ) { + unless ( $$status == 200 ) { if ( $$status == 504 ) { croak "Gateway Timeout: The HMDB server was acting as a gateway or proxy and did not receive a timely response from the upstream server" ; } + if ( $$status == 500 ) { croak "Internal Server Error: The HMDB server returns an unexpected internal server error" ; } else { ## None supported http code error ## + croak "Internal Server Error $$status..." ; } } + if ( $$status == 200 ) { print "The HMDB server returns that your request was fulfilled" ; } } return (1) ; @@ -232,7 +235,7 @@ $req->content_type('application/x-www-form-urlencoded'); $req->content('utf8=TRUE&mode='.$mode.'&query_masses='.$masses.'&tolerance='.$delta.'&database=HMDB&commit=Download Results As CSV'); - +# print Dumper $req ; my $res = $ua->request($req); # print $res->as_string; if ($res->is_success) { @@ -269,26 +272,10 @@ my %features = () ; # print Dumper $csv ; +# print Dumper $masses ; +# print Dumper $max_query ; foreach my $line (@{$csv}) { - ## HMDB csv output - [DEPRECATED]... -# if ($line !~ /query_mass,compound_id,formula,compound_mass,adduct,adduct_type,adduct_mass,delta/) { -# my @entry = split(/,/, $line) ; -# -# if ( !exists $result_by_entry{$entry[0]} ) { $result_by_entry{$entry[0]} = [] ; } -# -# $features{ENTRY_ENTRY_ID} = $entry[1] ; -# $features{ENTRY_FORMULA} = $entry[2] ; -# $features{ENTRY_CPD_MZ} = $entry[3] ; -# $features{ENTRY_ADDUCT} = $entry[4] ; -# $features{ENTRY_ADDUCT_TYPE} = $entry[5] ; -# $features{ENTRY_ADDUCT_MZ} = $entry[6] ; -# $features{ENTRY_DELTA} = $entry[7] ; -# -# my %temp = %features ; -# -# push (@{$result_by_entry{$entry[0]} }, \%temp) ; -# } ## NEW HMDB format V4.0 - dec2017 if ($line !~ /query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m\/z,delta\(ppm\)/) { @@ -341,6 +328,7 @@ else {push (@results, [] ) ;} ; } + return(\@results) ; } ## END of SUB @@ -1030,7 +1018,8 @@ my $self = shift ; my ( $csv_file, $rows ) = @_ ; - my $ocsv = lib::csv::new( {is_binary => 1 , quote_binary => 0, quote_char => undef }) ; +# my $ocsv = lib::csv::new( {is_binary => 1 , quote_binary => 0, quote_char => undef }) ; + my $ocsv = lib::csv::new() ; my $csv = $ocsv->get_csv_object("\t") ; $ocsv->write_csv_from_arrays($csv, $$csv_file, $rows) ; @@ -1053,7 +1042,7 @@ my ( $masses, $ids, $results, $file, ) = @_ ; open(CSV, '>:utf8', "$file") or die "Cant' create the file $file\n" ; - print CSV "ID\tQuery(Da)\tDelta\tMetabolite_Name\tCpd_MW(Da)\tFormula\tAdduct\tAdduct_MW(Da)\tHMDB_ID\n" ; + print CSV "ID\tQuery(Da)\tDelta(ppm)\tMetabolite_Name\tCpd_MW(Da)\tFormula\tAdduct\tAdduct_MW(Da)\tHMDB_ID\n" ; my $i = 0 ;
--- a/test-data/out_test01.txt Tue Oct 02 04:59:13 2018 -0400 +++ b/test-data/out_test01.txt Thu Jan 10 09:10:14 2019 -0500 @@ -1,4 +1,4 @@ -ID Query(Da) Delta Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID +ID Query(Da) Delta(ppm) Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID mz_00001 7.02080998 0 UNKNOWN N/A N/A N/A N/A N/A mz_00002 75.05547146 0 UNKNOWN N/A N/A N/A N/A N/A mz_00003 75.08059797 0 UNKNOWN N/A N/A N/A N/A N/A
--- a/test-data/out_test02.html Tue Oct 02 04:59:13 2018 -0400 +++ b/test-data/out_test02.html Thu Jan 10 09:10:14 2019 -0500 @@ -1,1 +1,1 @@ -<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content=""><meta name="author" content="INRA de Clermont-Ferrand"><title>Galaxy HMDB queries - All results</title><link rel="stylesheet" type="text/css" href="css.php" media="all"><link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/fgiacomoni/galaxy_utils/master/style/simplePagination.css"/><!-- JavaScript --><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script src="https://cdn.rawgit.com/fgiacomoni/galaxy_utils/master/scripts/jquery.simplePagination.js"></script><style type="text/css">body {padding-top: 70px}div.lm-table-warning { font-size: 1.4em; font-weight: bold; padding-right: 25px; color: #21536a; margin-left: 3px;}tr.green td {background-color: #eaf2d3; color: black;}tr.blank td {background-color: #9999CC; color: black;}table {font-family:'Trebuchet MS',Arial,Helvetica,sans-serif;width:100%;border-collapse:collapse;}table.detail, table.detail tr.parent, table.detail td, table.detail th, table.detail tr.category {border-collapse:collapse;border:1px solid #98bf21;}table.detail th {font-size: 1.2em;text-align: center;padding-top: 5px;padding-bottom: 10px;background-color: #a7c942;color: #ffffff;}td.ca {text-align:center;}footer { margin: 50px 0;}</style><script>function test(pageNumber){ var page="#page-id-"+pageNumber; $('.select').hide() ; $(page).show()}</script></head><body><div class="container"><div class="lm-table-warning">Results of HMDB queries - Search params : Molecular specie = positive / delta (mass-to-charge ratio) = 0.001</div><div id="detail_table_source" style="display:none"></div><p><div id="choose"></div><p><div id="ms_search_0" class="ms-search-table"></div><!-- HeadRows--><table id="detail_table" class="detail"><col style="width:30px;"><!-- Ids (m/z)--><col style="width:30px;"><!-- Mass (m/z)--><col style="width:120px;"><!-- Met name--><col style="width:50px;"><!-- Cpd ID--><col style="width:40px;"><!-- formula--><col style="width:60px;"><!-- cpd mw--><col style="width:50px;"><!-- adduct --><col style="width:20px;"><!-- adduct type--><col style="width:60px;"><!-- adduct mw--><col style="width:50px;"><!-- delta--><col style="width:120px;"><!-- INCHI--><col style="width:20;"><!-- logP--><thead><th>ID from input</th><th>Mass (m/z)</th><th>Metabolite_Name</th><th>Compound_ID</th><th>Formula</th><th>Compound MW (Da)</th><th>Adduct</th><th>Adduct_Type</th><th>Adduct MW (Da)</th><th>Delta</th><th>InChI Identifier</th><th>Predicted LogP (ALOGPS)</th></thead><tbody class="select" id="page-id-1"><tr class="white"><td class="ca" >mz_00001</td><td id="1" class="ca" >7.02080998</td><td class="ca" colspan="10"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">UNKNOWN</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">NONE</a></td><td class="ca">n/a</td><td class="ca">n/a</td><td class="ca">n/a</td><td class="ca">n/a</td><td class="ca">n/a</td><td class="ca">0</td><td class="ca">n/a</td><td class="ca">n/a</td></tr><tr class="green"><td class="ca" >mz_00002</td><td id="2" class="ca" >75.05547146</td><td class="ca" colspan="10"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">N-Nitrosodimethylamine</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0031419" target="_blank" class="btn">HMDB0031419</a></td><td class="ca">C2H6N2O</td><td class="ca">74.048012824</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.055289</td><td class="ca">2</td><td class="ca">InChI=1S/C2H6N2O/c1-4(2)3-5/h1-2H3</td><td class="ca">-0.53</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Acetylhydrazine</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0060428" target="_blank" class="btn">HMDB0060428</a></td><td class="ca">C2H6N2O</td><td class="ca">74.048012824</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.055289</td><td class="ca">2</td><td class="ca">InChI=1S/C2H6N2O/c1-2(5)4-3/h3H2,1H3,(H,4,5)</td><td class="ca">-0.78</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">glycinamide</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0062472" target="_blank" class="btn">HMDB0062472</a></td><td class="ca">C2H6N2O</td><td class="ca">74.048012824</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.055289</td><td class="ca">2</td><td class="ca">InChI=1S/C2H6N2O/c3-1-2(4)5/h1,3H2,(H2,4,5)</td><td class="ca">-2.49</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Creatine</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000064" target="_blank" class="btn">HMDB0000064</a></td><td class="ca">C4H9N3O2</td><td class="ca">131.069476547</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">75.055288</td><td class="ca">2</td><td class="ca">InChI=1S/C4H9N3O2/c1-7(4(5)6)2-3(8)9/h2H2,1H3,(H3,5,6)(H,8,9)</td><td class="ca">-1.59</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Beta-Guanidinopropionic acid</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0013222" target="_blank" class="btn">HMDB0013222</a></td><td class="ca">C4H9N3O2</td><td class="ca">131.069476547</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">75.055288</td><td class="ca">2</td><td class="ca">InChI=1S/C4H9N3O2/c5-4(6)7-2-1-3(8)9/h1-2H2,(H,8,9)(H4,5,6,7)</td><td class="ca">-1.70</td></tr><tr class="white"><td class="ca" >mz_00003</td><td id="3" class="ca" >75.08059797</td><td class="ca" colspan="10"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">UNKNOWN</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0155221" target="_blank" class="btn">HMDB0155221</a></td><td class="ca">H4O7P2</td><td class="ca">177.943225506</td><td class="ca">M+H+2Na</td><td class="ca">+</td><td class="ca">75.080599</td><td class="ca">0</td><td class="ca">NA</td><td class="ca">NA</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">1-Butanol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0004327" target="_blank" class="btn">HMDB0004327</a></td><td class="ca">C4H10O</td><td class="ca">74.073164942</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.080441</td><td class="ca">2</td><td class="ca">InChI=1S/C4H10O/c1-2-3-4-5/h5H,2-4H2,1H3</td><td class="ca">0.84</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">UNKNOWN</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0062103" target="_blank" class="btn">HMDB0062103</a></td><td class="ca">C4H10O</td><td class="ca">74.073164942</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.080441</td><td class="ca">2</td><td class="ca">NA</td><td class="ca">NA</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">1-hydroperoxy-8-carboxyoctyl 3,4-epoxynon-(2E)-enyl ether</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0062326" target="_blank" class="btn">HMDB0062326</a></td><td class="ca">C4H10O</td><td class="ca">74.073164942</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.080441</td><td class="ca">2</td><td class="ca">InChI=1S/C4H10O/c1-3-5-4-2/h3-4H2,1-2H3</td><td class="ca">1.12</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">2-Butanol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0011469" target="_blank" class="btn">HMDB0011469</a></td><td class="ca">C4H10O</td><td class="ca">74.073164942</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.080441</td><td class="ca">2</td><td class="ca">InChI=1S/C4H10O/c1-3-4(2)5/h4-5H,3H2,1-2H3</td><td class="ca">0.66</td></tr><tr class="green"><td class="ca" >mz_00004</td><td id="4" class="ca" >76.03942694</td><td class="ca" colspan="10"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">L-Aspartic acid</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000191" target="_blank" class="btn">HMDB0000191</a></td><td class="ca">C4H7NO4</td><td class="ca">133.037507717</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C4H7NO4/c5-2(4(8)9)1-3(6)7/h2H,1,5H2,(H,6,7)(H,8,9)/t2-/m0/s1</td><td class="ca">-3.52</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Ethyl nitrite</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0031239" target="_blank" class="btn">HMDB0031239</a></td><td class="ca">C2H5NO2</td><td class="ca">75.032028409</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C2H5NO2/c1-2-5-3-4/h2H2,1H3</td><td class="ca">0.42</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">1-deoxy-1-(N6-lysino)-D-fructose</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0062186" target="_blank" class="btn">HMDB0062186</a></td><td class="ca">C4H7NO4</td><td class="ca">133.037507709</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C4H7NO4/c5-2(4(8)9)1-3(6)7/h2H,1,5H2,(H,6,7)(H,8,9)</td><td class="ca">-3.52</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Glycine</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000123" target="_blank" class="btn">HMDB0000123</a></td><td class="ca">C2H5NO2</td><td class="ca">75.032028409</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C2H5NO2/c3-1-2(4)5/h1,3H2,(H,4,5)</td><td class="ca">-3.34</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Acetohydroxamic Acid</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0014691" target="_blank" class="btn">HMDB0014691</a></td><td class="ca">C2H5NO2</td><td class="ca">75.032028409</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C2H5NO2/c1-2(4)3-5/h5H,1H3,(H,3,4)</td><td class="ca">-1.46</td></tr></tbody><tbody class="select" id="page-id-2"><tr class="white"><td class="ca" >mz_00005</td><td id="5" class="ca" >76.07584477</td><td class="ca" colspan="10"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">3-aminopropan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0140038" target="_blank" class="btn">HMDB0140038</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c4-2-1-3-5/h5H,1-4H2</td><td class="ca">-1.01</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">1-Amino-propan-2-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0012136" target="_blank" class="btn">HMDB0012136</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c1-3(5)2-4/h3,5H,2,4H2,1H3</td><td class="ca">-1.03</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">2-(methylamino)ethan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0142449" target="_blank" class="btn">HMDB0142449</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413914</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c1-4-2-3-5/h4-5H,2-3H2,1H3</td><td class="ca">-1.05</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">Trimethylamine N-oxide</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000925" target="_blank" class="btn">HMDB0000925</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c1-4(2,3)5/h1-3H3</td><td class="ca">-2.01</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">Allyl alcohol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0031652" target="_blank" class="btn">HMDB0031652</a></td><td class="ca">C3H6O</td><td class="ca">58.041864814</td><td class="ca">M+NH4</td><td class="ca">+</td><td class="ca">76.075688</td><td class="ca">2</td><td class="ca">InChI=1S/C3H6O/c1-2-3-4/h2,4H,1,3H2</td><td class="ca">-0.03</td></tr><tr class="green"><td class="ca" >mz_00006</td><td id="6" class="ca" >76.07593168</td><td class="ca" colspan="10"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">3-aminopropan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0140038" target="_blank" class="btn">HMDB0140038</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c4-2-1-3-5/h5H,1-4H2</td><td class="ca">-1.01</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">1-Amino-propan-2-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0012136" target="_blank" class="btn">HMDB0012136</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c1-3(5)2-4/h3,5H,2,4H2,1H3</td><td class="ca">-1.03</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">2-(methylamino)ethan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0142449" target="_blank" class="btn">HMDB0142449</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413914</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c1-4-2-3-5/h4-5H,2-3H2,1H3</td><td class="ca">-1.05</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Trimethylamine N-oxide</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000925" target="_blank" class="btn">HMDB0000925</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c1-4(2,3)5/h1-3H3</td><td class="ca">-2.01</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Allyl alcohol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0031652" target="_blank" class="btn">HMDB0031652</a></td><td class="ca">C3H6O</td><td class="ca">58.041864814</td><td class="ca">M+NH4</td><td class="ca">+</td><td class="ca">76.075688</td><td class="ca">3</td><td class="ca">InChI=1S/C3H6O/c1-2-3-4/h2,4H,1,3H2</td><td class="ca">-0.03</td></tr></tbody></table></div><div class="container"><hr><footer><div class="row"> <div class="col-lg-12"><p>Copyright © INRA, N Paulhe, F Giacomoni 2014 </p> </div> </div> </footer></div><script language="javascript">$(function() {$('#choose').pagination({items: 2,itemsOnPage: 1,currentPage: 1,onInit: function () { test(1); },cssStyle: 'light-theme',onPageClick: function(pageNumber){test(pageNumber)}}).pagination('redraw');});</script></body></html> \ No newline at end of file +<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description" content=""><meta name="author" content="INRA de Clermont-Ferrand"><title>Galaxy HMDB queries - All results</title><link rel="stylesheet" type="text/css" href="css.php" media="all"><link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/fgiacomoni/galaxy_utils/master/style/simplePagination.css"/><!-- JavaScript --><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script src="https://cdn.rawgit.com/fgiacomoni/galaxy_utils/master/scripts/jquery.simplePagination.js"></script><style type="text/css">body {padding-top: 70px}div.lm-table-warning { font-size: 1.4em; font-weight: bold; padding-right: 25px; color: #21536a; margin-left: 3px;}tr.green td {background-color: #eaf2d3; color: black;}tr.blank td {background-color: #9999CC; color: black;}table {font-family:'Trebuchet MS',Arial,Helvetica,sans-serif;width:100%;border-collapse:collapse;}table.detail, table.detail tr.parent, table.detail td, table.detail th, table.detail tr.category {border-collapse:collapse;border:1px solid #98bf21;}table.detail th {font-size: 1.2em;text-align: center;padding-top: 5px;padding-bottom: 10px;background-color: #a7c942;color: #ffffff;}td.ca {text-align:center;}footer { margin: 50px 0;}</style><script>function test(pageNumber){ var page="#page-id-"+pageNumber; $('.select').hide() ; $(page).show()}</script></head><body><div class="container"><div class="lm-table-warning">Results of HMDB queries - Search params : Molecular specie = positive / delta (mass-to-charge ratio) = 0.001</div><div id="detail_table_source" style="display:none"></div><p><div id="choose"></div><p><div id="ms_search_0" class="ms-search-table"></div><!-- HeadRows--><table id="detail_table" class="detail"><col style="width:30px;"><!-- Ids (m/z)--><col style="width:30px;"><!-- Mass (m/z)--><col style="width:120px;"><!-- Met name--><col style="width:50px;"><!-- Cpd ID--><col style="width:40px;"><!-- formula--><col style="width:60px;"><!-- cpd mw--><col style="width:50px;"><!-- adduct --><col style="width:20px;"><!-- adduct type--><col style="width:60px;"><!-- adduct mw--><col style="width:50px;"><!-- delta--><col style="width:120px;"><!-- INCHI--><col style="width:20;"><!-- logP--><thead><th>ID from input</th><th>Mass (m/z)</th><th>Metabolite_Name</th><th>Compound_ID</th><th>Formula</th><th>Compound MW (Da)</th><th>Adduct</th><th>Adduct_Type</th><th>Adduct MW (Da)</th><th>Delta</th><th>InChI Identifier</th><th>Predicted LogP (ALOGPS)</th></thead><tbody class="select" id="page-id-1"><tr class="white"><td class="ca" >mz_00001</td><td id="1" class="ca" >7.02080998</td><td class="ca" colspan="10"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">Beryllium</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0002387" target="_blank" class="btn">HMDB0002387</a></td><td class="ca">Be</td><td class="ca">9.012182135</td><td class="ca">M+NH4-H2O</td><td class="ca">+</td><td class="ca">7.02033</td><td class="ca">68</td><td class="ca">InChI=1S/Be/q+2</td><td class="ca">NA</td></tr><tr class="green"><td class="ca" >mz_00002</td><td id="2" class="ca" >75.05547146</td><td class="ca" colspan="10"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">N-Nitrosodimethylamine</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0031419" target="_blank" class="btn">HMDB0031419</a></td><td class="ca">C2H6N2O</td><td class="ca">74.048012824</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.055289</td><td class="ca">2</td><td class="ca">InChI=1S/C2H6N2O/c1-4(2)3-5/h1-2H3</td><td class="ca">-0.53</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Acetylhydrazine</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0060428" target="_blank" class="btn">HMDB0060428</a></td><td class="ca">C2H6N2O</td><td class="ca">74.048012824</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.055289</td><td class="ca">2</td><td class="ca">InChI=1S/C2H6N2O/c1-2(5)4-3/h3H2,1H3,(H,4,5)</td><td class="ca">-0.78</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">glycinamide</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0062472" target="_blank" class="btn">HMDB0062472</a></td><td class="ca">C2H6N2O</td><td class="ca">74.048012824</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.055289</td><td class="ca">2</td><td class="ca">InChI=1S/C2H6N2O/c3-1-2(4)5/h1,3H2,(H2,4,5)</td><td class="ca">-2.49</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Creatine</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000064" target="_blank" class="btn">HMDB0000064</a></td><td class="ca">C4H9N3O2</td><td class="ca">131.069476547</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">75.055288</td><td class="ca">2</td><td class="ca">InChI=1S/C4H9N3O2/c1-7(4(5)6)2-3(8)9/h2H2,1H3,(H3,5,6)(H,8,9)</td><td class="ca">-1.59</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Beta-Guanidinopropionic acid</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0013222" target="_blank" class="btn">HMDB0013222</a></td><td class="ca">C4H9N3O2</td><td class="ca">131.069476547</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">75.055288</td><td class="ca">2</td><td class="ca">InChI=1S/C4H9N3O2/c5-4(6)7-2-1-3(8)9/h1-2H2,(H,8,9)(H4,5,6,7)</td><td class="ca">-1.70</td></tr><tr class="white"><td class="ca" >mz_00003</td><td id="3" class="ca" >75.08059797</td><td class="ca" colspan="10"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">Pyrophosphate</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000250" target="_blank" class="btn">HMDB0000250</a></td><td class="ca">H4O7P2</td><td class="ca">177.943225506</td><td class="ca">M+H+2Na</td><td class="ca">+</td><td class="ca">75.080599</td><td class="ca">0</td><td class="ca">InChI=1S/H4O7P2/c1-8(2,3)7-9(4,5)6/h(H2,1,2,3)(H2,4,5,6)</td><td class="ca">NA</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">UNKNOWN</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0155221" target="_blank" class="btn">HMDB0155221</a></td><td class="ca">H4O7P2</td><td class="ca">177.943225506</td><td class="ca">M+H+2Na</td><td class="ca">+</td><td class="ca">75.080599</td><td class="ca">0</td><td class="ca">NA</td><td class="ca">NA</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">1-Butanol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0004327" target="_blank" class="btn">HMDB0004327</a></td><td class="ca">C4H10O</td><td class="ca">74.073164942</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.080441</td><td class="ca">2</td><td class="ca">InChI=1S/C4H10O/c1-2-3-4-5/h5H,2-4H2,1H3</td><td class="ca">0.84</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">2-Methylpropan-2-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0031456" target="_blank" class="btn">HMDB0031456</a></td><td class="ca">C4H10O</td><td class="ca">74.073164942</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.080441</td><td class="ca">2</td><td class="ca">InChI=1S/C4H10O/c1-4(2,3)5/h5H,1-3H3</td><td class="ca">0.70</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">Isobutanol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0006006" target="_blank" class="btn">HMDB0006006</a></td><td class="ca">C4H10O</td><td class="ca">74.073164942</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">75.080441</td><td class="ca">2</td><td class="ca">InChI=1S/C4H10O/c1-4(2)3-5/h4-5H,3H2,1-2H3</td><td class="ca">0.60</td></tr><tr class="green"><td class="ca" >mz_00004</td><td id="4" class="ca" >76.03942694</td><td class="ca" colspan="10"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">L-Aspartic acid</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000191" target="_blank" class="btn">HMDB0000191</a></td><td class="ca">C4H7NO4</td><td class="ca">133.037507717</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C4H7NO4/c5-2(4(8)9)1-3(6)7/h2H,1,5H2,(H,6,7)(H,8,9)/t2-/m0/s1</td><td class="ca">-3.52</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">UNKNOWN</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0161401" target="_blank" class="btn">HMDB0161401</a></td><td class="ca">C2H4NO2</td><td class="ca">74.024751953</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">NA</td><td class="ca">NA</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Ethyl nitrite</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0031239" target="_blank" class="btn">HMDB0031239</a></td><td class="ca">C2H5NO2</td><td class="ca">75.032028409</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C2H5NO2/c1-2-5-3-4/h2H2,1H3</td><td class="ca">0.42</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">1-deoxy-1-(N6-lysino)-D-fructose</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0062186" target="_blank" class="btn">HMDB0062186</a></td><td class="ca">C4H7NO4</td><td class="ca">133.037507709</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C4H7NO4/c5-2(4(8)9)1-3(6)7/h2H,1,5H2,(H,6,7)(H,8,9)</td><td class="ca">-3.52</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">N-acetyl-seryl-aspartate</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0062501" target="_blank" class="btn">HMDB0062501</a></td><td class="ca">C4H7NO4</td><td class="ca">133.037507709</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">76.039304</td><td class="ca">2</td><td class="ca">InChI=1S/C4H7NO4/c5-2(4(8)9)1-3(6)7/h2H,1,5H2,(H,6,7)(H,8,9)</td><td class="ca">-3.52</td></tr></tbody><tbody class="select" id="page-id-2"><tr class="white"><td class="ca" >mz_00005</td><td id="5" class="ca" >76.07584477</td><td class="ca" colspan="10"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">3-aminopropan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0140038" target="_blank" class="btn">HMDB0140038</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c4-2-1-3-5/h5H,1-4H2</td><td class="ca">-1.01</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">2-(methylamino)ethan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0142449" target="_blank" class="btn">HMDB0142449</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413914</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c1-4-2-3-5/h4-5H,2-3H2,1H3</td><td class="ca">-1.05</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">Trimethylamine N-oxide</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000925" target="_blank" class="btn">HMDB0000925</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c1-4(2,3)5/h1-3H3</td><td class="ca">-2.01</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">1-Amino-propan-2-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0012136" target="_blank" class="btn">HMDB0012136</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">2</td><td class="ca">InChI=1S/C3H9NO/c1-3(5)2-4/h3,5H,2,4H2,1H3</td><td class="ca">-1.03</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca">UNKNOWN</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0168716" target="_blank" class="btn">HMDB0168716</a></td><td class="ca">C6H15NO2</td><td class="ca">133.110278727</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">76.075689</td><td class="ca">2</td><td class="ca">NA</td><td class="ca">NA</td></tr><tr class="green"><td class="ca" >mz_00006</td><td id="6" class="ca" >76.07593168</td><td class="ca" colspan="10"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">3-aminopropan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0140038" target="_blank" class="btn">HMDB0140038</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c4-2-1-3-5/h5H,1-4H2</td><td class="ca">-1.01</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">2-(methylamino)ethan-1-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0142449" target="_blank" class="btn">HMDB0142449</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413914</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c1-4-2-3-5/h4-5H,2-3H2,1H3</td><td class="ca">-1.05</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">Trimethylamine N-oxide</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0000925" target="_blank" class="btn">HMDB0000925</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c1-4(2,3)5/h1-3H3</td><td class="ca">-2.01</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">1-Amino-propan-2-ol</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0012136" target="_blank" class="btn">HMDB0012136</a></td><td class="ca">C3H9NO</td><td class="ca">75.068413915</td><td class="ca">M+H</td><td class="ca">+</td><td class="ca">76.07569</td><td class="ca">3</td><td class="ca">InChI=1S/C3H9NO/c1-3(5)2-4/h3,5H,2,4H2,1H3</td><td class="ca">-1.03</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca">UNKNOWN</td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB0168716" target="_blank" class="btn">HMDB0168716</a></td><td class="ca">C6H15NO2</td><td class="ca">133.110278727</td><td class="ca">M+H+NH4</td><td class="ca">+</td><td class="ca">76.075689</td><td class="ca">3</td><td class="ca">NA</td><td class="ca">NA</td></tr></tbody></table></div><div class="container"><hr><footer><div class="row"> <div class="col-lg-12"><p>Copyright © INRA, N Paulhe, F Giacomoni 2014 </p> </div> </div> </footer></div><script language="javascript">$(function() {$('#choose').pagination({items: 2,itemsOnPage: 1,currentPage: 1,onInit: function () { test(1); },cssStyle: 'light-theme',onPageClick: function(pageNumber){test(pageNumber)}}).pagination('redraw');});</script></body></html> \ No newline at end of file
--- a/test-data/out_test02.tabular Tue Oct 02 04:59:13 2018 -0400 +++ b/test-data/out_test02.tabular Thu Jan 10 09:10:14 2019 -0500 @@ -1,7 +1,7 @@ id mz rt hmdb(delta::name::mz::formula::adduct::id) -1 7.02080998 49.38210915 NONE -2 75.05547146 0.658528069 2::[N-Nitrosodimethylamine]::74.048012824::C2H6N2O::[M+H]::HMDB0031419 | 2::[Acetylhydrazine]::74.048012824::C2H6N2O::[M+H]::HMDB0060428 | 2::[glycinamide]::74.048012824::C2H6N2O::[M+H]::HMDB0062472 | 2::[Creatine]::131.069476547::C4H9N3O2::[M+H+NH4]::HMDB0000064 | 2::[Beta-Guanidinopropionic acid]::131.069476547::C4H9N3O2::[M+H+NH4]::HMDB0013222 -3 75.08059797 1743.94267 0::[UNKNOWN]::177.943225506::H4O7P2::[M+H+2Na]::HMDB0155221 | 2::[1-Butanol]::74.073164942::C4H10O::[M+H]::HMDB0004327 | 2::[UNKNOWN]::74.073164942::C4H10O::[M+H]::HMDB0062103 | 2::[1-hydroperoxy-8-carboxyoctyl 3,4-epoxynon-(2E)-enyl ether]::74.073164942::C4H10O::[M+H]::HMDB0062326 | 2::[2-Butanol]::74.073164942::C4H10O::[M+H]::HMDB0011469 -4 76.03942694 51.23158899 2::[L-Aspartic acid]::133.037507717::C4H7NO4::[M+H+NH4]::HMDB0000191 | 2::[Ethyl nitrite]::75.032028409::C2H5NO2::[M+H]::HMDB0031239 | 2::[1-deoxy-1-(N6-lysino)-D-fructose]::133.037507709::C4H7NO4::[M+H+NH4]::HMDB0062186 | 2::[Glycine]::75.032028409::C2H5NO2::[M+H]::HMDB0000123 | 2::[Acetohydroxamic Acid]::75.032028409::C2H5NO2::[M+H]::HMDB0014691 -5 76.07584477 50.51249853 2::[3-aminopropan-1-ol]::75.068413915::C3H9NO::[M+H]::HMDB0140038 | 2::[1-Amino-propan-2-ol]::75.068413915::C3H9NO::[M+H]::HMDB0012136 | 2::[2-(methylamino)ethan-1-ol]::75.068413914::C3H9NO::[M+H]::HMDB0142449 | 2::[Trimethylamine N-oxide]::75.068413915::C3H9NO::[M+H]::HMDB0000925 | 2::[Allyl alcohol]::58.041864814::C3H6O::[M+NH4]::HMDB0031652 -6 76.07593168 0.149308136 3::[3-aminopropan-1-ol]::75.068413915::C3H9NO::[M+H]::HMDB0140038 | 3::[1-Amino-propan-2-ol]::75.068413915::C3H9NO::[M+H]::HMDB0012136 | 3::[2-(methylamino)ethan-1-ol]::75.068413914::C3H9NO::[M+H]::HMDB0142449 | 3::[Trimethylamine N-oxide]::75.068413915::C3H9NO::[M+H]::HMDB0000925 | 3::[Allyl alcohol]::58.041864814::C3H6O::[M+NH4]::HMDB0031652 +1 7.02080998 49.38210915 68::[Beryllium]::9.012182135::Be::[M+NH4-H2O]::HMDB0002387 +2 75.05547146 0.658528069 "2::[N-Nitrosodimethylamine]::74.048012824::C2H6N2O::[M+H]::HMDB0031419 | 2::[Acetylhydrazine]::74.048012824::C2H6N2O::[M+H]::HMDB0060428 | 2::[glycinamide]::74.048012824::C2H6N2O::[M+H]::HMDB0062472 | 2::[Creatine]::131.069476547::C4H9N3O2::[M+H+NH4]::HMDB0000064 | 2::[Beta-Guanidinopropionic acid]::131.069476547::C4H9N3O2::[M+H+NH4]::HMDB0013222" +3 75.08059797 1743.94267 "0::[Pyrophosphate]::177.943225506::H4O7P2::[M+H+2Na]::HMDB0000250 | 0::[UNKNOWN]::177.943225506::H4O7P2::[M+H+2Na]::HMDB0155221 | 2::[1-Butanol]::74.073164942::C4H10O::[M+H]::HMDB0004327 | 2::[2-Methylpropan-2-ol]::74.073164942::C4H10O::[M+H]::HMDB0031456 | 2::[Isobutanol]::74.073164942::C4H10O::[M+H]::HMDB0006006" +4 76.03942694 51.23158899 "2::[L-Aspartic acid]::133.037507717::C4H7NO4::[M+H+NH4]::HMDB0000191 | 2::[UNKNOWN]::74.024751953::C2H4NO2::[M+H]::HMDB0161401 | 2::[Ethyl nitrite]::75.032028409::C2H5NO2::[M+H]::HMDB0031239 | 2::[1-deoxy-1-(N6-lysino)-D-fructose]::133.037507709::C4H7NO4::[M+H+NH4]::HMDB0062186 | 2::[N-acetyl-seryl-aspartate]::133.037507709::C4H7NO4::[M+H+NH4]::HMDB0062501" +5 76.07584477 50.51249853 "2::[3-aminopropan-1-ol]::75.068413915::C3H9NO::[M+H]::HMDB0140038 | 2::[2-(methylamino)ethan-1-ol]::75.068413914::C3H9NO::[M+H]::HMDB0142449 | 2::[Trimethylamine N-oxide]::75.068413915::C3H9NO::[M+H]::HMDB0000925 | 2::[1-Amino-propan-2-ol]::75.068413915::C3H9NO::[M+H]::HMDB0012136 | 2::[UNKNOWN]::133.110278727::C6H15NO2::[M+H+NH4]::HMDB0168716" +6 76.07593168 0.149308136 "3::[3-aminopropan-1-ol]::75.068413915::C3H9NO::[M+H]::HMDB0140038 | 3::[2-(methylamino)ethan-1-ol]::75.068413914::C3H9NO::[M+H]::HMDB0142449 | 3::[Trimethylamine N-oxide]::75.068413915::C3H9NO::[M+H]::HMDB0000925 | 3::[1-Amino-propan-2-ol]::75.068413915::C3H9NO::[M+H]::HMDB0012136 | 3::[UNKNOWN]::133.110278727::C6H15NO2::[M+H+NH4]::HMDB0168716"
--- a/test-data/out_test02.txt Tue Oct 02 04:59:13 2018 -0400 +++ b/test-data/out_test02.txt Thu Jan 10 09:10:14 2019 -0500 @@ -1,27 +1,27 @@ -ID Query(Da) Delta Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID -mz_00001 7.02080998 0 UNKNOWN N/A N/A N/A N/A N/A +ID Query(Da) Delta(ppm) Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID +mz_00001 7.02080998 68 [Beryllium] 9.012182135 Be [M+NH4-H2O] 7.02033 HMDB0002387 mz_00002 75.05547146 2 [N-Nitrosodimethylamine] 74.048012824 C2H6N2O [M+H] 75.055289 HMDB0031419 mz_00002 75.05547146 2 [Acetylhydrazine] 74.048012824 C2H6N2O [M+H] 75.055289 HMDB0060428 mz_00002 75.05547146 2 [glycinamide] 74.048012824 C2H6N2O [M+H] 75.055289 HMDB0062472 mz_00002 75.05547146 2 [Creatine] 131.069476547 C4H9N3O2 [M+H+NH4] 75.055288 HMDB0000064 mz_00002 75.05547146 2 [Beta-Guanidinopropionic acid] 131.069476547 C4H9N3O2 [M+H+NH4] 75.055288 HMDB0013222 +mz_00003 75.08059797 0 [Pyrophosphate] 177.943225506 H4O7P2 [M+H+2Na] 75.080599 HMDB0000250 mz_00003 75.08059797 0 [UNKNOWN] 177.943225506 H4O7P2 [M+H+2Na] 75.080599 HMDB0155221 mz_00003 75.08059797 2 [1-Butanol] 74.073164942 C4H10O [M+H] 75.080441 HMDB0004327 -mz_00003 75.08059797 2 [UNKNOWN] 74.073164942 C4H10O [M+H] 75.080441 HMDB0062103 -mz_00003 75.08059797 2 [1-hydroperoxy-8-carboxyoctyl 3,4-epoxynon-(2E)-enyl ether] 74.073164942 C4H10O [M+H] 75.080441 HMDB0062326 -mz_00003 75.08059797 2 [2-Butanol] 74.073164942 C4H10O [M+H] 75.080441 HMDB0011469 +mz_00003 75.08059797 2 [2-Methylpropan-2-ol] 74.073164942 C4H10O [M+H] 75.080441 HMDB0031456 +mz_00003 75.08059797 2 [Isobutanol] 74.073164942 C4H10O [M+H] 75.080441 HMDB0006006 mz_00004 76.03942694 2 [L-Aspartic acid] 133.037507717 C4H7NO4 [M+H+NH4] 76.039304 HMDB0000191 +mz_00004 76.03942694 2 [UNKNOWN] 74.024751953 C2H4NO2 [M+H] 76.039304 HMDB0161401 mz_00004 76.03942694 2 [Ethyl nitrite] 75.032028409 C2H5NO2 [M+H] 76.039304 HMDB0031239 mz_00004 76.03942694 2 [1-deoxy-1-(N6-lysino)-D-fructose] 133.037507709 C4H7NO4 [M+H+NH4] 76.039304 HMDB0062186 -mz_00004 76.03942694 2 [Glycine] 75.032028409 C2H5NO2 [M+H] 76.039304 HMDB0000123 -mz_00004 76.03942694 2 [Acetohydroxamic Acid] 75.032028409 C2H5NO2 [M+H] 76.039304 HMDB0014691 +mz_00004 76.03942694 2 [N-acetyl-seryl-aspartate] 133.037507709 C4H7NO4 [M+H+NH4] 76.039304 HMDB0062501 mz_00005 76.07584477 2 [3-aminopropan-1-ol] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0140038 -mz_00005 76.07584477 2 [1-Amino-propan-2-ol] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0012136 mz_00005 76.07584477 2 [2-(methylamino)ethan-1-ol] 75.068413914 C3H9NO [M+H] 76.07569 HMDB0142449 mz_00005 76.07584477 2 [Trimethylamine N-oxide] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0000925 -mz_00005 76.07584477 2 [Allyl alcohol] 58.041864814 C3H6O [M+NH4] 76.075688 HMDB0031652 +mz_00005 76.07584477 2 [1-Amino-propan-2-ol] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0012136 +mz_00005 76.07584477 2 [UNKNOWN] 133.110278727 C6H15NO2 [M+H+NH4] 76.075689 HMDB0168716 mz_00006 76.07593168 3 [3-aminopropan-1-ol] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0140038 -mz_00006 76.07593168 3 [1-Amino-propan-2-ol] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0012136 mz_00006 76.07593168 3 [2-(methylamino)ethan-1-ol] 75.068413914 C3H9NO [M+H] 76.07569 HMDB0142449 mz_00006 76.07593168 3 [Trimethylamine N-oxide] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0000925 -mz_00006 76.07593168 3 [Allyl alcohol] 58.041864814 C3H6O [M+NH4] 76.075688 HMDB0031652 +mz_00006 76.07593168 3 [1-Amino-propan-2-ol] 75.068413915 C3H9NO [M+H] 76.07569 HMDB0012136 +mz_00006 76.07593168 3 [UNKNOWN] 133.110278727 C6H15NO2 [M+H+NH4] 76.075689 HMDB0168716
--- a/test-data/out_test03.tabular Tue Oct 02 04:59:13 2018 -0400 +++ b/test-data/out_test03.tabular Thu Jan 10 09:10:14 2019 -0500 @@ -1,4 +1,4 @@ -ID Query(Da) Delta Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID +ID Query(Da) Delta(ppm) Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID mz_00001 175.01 0 [UNKNOWN] 500.026076369 C19H16O14S [M+2H+Na] 175.009949 HMDB0149376 mz_00001 175.01 0 [UNKNOWN] 500.026076369 C19H16O14S [M+2H+Na] 175.009949 HMDB0149375 mz_00001 175.01 0 [UNKNOWN] 500.026076369 C19H16O14S [M+2H+Na] 175.009949 HMDB0149391
--- a/test-data/out_test03.txt Tue Oct 02 04:59:13 2018 -0400 +++ b/test-data/out_test03.txt Thu Jan 10 09:10:14 2019 -0500 @@ -1,4 +1,4 @@ -ID Query(Da) Delta Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID +ID Query(Da) Delta(ppm) Metabolite_Name Cpd_MW(Da) Formula Adduct Adduct_MW(Da) HMDB_ID mz_00001 175.01 0 [UNKNOWN] 500.026076369 C19H16O14S [M+2H+Na] 175.009949 HMDB0149376 mz_00001 175.01 0 [UNKNOWN] 500.026076369 C19H16O14S [M+2H+Na] 175.009949 HMDB0149375 mz_00001 175.01 0 [UNKNOWN] 500.026076369 C19H16O14S [M+2H+Na] 175.009949 HMDB0149391
--- a/wsdl_hmdb.pl Tue Oct 02 04:59:13 2018 -0400 +++ b/wsdl_hmdb.pl Thu Jan 10 09:10:14 2019 -0500 @@ -127,9 +127,16 @@ my $result = undef ; my ( $hmdb_masses, $nb_masses_to_submit ) = $oHmdb->prepare_multi_masses_query($mzs) ; $hmdb_pages = $oHmdb->get_matches_from_hmdb_ua($hmdb_masses, $delta, $molecular_species) ; + +# print Dumper $hmdb_pages ; + + sleep(2) ; + ($result) = $oHmdb->parse_hmdb_csv_results($hmdb_pages, $mzs, $max_query) ; ## hash format result ## This previous step return results with cutoff on the number of entries returned ! $results = [ @$results, @$result ] ; + + sleep(2) ; } ## foreach metabolite get its own metabocard
--- a/wsdl_hmdb.xml Tue Oct 02 04:59:13 2018 -0400 +++ b/wsdl_hmdb.xml Thu Jan 10 09:10:14 2019 -0500 @@ -1,6 +1,6 @@ <tool id="wsdl_hmdb" name="HMDB MS search" version="2018-10-01"> <description> - search by masses on HMDB online bank + search by masses on HMDB online LCMS bank </description> <requirements> @@ -92,9 +92,9 @@ </outputs> <tests> -<!-- + <!--test 01 no result - fake-mzrt-input-with-id --> + <!-- <test> - <!~~test 01 no result - fake-mzrt-input-with-id ~~> <param name="choice" value="YES"/> <param name="masses" value="input_test01_fake-mzrt-input-with-id.tabular"/> <param name="header_choice" value="yes"/> @@ -107,8 +107,10 @@ <output name="HmdbOutWeb" file="out_test01.html"/> <output name="HmdbOutXlsx" file="out_test01.txt"/> </test> + --> + <!--test 02 : some results - with-mzrt-input-with-id file--> + <!-- <test> - <!~~test 02 : some results - with-mzrt-input-with-id file~~> <param name="choice" value="YES"/> <param name="masses" value="input_test02_mzrt-input-with-id.tabular"/> <param name="header_choice" value="yes"/> @@ -121,9 +123,9 @@ <output name="HmdbOutWeb" file="out_test02.html"/> <output name="HmdbOutXlsx" file="out_test02.txt"/> </test> - --> + --> + <!--test 03 : some results - with-mz list in manual mass mode--> <test> - <!--test 03 : some results - with-mz list in manual mass mode--> <param name="choice" value="NO"/> <param name="mass" value="175.01 238.19 420.16 780.32 956.25 1100.45"/> <param name="delta" value="0.05"/> @@ -147,6 +149,7 @@ **Please cite** If you use this tool, please add the following reference | Wishart DS, Jewison T, Guo AC, Wilson M, Knox C, et al., HMDB 3.0 — The Human Metabolome Database in 2013. Nucleic Acids Res. 2013. + | Wishart DS, Feunang YD, Marcu A, Guo AC, Liang K, et al., HMDB 4.0 — The Human Metabolome Database for 2018. Nucleic Acids Res. 2018. --------------------------------------------------- @@ -271,7 +274,7 @@ .. class:: warningmark -And their "W4M courses 2015": +And their "W4M courses 2018": | Using Galaxy4Metabolomics - W4M table format for Galaxy | Annotation Banks - Annotation @@ -280,5 +283,6 @@ <!-- [RECOMMANDED] All citations associated to this tool (main citation given above and other references). Can be extracted from the history panel --> <citations> <citation type="doi">10.1093/nar/gks1065</citation> + <citation type="doi">10.1093/nar/gkx1089</citation> </citations> </tool> \ No newline at end of file