Mercurial > repos > fgiacomoni > hmdb_ms_search
annotate wsdl_hmdb.pl @ 3:505956db90c5 draft
planemo upload commit 08ff14d8ba34cbd43461ff041d4a3b8df5bbdba7
author | fgiacomoni |
---|---|
date | Mon, 20 Feb 2017 09:55:54 -0500 |
parents | 6d0a0f8f672a |
children | 6091a80df951 |
rev | line source |
---|---|
1
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
1 #!perl |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
2 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
3 ## script : wsdl_hmdb.pl |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
4 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
5 # Included modules and versions |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
6 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
7 ## Perl modules |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
8 use strict ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
9 use warnings ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
10 use Carp qw (cluck croak carp) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
11 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
12 use Data::Dumper ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
13 use Getopt::Long ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
14 use POSIX ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
15 use FindBin ; ## Permet de localisez le repertoire du script perl d'origine |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
16 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
17 ## Specific Modules (Home made...) |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
18 use lib $FindBin::Bin ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
19 my $binPath = $FindBin::Bin ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
20 use lib::hmdb qw( :ALL ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
21 ## PFEM Perl Modules |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
22 use lib::conf qw( :ALL ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
23 use lib::csv qw( :ALL ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
24 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
25 ## Initialized values |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
26 my ( $help ) = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
27 my ( $mass ) = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
28 my ( $masses_file, $col_id, $col_mass, $header_choice, $nbline_header ) = ( undef, undef, undef, undef, undef ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
29 my $max_query = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
30 my ( $delta, $molecular_species, $out_tab, $out_html, $out_xls ) = ( undef, undef, undef, undef, undef ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
31 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
32 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
33 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
34 # Manage EXCEPTIONS |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
35 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
36 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
37 &GetOptions ( "h" => \$help, # HELP |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
38 "mass:s" => \$mass, ## option : one masse |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
39 "masses:s" => \$masses_file, ## option : path to the input |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
40 "header_choice:s" => \$header_choice, ## Presence or not of header in tabular file |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
41 "nblineheader:i" => \$nbline_header, ## numbre of header line present in file |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
42 "colfactor:i" => \$col_mass, ## Column id for retrieve formula list in tabular file |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
43 "delta:f" => \$delta, |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
44 "mode:s" => \$molecular_species, ## Molecular species (positive/negative/neutral) |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
45 "maxquery:i" => \$max_query, ## Maximum query return (default is 20 entries by query // min 1 & max 50 ) |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
46 "output_tabular:s" => \$out_tab, ## option : path to the ouput (tabular : input+results ) |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
47 "output_html|v:s" => \$out_html, ## option : path to the results view (output2) |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
48 "output_xlsx:s" => \$out_xls, ## option : path to the xls-like format output |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
49 ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
50 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
51 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
52 # EXCEPTIONS |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
53 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
54 $help and &help ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
55 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
56 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
57 # MAIN SCRIPT |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
58 #============================================================================= |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
59 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
60 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
61 ## -------------- Conf file ------------------------ : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
62 my ( $CONF ) = ( undef ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
63 foreach my $conf ( <$binPath/*.cfg> ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
64 my $oConf = lib::conf::new() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
65 $CONF = $oConf->as_conf($conf) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
66 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
67 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
68 ## -------------- HTML template file ------------------------ : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
69 foreach my $html_template ( <$binPath/*.tmpl> ) { $CONF->{'HTML_TEMPLATE'} = $html_template ; } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
70 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
71 if (!defined $max_query) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
72 $max_query = $CONF->{'HMDB_MAX_QUERY'} ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
73 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
74 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
75 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
76 ## --------------- Global parameters ---------------- : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
77 my ( $ids, $masses, $results ) = ( undef, undef, undef ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
78 my ( $complete_rows, $nb_pages_for_html_out ) = ( undef, 1 ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
79 my $metabocard_features = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
80 my $search_condition = "Search params : Molecular specie = $molecular_species / delta (mass-to-charge ratio) = $delta" ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
81 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
82 ## --------------- retrieve input data -------------- : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
83 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
84 ## manage only one mass |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
85 if ( ( defined $mass ) and ( $mass ne '' ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
86 my @masses = split(" ", $mass); |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
87 $masses = \@masses ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
88 for (my $i=1 ; $i<=$#masses+1 ; $i++){ push (@$ids,"mz_0".sprintf("%04s", $i ) ); } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
89 } ## END IF |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
90 ## manage csv file containing list of masses |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
91 elsif ( ( defined $masses_file ) and ( $masses_file ne "" ) and ( -e $masses_file ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
92 ## parse all csv for later : output csv build |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
93 my $ocsv_input = lib::csv->new() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
94 my $complete_csv = $ocsv_input->get_csv_object( "\t" ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
95 $complete_rows = $ocsv_input->parse_csv_object($complete_csv, \$masses_file) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
96 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
97 ## parse masses and set ids |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
98 my $ocsv = lib::csv->new() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
99 my $csv = $ocsv->get_csv_object( "\t" ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
100 if ( ( !defined $nbline_header ) or ( $nbline_header < 0 ) ) { $nbline_header = 0 ; } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
101 $masses = $ocsv->get_value_from_csv_multi_header( $csv, $masses_file, $col_mass, $header_choice, $nbline_header ) ; ## retrieve mz values on csv |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
102 my $nbmz = @$masses ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
103 for (my $i=1 ; $i<=$nbmz+1 ; $i++){ push (@$ids,"mz_0".sprintf("%04s", $i ) ); } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
104 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
105 else { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
106 warn "[warning] Input data are missing : none mass or file of masses\n" ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
107 &help ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
108 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
109 #print Dumper $masses ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
110 ## ---------------- launch queries -------------------- : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
111 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
112 if ( ( defined $delta ) and ( $delta > 0 ) and ( defined $molecular_species ) and ( $molecular_species ne '' ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
113 ## prepare masses list and execute query |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
114 my $oHmdb = lib::hmdb::new() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
115 my $hmdb_pages = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
116 my $hmdb_ids = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
117 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
118 $results = [] ; # prepare arrays ref |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
119 my $submasses = $oHmdb->extract_sub_mz_lists($masses, $CONF->{HMDB_LIMITS} ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
120 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
121 ## get the hmdb server status by a test query - continuous queries or kill script. |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
122 my $status = $oHmdb->test_matches_from_hmdb_ua() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
123 $oHmdb->check_state_from_hmdb_ua($status) ; ## can kill the script execution |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
124 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
125 foreach my $mzs ( @{$submasses} ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
126 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
127 my $result = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
128 my ( $hmdb_masses, $nb_masses_to_submit ) = $oHmdb->prepare_multi_masses_query($mzs) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
129 $hmdb_pages = $oHmdb->get_matches_from_hmdb_ua($hmdb_masses, $delta, $molecular_species) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
130 ($result) = $oHmdb->parse_hmdb_csv_results($hmdb_pages, $mzs, $max_query) ; ## hash format result |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
131 ## This previous step return results with cutoff on the number of entries returned ! |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
132 $results = [ @$results, @$result ] ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
133 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
134 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
135 ## foreach metabolite get its own metabocard |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
136 $hmdb_ids = $oHmdb->get_unik_ids_from_results($results) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
137 # $hmdb_ids->{'HMDB03125'} = 1 , |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
138 $metabocard_features = $oHmdb->get_hmdb_metabocard_from_id($hmdb_ids, $CONF->{'HMDB_METABOCARD_URL'}) ; ## Try to multithread the querying |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
139 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
140 ## Map metabocards with results (add supplementary data) |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
141 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
142 # print Dumper $results ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
143 # print Dumper $hmdb_ids ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
144 # print Dumper $metabocard_features ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
145 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
146 if ( ( defined $results ) and ( defined $metabocard_features ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
147 $results = $oHmdb->map_suppl_data_on_hmdb_results($results, $metabocard_features) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
148 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
149 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
150 ## Uses N mz and theirs entries per page (see config file). |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
151 # how many pages you need with your input mz list? |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
152 $nb_pages_for_html_out = ceil( scalar(@{$masses} ) / $CONF->{HTML_ENTRIES_PER_PAGE} ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
153 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
154 # print Dumper $results ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
155 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
156 else { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
157 croak "Can't work with HMDB : missing paramaters (list of masses, delta or molecular species)\n" ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
158 } ## end ELSE |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
159 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
160 ## -------------- Produce HTML/CSV output ------------------ : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
161 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
162 if ( ( defined $out_html ) and ( defined $results ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
163 my $oHtml = lib::hmdb::new() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
164 my ($tbody_object) = $oHtml->set_html_tbody_object( $nb_pages_for_html_out, $CONF->{HTML_ENTRIES_PER_PAGE} ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
165 ($tbody_object) = $oHtml->add_mz_to_tbody_object($tbody_object, $CONF->{HTML_ENTRIES_PER_PAGE}, $masses, $ids) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
166 ($tbody_object) = $oHtml->add_entries_to_tbody_object($tbody_object, $CONF->{HTML_ENTRIES_PER_PAGE}, $masses, $results) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
167 my $output_html = $oHtml->write_html_skel(\$out_html, $tbody_object, $nb_pages_for_html_out, $search_condition, $CONF->{'HTML_TEMPLATE'}, $CONF->{'JS_GALAXY_PATH'}, $CONF->{'CSS_GALAXY_PATH'}) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
168 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
169 } ## END IF |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
170 else { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
171 warn "Can't create a HTML output for HMDB : no result found or your output file is not defined\n" ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
172 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
173 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
174 if ( ( defined $out_tab ) and ( defined $results ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
175 # produce a csv based on METLIN format |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
176 my $ocsv = lib::hmdb::new() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
177 if (defined $masses_file) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
178 my $lm_matrix = undef ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
179 if ( ( defined $nbline_header ) and ( $header_choice eq 'yes' ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
180 # $lm_matrix = $ocsv->set_lm_matrix_object('hmdb', $masses, $results ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
181 $lm_matrix = $ocsv->set_hmdb_matrix_object_with_ids('hmdb', $masses, $results ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
182 $lm_matrix = $ocsv->add_lm_matrix_to_input_matrix($complete_rows, $lm_matrix, $nbline_header-1) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
183 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
184 elsif ( ( $header_choice eq 'no' ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
185 # $lm_matrix = $ocsv->set_lm_matrix_object(undef, $masses, $results ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
186 $lm_matrix = $ocsv->set_hmdb_matrix_object_with_ids(undef, $masses, $results ) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
187 $lm_matrix = $ocsv->add_lm_matrix_to_input_matrix($complete_rows, $lm_matrix, 0) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
188 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
189 $ocsv->write_csv_skel(\$out_tab, $lm_matrix) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
190 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
191 elsif (defined $mass) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
192 $ocsv->write_csv_one_mass($masses, $ids, $results, $out_tab) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
193 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
194 } ## END IF |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
195 else { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
196 warn "Can't create a tabular output for HMDB : no result found or your output file is not defined\n" ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
197 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
198 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
199 ## Write XLS like format |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
200 if ( ( defined $out_xls ) and ( defined $results ) ) { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
201 my $ocsv = lib::hmdb::new() ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
202 $ocsv->write_csv_one_mass($masses, $ids, $results, $out_xls) ; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
203 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
204 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
205 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
206 #==================================================================================== |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
207 # Help subroutine called with -h option |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
208 # number of arguments : 0 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
209 # Argument(s) : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
210 # Return : 1 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
211 #==================================================================================== |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
212 sub help { |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
213 print STDERR " |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
214 help of wsdl_hmdb |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
215 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
216 # 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. |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
217 # Input : formula or list of formula |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
218 # Author : Franck Giacomoni and Marion Landi |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
219 # Email : fgiacomoni\@clermont.inra.fr |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
220 # Version : 1.4 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
221 # Created : 08/07/2012 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
222 # Updated : 21/01/2016 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
223 USAGE : |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
224 wsdl_hmdb.pl -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] |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
225 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
226 or |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
227 wsdl_hmdb.pl -masses [an input file of mzs] -colfactor [col of mz] -header_choice [yes|no] -nblineheader [nb of lines containing file header : 0-n] |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
228 -delta [mz delta] -mode [molecular species: positive|negative|neutral] -output [output tabular file] -view [output html file] |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
229 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
230 or |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
231 wsdl_hmdb.pl -h for help |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
232 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
233 "; |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
234 exit(1); |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
235 } |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
236 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
237 ## END of script - F Giacomoni |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
238 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
239 __END__ |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
240 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
241 =head1 NAME |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
242 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
243 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. |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
244 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
245 =head1 USAGE |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
246 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
247 wsdl_hmdb.pl -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] |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
248 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
249 or |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
250 wsdl_hmdb.pl -masses [an input file of mzs] -colfactor [col of mz] -header_choice [yes|no] -nblineheader [nb of lines containing file header : 0-n] |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
251 -delta [mz delta] -mode [molecular species: positive|negative|neutral] -output [output tabular file] -view [output html file] |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
252 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
253 =head1 SYNOPSIS |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
254 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
255 This script manages batch queries on HMDB server. |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
256 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
257 =head1 DESCRIPTION |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
258 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
259 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. |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
260 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
261 =over 4 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
262 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
263 =item B<function01> |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
264 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
265 =item B<function02> |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
266 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
267 =back |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
268 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
269 =head1 AUTHOR |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
270 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
271 Franck Giacomoni E<lt>franck.giacomoni@clermont.inra.frE<gt> |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
272 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
273 =head1 LICENSE |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
274 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
275 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
276 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
277 =head1 VERSION |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
278 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
279 version 1.0 : 06 / 06 / 2013 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
280 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
281 version 1.2 : 27 / 01 / 2014 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
282 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
283 version 1.3 : 19 / 11 / 2014 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
284 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
285 version 1.4 : 21 / 01 / 2016 - a clean version for community |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
286 |
6d0a0f8f672a
planemo upload commit f67323ae4fa7fdbd9f4518ede105a7d7cd44b471
fgiacomoni
parents:
diff
changeset
|
287 =cut |