Next changeset 1:6d0a0f8f672a (2016-11-23) |
Commit message:
Init and uploaded |
added:
hmdb/README.txt hmdb/conf_hmdb.cfg hmdb/hmdb.tmpl hmdb/lib/conf.pm hmdb/lib/csv.pm hmdb/lib/hmdb.pm hmdb/static/images/hmdb.png hmdb/t/hmdb_managerTest.pl hmdb/t/lib/hmdbTest.pm hmdb/test_data/.DS_Store hmdb/test_data/._.DS_Store hmdb/test_data/input_test01_fake-mzrt-input-with-id.tsv hmdb/test_data/input_test02_mzrt-input-with-id.tsv hmdb/test_data/out_test01.csv hmdb/test_data/out_test01.html hmdb/test_data/out_test01.tsv hmdb/test_data/out_test02.csv hmdb/test_data/out_test02.html hmdb/test_data/out_test02.tsv hmdb/test_data/out_test03.csv hmdb/test_data/out_test03.html hmdb/test_data/out_test03.tsv hmdb/wsdl_hmdb.pl hmdb/wsdl_hmdb.xml |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/README.txt Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,65 @@ +## ****** HMDB environnemnt : ****** ## +# version January 2016 M Landi / F Giacomoni - INRA - METABOHUB - workflow4metabolomics.org core team + +## --- PERL compilator / libraries : --- ## +$ perl -v +This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi + +# libs CORE PERL : +use strict ; +use warnings ; +use Carp qw (cluck croak carp) ; +use Exporter ; +use Data::Dumper ; +use Getopt::Long ; +use FindBin ; +use Encode; + +# libs CPAN PERL : +$ perl -e 'use Text::CSV' +$ perl -e 'use LWP::Simple' +$ perl -e 'use URI::URL' +$ perl -e 'use SOAP::Lite' +$ perl -e 'use HTML::Template' +$ sudo perl -MCPAN -e shell +cpan> install Text::CSV +cpan> install LWP::Simple +cpan> install URI::URL +cpan> install SOAP::Lite +cpan> install HTML::Template + +# libs pfem PERL : this lib were included in lib dir. +use conf::conf qw( :ALL ) ; +use formats::csv qw( :ALL ) ; +-- + +## --- R bin and Packages : --- ## +No interaction with R +-- + +## --- Binary dependencies --- ## +No interaction with binary - use only HMDB post method (http://www.hmdb.ca/spectra/ms/search?) +-- + +## --- Config : --- ## +JS and CSS (used in HTML output format) are now hosted on cdn.rawgit.com server - no local config needed + + +PS :If Galaxy can't find the file "hmdb.tmpl", perform this command line : perl -pi -e 's/\r//g' conf_hmdb.cfg +-- + +## --- XML HELP PART --- ## +one image : +hmdb.png +-- + +## --- DATASETS OR TUTORIAL --- ## +Please find help on W4M : +-- + +## --- ??? COMMENTS ??? --- ## +If Galaxy can't find the file "hmdb.tmpl", perform this command line : " perl -pi -e 's/\r//g' " on the conf file "conf_hmdb.cfg". + +To use fully functionalities of HTML output format file : + - check that sanitize_all_html option in universe_wsgi.ini file is uncomment and set to FALSE. +-- \ No newline at end of file |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/conf_hmdb.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/conf_hmdb.cfg Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,14 @@ +## Conf file for wsdl_hmdb.pl script +# +## Version -- edited by F.Giacomoni +VERSION=2015-06-08 +# +## ARGVT +# Hmdb limits per job (max is 149) +HMDB_LIMITS=50 +## Galaxy url for HTML JS and CSS path +JS_GALAXY_PATH=https://cdn.rawgit.com/fgiacomoni/galaxy_utils/master/scripts +CSS_GALAXY_PATH=https://cdn.rawgit.com/fgiacomoni/galaxy_utils/master/style +# +## HTML OUTPUT : +HTML_ENTRIES_PER_PAGE=4 |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/hmdb.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/hmdb.tmpl Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +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="<TMPL_VAR NAME=CSS_GALAXY_PATH>/simplePagination.css"/><!-- JavaScript --><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script><script src="<TMPL_VAR NAME=JS_GALAXY_PATH>/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 - <TMPL_VAR NAME=CONDITIONS></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:30px;"><!-- Compound--><col style="width:120px;"><!-- name--><col style="width:40px;"><!-- adduct--><col style="width:50px;"><!-- adduct type--><col style="width:60px;"><!-- adduct mw--><col style="width:60px;"><!-- cpd mw--><col style="width:50px;"><!-- delta--><thead><th>ID from input</th><th>Mass (m/z)</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></thead><TMPL_LOOP NAME=PAGES><tbody class="select" id="page-id-<TMPL_VAR NAME=PAGE_NB>"><TMPL_LOOP NAME=MASSES><tr class="<TMPL_VAR NAME=MZ_COLOR>"><td class="ca" ><TMPL_VAR NAME=MASSES_ID_QUERY></td><td id="<TMPL_VAR NAME=MASSES_NB>" class="ca" ><TMPL_VAR NAME=MASSES_MZ_QUERY></td><td class="ca" colspan="7"></td></tr><TMPL_LOOP NAME=ENTRIES><tr class="<TMPL_VAR NAME=ENTRY_COLOR>"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/<TMPL_VAR NAME=ENTRY_ENTRY_ID2>" target="_blank" class="btn"><TMPL_VAR NAME=ENTRY_ENTRY_ID></a></td><td class="ca"><TMPL_VAR NAME=ENTRY_FORMULA></td><td class="ca"><TMPL_VAR NAME=ENTRY_CPD_MZ></td><td class="ca"><TMPL_VAR NAME=ENTRY_ADDUCT></td><td class="ca"><TMPL_VAR NAME=ENTRY_ADDUCT_TYPE></td><td class="ca"><TMPL_VAR NAME=ENTRY_ADDUCT_MZ></td><td class="ca"><TMPL_VAR NAME=ENTRY_DELTA></td></tr></TMPL_LOOP></TMPL_LOOP></tbody></TMPL_LOOP></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: <TMPL_VAR NAME=PAGES_NB>,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 |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/lib/conf.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/lib/conf.pm Thu Jan 28 10:52:26 2016 -0500 |
[ |
@@ -0,0 +1,259 @@ +package lib::conf ; + +use strict; +use warnings ; +use Exporter ; +use Carp ; +use Data::Dumper ; + +use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS); + +our $VERSION = "1.0" ; +our @ISA = qw(Exporter) ; +our @EXPORT = qw( as_conf get_value_from_conf check_path_and_file ) ; +our %EXPORT_TAGS = ( ALL => [qw( as_conf get_value_from_conf )] ) ; + +=head1 NAME + +conf - A module for manage pfem conf file + +=head1 SYNOPSIS + + use conf ; + my $object = conf->new() ; + +=head1 DESCRIPTION + +This module does manage conf file (extract all or selected fields) + +=head1 METHODS + +Methods are : + +=head2 METHOD new + + ## Description : new + ## Input : $self + ## Ouput : bless $self ; + ## Usage : new() ; + +=cut +## START of SUB +sub new { + ## Variables + my $self={}; + bless($self) ; + return $self ; +} +### END of SUB + +=head2 METHOD as_conf + + ## Description : permet de cr�er l'object conf � partir d'un fichier de conf de type KEY=VALUE + ## Input : $file + ## Ouput : $oConf (a hash) + ## Usage : my ( $oConf ) = as_conf( $file ) ; + +=cut +## START of SUB +sub as_conf { + ## Retrieve Values + my $self = shift ; + my ( $file, $separator ) = @_ ; + +# if (!defined $separator) { $separator = ';' } ## set separator to ; + + if ( !defined $file ) { croak "Can't create object with an none defined file\n" ; } + + my %Conf = () ; ## Hash devant contenir l'ensemble des parametres locaux + + if (-e $file) { + open (CFG, "<$file") or die "Can't open $file\n" ; + while (<CFG>) { + chomp $_ ; + if ( $_ =~ /^#(.*)/) { next ; } + elsif ($_ =~/^(\w+?)=(.*)/) { ## ALPHANUMERIC OR UNDERSCORE ONLY FOR THE KEY AND ANYTHING ELSE FOR VALUE + + my ($key, $value) = ($1, $2) ; + + if (defined $separator) { + if ( $value=~/$separator/ ) { ## is a list to split + my @tmp = split(/$separator/ , $value) ; + $Conf{$key} = \@tmp ; + } + } + else { + $Conf{$key} = $value ; + } + } + } + close(CFG) ; + } + else { + croak "Can't create object with an none existing file\n" ; + } + + return ( \%Conf ) ; +} +## END of SUB + +=head2 METHOD as_conf_list + + ## Description : permet de charger une liste txt en array + ## Input : $file + ## Output : elements + ## Usage : my ( elements ) = as_conf_list( $conf_file ) ; + +=cut +## START of SUB +sub as_conf_list { + ## Retrieve Values + my $self = shift ; + my ( $file ) = @_ ; + + my @elements = () ; + if ( !defined $file ) { croak "Can't create object with an none defined file\n" ; } + + if (-e $file) { + open (CFG, "<$file") or die "Can't open $file\n" ; + while (<CFG>) { + chomp $_ ; + if ( $_ =~ /^#(.*)/) { next ; } + elsif ($_ =~/^(.*)/) { if (defined $1) { push (@elements, $1) ; } } + } + } + else { + croak "Can't create object with an none existing file\n" ; + } + return(\@elements) ; +} +## END of SUB + +=head2 METHOD get_value_from_conf + + ## Description : permet de retourner une valeur du hash de conf � partir d'une key + ## Input : $oConf, $Key + ## Ouput : $Value + ## Usage : my ( $Value ) = get_value_from_conf( $oConf, $Key ) ; + +=cut +## START of SUB +sub get_value_from_conf { + ## Retrieve Values + my $self = shift ; + my ( $oConf, $Key ) = @_ ; + + my $Value = undef ; + + if ( defined $oConf ) { + if ( defined $oConf->{$Key} ) { + $Value = $oConf->{$Key} ; + } + } + else { + croak "Can't manage value with undefined object\n" ; + } + return($Value) ; +} +## END of SUB + +=head2 METHOD get_value_from_conf + + ## Description : permet de retourner une valeur du hash de conf � partir d'une key + ## Input : $oConf, $Key + ## Ouput : $Value + ## Usage : my ( $Value ) = get_value_from_conf( $oConf, $Key ) ; + +=cut +## START of SUB +sub split_value_from_conf { + ## Retrieve Values + my $self = shift ; + my ( $oConf, $Key, $sep ) = @_ ; + + my $value = undef ; + my @values = () ; + + if ( defined $oConf ) { + if ( defined $oConf->{$Key} ) { + $value = $oConf->{$Key} ; + @values = split ( /$sep/, $value) ; + } + } + else { + croak "Can't manage value with undefined object\n" ; + } + return(\@values) ; +} +## END of SUB + + +=head2 METHOD check_path_and_file + + ## Description : permet de v�rifier les path et la pr�sence des exe d�crits dans le file conf. Bloque le script en cas de probleme + ## Input : $oConfs + ## Ouput : NA + ## Usage : &get_value_from_conf( $oConf ) ; + +=cut +## START of SUB +sub check_path_and_file { + + my $self = shift ; + my ( $oConfs ) = @_ ; + + foreach my $conf ( keys %{ $oConfs } ) { + if ( $conf =~ /^FILE/ ) { + if ( -e $oConfs->{$conf} ) { + if ( -s $oConfs->{$conf} ) { next ; } + else { carp "[Warning] : The size of file $oConfs->{$conf} is null\n" ; } + } + else { + carp "[Warning] : The file $oConfs->{$conf} doesn't exist\n" ; + } + } + elsif ( $conf =~ /^PATH/ ) { + if ( -d $oConfs->{$conf} ) { next ; } + else { carp "[Warning] : The dir $oConfs->{$conf} doesn't exist\n" ; } + } + else { next ; } + } + return ; +} +## END of SUB + +1 ; + + +__END__ + +=head1 SUPPORT + +You can find documentation for this module with the perldoc command. + + perldoc conf.pm + + +=head1 Exports + +=over 4 + +=item :ALL is as_conf get_value_from_conf + +=back + +=head1 AUTHOR + +Franck Giacomoni E<lt>franck.giacomoni@clermont.inra.frE<gt> + +=head1 LICENSE + +This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. + +=head1 VERSION + +version 1 : 10 / 02 / 2013 + +version 2 : ?? + +=cut \ No newline at end of file |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/lib/csv.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/lib/csv.pm Thu Jan 28 10:52:26 2016 -0500 |
[ |
@@ -0,0 +1,239 @@ +package lib::csv ; + +use strict; +use warnings ; +use Exporter ; +use Carp ; + +use Text::CSV ; + +use Data::Dumper ; + +use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS); + +our $VERSION = "1.0"; +our @ISA = qw(Exporter); +our @EXPORT = qw( get_csv_object get_value_from_csv_multi_header ); +our %EXPORT_TAGS = ( ALL => [qw( get_csv_object get_value_from_csv_multi_header )] ); + +=head1 NAME + +My::Module - An example module + +=head1 SYNOPSIS + + use My::Module; + my $object = My::Module->new(); + print $object->as_string; + +=head1 DESCRIPTION + +This module does not really exist, it +was made for the sole purpose of +demonstrating how POD works. + +=head1 METHODS + +Methods are : + +=head2 METHOD new + + ## Description : new + ## Input : $self + ## Ouput : bless $self ; + ## Usage : new() ; + +=cut + +sub new { + ## Variables + my $self={}; + bless($self) ; + return $self ; +} +### END of SUB + +=head2 METHOD get_csv_object + + ## Description : builds a csv object and etablishes format + ## Input : $separator + ## Output : $csv + ## Usage : my ( $csv ) = get_csv_object( $separator ) ; + +=cut +## START of SUB +sub get_csv_object { + ## Retrieve Values + my $self = shift ; + my ( $separator ) = @_ ; + +# my $csv = Text::CSV->new({'sep_char' => "$separator"}); + my $csv = Text::CSV->new ( {'sep_char' => "$separator", binary => 1 } ) # should set binary attribute. + or die "Cannot use CSV: ".Text::CSV->error_diag (); + + return($csv) ; +} +## END of SUB + +=head2 METHOD get_value_from_csv_multi_header + + ## Description : extract a targeted column in a csv file + ## Input : $csv, $file, $column, $is_header, $nb_header + ## Output : $value + ## Usage : my ( $value ) = get_value_from_csv_multi_header( $csv, $file, $column, $is_header, $nb_header ) ; + +=cut +## START of SUB +sub get_value_from_csv_multi_header { + ## Retrieve Values + my $self = shift ; + my ( $csv, $file, $column, $is_header, $nb_header ) = @_ ; + + my @value = () ; + + ## Adapte the number of the colunm : (nb of column to position in array) + $column = $column - 1 ; + + open (CSV, "<", $file) or die $! ; + + my $line = 0 ; + + while (<CSV>) { + $line++ ; + chomp $_ ; + # file has a header + if ( defined $is_header and $is_header eq 'yes') { if ($line <= $nb_header) { next ; } } + # parsing the targeted column + if ( $csv->parse($_) ) { + my @columns = $csv->fields(); + push ( @value, $columns[$column] ) ; + } + else { + my $err = $csv->error_input; + die "Failed to parse line: $err"; + } + } + close CSV; + return(\@value) ; +} +## END of SUB + +=head2 METHOD parse_csv_object + + ## Description : parse_all csv object and return a array of rows + ## Input : $csv, $file + ## Output : $csv_matrix + ## Usage : my ( $csv_matrix ) = parse_csv_object( $csv, $file ) ; + +=cut +## START of SUB +sub parse_csv_object { + ## Retrieve Values + my $self = shift ; + my ( $csv, $file ) = @_ ; + + my @csv_matrix = () ; + + open my $fh, "<:encoding(utf8)", $$file or die "Can't open csv file $$file: $!"; + + while ( my $row = $csv->getline( $fh ) ) { + push @csv_matrix, $row; + } + $csv->eof or $csv->error_diag(); + close $fh; + + return(\@csv_matrix) ; +} +## END of SUB + +=head2 METHOD parse_allcsv_object + + ## Description : parse_all csv object and return a array of rows with or without header + ## Input : $csv, $file, $keep_header + ## Output : $csv_matrix + ## Usage : my ( $csv_matrix ) = parse_csv_object( $csv, $file, $keep_header ) ; + +=cut +## START of SUB +sub parse_allcsv_object { + ## Retrieve Values + my $self = shift ; + my ( $csv, $file, $keep_header ) = @_ ; + + my @csv_matrix = () ; + my $line = 1 ; + + open my $fh, "<:encoding(utf8)", $$file or die "Can't open csv file $$file: $!"; + + while ( my $row = $csv->getline( $fh ) ) { + if ( ( $keep_header eq 'n' ) and ($line == 1) ) { } + else { push @csv_matrix, $row; } + $line ++ ; + } + my $status = $csv->eof or $csv->error_diag(); + close $fh; + + return(\@csv_matrix, $status) ; +} +## END of SUB + + +=head2 METHOD write_csv_from_arrays + + ## Description : write a csv file from list of rows + ## Input : $csv, $file_name, $rows + ## Output : $csv_file + ## Usage : my ( $csv_file ) = write_csv_from_arrays( $csv, $file_name, $rows ) ; + +=cut +## START of SUB +sub write_csv_from_arrays { + ## Retrieve Values + my $self = shift ; + my ( $csv, $file_name, $rows ) = @_ ; + + my $fh = undef ; + $csv->eol ("\n"); ## end-of-line string to add to rows + 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 + +1 ; + + +__END__ + +=head1 SUPPORT + +You can find documentation for this module with the perldoc command. + + perldoc csv.pm + +=head1 Exports + +=over 4 + +=item :ALL is get_csv_object, get_value_from_csv_multi_header + +=back + +=head1 AUTHOR + +Franck Giacomoni E<lt>franck.giacomoni@clermont.inra.frE<gt> + +=head1 LICENSE + +This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. + +=head1 VERSION + +version 1 : 23 / 10 / 2013 + +version 2 : ?? + +=cut \ No newline at end of file |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/lib/hmdb.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/lib/hmdb.pm Thu Jan 28 10:52:26 2016 -0500 |
[ |
b'@@ -0,0 +1,889 @@\n+package lib::hmdb ;\r\n+\r\n+use strict;\r\n+use warnings ;\r\n+use Exporter ;\r\n+use Carp ;\r\n+\r\n+use LWP::Simple;\r\n+use LWP::UserAgent;\r\n+use URI::URL;\r\n+use SOAP::Lite;\r\n+use Encode;\r\n+use HTML::Template ;\r\n+\r\n+use Data::Dumper ;\r\n+\r\n+use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS);\r\n+\r\n+our $VERSION = "1.0";\r\n+our @ISA = qw(Exporter);\r\n+our @EXPORT = qw( extract_sub_mz_lists test_matches_from_hmdb_ua prepare_multi_masses_query get_matches_from_hmdb_ua parse_hmdb_csv_results set_html_tbody_object add_mz_to_tbody_object add_entries_to_tbody_object write_html_skel set_lm_matrix_object set_hmdb_matrix_object_with_ids add_lm_matrix_to_input_matrix write_csv_skel write_csv_one_mass );\r\n+our %EXPORT_TAGS = ( ALL => [qw( extract_sub_mz_lists test_matches_from_hmdb_ua prepare_multi_masses_query get_matches_from_hmdb_ua parse_hmdb_csv_results set_html_tbody_object add_mz_to_tbody_object add_entries_to_tbody_object write_html_skel set_lm_matrix_object set_hmdb_matrix_object_with_ids add_lm_matrix_to_input_matrix write_csv_skel write_csv_one_mass )] );\r\n+\r\n+=head1 NAME\r\n+\r\n+My::Module - An example module\r\n+\r\n+=head1 SYNOPSIS\r\n+\r\n+ use My::Module;\r\n+ my $object = My::Module->new();\r\n+ print $object->as_string;\r\n+\r\n+=head1 DESCRIPTION\r\n+\r\n+This module does not really exist, it\r\n+was made for the sole purpose of\r\n+demonstrating how POD works.\r\n+\r\n+=head1 METHODS\r\n+\r\n+Methods are :\r\n+\r\n+=head2 METHOD new\r\n+\r\n+\t## Description : new\r\n+\t## Input : $self\r\n+\t## Ouput : bless $self ;\r\n+\t## Usage : new() ;\r\n+\r\n+=cut\r\n+\r\n+sub new {\r\n+ ## Variables\r\n+ my $self={};\r\n+ bless($self) ;\r\n+ return $self ;\r\n+}\r\n+### END of SUB\r\n+ \r\n+\r\n+=head2 METHOD extract_sub_mz_lists\r\n+\r\n+\t## Description : extract a couples of sublist from a long mz list (more than $HMDB_LIMITS)\r\n+\t## Input : $HMDB_LIMITS, $masses\r\n+\t## Output : $sublists\r\n+\t## Usage : my ( $sublists ) = extract_sub_mz_lists( $HMDB_LIMITS, $masses ) ;\r\n+\t\r\n+=cut\r\n+## START of SUB\r\n+sub extract_sub_mz_lists {\r\n+\t## Retrieve Values\r\n+ my $self = shift ;\r\n+ my ( $masses, $HMDB_LIMITS ) = @_ ;\r\n+ \r\n+ my ( @sublists, @sublist ) = ( (), () ) ;\r\n+ my $nb_mz = 0 ;\r\n+ my $nb_total_mzs = scalar(@{$masses}) ;\r\n+ \r\n+ if ($nb_total_mzs == 0) {\r\n+ \tdie "The provided mzs list is empty" ;\r\n+ }\r\n+ \r\n+ for ( my $current_pos = 0 ; $current_pos < $nb_total_mzs ; $current_pos++ ) {\r\n+ \t\r\n+ \tif ( $nb_mz < $HMDB_LIMITS ) {\r\n+ \t\tif ( $masses->[$current_pos] ) { \tpush (@sublist, $masses->[$current_pos]) ; $nb_mz++ ;\t} # build sub list\r\n+ \t} \r\n+ \telsif ( $nb_mz == $HMDB_LIMITS ) {\r\n+ \t\tmy @tmp = @sublist ; push (@sublists, \\@tmp) ; @sublist = () ;\t$nb_mz = 0 ;\r\n+ \t\t$current_pos-- ;\r\n+ \t}\r\n+ \tif ($current_pos == $nb_total_mzs-1) { \tmy @tmp = @sublist ; push (@sublists, \\@tmp) ; }\r\n+\t}\r\n+ return(\\@sublists) ;\r\n+}\r\n+## END of SUB\r\n+\r\n+=head2 METHOD prepare_multi_masses_query\r\n+\r\n+\t## Description : Generate the adapted format of the mz list for HMDB\r\n+\t## Input : $masses\r\n+\t## Output : $hmdb_masses\r\n+\t## Usage : my ( $hmdb_masses ) = prepare_multi_masses_query( $masses ) ;\r\n+\t\r\n+=cut\r\n+## START of SUB\r\n+sub prepare_multi_masses_query {\r\n+\t## Retrieve Values\r\n+ my $self = shift ;\r\n+ my ( $masses ) = @_ ;\r\n+ \r\n+ my $hmdb_masses = undef ;\r\n+ my $sep = \'%0D%0A\' ; ## retour chariot encode\r\n+ my ($nb_masses, $i) = (0, 0) ;\r\n+ \r\n+ if ( defined $masses ) {\r\n+ \tmy @masses = @{$masses} ;\r\n+ \tmy $nb_masses = scalar ( @masses ) ;\r\n+ \tif ( $nb_masses == 0 ) { croak "The input method parameter mass list is empty" ; }\r\n+ \telsif ( $nb_masses >= 150 ) { croak "Your mass list is too long : HMDB allows maximum 150 query masses per request \\n" ; } ## Del it --- temporary patch\r\n+\t \r\n+\t foreach my $mass (@masses) {\r\n+\t \t\r\n+\t \tif ($i < $nb_masses) {\r\n+\t \t\t$hmdb_masses .= $mass.$sep ;\r\n+\t \t}\r\n+\t \telsif ( $i == $nb_masses ) {\r\n+\t \t\t$hmdb_masses .= $mass ;\r\n+\t \t}\r\n+\t \telse {\r\n+\t \t\tlast ;\r'..b' \t\tpush (@output_matrix_object, \\@init_row) ;\r\n+ \t\tnext ;\r\n+ \t}\r\n+ \t\r\n+ \tif ( $lm_matrix_object->[$index_row] ) {\r\n+ \t\tmy $dim = scalar(@{$lm_matrix_object->[$index_row]}) ;\r\n+ \t\t\r\n+ \t\tif ($dim > 1) { warn "the add method can\'t manage more than one column\\n" ;}\r\n+ \t\tmy $lm_col = $lm_matrix_object->[$index_row][$dim-1] ;\r\n+\r\n+ \t\t \tpush (@init_row, $lm_col) ;\r\n+\t \t$index_row++ ;\r\n+ \t}\r\n+ \tpush (@output_matrix_object, \\@init_row) ;\r\n+ }\r\n+ return(\\@output_matrix_object) ;\r\n+}\r\n+## END of SUB\r\n+\r\n+=head2 METHOD write_csv_skel\r\n+\r\n+\t## Description : prepare and write csv output file\r\n+\t## Input : $csv_file, $rows\r\n+\t## Output : $csv_file\r\n+\t## Usage : my ( $csv_file ) = write_csv_skel( $csv_file, $rows ) ;\r\n+\t\r\n+=cut\r\n+## START of SUB\r\n+sub write_csv_skel {\r\n+\t## Retrieve Values\r\n+ my $self = shift ;\r\n+ my ( $csv_file, $rows ) = @_ ;\r\n+ \r\n+ my $ocsv = lib::csv::new() ;\r\n+\tmy $csv = $ocsv->get_csv_object("\\t") ;\r\n+\t$ocsv->write_csv_from_arrays($csv, $$csv_file, $rows) ;\r\n+ \r\n+ return($csv_file) ;\r\n+}\r\n+## END of SUB\r\n+\r\n+=head2 METHOD write_csv_one_mass\r\n+\r\n+\t## Description : print a cvs file\r\n+\t## Input : $masses, $ids, $results, $file\r\n+\t## Output : N/A\r\n+\t## Usage : write_csv_one_mass( $ids, $results, $file ) ;\r\n+\t\r\n+=cut\r\n+## START of SUB\r\n+sub write_csv_one_mass {\r\n+\t## Retrieve Values\r\n+ my $self = shift ;\r\n+ my ( $masses, $ids, $results, $file, ) = @_ ;\r\n+\r\n+ open(CSV, \'>:utf8\', "$file") or die "Cant\' create the file $file\\n" ;\r\n+ print CSV "ID\\tMASS_SUBMIT\\tHMDB_ID\\tCPD_FORMULA\\tCPD_MW\\tDELTA\\n" ;\r\n+ \t\r\n+ my $i = 0 ;\r\n+ \t\r\n+ foreach my $id (@{$ids}) {\r\n+ \tmy $mass = undef ;\r\n+ \tif ( $masses->[$i] ) { \t$mass = $masses->[$i] ; \t}\r\n+ \telse {\t\t\t\t\t\tlast ; \t\t\t\t\t \t}\r\n+ \t\r\n+ \tif ( $results->[$i] ) { ## an requested id has a result in the list of hashes $results.\r\n+\r\n+ \t\tmy @anti_redondant = (\'N/A\') ;\r\n+ \t\tmy $check_rebond = 0 ;\r\n+ \t\tmy $check_noentry = 0 ;\r\n+ \t\t\r\n+ \t\tforeach my $entry (@{$results->[$i]}) {\r\n+ \t\t\t$check_noentry ++ ;\r\n+ \t\t\t## dispo anti doublons des entries\r\n+\t \t\tforeach my $rebond (@anti_redondant) {\r\n+\t \t\t\tif ( $rebond eq $entry->{ENTRY_ENTRY_ID} ) { $check_rebond = 1 ; last ; }\r\n+\t \t\t}\r\n+#\t \t\tprint "\\n-----------------------" ;\r\n+#\t \t\tprint Dumper $entry->{ENTRY_ENTRY_ID} ;\r\n+#\t \t\tprint "-------------------------$check_rebond\\n" ;\r\n+#\t\t \tprint Dumper @anti_redondant ;\r\n+\t\t \tif ( $check_rebond == 0 ) {\r\n+\t \t\t\t\r\n+\t\t \t\tpush ( @anti_redondant, $entry->{ENTRY_ENTRY_ID} ) ;\r\n+\r\n+\t \t\t\tprint CSV "$id\\t$mass\\t$entry->{ENTRY_ENTRY_ID}\\t" ;\r\n+\t \t\t\t## print cpd name\r\n+\t \t\t\tif ( $entry->{ENTRY_FORMULA} ) { print CSV "$entry->{ENTRY_FORMULA}\\t" ; }\r\n+\t \t\t\telse { \t\t\t\t\t\t\t print CSV "N/A\\t" ; }\r\n+\t \t\t\t## print cpd mw\r\n+\t \t\t\tif ( $entry->{ENTRY_CPD_MZ} ) { print CSV "$entry->{ENTRY_CPD_MZ}\\t" ; }\r\n+\t \t\t\telse { \t\t\t\t\t\t\tprint CSV "N/A\\t" ; }\r\n+\t \t\t\t## print delta\r\n+\t \t\t\tif ( $entry->{ENTRY_DELTA} ) { print CSV "$entry->{ENTRY_DELTA}\\n" ; }\r\n+\t \t\t\telse { \t\t\t\t\t\t\tprint CSV "N/A\\n" ; }\r\n+\t\t \t}\r\n+\t\t \t$check_rebond = 0 ; ## reinit double control\r\n+ \t\t} ## end foreach\r\n+ \t\tif ($check_noentry == 0 ) {\r\n+ \t\t\tprint CSV "$id\\t$mass\\t".\'No_result_found_on_HMDB\'."\\tn/a\\tn/a\\t0\\n" ;\r\n+ \t\t}\r\n+ \t}\r\n+ \t$i++ ;\r\n+ }\r\n+ \tclose(CSV) ;\r\n+ return() ;\r\n+}\r\n+## END of SUB\r\n+\r\n+1 ;\r\n+\r\n+\r\n+__END__\r\n+\r\n+=head1 SUPPORT\r\n+\r\n+You can find documentation for this module with the perldoc command.\r\n+\r\n+ perldoc hmdb.pm\r\n+\r\n+=head1 Exports\r\n+\r\n+=over 4\r\n+\r\n+=item :ALL is ...\r\n+\r\n+=back\r\n+\r\n+=head1 AUTHOR\r\n+\r\n+Franck Giacomoni E<lt>franck.giacomoni@clermont.inra.frE<gt>\r\n+\r\n+=head1 LICENSE\r\n+\r\n+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.\r\n+\r\n+=head1 VERSION\r\n+\r\n+version 1 : 06 / 06 / 2013\r\n+\r\n+version 2 : 27 / 01 / 2014\r\n+\r\n+version 3 : 19 / 11 / 2014\r\n+\r\n+version 4 : 28 / 01 / 2016\r\n+\r\n+=cut\r\n' |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/static/images/hmdb.png |
b |
Binary file hmdb/static/images/hmdb.png has changed |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/t/hmdb_managerTest.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/t/hmdb_managerTest.pl Thu Jan 28 10:52:26 2016 -0500 |
[ |
@@ -0,0 +1,134 @@ +#! perl +use diagnostics; +use warnings; +no warnings qw/void/; +use strict; +no strict "refs" ; +use Test::More qw( no_plan ); +use Test::Exception; +use FindBin ; +use Carp ; + +## Specific Modules +use lib $FindBin::Bin ; +my $binPath = $FindBin::Bin ; +use lib::hmdbTest qw( :ALL ) ; + + +## To launch the right sequence : API, MAPPER, THREADER, ... +#my $sequence = 'MAPPER' ; +my $sequence = 'MAIN' ; +my $current_test = 1 ; + +if ($sequence eq "MAIN") { + print "\n\t\t\t\t * * * * * * \n" ; + print "\t * * * - - - Test HMDB Main script - - - * * * \n\n" ; + + + print "\n** Test $current_test extract_sub_mz_lists with an empty list of mzs **\n" ; $current_test++; + + throws_ok{ extract_sub_mz_listsTest([], 3)} '/The provided mzs list is empty/', 'Method \'extract_sub_mz_lists\' detects empty argument and died correctly' ; + + print "\n** Test $current_test extract_sub_mz_lists with a list of mzs and a limit of 3 **\n" ; $current_test++; + is_deeply( extract_sub_mz_listsTest( + ['175.01', '238.19', '420.16', '780.32', '956.25', '1100.45' ], 3), + [ [ '175.01', '238.19', '420.16' ], [ '780.32', '956.25', '1100.45' ] ], + 'Method \'extract_sub_mz_lists\' works with a list and return a well formated list of sublist of mzs'); + + print "\n** Test $current_test prepare_multi_masses_query with an empty list of mzs **\n" ; $current_test++; + throws_ok{ prepare_multi_masses_queryTest([])} '/The input method parameter mass list is empty/', 'Method \'prepare_multi_masses_query\' detects empty argument and died correctly' ; + + print "\n** Test $current_test prepare_multi_masses_query with a list of mzs **\n" ; $current_test++; + is_deeply( prepare_multi_masses_queryTest( + ['175.01', '238.19', '420.16', '780.32', '956.25', '1100.45' ] ), + '175.01%0D%0A238.19%0D%0A420.16%0D%0A780.32%0D%0A956.25%0D%0A1100.45%0D%0A', + 'Method \'prepare_multi_masses_query\' works with a list of and return a well formated string for hmdb querying'); + + print "\n** Test $current_test get_matches_from_hmdb_ua with a well-formated string of mzs **\n" ; $current_test++; + is_deeply( get_matches_from_hmdb_uaTest( + '175.01%0D%0A420.16%0D%0A780.32%0D%0A956.25%0D%0A1100.45%0D%0A', 0.001, 'positive'), + [ + 'query_mass,compound_id,formula,compound_mass,adduct,adduct_type,adduct_mass,delta', + '175.01,HMDB60293,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,0.000125', + '175.01,HMDB03745,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,0.000676', + '175.01,HMDB31436,H4O4Si,95.987885149,M+DMSO+H,+,175.009105,0.000895', + '175.01,HMDB33657,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', + '175.01,HMDB35230,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', + '420.16,HMDB60838,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683', + '420.16,HMDB60836,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683' + ], + 'Method \'get_matches_from_hmdb_ua\' works with a well-formated string of mzs and return a complete csv from hmdb'); + + print "\n** Test $current_test test_matches_from_hmdb_ua to get hmdb status **\n" ; $current_test++; + is_deeply (test_matches_from_hmdb_uaTest (), + \'200', + 'The HMDB server is available: returns successful HTTP requests' ) ; + + print "\n** Test $current_test check_state_from_hmdb_ua to manage script execution with the hmdb server status **\n" ; $current_test++; + is_deeply (check_state_from_hmdb_uaTest (\'200'), + 1, + 'The status 200 returns no error/warn' ) ; + + print "\n** Test $current_test prepare_multi_masses_query with an empty list of mzs **\n" ; $current_test++; + throws_ok{ check_state_from_hmdb_uaTest(\'504')} + '/Gateway Timeout: The HMDB server was acting as a gateway or proxy and did not receive a timely response from the upstream server/', + 'Method \'check_state_from_hmdb_ua\' detects HTTP error code returned by HMDB and died correctly' ; + + print "\n** Test $current_test parse_hmdb_csv_results with the correct inputs for hmdb outputs parsing (csv format) **\n" ; $current_test++; + is_deeply ( parse_hmdb_csv_resultsTest ( + [ + 'query_mass,compound_id,formula,compound_mass,adduct,adduct_type,adduct_mass,delta', + '175.01,HMDB60293,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,0.000125', + '175.01,HMDB03745,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,0.000676', + '175.01,HMDB31436,H4O4Si,95.987885149,M+DMSO+H,+,175.009105,0.000895', + '175.01,HMDB33657,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', + '175.01,HMDB35230,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', + '420.16,HMDB60838,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683', + '420.16,HMDB60836,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683' + ], + ['175.01', '238.19', '420.16'] + ), + [ + [ + { 'ENTRY_ADDUCT' => 'M+IsoProp+H', 'ENTRY_DELTA' => '0.000125', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_FORMULA' => 'H2O3S2', 'ENTRY_ENTRY_ID' => 'HMDB60293', 'ENTRY_ADDUCT_MZ' => '175.009875', 'ENTRY_CPD_MZ' => '113.94453531' }, + { 'ENTRY_ADDUCT' => 'M+CH3OH+H', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_DELTA' => '0.000676', 'ENTRY_FORMULA' => 'C2H6O3S2', 'ENTRY_ENTRY_ID' => 'HMDB03745', 'ENTRY_ADDUCT_MZ' => '175.009324', 'ENTRY_CPD_MZ' => '141.975835438' }, + { 'ENTRY_CPD_MZ' => '95.987885149', 'ENTRY_FORMULA' => 'H4O4Si', 'ENTRY_ENTRY_ID' => 'HMDB31436', 'ENTRY_ADDUCT_MZ' => '175.009105', 'ENTRY_DELTA' => '0.000895', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT' => 'M+DMSO+H' }, + { 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_DELTA' => '0.000914', 'ENTRY_ADDUCT' => 'M+H+K', 'ENTRY_CPD_MZ' => '310.047738052', 'ENTRY_ENTRY_ID' => 'HMDB33657', 'ENTRY_ADDUCT_MZ' => '175.009086', 'ENTRY_FORMULA' => 'C17H10O6' }, + { 'ENTRY_ADDUCT' => 'M+H+K', 'ENTRY_DELTA' => '0.000914', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_FORMULA' => 'C17H10O6', 'ENTRY_ADDUCT_MZ' => '175.009086', 'ENTRY_ENTRY_ID' => 'HMDB35230', 'ENTRY_CPD_MZ' => '310.047738052' } + ], + [], + [ + { 'ENTRY_ADDUCT' => 'M+IsoProp+H', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_DELTA' => '0.000683', 'ENTRY_ENTRY_ID' => 'HMDB60838', 'ENTRY_ADDUCT_MZ' => '420.159317', 'ENTRY_FORMULA' => 'C17H17N3O4S', 'ENTRY_CPD_MZ' => '359.093976737' }, + { 'ENTRY_CPD_MZ' => '359.093976737', 'ENTRY_FORMULA' => 'C17H17N3O4S', 'ENTRY_ENTRY_ID' => 'HMDB60836', 'ENTRY_ADDUCT_MZ' => '420.159317', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_DELTA' => '0.000683', 'ENTRY_ADDUCT' => 'M+IsoProp+H' } + ] + ], + 'Method \'parse_hmdb_csv_results\' works with a well-formated csv output and returns a a well formated array' ) ; + + print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a list of mzs **\n" ; $current_test++; + is_deeply ( parse_hmdb_csv_resultsTest ( [], ['175.01', '238.19', '420.16'] ), + [ [], [], [] ], + 'Method \'parse_hmdb_csv_results\' works with a empty csv output and returns an empty but well formatted array' ) ; + + print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a void mz list **\n" ; $current_test++; + 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' ) ; +} + + + + + + + + + + + + + + + + + +## END of the script \ No newline at end of file |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/t/lib/hmdbTest.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/t/lib/hmdbTest.pm Thu Jan 28 10:52:26 2016 -0500 |
[ |
@@ -0,0 +1,83 @@ +package lib::hmdbTest ; + +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 ; + +our $VERSION = "1.0"; +our @ISA = qw(Exporter); +our @EXPORT = qw( parse_hmdb_csv_resultsTest check_state_from_hmdb_uaTest test_matches_from_hmdb_uaTest extract_sub_mz_listsTest prepare_multi_masses_queryTest get_matches_from_hmdb_uaTest); +our %EXPORT_TAGS = ( ALL => [qw( parse_hmdb_csv_resultsTest check_state_from_hmdb_uaTest test_matches_from_hmdb_uaTest extract_sub_mz_listsTest prepare_multi_masses_queryTest get_matches_from_hmdb_uaTest)] ); + +use lib '/Users/fgiacomoni/Inra/labs/perl/galaxy_tools/hmdb' ; +use lib::hmdb qw( :ALL ) ; + +use Data::Dumper ; + +## sub +sub extract_sub_mz_listsTest { + + my ($masses, $hmdb_limits, ) = @_ ; + + my $oHmdb = lib::hmdb->new() ; + my $submasses = $oHmdb->extract_sub_mz_lists($masses, $hmdb_limits ) ; + + return ($submasses) ; +} + +## sub +sub prepare_multi_masses_queryTest { + + my ($mzs ) = @_ ; + + my $oHmdb = lib::hmdb->new() ; + my ( $hmdb_masses, $nb_masses_to_submit ) = $oHmdb->prepare_multi_masses_query($mzs) ; + + return ($hmdb_masses) ; +} + +## sub +sub get_matches_from_hmdb_uaTest { + + my ( $hmdb_masses, $delta, $molecular_species ) = @_ ; + + my $oHmdb = lib::hmdb->new() ; + my $hmdb_pages = $oHmdb->get_matches_from_hmdb_ua($hmdb_masses, $delta, $molecular_species) ; + return ($hmdb_pages) ; +} + + +## sub +sub test_matches_from_hmdb_uaTest { + + my $oHmdb = lib::hmdb->new() ; + my $status = $oHmdb->test_matches_from_hmdb_ua() ; + return ($status) ; +} + + +## sub +sub check_state_from_hmdb_uaTest { + my ($status ) = @_ ; + + my $oHmdb = lib::hmdb->new() ; + my $res = $oHmdb->check_state_from_hmdb_ua($status) ; + return($res) ; +} + + + +## sub +sub parse_hmdb_csv_resultsTest { + my ($hmdb_pages, $mzs ) = @_ ; + + my $oHmdb = lib::hmdb->new() ; + my $result = $oHmdb->parse_hmdb_csv_results($hmdb_pages, $mzs) ; ## hash format result + + return($result) ; +} + + +1 ; \ No newline at end of file |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/.DS_Store |
b |
Binary file hmdb/test_data/.DS_Store has changed |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/._.DS_Store |
b |
Binary file hmdb/test_data/._.DS_Store has changed |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/input_test01_fake-mzrt-input-with-id.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/input_test01_fake-mzrt-input-with-id.tsv Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,7 @@ +id mz rt +1 7.02080998 49.38210915 +2 75.05547146 0.658528069 +3 75.08059797 1743.94267 +4 76.03942694 51.23158899 +5 76.07584477 50.51249853 +6 76.07593168 0.149308136 \ No newline at end of file |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/input_test02_mzrt-input-with-id.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/input_test02_mzrt-input-with-id.tsv Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,7 @@ +id mz rt +1 7.02080998 49.38210915 +2 75.05547146 0.658528069 +3 75.08059797 1743.94267 +4 76.03942694 51.23158899 +5 76.07584477 50.51249853 +6 76.07593168 0.149308136 \ No newline at end of file |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test01.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test01.csv Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,7 @@ +ID MASS_SUBMIT HMDB_ID CPD_FORMULA CPD_MW DELTA +mz_00001 7.02080998 No_result_found_on_HMDB n/a n/a 0 +mz_00002 75.05547146 No_result_found_on_HMDB n/a n/a 0 +mz_00003 75.08059797 No_result_found_on_HMDB n/a n/a 0 +mz_00004 76.03942694 No_result_found_on_HMDB n/a n/a 0 +mz_00005 76.07584477 No_result_found_on_HMDB n/a n/a 0 +mz_00006 76.07593168 No_result_found_on_HMDB n/a n/a 0 |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test01.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test01.html Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +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 = neutral / 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:30px;"><!-- Compound--><col style="width:120px;"><!-- name--><col style="width:40px;"><!-- adduct--><col style="width:50px;"><!-- adduct type--><col style="width:60px;"><!-- adduct mw--><col style="width:60px;"><!-- cpd mw--><col style="width:50px;"><!-- delta--><thead><th>ID from input</th><th>Mass (m/z)</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></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="7"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">No_result_found_on_HMDB</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></tr><tr class="green"><td class="ca" >mz_00002</td><td id="2" class="ca" >75.05547146</td><td class="ca" colspan="7"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">No_result_found_on_HMDB</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></tr><tr class="white"><td class="ca" >mz_00003</td><td id="3" class="ca" >75.08059797</td><td class="ca" colspan="7"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">No_result_found_on_HMDB</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></tr><tr class="green"><td class="ca" >mz_00004</td><td id="4" class="ca" >76.03942694</td><td class="ca" colspan="7"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">No_result_found_on_HMDB</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></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="7"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">No_result_found_on_HMDB</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></tr><tr class="green"><td class="ca" >mz_00006</td><td id="6" class="ca" >76.07593168</td><td class="ca" colspan="7"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">No_result_found_on_HMDB</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></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 |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test01.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test01.tsv Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,7 @@ +id mz rt hmdb +1 7.02080998 49.38210915 No_result_found_on_HMDB +2 75.05547146 0.658528069 No_result_found_on_HMDB +3 75.08059797 1743.94267 No_result_found_on_HMDB +4 76.03942694 51.23158899 No_result_found_on_HMDB +5 76.07584477 50.51249853 No_result_found_on_HMDB +6 76.07593168 0.149308136 No_result_found_on_HMDB |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test02.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test02.csv Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,75 @@ +ID MASS_SUBMIT HMDB_ID CPD_FORMULA CPD_MW DELTA +mz_00001 7.02080998 No_result_found_on_HMDB n/a n/a 0 +mz_00002 75.05547146 HMDB31419 C2H6N2O 74.048012824 0.00018246 +mz_00002 75.05547146 HMDB60428 C2H6N2O 74.048012824 0.00018246 +mz_00002 75.05547146 HMDB00064 C4H9N3O2 131.069476547 0.00018346 +mz_00002 75.05547146 HMDB13222 C4H9N3O2 131.069476547 0.00018346 +mz_00002 75.05547146 HMDB32439 H3NO 33.021463723 0.00018446 +mz_00002 75.05547146 HMDB03338 H3NO 33.021463723 0.00018446 +mz_00002 75.05547146 HMDB13162 C11H22NO2 200.165053953 0.00080354 +mz_00003 75.08059797 HMDB04327 C4H10O 74.073164942 0.00015697 +mz_00003 75.08059797 HMDB62103 C4H10O 74.073164942 0.00015697 +mz_00003 75.08059797 HMDB11469 C4H10O 74.073164942 0.00015697 +mz_00003 75.08059797 HMDB06006 C4H10O 74.073164942 0.00015697 +mz_00003 75.08059797 HMDB31456 C4H10O 74.073164942 0.00015697 +mz_00004 76.03942694 HMDB00191 C4H7NO4 133.037507717 0.00012294 +mz_00004 76.03942694 HMDB31239 C2H5NO2 75.032028409 0.00012294 +mz_00004 76.03942694 HMDB00123 C2H5NO2 75.032028409 0.00012294 +mz_00004 76.03942694 HMDB14691 C2H5NO2 75.032028409 0.00012294 +mz_00004 76.03942694 HMDB11753 C4H7NO4 133.037507717 0.00012294 +mz_00004 76.03942694 HMDB06483 C4H7NO4 133.037507717 0.00012294 +mz_00004 76.03942694 HMDB03125 H2O2 34.005479308 0.00012494 +mz_00004 76.03942694 HMDB01039 HO 17.002739654 0.00012494 +mz_00004 76.03942694 HMDB00201 C9H17NO4 203.115758037 0.00041606 +mz_00004 76.03942694 HMDB31603 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB40214 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31681 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31174 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB38271 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31342 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31504 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB33793 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31593 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB39819 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB30330 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB29165 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31351 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB40591 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB32460 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB38962 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB32391 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31476 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31477 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB29314 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31500 C7H12O2 128.083729628 0.00068506 +mz_00004 76.03942694 HMDB31484 C7H12O2 128.083729628 0.00068506 +mz_00005 76.07584477 HMDB12136 C3H9NO 75.068413915 0.00015477 +mz_00005 76.07584477 HMDB00925 C3H9NO 75.068413915 0.00015477 +mz_00005 76.07584477 HMDB31652 C3H6O 58.041864814 0.00015677 +mz_00005 76.07584477 HMDB62143 C3H6O 58.041864813 0.00015677 +mz_00005 76.07584477 HMDB31558 C3H6O 58.041864814 0.00015677 +mz_00005 76.07584477 HMDB03366 C3H6O 58.041864814 0.00015677 +mz_00005 76.07584477 HMDB01659 C3H6O 58.041864814 0.00015677 +mz_00005 76.07584477 HMDB62061 C9H20 128.156500644 0.00065223 +mz_00005 76.07584477 HMDB31416 C9H20 128.15650064 0.00065223 +mz_00005 76.07584477 HMDB31556 C9H20 128.15650064 0.00065223 +mz_00005 76.07584477 HMDB30301 C9H20 128.15650064 0.00065223 +mz_00005 76.07584477 HMDB29595 C9H20 128.15650064 0.00065223 +mz_00005 76.07584477 HMDB30302 C9H20 128.15650064 0.00065223 +mz_00005 76.07584477 HMDB62013 C9H20 128.156500644 0.00065223 +mz_00005 76.07584477 HMDB62017 C9H20 128.156500644 0.00065223 +mz_00006 76.07593168 HMDB12136 C3H9NO 75.068413915 0.00024168 +mz_00006 76.07593168 HMDB00925 C3H9NO 75.068413915 0.00024168 +mz_00006 76.07593168 HMDB31652 C3H6O 58.041864814 0.00024368 +mz_00006 76.07593168 HMDB62143 C3H6O 58.041864813 0.00024368 +mz_00006 76.07593168 HMDB31558 C3H6O 58.041864814 0.00024368 +mz_00006 76.07593168 HMDB03366 C3H6O 58.041864814 0.00024368 +mz_00006 76.07593168 HMDB01659 C3H6O 58.041864814 0.00024368 +mz_00006 76.07593168 HMDB62061 C9H20 128.156500644 0.00056532 +mz_00006 76.07593168 HMDB31416 C9H20 128.15650064 0.00056532 +mz_00006 76.07593168 HMDB31556 C9H20 128.15650064 0.00056532 +mz_00006 76.07593168 HMDB30301 C9H20 128.15650064 0.00056532 +mz_00006 76.07593168 HMDB29595 C9H20 128.15650064 0.00056532 +mz_00006 76.07593168 HMDB30302 C9H20 128.15650064 0.00056532 +mz_00006 76.07593168 HMDB62013 C9H20 128.156500644 0.00056532 +mz_00006 76.07593168 HMDB62017 C9H20 128.156500644 0.00056532 |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test02.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test02.html Thu Jan 28 10:52:26 2016 -0500 |
b |
b'@@ -0,0 +1,1 @@\n+<?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:30px;"><!-- Compound--><col style="width:120px;"><!-- name--><col style="width:40px;"><!-- adduct--><col style="width:50px;"><!-- adduct type--><col style="width:60px;"><!-- adduct mw--><col style="width:60px;"><!-- cpd mw--><col style="width:50px;"><!-- delta--><thead><th>ID from input</th><th>Mass (m/z)</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></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="7"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/" target="_blank" class="btn">No_result_found_on_HMDB</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></tr><tr class="green"><td class="ca" >mz_00002</td><td id="2" class="ca" >75.05547146</td><td class="ca" colspan="7"></td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB31419" target="_blank" class="btn">HMDB31419</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">0.00018246</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB60428" target="_blank" class="btn">HMDB60428</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">0.00018246</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB00064" target="_blank" class="btn">HMDB00064</a></td><td class="ca">C4H9N3O2</td><td class="ca">131.069476547</td><td class="ca">M+H+NH4</td><td'..b'8" target="_blank" class="btn">HMDB31558</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">0.00024368</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB03366" target="_blank" class="btn">HMDB03366</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">0.00024368</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB01659" target="_blank" class="btn">HMDB01659</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">0.00024368</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB62061" target="_blank" class="btn">HMDB62061</a></td><td class="ca">C9H20</td><td class="ca">128.156500644</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB31416" target="_blank" class="btn">HMDB31416</a></td><td class="ca">C9H20</td><td class="ca">128.15650064</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB31556" target="_blank" class="btn">HMDB31556</a></td><td class="ca">C9H20</td><td class="ca">128.15650064</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB30301" target="_blank" class="btn">HMDB30301</a></td><td class="ca">C9H20</td><td class="ca">128.15650064</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB29595" target="_blank" class="btn">HMDB29595</a></td><td class="ca">C9H20</td><td class="ca">128.15650064</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB30302" target="_blank" class="btn">HMDB30302</a></td><td class="ca">C9H20</td><td class="ca">128.15650064</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB62013" target="_blank" class="btn">HMDB62013</a></td><td class="ca">C9H20</td><td class="ca">128.156500644</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB62017" target="_blank" class="btn">HMDB62017</a></td><td class="ca">C9H20</td><td class="ca">128.156500644</td><td class="ca">M+H+Na</td><td class="ca">+</td><td class="ca">76.076497</td><td class="ca">0.00056532</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>\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test02.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test02.tsv Thu Jan 28 10:52:26 2016 -0500 |
b |
@@ -0,0 +1,7 @@ +id mz rt hmdb +1 7.02080998 49.38210915 No_result_found_on_HMDB +2 75.05547146 0.658528069 HMDB31419|HMDB60428|HMDB00064|HMDB13222|HMDB32439|HMDB03338|HMDB13162 +3 75.08059797 1743.94267 HMDB04327|HMDB62103|HMDB11469|HMDB06006|HMDB31456 +4 76.03942694 51.23158899 HMDB00191|HMDB31239|HMDB00123|HMDB14691|HMDB11753|HMDB06483|HMDB03125|HMDB01039|HMDB00201|HMDB31603|HMDB40214|HMDB31681|HMDB31174|HMDB38271|HMDB31342|HMDB31504|HMDB33793|HMDB31593|HMDB39819|HMDB30330|HMDB29165|HMDB31351|HMDB40591|HMDB32460|HMDB38962|HMDB32391|HMDB31476|HMDB31477|HMDB29314|HMDB31500|HMDB31484 +5 76.07584477 50.51249853 HMDB12136|HMDB00925|HMDB31652|HMDB62143|HMDB31558|HMDB03366|HMDB01659|HMDB62061|HMDB31416|HMDB31556|HMDB30301|HMDB29595|HMDB30302|HMDB62013|HMDB62017 +6 76.07593168 0.149308136 HMDB12136|HMDB00925|HMDB31652|HMDB62143|HMDB31558|HMDB03366|HMDB01659|HMDB62061|HMDB31416|HMDB31556|HMDB30301|HMDB29595|HMDB30302|HMDB62013|HMDB62017 |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test03.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test03.csv Thu Jan 28 10:52:26 2016 -0500 |
b |
b'@@ -0,0 +1,1116 @@\n+ID\tMASS_SUBMIT\tHMDB_ID\tCPD_FORMULA\tCPD_MW\tDELTA\n+mz_00001\t175.01\tHMDB60293\tH2O3S2\t113.94453531\t0.000125\n+mz_00001\t175.01\tHMDB03745\tC2H6O3S2\t141.975835438\t0.000676\n+mz_00001\t175.01\tHMDB31436\tH4O4Si\t95.987885149\t0.000895\n+mz_00001\t175.01\tHMDB33657\tC17H10O6\t310.047738052\t0.000914\n+mz_00001\t175.01\tHMDB35230\tC17H10O6\t310.047738052\t0.000914\n+mz_00001\t175.01\tHMDB34155\tCH4N2S\t76.009518828\t0.001744\n+mz_00001\t175.01\tHMDB01570\tC10H13N2O7P\t304.046037292\t0.002237\n+mz_00001\t175.01\tHMDB01270\tC3H8O10P2\t265.9592695\t0.003458\n+mz_00001\t175.01\tHMDB01294\tC3H8O10P2\t265.9592695\t0.003458\n+mz_00001\t175.01\tHMDB60394\tC9H12FN2O8P\t326.031530087\t0.004012\n+mz_00001\t175.01\tHMDB60015\tC6H6O4S\t173.99867937\t0.004045\n+mz_00001\t175.01\tHMDB00021\tC9H10INO3\t306.970536611\t0.004182\n+mz_00001\t175.01\tHMDB15167\tC5H4N4S\t152.015666838\t0.005115\n+mz_00001\t175.01\tHMDB40364\tC3H7MnO6P\t224.936074104\t0.005134\n+mz_00001\t175.01\tHMDB62056\tC6H7O4P\t174.008195703\t0.005472\n+mz_00001\t175.01\tHMDB41485\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB00209\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB06853\tC4H4O\t68.02621475\t0.005588\n+mz_00001\t175.01\tHMDB03767\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB40733\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB38176\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB33968\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB29635\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB33128\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB33766\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB40638\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB32568\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB29686\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB32603\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB32400\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB31459\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB13785\tC4H4O\t68.02621475\t0.005588\n+mz_00001\t175.01\tHMDB02340\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB14912\tC8H8F3N3O4S2\t330.990831754\t0.005966\n+mz_00001\t175.01\tHMDB60764\tC16H11ClN4O\t310.062138701\t0.006286\n+mz_00001\t175.01\tHMDB40238\tC6H10OS\t130.045235632\t0.006396\n+mz_00001\t175.01\tHMDB31370\tC6H10OS\t130.045235632\t0.006396\n+mz_00001\t175.01\tHMDB37493\tC6H10OS\t130.045235632\t0.006396\n+mz_00001\t175.01\tHMDB37787\tC5H10N2\t98.08439833\t0.006562\n+mz_00001\t175.01\tHMDB61807\tC10H9Cl3O2\t265.966812653\t0.007229\n+mz_00001\t175.01\tHMDB59985\tC11H12O8S\t304.02528805\t0.008138\n+mz_00001\t175.01\tHMDB59987\tC11H12O8S\t304.02528805\t0.008138\n+mz_00001\t175.01\tHMDB60020\tC11H12O8S\t304.02528805\t0.008138\n+mz_00001\t175.01\tHMDB14581\tC5H4N4O\t136.03851077\t0.008331\n+mz_00001\t175.01\tHMDB00157\tC5H4N4O\t136.03851077\t0.008331\n+mz_00001\t175.01\tHMDB40631\tC15H12O7\t304.058302738\t0.008369\n+mz_00001\t175.01\tHMDB31778\tC14H9ClF2N2O2\t310.032061659\t0.008752\n+mz_00001\t175.01\tHMDB31160\tC5H12S2\t136.038041764\t0.0088\n+mz_00001\t175.01\tHMDB33053\tC5H12S2\t136.038041764\t0.0088\n+mz_00001\t175.01\tHMDB33054\tC5H12S2\t136.038041764\t0.0088\n+mz_00001\t175.01\tHMDB29694\tC8H8OS\t152.029585568\t0.008804\n+mz_00001\t175.01\tHMDB29783\tC14H14O8\t310.068867424\t0.009651\n+mz_00001\t175.01\tHMDB00613\tC4H8O5\t136.037173366\t0.009669\n+mz_00001\t175.01\tHMDB00943\tC4H8O5\t136.037173366\t0.009669\n+mz_00001\t175.01\tHMDB00115\tC2H4O3\t76.016043994\t0.011306\n+mz_00001\t175.01\tHMDB31608\tC2H4O3\t76.016043994\t0.011306\n+mz_00001\t175.01\tHMDB41797\tC8H6Cl2O3\t219.969399472\t0.011761\n+mz_00001\t175.01\tHMDB15413\tC12H14N4O4S\t310.073575646\t0.012005\n+mz_00001\t175.01\tHMDB15621\tC12H14N4O4S\t310.073575646\t0.012005\n+mz_00001\t175.01\tHMDB31825\tC8H8S\t136.034670946\t0.012171\n+mz_00001\t175.01\tHMDB31781\tC14H15O2PS2\t310.025107616\t0.012229\n+mz_00001\t175.01\tHMDB00634\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB00620\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB61185\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB00749\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB02092\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB33809\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB13233\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB59743\tC5H6'..b'17\t696.226549854\t0.03834\n+mz_00004\t780.32\tHMDB61254\tC38H41N3O11S\t747.246179859\t0.040331\n+mz_00004\t780.32\tHMDB61256\tC38H41N3O11S\t747.246179859\t0.040331\n+mz_00004\t780.32\tHMDB33965\tC15H27NO10\t381.163496089\t0.040815\n+mz_00004\t780.32\tHMDB12364\tC36H66NO10P\t703.442433849\t0.041474\n+mz_00004\t780.32\tHMDB12344\tC36H66NO10P\t703.442433849\t0.041474\n+mz_00004\t780.32\tHMDB06606\tC29H49NO23\t779.269536879\t0.043187\n+mz_00004\t780.32\tHMDB13001\tC54H92O46\t1476.485975556\t0.043189\n+mz_00004\t780.32\tHMDB12201\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB41369\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB12202\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB12203\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB32000\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB29401\tC20H19NO6\t369.121237345\t0.043702\n+mz_00004\t780.32\tHMDB33522\tC21H19NO6\t381.121237345\t0.043702\n+mz_00004\t780.32\tHMDB29360\tC20H19NO6\t369.121237345\t0.043702\n+mz_00005\t956.25\tHMDB35451\tC43H49O23\t933.266462874\t0.005681\n+mz_00005\t956.25\tHMDB38095\tC43H49O23\t933.266462874\t0.005681\n+mz_00005\t956.25\tHMDB40803\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB02219\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB38821\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB40511\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB34149\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB33990\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB35931\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB29617\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB36630\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB41455\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB60157\tC30H52N7O18P3S\t923.230238121\t0.013727\n+mz_00005\t956.25\tHMDB33021\tC43H49O22\t917.271548252\t0.015294\n+mz_00005\t956.25\tHMDB41153\tC40H41O22\t873.208947996\t0.019318\n+mz_00005\t956.25\tHMDB60375\tC35H54N7O19P3S\t1001.240802807\t0.019643\n+mz_00005\t956.25\tHMDB35163\tC40H42O26\t938.196431516\t0.019745\n+mz_00005\t956.25\tHMDB29794\tC40H42O26\t938.196431516\t0.019745\n+mz_00005\t956.25\tHMDB04047\tC27H44N7O19P3S\t895.162552487\t0.022108\n+mz_00005\t956.25\tHMDB40378\tC45H38O21\t914.190558278\t0.025619\n+mz_00005\t956.25\tHMDB14756\tC21H21ClN2O8\t464.098643365\t0.029593\n+mz_00005\t956.25\tHMDB12207\tC28H42N7O17P3S\t873.157073179\t0.032557\n+mz_00005\t956.25\tHMDB35883\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB37932\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB34725\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB33132\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB40478\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB34360\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB37362\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB30775\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB30747\tC22H24O11\t464.13186161\t0.036843\n+mz_00005\t956.25\tHMDB37535\tC22H24O11\t464.13186161\t0.036843\n+mz_00005\t956.25\tHMDB14927\tC28H54GdN5O20\t938.260314726\t0.044138\n+mz_00006\t1100.45\tHMDB60499\tC28H30N4O6\t518.216534712\t0.001166\n+mz_00006\t1100.45\tHMDB32198\tC30H34Cl2N4O\t536.210967144\t0.004946\n+mz_00006\t1100.45\tHMDB06568\tC20H35NO15\t529.200669455\t0.014838\n+mz_00006\t1100.45\tHMDB02060\tC20H35NO15\t529.200669455\t0.014838\n+mz_00006\t1100.45\tHMDB06582\tC20H35NO15\t529.200669455\t0.014838\n+mz_00006\t1100.45\tHMDB10345\tC27H36O11\t536.225761994\t0.024644\n+mz_00006\t1100.45\tHMDB36888\tC27H36O11\t536.225761994\t0.024644\n+mz_00006\t1100.45\tHMDB39422\tC48H64N11O18\t1082.443079299\t0.026902\n+mz_00006\t1100.45\tHMDB35520\tC24H38O12\t518.23632668\t0.038418\n+mz_00006\t1100.45\tHMDB38923\tC24H38O12\t518.23632668\t0.038418\n+mz_00006\t1100.45\tHMDB29773\tC24H38O12\t518.23632668\t0.038418\n+mz_00006\t1100.45\tHMDB15455\tC53H67N9O10S\t1021.473160099\t0.04438\n+mz_00006\t1100.45\tHMDB40723\tC30H30O8\t518.194067936\t0.046099\n+mz_00006\t1100.45\tHMDB01980\tC46H65N13O12S2\t1055.431705989\t0.047134\n+mz_00006\t1100.45\tHMDB33282\tC26H32O12\t536.189376488\t0.048127\n+mz_00006\t1100.45\tHMDB33281\tC26H32O12\t536.189376488\t0.048127\n+mz_00006\t1100.45\tHMDB15595\tC28H22F3N7O\t529.183792976\t0.048591\n' |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test03.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test03.html Thu Jan 28 10:52:26 2016 -0500 |
b |
b'@@ -0,0 +1,1 @@\n+<?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.05</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:30px;"><!-- Compound--><col style="width:120px;"><!-- name--><col style="width:40px;"><!-- adduct--><col style="width:50px;"><!-- adduct type--><col style="width:60px;"><!-- adduct mw--><col style="width:60px;"><!-- cpd mw--><col style="width:50px;"><!-- delta--><thead><th>ID from input</th><th>Mass (m/z)</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></thead><tbody class="select" id="page-id-1"><tr class="white"><td class="ca" >mz_00001</td><td id="1" class="ca" >175.01</td><td class="ca" colspan="7"></td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB60293" target="_blank" class="btn">HMDB60293</a></td><td class="ca">H2O3S2</td><td class="ca">113.94453531</td><td class="ca">M+IsoProp+H</td><td class="ca">+</td><td class="ca">175.009875</td><td class="ca">0.000125</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB03745" target="_blank" class="btn">HMDB03745</a></td><td class="ca">C2H6O3S2</td><td class="ca">141.975835438</td><td class="ca">M+CH3OH+H</td><td class="ca">+</td><td class="ca">175.009324</td><td class="ca">0.000676</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB31436" target="_blank" class="btn">HMDB31436</a></td><td class="ca">H4O4Si</td><td class="ca">95.987885149</td><td class="ca">M+DMSO+H</td><td class="ca">+</td><td class="ca">175.009105</td><td class="ca">0.000895</td></tr><tr class="white"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB33657" target="_blank" class="btn">HMDB33657</a></td><td class="ca">C17H10O6</td><td class="ca">310.047738052</td><td class="ca">M+H+K</td><td class="ca">+</td><td class="ca">175.009086</td><td class="ca">0.000914</td></tr><tr class="w'..b'536.225761994</td><td class="ca">2M+3H2O+2H</td><td class="ca">+</td><td class="ca">1100.474644</td><td class="ca">0.024644</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB39422" target="_blank" class="btn">HMDB39422</a></td><td class="ca">C48H64N11O18</td><td class="ca">1082.443079299</td><td class="ca">M+NH4</td><td class="ca">+</td><td class="ca">1100.476902</td><td class="ca">0.026902</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB35520" target="_blank" class="btn">HMDB35520</a></td><td class="ca">C24H38O12</td><td class="ca">518.23632668</td><td class="ca">2M+ACN+Na</td><td class="ca">+</td><td class="ca">1100.488418</td><td class="ca">0.038418</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB38923" target="_blank" class="btn">HMDB38923</a></td><td class="ca">C24H38O12</td><td class="ca">518.23632668</td><td class="ca">2M+ACN+Na</td><td class="ca">+</td><td class="ca">1100.488418</td><td class="ca">0.038418</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB29773" target="_blank" class="btn">HMDB29773</a></td><td class="ca">C24H38O12</td><td class="ca">518.23632668</td><td class="ca">2M+ACN+Na</td><td class="ca">+</td><td class="ca">1100.488418</td><td class="ca">0.038418</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB15455" target="_blank" class="btn">HMDB15455</a></td><td class="ca">C53H67N9O10S</td><td class="ca">1021.473160099</td><td class="ca">M+DMSO+H</td><td class="ca">+</td><td class="ca">1100.49438</td><td class="ca">0.04438</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB40723" target="_blank" class="btn">HMDB40723</a></td><td class="ca">C30H30O8</td><td class="ca">518.194067936</td><td class="ca">2M+ACN+Na</td><td class="ca">+</td><td class="ca">1100.403901</td><td class="ca">0.046099</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB01980" target="_blank" class="btn">HMDB01980</a></td><td class="ca">C46H65N13O12S2</td><td class="ca">1055.431705989</td><td class="ca">M+2Na-H</td><td class="ca">+</td><td class="ca">1100.402866</td><td class="ca">0.047134</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB33282" target="_blank" class="btn">HMDB33282</a></td><td class="ca">C26H32O12</td><td class="ca">536.189376488</td><td class="ca">2M+3H2O+2H</td><td class="ca">+</td><td class="ca">1100.401873</td><td class="ca">0.048127</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB33281" target="_blank" class="btn">HMDB33281</a></td><td class="ca">C26H32O12</td><td class="ca">536.189376488</td><td class="ca">2M+3H2O+2H</td><td class="ca">+</td><td class="ca">1100.401873</td><td class="ca">0.048127</td></tr><tr class="green"><td class="ca" colspan="2"></td><td class="ca"><a href="http://www.hmdb.ca/metabolites/HMDB15595" target="_blank" class="btn">HMDB15595</a></td><td class="ca">C28H22F3N7O</td><td class="ca">529.183792976</td><td class="ca">2M+ACN+H</td><td class="ca">+</td><td class="ca">1100.401409</td><td class="ca">0.048591</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>\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/test_data/out_test03.tsv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/test_data/out_test03.tsv Thu Jan 28 10:52:26 2016 -0500 |
b |
b'@@ -0,0 +1,1116 @@\n+ID\tMASS_SUBMIT\tHMDB_ID\tCPD_FORMULA\tCPD_MW\tDELTA\n+mz_00001\t175.01\tHMDB60293\tH2O3S2\t113.94453531\t0.000125\n+mz_00001\t175.01\tHMDB03745\tC2H6O3S2\t141.975835438\t0.000676\n+mz_00001\t175.01\tHMDB31436\tH4O4Si\t95.987885149\t0.000895\n+mz_00001\t175.01\tHMDB33657\tC17H10O6\t310.047738052\t0.000914\n+mz_00001\t175.01\tHMDB35230\tC17H10O6\t310.047738052\t0.000914\n+mz_00001\t175.01\tHMDB34155\tCH4N2S\t76.009518828\t0.001744\n+mz_00001\t175.01\tHMDB01570\tC10H13N2O7P\t304.046037292\t0.002237\n+mz_00001\t175.01\tHMDB01270\tC3H8O10P2\t265.9592695\t0.003458\n+mz_00001\t175.01\tHMDB01294\tC3H8O10P2\t265.9592695\t0.003458\n+mz_00001\t175.01\tHMDB60394\tC9H12FN2O8P\t326.031530087\t0.004012\n+mz_00001\t175.01\tHMDB60015\tC6H6O4S\t173.99867937\t0.004045\n+mz_00001\t175.01\tHMDB00021\tC9H10INO3\t306.970536611\t0.004182\n+mz_00001\t175.01\tHMDB15167\tC5H4N4S\t152.015666838\t0.005115\n+mz_00001\t175.01\tHMDB40364\tC3H7MnO6P\t224.936074104\t0.005134\n+mz_00001\t175.01\tHMDB62056\tC6H7O4P\t174.008195703\t0.005472\n+mz_00001\t175.01\tHMDB41485\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB00209\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB06853\tC4H4O\t68.02621475\t0.005588\n+mz_00001\t175.01\tHMDB03767\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB40733\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB38176\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB33968\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB29635\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB33128\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB33766\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB40638\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB32568\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB29686\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB32603\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB32400\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB31459\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB13785\tC4H4O\t68.02621475\t0.005588\n+mz_00001\t175.01\tHMDB02340\tC8H8O2\t136.0524295\t0.005588\n+mz_00001\t175.01\tHMDB14912\tC8H8F3N3O4S2\t330.990831754\t0.005966\n+mz_00001\t175.01\tHMDB60764\tC16H11ClN4O\t310.062138701\t0.006286\n+mz_00001\t175.01\tHMDB40238\tC6H10OS\t130.045235632\t0.006396\n+mz_00001\t175.01\tHMDB31370\tC6H10OS\t130.045235632\t0.006396\n+mz_00001\t175.01\tHMDB37493\tC6H10OS\t130.045235632\t0.006396\n+mz_00001\t175.01\tHMDB37787\tC5H10N2\t98.08439833\t0.006562\n+mz_00001\t175.01\tHMDB61807\tC10H9Cl3O2\t265.966812653\t0.007229\n+mz_00001\t175.01\tHMDB59985\tC11H12O8S\t304.02528805\t0.008138\n+mz_00001\t175.01\tHMDB59987\tC11H12O8S\t304.02528805\t0.008138\n+mz_00001\t175.01\tHMDB60020\tC11H12O8S\t304.02528805\t0.008138\n+mz_00001\t175.01\tHMDB14581\tC5H4N4O\t136.03851077\t0.008331\n+mz_00001\t175.01\tHMDB00157\tC5H4N4O\t136.03851077\t0.008331\n+mz_00001\t175.01\tHMDB40631\tC15H12O7\t304.058302738\t0.008369\n+mz_00001\t175.01\tHMDB31778\tC14H9ClF2N2O2\t310.032061659\t0.008752\n+mz_00001\t175.01\tHMDB31160\tC5H12S2\t136.038041764\t0.0088\n+mz_00001\t175.01\tHMDB33053\tC5H12S2\t136.038041764\t0.0088\n+mz_00001\t175.01\tHMDB33054\tC5H12S2\t136.038041764\t0.0088\n+mz_00001\t175.01\tHMDB29694\tC8H8OS\t152.029585568\t0.008804\n+mz_00001\t175.01\tHMDB29783\tC14H14O8\t310.068867424\t0.009651\n+mz_00001\t175.01\tHMDB00613\tC4H8O5\t136.037173366\t0.009669\n+mz_00001\t175.01\tHMDB00943\tC4H8O5\t136.037173366\t0.009669\n+mz_00001\t175.01\tHMDB00115\tC2H4O3\t76.016043994\t0.011306\n+mz_00001\t175.01\tHMDB31608\tC2H4O3\t76.016043994\t0.011306\n+mz_00001\t175.01\tHMDB41797\tC8H6Cl2O3\t219.969399472\t0.011761\n+mz_00001\t175.01\tHMDB15413\tC12H14N4O4S\t310.073575646\t0.012005\n+mz_00001\t175.01\tHMDB15621\tC12H14N4O4S\t310.073575646\t0.012005\n+mz_00001\t175.01\tHMDB31825\tC8H8S\t136.034670946\t0.012171\n+mz_00001\t175.01\tHMDB31781\tC14H15O2PS2\t310.025107616\t0.012229\n+mz_00001\t175.01\tHMDB00634\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB00620\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB61185\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB00749\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB02092\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB33809\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB13233\tC5H6O4\t130.02660868\t0.012231\n+mz_00001\t175.01\tHMDB59743\tC5H6'..b'17\t696.226549854\t0.03834\n+mz_00004\t780.32\tHMDB61254\tC38H41N3O11S\t747.246179859\t0.040331\n+mz_00004\t780.32\tHMDB61256\tC38H41N3O11S\t747.246179859\t0.040331\n+mz_00004\t780.32\tHMDB33965\tC15H27NO10\t381.163496089\t0.040815\n+mz_00004\t780.32\tHMDB12364\tC36H66NO10P\t703.442433849\t0.041474\n+mz_00004\t780.32\tHMDB12344\tC36H66NO10P\t703.442433849\t0.041474\n+mz_00004\t780.32\tHMDB06606\tC29H49NO23\t779.269536879\t0.043187\n+mz_00004\t780.32\tHMDB13001\tC54H92O46\t1476.485975556\t0.043189\n+mz_00004\t780.32\tHMDB12201\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB41369\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB12202\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB12203\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB32000\tC16H23N5O6\t381.164833493\t0.04349\n+mz_00004\t780.32\tHMDB29401\tC20H19NO6\t369.121237345\t0.043702\n+mz_00004\t780.32\tHMDB33522\tC21H19NO6\t381.121237345\t0.043702\n+mz_00004\t780.32\tHMDB29360\tC20H19NO6\t369.121237345\t0.043702\n+mz_00005\t956.25\tHMDB35451\tC43H49O23\t933.266462874\t0.005681\n+mz_00005\t956.25\tHMDB38095\tC43H49O23\t933.266462874\t0.005681\n+mz_00005\t956.25\tHMDB40803\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB02219\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB38821\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB40511\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB34149\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB33990\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB35931\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB29617\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB36630\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB41455\tC22H22O10\t446.121296924\t0.008359\n+mz_00005\t956.25\tHMDB60157\tC30H52N7O18P3S\t923.230238121\t0.013727\n+mz_00005\t956.25\tHMDB33021\tC43H49O22\t917.271548252\t0.015294\n+mz_00005\t956.25\tHMDB41153\tC40H41O22\t873.208947996\t0.019318\n+mz_00005\t956.25\tHMDB60375\tC35H54N7O19P3S\t1001.240802807\t0.019643\n+mz_00005\t956.25\tHMDB35163\tC40H42O26\t938.196431516\t0.019745\n+mz_00005\t956.25\tHMDB29794\tC40H42O26\t938.196431516\t0.019745\n+mz_00005\t956.25\tHMDB04047\tC27H44N7O19P3S\t895.162552487\t0.022108\n+mz_00005\t956.25\tHMDB40378\tC45H38O21\t914.190558278\t0.025619\n+mz_00005\t956.25\tHMDB14756\tC21H21ClN2O8\t464.098643365\t0.029593\n+mz_00005\t956.25\tHMDB12207\tC28H42N7O17P3S\t873.157073179\t0.032557\n+mz_00005\t956.25\tHMDB35883\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB37932\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB34725\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB33132\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB40478\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB34360\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB37362\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB30775\tC21H20O12\t464.095476104\t0.035928\n+mz_00005\t956.25\tHMDB30747\tC22H24O11\t464.13186161\t0.036843\n+mz_00005\t956.25\tHMDB37535\tC22H24O11\t464.13186161\t0.036843\n+mz_00005\t956.25\tHMDB14927\tC28H54GdN5O20\t938.260314726\t0.044138\n+mz_00006\t1100.45\tHMDB60499\tC28H30N4O6\t518.216534712\t0.001166\n+mz_00006\t1100.45\tHMDB32198\tC30H34Cl2N4O\t536.210967144\t0.004946\n+mz_00006\t1100.45\tHMDB06568\tC20H35NO15\t529.200669455\t0.014838\n+mz_00006\t1100.45\tHMDB02060\tC20H35NO15\t529.200669455\t0.014838\n+mz_00006\t1100.45\tHMDB06582\tC20H35NO15\t529.200669455\t0.014838\n+mz_00006\t1100.45\tHMDB10345\tC27H36O11\t536.225761994\t0.024644\n+mz_00006\t1100.45\tHMDB36888\tC27H36O11\t536.225761994\t0.024644\n+mz_00006\t1100.45\tHMDB39422\tC48H64N11O18\t1082.443079299\t0.026902\n+mz_00006\t1100.45\tHMDB35520\tC24H38O12\t518.23632668\t0.038418\n+mz_00006\t1100.45\tHMDB38923\tC24H38O12\t518.23632668\t0.038418\n+mz_00006\t1100.45\tHMDB29773\tC24H38O12\t518.23632668\t0.038418\n+mz_00006\t1100.45\tHMDB15455\tC53H67N9O10S\t1021.473160099\t0.04438\n+mz_00006\t1100.45\tHMDB40723\tC30H30O8\t518.194067936\t0.046099\n+mz_00006\t1100.45\tHMDB01980\tC46H65N13O12S2\t1055.431705989\t0.047134\n+mz_00006\t1100.45\tHMDB33282\tC26H32O12\t536.189376488\t0.048127\n+mz_00006\t1100.45\tHMDB33281\tC26H32O12\t536.189376488\t0.048127\n+mz_00006\t1100.45\tHMDB15595\tC28H22F3N7O\t529.183792976\t0.048591\n' |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/wsdl_hmdb.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/wsdl_hmdb.pl Thu Jan 28 10:52:26 2016 -0500 |
[ |
b'@@ -0,0 +1,265 @@\n+#!perl\r\n+\r\n+## script : wsdl_hmdb.pl\r\n+#=============================================================================\r\n+# Included modules and versions\r\n+#=============================================================================\r\n+## Perl modules\r\n+use strict ;\r\n+use warnings ;\r\n+use Carp qw (cluck croak carp) ;\r\n+\r\n+use Data::Dumper ;\r\n+use Getopt::Long ;\r\n+use Text::CSV ;\r\n+use POSIX ;\r\n+use FindBin ; ## Permet de localisez le repertoire du script perl d\'origine\r\n+\r\n+## Specific Modules (Home made...)\r\n+use lib $FindBin::Bin ;\r\n+my $binPath = $FindBin::Bin ;\r\n+use lib::hmdb qw( :ALL ) ;\r\n+## PFEM Perl Modules\r\n+use lib::conf qw( :ALL ) ;\r\n+use lib::csv qw( :ALL ) ;\r\n+\r\n+## Initialized values\r\n+my ( $help ) = undef ;\r\n+my ( $mass ) = undef ;\r\n+my ( $masses_file, $col_id, $col_mass, $header_choice, $nbline_header ) = ( undef, undef, undef, undef, undef ) ;\r\n+my ( $delta, $molecular_species, $out_tab, $out_html, $out_xls ) = ( undef, undef, undef, undef, undef ) ;\r\n+\r\n+\r\n+#=============================================================================\r\n+# Manage EXCEPTIONS\r\n+#=============================================================================\r\n+\r\n+&GetOptions ( \t"h"\t\t\t\t\t=> \\$help,\t\t\t\t# HELP\r\n+\t\t\t\t"mass:s"\t\t\t=> \\$mass,\t\t\t\t## option : one masse\r\n+\t\t\t\t"masses:s"\t\t\t=> \\$masses_file,\t\t## option : path to the input\r\n+\t\t\t\t"header_choice:s"\t=> \\$header_choice,\t\t## Presence or not of header in tabular file\r\n+\t\t\t\t"nblineheader:i"\t=> \\$nbline_header,\t\t## numbre of header line present in file\r\n+\t\t\t\t"colfactor:i"\t\t=> \\$col_mass,\t\t\t## Column id for retrieve formula list in tabular file\r\n+\t\t\t\t"delta:f"\t\t\t=> \\$delta,\r\n+\t\t\t\t"mode:s"\t\t\t=> \\$molecular_species,\t## Molecular species (positive/negative/neutral) \r\n+\t\t\t\t"output|o:s"\t\t=> \\$out_tab,\t\t\t## option : path to the ouput (tabular : input+results )\r\n+\t\t\t\t"view|v:s"\t\t\t=> \\$out_html,\t\t\t## option : path to the results view (output2)\r\n+\t\t\t\t"outputxls:s"\t\t=> \\$out_xls,\t\t\t## option : path to the xls-like format output\r\n+ ) ;\r\n+\r\n+#=============================================================================\r\n+# EXCEPTIONS\r\n+#=============================================================================\r\n+$help and &help ;\r\n+\r\n+#=============================================================================\r\n+# MAIN SCRIPT\r\n+#=============================================================================\r\n+\r\n+\r\n+## -------------- Conf file ------------------------ :\r\n+my ( $CONF ) = ( undef ) ;\r\n+foreach my $conf ( <$binPath/*.cfg> ) {\r\n+\tmy $oConf = lib::conf::new() ;\r\n+\t$CONF = $oConf->as_conf($conf) ;\r\n+}\r\n+\r\n+## -------------- HTML template file ------------------------ :\r\n+foreach my $html_template ( <$binPath/*.tmpl> ) { $CONF->{\'HTML_TEMPLATE\'} = $html_template ; }\r\n+\r\n+\r\n+## --------------- Global parameters ---------------- :\r\n+my ( $ids, $masses, $results ) = ( undef, undef, undef ) ;\r\n+my ( $complete_rows, $nb_pages_for_html_out ) = ( undef, 1 ) ;\r\n+my $search_condition = "Search params : Molecular specie = $molecular_species / delta (mass-to-charge ratio) = $delta" ;\r\n+\r\n+## --------------- retrieve input data -------------- :\r\n+\r\n+## manage only one mass\r\n+if ( ( defined $mass ) and ( $mass ne \'\' ) ) {\r\n+\tmy @masses = split(" ", $mass);\r\n+\t$masses = \\@masses ;\r\n+\tfor (my $i=1 ; $i<=$#masses+1 ; $i++){ push (@$ids,"mz_0".sprintf("%04s", $i ) ); }\r\n+} ## END IF\r\n+## manage csv file containing list of masses\r\n+elsif ( ( defined $masses_file ) and ( $masses_file ne "" ) and ( -e $masses_file ) ) {\r\n+\t## parse all csv for later : output csv build\r\n+\tmy $ocsv_input = lib::csv->new() ;\r\n+\tmy $complete_csv = $ocsv_input->get_csv_object( "\\t" ) ;\r\n+\t$complete_rows = $ocsv_input->parse_csv_object($complete_csv, \\$masses_file) ;\r\n+\t\r\n+\t## parse masses and set ids\r\n+\tmy $ocsv = lib::csv->new() ;\r\n+\tmy $csv = $ocsv->get_csv_object( "\\t" ) ;'..b' {\r\n+\t# produce a csv based on METLIN format\r\n+\tmy $ocsv = lib::hmdb::new() ;\r\n+\tif (defined $masses_file) {\r\n+\t\tmy $lm_matrix = undef ;\r\n+\t\tif ( ( defined $nbline_header ) and ( $header_choice eq \'yes\' ) ) {\r\n+#\t\t\t$lm_matrix = $ocsv->set_lm_matrix_object(\'hmdb\', $masses, $results ) ;\r\n+\t\t\t$lm_matrix = $ocsv->set_hmdb_matrix_object_with_ids(\'hmdb\', $masses, $results ) ;\r\n+\t\t\t$lm_matrix = $ocsv->add_lm_matrix_to_input_matrix($complete_rows, $lm_matrix, $nbline_header-1) ;\r\n+\t\t}\r\n+\t\telsif ( ( $header_choice eq \'no\' ) ) {\r\n+#\t\t\t$lm_matrix = $ocsv->set_lm_matrix_object(undef, $masses, $results ) ;\r\n+\t\t\t$lm_matrix = $ocsv->set_hmdb_matrix_object_with_ids(undef, $masses, $results ) ;\r\n+\t\t\t$lm_matrix = $ocsv->add_lm_matrix_to_input_matrix($complete_rows, $lm_matrix, 0) ;\r\n+\t\t}\r\n+\t\t$ocsv->write_csv_skel(\\$out_tab, $lm_matrix) ;\r\n+\t}\r\n+\telsif (defined $mass) {\r\n+\t\t$ocsv->write_csv_one_mass($masses, $ids, $results, $out_tab) ;\r\n+\t}\r\n+} ## END IF\r\n+else {\r\n+\twarn "Can\'t create a tabular output for HMDB : no result found or your output file is not defined\\n" ;\r\n+}\r\n+\r\n+## Write XLS like format\r\n+if ( ( defined $out_xls ) and ( defined $results ) ) {\r\n+\tmy $ocsv = lib::hmdb::new() ;\r\n+\t$ocsv->write_csv_one_mass($masses, $ids, $results, $out_xls) ;\r\n+}\r\n+\r\n+\r\n+#====================================================================================\r\n+# Help subroutine called with -h option\r\n+# number of arguments : 0\r\n+# Argument(s) :\r\n+# Return : 1\r\n+#====================================================================================\r\n+sub help {\r\n+\tprint STDERR "\r\n+help of wsdl_hmdb\r\n+\r\n+# wsdl_hmdb is a script to query HMDB website using mz and return a list of candidates sent by HMDB based on the ms search tool.\r\n+# Input : formula or list of formula\r\n+# Author : Franck Giacomoni and Marion Landi\r\n+# Email : fgiacomoni\\@clermont.inra.fr\r\n+# Version : 1.4\r\n+# Created : 08/07/2012\r\n+# Updated : 21/01/2016\r\n+USAGE :\t\t \r\n+\t\twsdl_hmdb.pl \t-mass [one mass or a string list of exact masses] -delta [mz delta] -mode [molecular species: positive|negative|neutral] -output [output tabular file] -view [output html file] \r\n+\t\t\r\n+\t\tor \r\n+\t\twsdl_hmdb.pl \t-masses [an input file of mzs] -colfactor [col of mz] -header_choice [yes|no] -nblineheader [nb of lines containing file header : 0-n]\r\n+\t\t\t\t\t\t-delta [mz delta] -mode [molecular species: positive|negative|neutral] -output [output tabular file] -view [output html file] \r\n+\t\t\t\t\t\t\r\n+\t\tor \r\n+\t\twsdl_hmdb.pl \t-h for help\r\n+\t\t\r\n+\t\t";\r\n+\texit(1);\r\n+}\r\n+\r\n+## END of script - F Giacomoni \r\n+\r\n+__END__\r\n+\r\n+=head1 NAME\r\n+\r\n+ wsdl_hmdb.pl -- script to query HMDB website using mz and return a list of candidates sent by HMDB based on the ms search tool.\r\n+\r\n+=head1 USAGE\r\n+\r\n+\twsdl_hmdb.pl \t-mass [one mass or a string list of exact masses] -delta [mz delta] -mode [molecular species: positive|negative|neutral] -output [output tabular file] -view [output html file] \r\n+\t\t\r\n+\tor \r\n+\twsdl_hmdb.pl \t-masses [an input file of mzs] -colfactor [col of mz] -header_choice [yes|no] -nblineheader [nb of lines containing file header : 0-n]\r\n+\t\t\t\t\t-delta [mz delta] -mode [molecular species: positive|negative|neutral] -output [output tabular file] -view [output html file] \r\n+\r\n+=head1 SYNOPSIS\r\n+\r\n+This script manages batch queries on HMDB server. \r\n+\r\n+=head1 DESCRIPTION\r\n+\r\n+This main program is a script to query HMDB website using mz and return a list of candidates sent by HMDB based on the ms search tool.\r\n+\r\n+=over 4\r\n+\r\n+=item B<function01>\r\n+\r\n+=item B<function02>\r\n+\r\n+=back\r\n+\r\n+=head1 AUTHOR\r\n+\r\n+Franck Giacomoni E<lt>franck.giacomoni@clermont.inra.frE<gt>\r\n+\r\n+=head1 LICENSE\r\n+\r\n+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.\r\n+\r\n+=head1 VERSION\r\n+\r\n+version 1.0 : 06 / 06 / 2013\r\n+\r\n+version 1.2 : 27 / 01 / 2014\r\n+\r\n+version 1.3 : 19 / 11 / 2014\r\n+\r\n+version 1.4 : 21 / 01 / 2016 - a clean version for community\r\n+\r\n+=cut\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r 9583f9772198 hmdb/wsdl_hmdb.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hmdb/wsdl_hmdb.xml Thu Jan 28 10:52:26 2016 -0500 |
b |
b'@@ -0,0 +1,239 @@\n+<tool id="wsdl_hmdb" name="HMDB MS search" version="2016-01-28">\r\n+ <description>\r\n+ search by masses on HMDB online bank\r\n+ </description>\r\n+ <command interpreter="perl">\r\n+ wsdl_hmdb.pl\r\n+ #if str($input_type.choice) == "YES":\r\n+ -masses "${input_type.masses}"\r\n+ -header_choice "${input_type.header.header_choice}"\r\n+ #if str($input_type.header.header_choice) == "yes":\r\n+ -nblineheader "${$input_type.header.nbHeader}"\r\n+ #end if\r\n+ -colfactor "${input_type.colfactor}"\r\n+ #else:\r\n+ -mass "${input_type.mass}"\r\n+ #end if\r\n+ -delta "$delta" -mode "$mode"\r\n+ -output "$variableMetadata" -view "$HmdbResView" -outputxls "$HmdbResXls"\r\n+ </command>\r\n+ <inputs>\r\n+ <conditional name="input_type">\r\n+ <param name="choice" type="select" label="Would you use a file " help="if \'NO\' is selected then one or more mass(es) must be entered manually">\r\n+ <option value="YES">YES</option>\r\n+ <option value="NO">NO</option>\r\n+ </param>\r\n+ <when value="YES">\r\n+ <param name="masses" label="File of masses (Variable Metadata) " format="tabular" type="data" help="Generally variable metadata file. Please note : HMDB allows maximum 150 query masses per request" />\r\n+ <conditional name="header">\r\n+ <param name="header_choice" type="select" label="Do you have a header " help="if \'YES\' is selected then enter your number of header lines">\r\n+ <option value="no">NO</option>\r\n+ <option value="yes" selected="true">YES</option>\r\n+ </param>\r\n+ <when value="yes">\r\n+ <param name="nbHeader" label="Number of header lines " type="integer" value="1" min="1" size="10" help="number of lines not containing masses"/>\r\n+ </when>\r\n+ </conditional>\r\n+\t <param name="colfactor" label="Column of masses " type="data_column" data_ref="masses" accept_default="true" />\r\n+ </when>\r\n+ <when value="NO">\r\n+ <param name="mass" label="Mass to submit " type="text" size="20" help="For a masses list, writes : m1 m2 m3. Your values \xe2\x80\x8b\xe2\x80\x8bmust be separated by spaces. You should use dot (.) like decimal separator" />\r\n+ </when>\r\n+ </conditional>\r\n+ \r\n+ <param name="delta" label="Mass-to-charge ratio " type="float" value="0.05" min="0" max="10" size="10" help="Default value is 0.05 for HMDB (mass-to-charge ratio)"/>\r\n+ <param name="mode" label="Molecular Species " type="select" display="radio" help="">\r\n+ <option value="positive">Positif Mode</option>\r\n+ <option value="negative">Negatif Mode</option>\r\n+ <option value="neutral" selected="True">Neutral Mass</option>\r\n+ </param>\r\n+ </inputs>\r\n+ \r\n+ <outputs>\r\n+ <data name="variableMetadata" format="tabular" label="${tool.name}_TSV"/>\r\n+ <data name="HmdbResView" format="html" label="${tool.name}_VIEW"/>\r\n+ <data name="HmdbResXls" label="${tool.name}_XLS" format="tabular" />\r\n+ </outputs>\r\n+ \r\n+ <tests>\r\n+ \t<test>\r\n+ \t\t<!--test 01 no result - fake-mzrt-input-with-id -->\r\n+ \t\t<param name="choice" value="YES"/>\r\n+ \t\t<param name="masses" value="input_test01_fake-mzrt-input-with-id.tsv"/>\r\n+ \t\t<param name="header_choice" value="yes"/>\r\n+ \t\t<param name="nblineheader" value="1"/>\r\n+ \t\t<param name="colfactor" value="2"/>\r\n+ \t\t<param name="delta" value="0.001"/>\r\n+ \t\t<param name="mode" value="neutral"/>\r\n+ \t\t<output name="variableMetadata" file="out_test01.tsv"/>\r\n+ \t\t<output name="HmdbResView" file="out_test01.html"/>\r\n+ \t\t<output name="HmdbResXls" file="out_test01.csv"/>\r\n+ \t</test>\r\n+ \t<test>\r\n+ \t\t<!--test 02 : some results - with-mzrt-input-with-id file-->\r\n+ \t\t<param name="choice" value="YES"/>\r\n+ \t\t<param name="masses" value="input_test02_mzrt-input-with-id.tsv"/>\r\n+ \t\t<param name="header_choice" value="yes"/>\r\n+ \t\t<param name="nblineheader" value="1"/>\r\n+ \t\t<param name="colfactor" value="2"/>\r\n+ '..b'le="out_test02.csv"/>\r\n+ \t</test>\r\n+ \t<test>\r\n+ \t\t<!--test 03 : some results - with-mz list in manual mass mode-->\r\n+ \t\t<param name="choice" value="NO"/>\r\n+ \t\t<param name="mass" value="175.01 238.19 420.16 780.32 956.25 1100.45"/>\r\n+ \t\t<param name="delta" value="0.05"/>\r\n+ \t\t<param name="mode" value="positive"/>\r\n+ \t\t<output name="variableMetadata" file="out_test03.tsv"/>\r\n+ \t\t<output name="HmdbResView" file="out_test03.html"/>\r\n+ \t\t<output name="HmdbResXls" file="out_test03.csv"/>\r\n+ \t</test>\r\n+ </tests>\r\n+\r\n+ <help>\r\n+\r\n+.. class:: infomark\r\n+\r\n+**Authors** Marion Landi and Franck Giacomoni\r\n+\r\n+---------------------------------------------------\r\n+\r\n+.. class:: infomark\r\n+\r\n+**Please cite** If you use this tool, please cite \r\n+ | `Wishart DS, Jewison T, Guo AC, Wilson M, Knox C, et al., HMDB 3.0\xe2\x80\x94The Human Metabolome Database in 2013. Nucleic Acids Res. 2013. <http://www.ncbi.nlm.nih.gov/pubmed/23161693>`_\r\n+\r\n+\r\n+---------------------------------------------------\r\n+\r\n+==============\r\n+HMDB MS search\r\n+==============\r\n+\r\n+-----------\r\n+Description\r\n+-----------\r\n+\r\n+ | Search informations (like : HMDB id, Name, Adduct, delta mass) on HMDB online bank\r\n+ | with one or more mass(es) in a file or entered manually\r\n+\r\n+\r\n+-----------------\r\n+Workflow position\r\n+-----------------\r\n+\r\n+\r\n+.. image:: ./static/images/metabolomics/hmdb.png\r\n+ :width: 800\r\n+\r\n+\r\n+-----------\r\n+Input files\r\n+-----------\r\n+\r\n+\r\n++-------------------------+-----------+\r\n+| Parameter : num + label | Format |\r\n++=========================+===========+\r\n+| 1 : File of masses | tabular |\r\n++-------------------------+-----------+\r\n+\r\n+File of masses (Generally variable metadata file) must have at least the following column : \r\n+\t* Masses : column with all the masses in the tsv input file\r\n+\r\n+----------\r\n+Parameters\r\n+----------\r\n+\r\n+Would you use a file\r\n+\t| Choose whether the masses are in a file or entered manually\r\n+\t| YES (default) : parameters **File of masses ; Do you have a header ; Column of masses** are visible\r\n+\t| NO : parameter **Mass to submit** is visible\r\n+\t|\r\n+\r\n+\r\n+If \'use file\'=\'YES\'\r\n+\r\n+File of masses\r\n+\t| see "Input files" section above\r\n+\t| Tabular file format, Generally variable metadata file\r\n+\t| \r\n+\r\n+Do you have a header\r\n+\t| YES (default) : parameter **Number of header lines** is visible\r\n+\t| NO : all lines are considered to contain masses\r\n+\t|\r\n+\r\n+If \'have a header\'=\'YES\'\r\n+\r\n+Number of header lines\r\n+\t| Number of lines not containing masses values, these lines will be ignored\r\n+\t|\r\n+\r\n+In all header cases :\r\n+\r\n+Column of masses\r\n+\t| Specify the column number for the mass in the tsv input file\r\n+\t|\r\n+\r\n+\r\n+If \'use file\'=\'NO\'\r\n+\r\n+Mass to submit\r\n+\t| Specify a list of mass to request\r\n+\t| one or more mass(es) entered manually\r\n+\t| For a masses list, writes : m1 m2 m3\r\n+\t| You must separate yours values with space\r\n+\t| dot (.) is for float number\r\n+\t|\r\n+\r\n+In all cases :\r\n+\r\n+Mass-to-charge ratio\r\n+\t| Specify a delta (mass-to-charge ratio) to apply on mass - This value is a float, between 0.0000000000000001 and 10.\r\n+\t|\r\n+\r\n+Molecular Species\r\n+\t| Type of ionization of the molecule : *positif, negatif, neutral*\r\n+\t|\r\n+\r\n+\r\n+------------\r\n+Output files\r\n+------------\r\n+\r\n+Two types of files\r\n+\t| wsdl_hmdb_VIEW.HTML : for viewing result via HTML.\r\n+\t| \r\n+\t| wsdl_hmdb_TSV.tabular : for linking with others modules.\r\n+\t| \r\n+\t| an excel-like output will be available. \r\n+\t| \r\n+\t\r\n+---------------------------------------------------\r\n+\r\n+\r\n+---------------\r\n+Working example\r\n+---------------\r\n+\r\n+\r\n+.. class:: warningmark\r\n+\r\n+Refer to the corresponding `"W4M HowTo" <http://workflow4metabolomics.org/howto>`_ page:\r\n+ | Format Data For Postprocessing\r\n+ | Perform LCMS Annotations\r\n+\r\n+.. class:: warningmark\r\n+\r\n+And their "W4M courses 2015":\r\n+ | Using Galaxy4Metabolomics - W4M table format for Galaxy\r\n+ | Annotation Banks - Annotation \r\n+\t\r\n+\r\n+\t</help>\r\n+</tool>\n\\ No newline at end of file\n' |