Next changeset 1:4dc76dcbd1e7 (2016-12-05) |
Commit message:
Init repository with last tool-bank-golm-lib_search master version |
added:
MANUAL_INSTALL.txt README.md conf_golm.cfg golm_out.tmpl golm_ws_lib_search.pl golm_ws_lib_search.xml lib/conf.pm lib/golm_ws_api.pm lib/msp.pm lib/output.pm planemo_test.sh t/data/inputSpectra_unit_test.msp t/data/peakspectra_test.msp t/golm_ws_LibrarySearch_test.t t/lib/golm_ws_api_test.pm test-data/KHanaoka_peakspectra.msp test-data/input01_peakspectra_test.msp test-data/input03_peakspectra_full.msp test-data/output01.html test-data/output01.tabular test-data/output01.txt test-data/output02.html test-data/output02.tabular test-data/output02.txt test-data/output03.html test-data/output03.tabular test-data/output03.txt |
b |
diff -r 000000000000 -r e3d43b8c987b MANUAL_INSTALL.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MANUAL_INSTALL.txt Mon Dec 05 08:32:04 2016 -0500 |
[ |
@@ -0,0 +1,55 @@ +## ****** MON_MODULE environnemnt : ****** ## +# version 1.0 XX.XX.2016 G Cretin / F Giacomoni / Y Guitton + +## --- PERL compilator / libraries : --- ## +$ perl -v +This is perl, v5.18.2 built for x86_64-linux-gnu-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 ; + +# libs CPAN PERL : +$ perl -e 'use SOAP::Lite +trace => [qw (debug)] ;' +$ perl -e 'use Excel::Writer::XLSX ;' +$ perl -e 'use JSON ;' +$ perl -e 'use HTML::Template ;' + + +# libs pfem PERL : +use lib::golm_ws_api qw( :ALL ) ; +use lib::msp qw( :ALL ) ; +use lib::output qw( :ALL ) ; +-- + +## --- R bin and Packages : --- ## + +No interaction with R + +-- + +## --- Binary dependencies --- ## + +NA + +-- + +## --- Config : --- ## +NA + +-- + +## --- XML HELP PART --- ## + +-- + +## --- DATASETS --- ## +-- + +## --- ??? COMMENTS ??? --- ## +-- \ No newline at end of file |
b |
diff -r 000000000000 -r e3d43b8c987b README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Mon Dec 05 08:32:04 2016 -0500 |
[ |
@@ -0,0 +1,53 @@ +Golm Metabolome Database search spectrum for Galaxy +=================================================== + +[![bioconda-badge](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io) [![Build Status](https://travis-ci.org/workflow4metabolomics/tool-bank-golm-lib_search.svg?branch=master)](https://travis-ci.org/workflow4metabolomics/tool-bank-golm-lib_search) + +Our project +----------- +The [Workflow4Metabolomics](http://workflow4metabolomics.org), W4M in short, is a French infrastructure offering software tool processing, analyzing and annotating metabolomics data. It is based on the Galaxy platform. + + +Golm Metabolome Database search spectrum +---------------------------------------- + +Tool using the Golm Library Search WS. + + +Galaxy +------ +Galaxy is an open, web-based platform for data intensive biomedical research. Whether on the free public server or your own instance, you can perform, reproduce, and share complete analyses. + +Homepage: [https://galaxyproject.org/](https://galaxyproject.org/) + + +Dependencies using Conda +------------------------ +[![bioconda-badge](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io) + + +[Conda](http://conda.pydata.org/) is package manager that among many other things can be used to manage Python packages. + +``` +#To install miniconda2 +#http://conda.pydata.org/miniconda.html +#To install the tool dependencies using conda: +conda install perl-soap-lite perl-list-moreutils perl-json perl-html-template +#To set an environment: +conda create -n tool-bank-golm-lib_search perl-soap-lite perl-list-moreutils perl-json perl-html-template` +#To activate the environment: +. activate tool-bank-golm-lib_search +``` + + +Travis +------ +[![Build Status](https://travis-ci.org/workflow4metabolomics/tool-bank-golm-lib_search.svg?branch=master)](https://travis-ci.org/workflow4metabolomics/tool-bank-golm-lib_search) + +Test and Deploy with Confidence. Easily sync your GitHub projects with Travis CI and you'll be testing your code in minutes! + +Historic contributors +--------------------- + - Yann Guitton @yguitton - [LABERCA - Laboratory of Food Contaminants and Residue Analysis](http://www.laberca.org/) - Ecole Nationale Vétérinaire, Agroalimentaire et de l'Alimentation Nantes-Atlantique - France + - Gabriel Cretin - [French Metabolomics and Fluxomics Infrastructure (MetaboHUB)](http://www.metabohub.fr/en) - [La plateforme "Exploration du Métabolisme" (PFEM, Clermont-Ferrand)](http://www6.clermont.inra.fr/plateforme_exploration_metabolisme) + - Franck Giacomoni @fgiacomoni - [French Metabolomics and Fluxomics Infrastructure (MetaboHUB)](http://www.metabohub.fr/en) - [La plateforme "Exploration du Métabolisme" (PFEM, Clermont-Ferrand)](http://www6.clermont.inra.fr/plateforme_exploration_metabolisme) |
b |
diff -r 000000000000 -r e3d43b8c987b conf_golm.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf_golm.cfg Mon Dec 05 08:32:04 2016 -0500 |
b |
@@ -0,0 +1,21 @@ +## Conf file for golm_ws_lib_search.pl script +# +## Version of +VERSION=2016-06-24 +# +## WEB-SERVICE URLS +WS_URL=http://gmd.mpimp-golm.mpg.de +WS_PROXY=http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx +# +##REFERENCE TO GOLM DESCRIPTION WEBSITES URLS +METABOLITE_REF=http://gmd.mpimp-golm.mpg.de/Metabolites/ +ANALYTE_REF=http://gmd.mpimp-golm.mpg.de/Analytes/ +SPECTRUM_REF=http://gmd.mpimp-golm.mpg.de/Spectrums/ +# +## DEFAULT SEARCH VALUES +RI=1500 +RI_WINDOW=3000 +GC_COLUMN=VAR5 +# +## DEFAULT NUMBER OF ENTRIES VIEW +DEFAULT_ENTRIES=10 \ No newline at end of file |
b |
diff -r 000000000000 -r e3d43b8c987b golm_out.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/golm_out.tmpl Mon Dec 05 08:32:04 2016 -0500 |
b |
b"@@ -0,0 +1,11 @@\n+<!DOCTYPE html><html><head><meta charset='UTF-8'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/buttons/1.1.2/css/buttons.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css'/><link rel='stylesheet' href='https://code.getmdl.io/1.1.3/material.light_green-orange.min.css' /><link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons'> <style type='text/css' class='init'>\n+.card-wide.mdl-card{width:900px;height:550px}.card-wide>.mdl-card__menu{color:#fff}.list-icon{width:800px}#table_id_wrapper{overflow-x:auto;margin-left:20px;margin-right:20px;padding-top:20px}.toolbar{float:left}.dt-buttons{padding-right:10px;margin-bottom:20px}table.dataTable thead th, table.dataTable thead td{border-bottom:1px solid #A7A7A7}div.dt-button-collection{width:140px;margin-top:7px;padding:6px 6px 3px 6px;border:1px solid rgba(0,0,0,0.4);background-color:rgba(171, 171, 171, 0.8);border-radius:10px;box-shadow:0px 0px 100px rgba(255, 255, 255, 0.3)}div.dt-button-collection a.dt-button.active:not(.disabled){box-shadow:inset 1px 1px 6px rgba(102,102,102,0.69)}.buttons-copy,.buttons-print,.buttons-collection{height:40px;margin-right:10px;padding-right:0px;padding-left:0px;margin-left:10px}.mdl-button--accent.mdl-button--accent.mdl-button--raised,.mdl-button--accent.mdl-button--accent.mdl-button--fab{background-color:#E3E3E3}.mdl-button{height:40px;line-height:40px}.mdl-button:hover{transform:translateY(-3px);box-shadow:0px 6px 15px #c1c1c1}a{color:rgb(0,0,0)}.ripple{overflow:hidden;position:relative;box-sizing:border-box;transform:translate3d(0,0,0)}.ripple-effect{position:absolute;border-radius:50%;background-color:rgba(255,255,255,0.5);user-select:none;pointer-events:none;padding:0;margin:0;opacity:0.6;transform:translate3d(-50%,-50%,0)}.mdl-shadow--3dp{box-shadow:0 25px 150px rgba(0,0,0,.33),0 3px 3px -2px rgba(0,0,0,.2),0 1px 8px 0 rgba(0,0,0,.12)}.mdl-tooltip.is-active{animation:pulse 1000ms cubic-bezier(0,0,.2,1)forwards;z-index:1000}.mdl-tooltip{border-radius:20px;line-height:18px}.mdl-list__item{line-height:1.25 }.mdl-list__item-icon{font-size:35px}#large_card{height:850px}#dist_table th,td{padding:15px;text-align:left}.mdl-card__supporting-text{color:rgba(0,0,0,.87);font-size:16px;line-height:22px;text-align:justify}.dataTables_wrapper .dataTables_length{float:left;padding-top:11px;padding-left:30px}table.display tbody tr:hover td{background-color:#B9DBD5 !important}.selected{background-color:#96ADA6 !important }.buttons-colvis{padding-left:15px;padding-right:15px}select{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n+</style> <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js'></script> <script type='text/javascript' language='javascript' src='https://code.jquery.com/jquery-1.12.3.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.2.0/js/buttons.colVis.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/select/1.1.2/js/dataTables.select.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.1.2/js/dataTables.buttons.min.js'></script> "..b'ard__title\'><h1 class=\'mdl-card__title-text\'>What can the table do ?</h1></div><div class=\'mdl-card__supporting-text\'><ul class=\'list-icon mdl-list\'><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>filter_list</i> By default, the spectra numbers (N\xc2\xb0 Spectra) are ordered by ascending values. You can manage your data ordering as you wish. You can even order data according to multiple columns: SHIFT + LEFT CLICK on column headers. This will order by the first column clicked, then the second, etc. You can sort data specifically by clicking on any entry in boxes under each columns. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>delete_sweep</i> You can delete multiple entries that are selected: Select wanted entries and click on the button DELETE SELECTED ROWS. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>remove_red_eye</i> You have the possibility to toggle columns by clicking on SHOW MORE. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>save</i> You can print, copy, or export to excel and csv the table on its actual state, with the three buttons right above the table. </span></li></ul></div></div> </br><div id="large_card" class=\'card-wide mdl-card mdl-shadow--3dp\'> <figure class=\'mdl-card__media\' style=\'background-color: white\'> <img src=\'http://image005.flaticon.com/1/svg/125/125279.svg\' style=\'height: 60px; width: 60px;\'> </figure><div class=\'mdl-card__title\'><h1 class=\'mdl-card__title-text\'>Distances scores</h1></div><div class=\'mdl-card__supporting-text\'><table id="dist_table" style="color: rgba(0,0,0,.87);"><tr><td style="padding-right:10px;><b style="white-space: nowrap;"><b>S12Gower-Legendre Distance</b></td><td> The distance measure S12GowLeg = sqrt(1 - s12) is derived from the S12 coefficient of Gower & Legendre defined as s12 = a / sqrt((a + b)(a + c)), with "a" representing the number of positions at which both spectra are in "on-state" and "b" respectively "c" representing the number of positions at which only the query spectrum or the hit spectrum are in "on-state".</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Hamming Distance</b></td><td> In information theory, the Hamming distance between two strings of equal length is the number of positions for which the corresponding symbols are different. Put another way, it measures the minimum number of substitutions required to change one into the other, or the number of errors that transformed one string into the other.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Jaccard Distance</b></td><td>Number of matches (a mass with appropriate intensity in both spectra) divided by the sum of matches and mismatches (a mass where only one of both spectra has a intensity). The jaccard distance is a binary distance.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Dotproduct Distance</b></td><td>The Dotproduct distance is summing the multiplied intensities over all matching peaks within both spectra. Here, to satisfy the conditions of a metric I) non-negativity, II) identity of indiscernibles, III) symmetry and IV) subadditivity / triangle inequality, we use 1-Dotproduct. Both spectra are normalised prior to the spectral vector norm in that way, that the absolute value of the squared intensities is equal to 1.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Euclidean Distance</b></td><td>The Euclid is the square root of the sum of the squared differences over all matching peaks.</td></tr></table></div></div></div> </br></br></center> </section> </main></div></body></html>\n+\t\t\n+\t\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r e3d43b8c987b golm_ws_lib_search.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/golm_ws_lib_search.pl Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,375 @@\n+#!perl\r\n+\r\n+## script : XXX.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 FindBin ; ## Allows you to locate the directory of original perl script\r\n+\r\n+## Specific Perl Modules (PFEM)\r\n+use lib $FindBin::Bin ;\r\n+my $binPath = $FindBin::Bin ;\r\n+use JSON ;\r\n+\r\n+## Dedicate Perl Modules PFEM\r\n+use lib::golm_ws_api qw( :ALL ) ;\r\n+use lib::msp qw( :ALL ) ;\r\n+use lib::output qw( :ALL ) ;\r\n+use lib::conf qw( :ALL ) ;\r\n+\r\n+## Initialized values\r\n+my ($OptHelp,$ri,$riWindow,$gcColumn,$inputFile,$inputMasses) = (undef,undef,undef,undef,undef,undef) ;\r\n+my ($maxHits,$mzRes,$maxIons,$threshold,$relative,$noise_threshold) = (undef,undef,undef,undef,undef,undef) ;\r\n+my ($JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold) = (undef,undef,undef,undef,undef) ;\r\n+my ($DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold) = (undef,undef,undef) ;\r\n+my ($excel_file,$html_file,$html_template,$json_file,$csv_file) = (undef,undef,undef,undef,undef) ;\r\n+my (@hits, @ojson) = ( () , () ) ;\r\n+my $encoded_spectra ;\r\n+\r\n+## if you put no arguments, function help is started\r\n+if (!@ARGV){ &help ; } \r\n+\r\n+#=============================================================================\r\n+# Manage EXCEPTIONS\r\n+#=============================================================================\r\n+&GetOptions ( \t\r\n+\t\t\t\t"help|h" => \\$OptHelp, # HELP\r\n+\t\t\t\t"inputFile:s"\t\t=> \\$inputFile,\r\n+\t\t\t\t"inputMasses:s"\t\t=> \\$inputMasses,\r\n+\t\t\t\t"ri:i"\t\t=> \\$ri,\r\n+\t\t\t\t"riWindow:i"\t\t=> \\$riWindow,\r\n+\t\t\t\t"gcColumn:s"\t\t=> \\$gcColumn,\r\n+\t\t\t\t"maxHits:i"\t\t=> \\$maxHits,\r\n+\t\t\t\t"mzRes:i"\t\t=> \\$mzRes,\r\n+\t\t\t\t"maxIons:i"\t\t=> \\$maxIons,\r\n+\t\t\t\t#"noiseThreshold:f" => \\$noise_threshold,\r\n+\t\t\t\t"JaccardDistanceThreshold:f"\t\t=> \\$JaccardDistanceThreshold,\r\n+\t\t\t\t"s12GowerLegendreDistanceThreshold:f"\t\t=> \\$s12GowerLegendreDistanceThreshold,\r\n+\t\t\t\t"DotproductDistanceThreshold:f"\t\t=> \\$DotproductDistanceThreshold,\r\n+\t\t\t\t"HammingDistanceThreshold:f"\t\t=> \\$HammingDistanceThreshold,\r\n+\t\t\t\t"EuclideanDistanceThreshold:f"\t\t=> \\$EuclideanDistanceThreshold,\r\n+\t\t\t\t"relative:s"\t\t\t=> \\$relative,\r\n+\t\t\t\t"output_xls:s"\t\t\t=> \\$excel_file,\r\n+\t\t\t\t"output_html:s"\t\t=> \\$html_file,\r\n+\t\t\t\t"output_json:s"\t\t=> \\$json_file,\r\n+\t\t\t\t"output_tabular:s"\t\t=> \\$csv_file,\r\n+ ) ;\r\n+ \r\n+ die "maxHits must be >= 0\\n" unless ($maxHits >= 0) ;\r\n+ die "mzRes must be >= 0 \\n" unless ($mzRes >= 0) ;\r\n+ die "maxIons must be >= 0\\n" unless ($maxIons >= 0) ;\r\n+ #die "noiseThreshold must be > 0\\n" unless ($noise_threshold > 0) ;\r\n+ \r\n+## if you put the option -help or -h function help is started \r\n+if(defined($OptHelp)){ &help ; }\r\n+\r\n+if( (!defined ($inputFile)) and (!defined($inputMasses) )){ warn "The input data is not defined (File or mass/intensity list AS string)\\n" ; &help ; }\r\n+\r\n+#=============================================================================\r\n+# MAIN SCRIPT\r\n+#=============================================================================\r\n+\r\n+## Create module objects ###\r\n+\r\n+my $oapi = lib::golm_ws_api->new() ;\r\n+my $omsp = lib::msp->new() ;\r\n+my $o_output = lib::output->new() ;\r\n+my $oConf = lib::conf->new() ;\r\n+\r\n+\r\n+## -------------- Conf file ------------------------ :\r\n+my ( $CONF ) = ( undef ) ;\r\n+foreach my $conf ( <$binPath/*.cfg> ) {\r\n+\t$CONF = $oConf->as_conf($conf) ;\r\n+}\r\n+\r\n+## -------------- HTML template file ------------------------ :\r\n+$html_template = <$binPath/golm_out.tmpl> ;\r\n+$CONF->{\'HTML_TEMPLATE\'} = $html_template ;\r\n+\r\n+\r\n+## -------------- Retrieve values from conf file ----------'..b' [Rentention Index: float or integer]\r\n+\t\t\t-riWindow [Retention Index Window: 1500 or the value of your choice]\r\n+\t\t\t-gcColumn [AlkaneRetentionIndexGcColumnComposition: \'VAR5\' or \'MDN35\' or \'None\']\r\n+\t\t\t-maxHits [Maximum hits per queried spectra: integer >= 1 (100 for all of them)]\r\n+\t\t\t-mzRes [Number of digits after the decimal point for m/z values: integer (0 if none)]\r\n+\t\t\t-maxIons [Number of m/z per spectra you want to keep for the queries, default 0 for all detected ions]\r\n+\t\t\t-noiseThreshold [Ions having intensity values less than this value are ignored]\r\n+\t\t\t-JaccardDistanceThreshold...............[\r\n+\t\t\t-s12GowerLegendreDistanceThreshold......[ Threshold for each score. Hits with greater scores are ignored: 0 (perfect match) < threshlold <= 1 (mismatch) ]\r\n+\t\t\t-DotproductDistanceThreshold............[\r\n+\t\t\t-EuclideanDistanceThreshold.............[\r\n+\t\t\t-HammingDistanceThreshold[Threshold for hamming score. Hits with greater scores are ignored: 0 - perfect match to higher values indicating a mismatch]\r\n+\t\t\t-relative [Transforms absolute intensities in the msp file into relative intensities: (intensity * 100)/ max(intensitiess), otherwise, leave them absolute: true or false]\r\n+\t\t\t-output_xls [name of the xls file in output: string]\r\n+\t\t\t-output_html [name of the html file in output: string]\r\n+\t\t\t-output_json [name of the json file in output: string]\r\n+\t\t\t-output_tabular [name of the csv file in output: string]\r\n+\t\t\t\t\r\n+";\r\n+\texit(1);\r\n+}\r\n+\r\n+## END of script\r\n+\r\n+__END__\r\n+\r\n+=head1 NAME\r\n+\r\n+ golm_ws_lib_search.pl -- script to send GC-MS spectra queries to Golm Metabolome Database (GMD)\r\n+\r\n+=head1 USAGE\r\n+\r\n+ golm_ws_lib_search.pl -help OR\r\n+\t\t\r\n+\t\tgolm_ws_lib_search.pl \r\n+\t\t\t-spectraFile [.msp file]\t\r\n+\t\t\t-spectraMasses [masses + intensities of an ion: \'mz1 int1 mz2 int2 mzx intx...\']\r\n+\t\t\t-ri [Rentention Index: float or integer]\r\n+\t\t\t-riWindow [Retention Index Window: 1500 or the value of your choice]\r\n+\t\t\t-gcColumn [AlkaneRetentionIndexGcColumnComposition: \'VAR5\' or \'MDN35\' or \'None\']\r\n+\t\t\t-maxHits [Maximum hits per queried spectra: integer >= 1 (100 for all of them)]\r\n+\t\t\t-mzRes [Number of digits after the decimal point for m/z values: integer (0 if none)]\r\n+\t\t\t-maxIons [Number of m/z per spectra you want to keep for the queries, default 0 for all detected ions]\r\n+\t\t\t-noiseThreshold [Ions having intensity values less than this value are ignored]\r\n+\t\t\t-JaccardDistanceThreshold...............[\r\n+\t\t\t-s12GowerLegendreDistanceThreshold......[ Threshold for each score. Hits with greater scores are ignored: 0 (perfect match) < threshlold <= 1 (mismatch) ]\r\n+\t\t\t-DotproductDistanceThreshold............[\r\n+\t\t\t-EuclideanDistanceThreshold.............[\r\n+\t\t\t-HammingDistanceThreshold[Threshold for hamming score. Hits with greater scores are ignored: 0 - perfect match to higher values indicating a mismatch]\r\n+\t\t\t-relative [Transforms absolute intensities in the msp file into relative intensities: (intensity * 100)/ max(intensitiess), otherwise, leave them absolute: true or false]\r\n+\t\t\t-output_xls [name of the xls file in output: string]\r\n+\t\t\t-output_html [name of the html file in output: string]\r\n+\t\t\t-output_json [name of the json file in output: string]\r\n+\t\t\t-output_tabular [name of the csv file in output: string]\r\n+\r\n+=head1 SYNOPSIS\r\n+\r\n+This script sends GC-MS EI spectra from an msp file given in argument to Golm Database, and presents results on a web interface.\r\n+\r\n+=head1 DESCRIPTION\r\n+\r\n+This main program is a ...\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+Gabriel Cretin\tE<lt>gabriel.cretin@clermont.inra.frE<gt>\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 : 03 / 06 / 2016\r\n+\r\n+version 1.1 : 24 / 06 / 2016\r\n+\r\n+version 1.2 : 28 / 11 / 2016\r\n+\r\n+=cut\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r e3d43b8c987b golm_ws_lib_search.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/golm_ws_lib_search.xml Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,316 @@\n+<tool id="golm_ws_lib_search" name="Golm Metabolome Database search spectrum" version="2016-11-28">\n+ <description>\n+ : GC-MS Mass Spectral Database.\n+ </description>\n+ \n+ <!--<requirements>\n+ <requirement type="package" version="0.413">perl-list-moreutils</requirement>\n+ <requirement type="package" version="1.19">perl-soap-lite</requirement>\n+ <requirement type="package" version="0.95">perl-excel-writer-xlsx</requirement>\n+ <requirement type="package" version="2.90">perl-json</requirement>\n+ <requirement type="package" version="2.95">perl-html-template</requirement>\n+ </requirements>-->\n+ \n+ <stdio>\n+ <exit_code range="1" level="fatal" />\n+ </stdio>\n+ \n+ <command><![CDATA[\n+ perl $__tool_directory__/golm_ws_lib_search.pl\n+\t\t#if str($input_type.choice) == "YES":\n+\t \t-inputFile "${input_type.masses}"\n+\t \t-output_tabular "$GolmOutTab" -output_html "$GolmOutWeb" -output_xls "$GolmOutXlsx"\n+\t #else:\n+\t \t-inputMasses "${input_type.mass}"\n+\t \t-output_tabular "$GolmOutTab2" -output_html "$GolmOutWeb2" -output_xls "$GolmResXlsx2"\n+\t #end if\n+\t -ri "$ri"\n+\t\t-riWindow "$riWindow"\n+\t\t-gcColumn "$columnType"\n+\t -mzRes "$mzRes"\n+\t -maxHits "$maxHits"\n+\t -maxIons "$maxIons"\n+\t\t-JaccardDistanceThreshold "$JaccardDistanceThreshold" \n+\t\t-s12GowerLegendreDistanceThreshold "$s12GowerLegendreDistanceThreshold" \n+\t\t-DotproductDistanceThreshold "$DotproductDistanceThreshold" \n+\t\t-HammingDistanceThreshold "$HammingDistanceThreshold"\n+\t\t-EuclideanDistanceThreshold "$EuclideanDistanceThreshold"\n+\t\t-relative "$intensity_type"\n+\t\t\n+ ]]></command>\n+ <inputs>\n+ \t<conditional name="input_type">\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.">\n+ <option value="YES">YES</option>\n+ <option value="NO">NO</option>\n+ </param>\n+ <when value="YES">\n+ \t<param name="masses" label="File of masses (format: msp)" format="msp,txt" type="data" help=".msp output file from metaMS.runGC function, or any msp file." />\n+ </when>\n+ <when value="NO">\n+ \t<param name="mass" size="30" area="true" type="text" label="Masses and intensities (entered manually)" help="For a list of masses + intensities write : mz1 int1 mz2 int2 mzx intx..."/>\t\n+\t </when>\n+\t</conditional>\n+ \t<param name="columnType" label="Column" type="select" display="radio" help="5%-phenyl-95%-dimethylpolysiloxane (VAR5), 35%-phenyl-65%-dimethylpolysiloxane (MDN35).">\n+ <option value="VAR5">VAR5</option>\n+ <option value="MDN35">MDN35</option>\n+ </param>\n+ <param name="ri" type="integer" value="1898" label="Alkane Retention Index" help="If neither an alkane RIs for VAR5 nor MDN35 is available in your setup, please select \'none\' in the input field above!" />\n+ \t<param name="riWindow" type="integer" value="5" label="Retention Index Window" help="This value is for the library search used only. A larger window size will increase the number of matches.\n+ \t At the same time the identification becomes less reliable due to false matching spectra without RI consensus." />\n+ <param name="maxHits" type="integer" value="100" label="Maximum Hits" help="Maximum number of hits per queried spectra, default=all (0)." />\n+ <param name="mzRes" type="integer" value="0" label="Number of significant decimal" help="Number of significant decimals of your m/z." />\n+ <param name="maxIons" type="integer" value="0" label="Maximum number of ions" help="Number of m/z per spectra you want to keep for the queries, default 0 = all of them." />\n+ \t<param name="JaccardDistanceThreshold" type="float" value="0.9" label="JaccardDistance" help="Number of matches, divided by the sum of matches and mismatches." />\n+ \t<param name="s12GowerLegendreDistanceThreshold" type="float" value="0.9" label="s12GowerLegendreDistanceThreshold" help="The dist'..b'----------\n+Parameters\n+----------\n+\n+**Would you use a file**\n+\n+\t| Choose whether the masses are in a file or entered manually\n+\t| YES (default) : parameters **File of masses (format: msp)** is visible\n+\t| NO : parameter **Masses of the molecule (entered manually)** is visible\n+\t| For both, all other parameters are available\n+\n+\n+**Column type**\n+\n+\t| VAR5 means a 5%-phenyl-95%-dimethylpolysiloxane column and MDN35 means a 35%-phenyl-65%-dimethylpolysiloxane column. If you don\'t know select \'None\'.\n+\n+\n+**Alkane Retention Index**\n+\n+\t| If neither an alkane RIs for VAR5 nor MDN35 is available in your setup, please select \'none\' in the input field above!\n+\n+\n+**Retention Index Window**\n+\n+\t| This value is for the library search used only. A larger window size will increase the number of matches.\n+\t| At the same time the identification becomes less reliable due to false matching spectra without RI consensus.\n+\t| The maximal number of hits returned from the data base is limited due to performance reasons.\n+\n+\n+**Maximum Hits**\n+\n+\t| Maximum number of hits returned by Golm database, default = 0 (which means all of them are taken in account).\n+\n+\n+**Number of significant decimal**\n+\n+\t| Number of significant decimals of your m/z. \n+\t| Example: m/z = 73.798 if mzRes = 4, m/z becomes 73.7980\n+\t| \t\t m/z = 73.798 if mzRes = 0, m/z becomes 74\n+\n+\n+**Maximum number of ions**\n+\n+\t| Number of m/z and intensities per spectra you want to keep for the queries to Golm, default = 0 = all of them.\n+\n+\n+**JaccardDistanceThreshold**\n+\n+\t| Number of matches (a mass with appropriate intensity in both spectra) divided by the sum of matches and mismatches (a mass where only one of both spectra has a intensity).\n+\t| The jaccard distance is a binary distance.\n+\n+\n+**s12GowerLegendreDistanceThreshold**\n+\n+\t| The distance measure S12GowLeg = sqrt(1 - s12) is derived from the S12 coefficient of Gower & Legendre defined as s12 = a / sqrt((a + b)(a + c)), with "a" representing the number of positions at which both spectra are in "on-state" and "b" respectively "c" representing the number of positions at which only the query spectrum or the hit spectrum are in "on-state".\n+\n+\n+**DotproductDistanceThreshold**\n+\n+\t| The Dotproduct distance is summing the multiplied intensities over all matching peaks within both spectra. Here, to satisfy the conditions of a metric I) non-negativity, II) identity of indiscernibles, III) symmetry and IV) subadditivity / triangle inequality, we use 1-Dotproduct. Both spectra are normalised prior to the spectral vector norm in that way, that the absolute value of the squared intensities is equal to 1.\n+\n+\n+**HammingDistanceThreshold**\n+\n+\t| In information theory, the Hamming distance between two strings of equal length is the number of positions for which the corresponding symbols are different. Put another way, it measures the minimum number of substitutions required to change one into the other, or the number of errors that transformed one string into the other.\n+\n+\n+**EuclideanDistanceThreshold**\n+\n+\t| The Euclid is the square root of the sum of the squared differences over all matching peaks.\n+\n+\n+**Type of intensities**\n+\n+\t| Use absolute or relative intensities.\n+\t| Example: relative = percentage (intensity * 100) / max(intensities), absolute = untouched\n+\n+\n+------------\n+Output files\n+------------\n+\n+**Tree types of files**\n+\n+\t| GOLM.html : to view results on a webpage (HTML).\n+\t| GOLM.xlsx : to get results in a excel like format.\n+\t| GOLM.tabular : to get results in tabular format.\n+\n+---------------------------------------------------\n+\n+\n+---------------\n+Working example\n+---------------\n+\n+\n+.. class:: warningmark\n+\n+Refer to the corresponding W4M HowTo section: http://workflow4metabolomics.org/howto\n+ | Format Data For Postprocessing\n+ | Perform GCMS Annotations\n+ \n+\n+ ]]></help>\n+ \n+ <citations>\n+ <citation type="doi">10.1093/bioinformatics/btu813</citation>\n+ </citations>\n+\n+</tool>\n+\t \n' |
b |
diff -r 000000000000 -r e3d43b8c987b lib/conf.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/conf.pm Mon Dec 05 08:32:04 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 creer l'object conf a 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 a 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 a 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 verifier les path et la presence des exe decrits 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 e3d43b8c987b lib/golm_ws_api.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/golm_ws_api.pm Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,338 @@\n+package lib::golm_ws_api ;\r\n+\r\n+use strict;\r\n+use warnings ;\r\n+use Exporter ;\r\n+use Carp ;\r\n+\r\n+use Data::Dumper ;\r\n+#use SOAP::Lite +trace => [qw (debug)];\r\n+use SOAP::Lite ;\r\n+use JSON ;\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( connectWSlibrarySearchGolm LibrarySearch test_query_golm filter_scores_golm_results filter_replica_results);\r\n+our %EXPORT_TAGS = ( ALL => [qw( connectWSlibrarySearchGolm LibrarySearch test_query_golm filter_scores_golm_results filter_replica_results)] );\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+=head2 METHOD connectWSlibrarySearchGolm\r\n+\r\n+\t## Description : create a soap object throught the webservice LibrarySearch of Golm.\r\n+\t## Input : $ws_url, $ws_proxy\r\n+\t## Ouput : $soap ;\r\n+\t## Usage : my $soap = connectWSlibrarySearchGolm($ws_url, $ws_proxy) ;\r\n+\r\n+=cut\r\n+\r\n+sub connectWSlibrarySearchGolm() {\r\n+\t## Retrieve Values\r\n+ my $self = shift ;\r\n+ my ($ws_url, $ws_proxy) = @_ ;\r\n+ \r\n+\tmy $osoap = SOAP::Lite\r\n+\t\t-> soapversion(\'1.2\')\r\n+\t\t-> envprefix(\'soap12\')\r\n+\t\t-> readable(1)\r\n+\t\t-> uri( $ws_url )\r\n+\t\t-> proxy( $ws_proxy."/" )\r\n+\t\t-> on_fault(sub { my($soap, $res) = @_; \r\n+ eval { die ref $res ? $res->faultstring : $soap->transport->status, "\\n"};\r\n+ return ref $res ? $res : new SOAP::SOM ;\r\n+ });\r\n+\t\r\n+\treturn ($osoap);\r\n+}\r\n+### END of SUB\r\n+ \r\n+ \r\n+ \r\n+ \r\n+ \r\n+=head2 METHOD test_query_golm\r\n+\r\n+\t## Description : send a test request (default given on ws website) to golm database.\r\n+\t## Input : $ws_url, $ws_proxy\r\n+\t## Ouput : $soap ;\r\n+\t## Usage : my $soap = test_query_golm($ws_url, $ws_proxy) ;\r\n+\r\n+=cut\r\n+\r\n+sub test_query_golm() {\r\n+\t## Retrieve Values\r\n+ my $self = shift ;\r\n+ my ($ws_url, $ws_proxy) = @_ ;\r\n+ \r\n+\tmy $soap = SOAP::Lite\r\n+ -> uri($ws_url)\r\n+ -> on_action( sub { join \'/\', $ws_proxy, $_[1] } )\r\n+ -> proxy($ws_proxy, timeout => 500);\r\n+ \r\n+ # Setting Content-Type myself\r\n+ my $http_request = $soap\r\n+ ->{\'_transport\'}\r\n+ ->{\'_proxy\'}\r\n+ ->{\'_http_request\'};\r\n+ $http_request->content_type("text/xml; charset=utf-8");\r\n+ \r\n+ my $method = SOAP::Data->name(\'LibrarySearch\')\r\n+ ->attr({xmlns => $ws_proxy."/"});\r\n+ \r\n+ my @params = (\r\n+ SOAP::Data->name(\'ri\' => 1898),\r\n+ SOAP::Data->name(\'riWindow\' => 5),\r\n+ SOAP::Data->name(\'AlkaneRetentionIndexGcColumnComposition\' => \'VAR5\'),\r\n+ SOAP::Data->name(\'spectrum\' => "70 3 71 3 72 16 73 999 74 87 75 78 76 4 77 5 81 1 82 6 83 13 84 4 85 3 86 4 87 5 88 4 89 52 90 4 91 2 97 2 98 1 99 4 100 12 101 16 102 9 103 116 104 11 105 26 106 2 107 1 111 1 112 1 113 4 114 11 115 7 116 5 117 93 118 9 119 8 126 1 127 3 128 3 129 101 130 19 131 25 132 4 133 60 134 8 135 4 140 1 141 1 142 4 143 13 144 2 145 6 146 1 147 276 148 44 149 27 150 3 151 1 156 1 157 70 158 12 159 5 160 148 161 26 162 7 163 8 164 1 168 1 169 2 170 1 172 3 173 4 174 1 175 4 177 4 186 2 187 1 189 28 190 7 191 13 192 2 193 1 201 5 202 1 203 3 204 23 205 162 206 31 207 16 208 2 210 2 214 1 215 2 216 8 217 88 218 18 219 8 220 1 221 6 222 1 229 23 230 6 231 11 232 3 233 4 234 3 235 1 243 1 244 2 245 1 246 2 2'..b' ;\r\n+ }\r\n+ elsif ($maxHits < 100 && $maxHits > 0 && $status eq \'success\'){\r\n+ \t\r\n+ \tmy $filtered_res_before_hits_limited = $oapi->filter_scores_golm_results(\\@results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold,\r\n+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold) ;\r\n+ \tif (@$filtered_res_before_hits_limited) {\r\n+ \t\t\r\n+\t \tfor (my $i=0 ; $i<$maxHits ; $i++) {\r\n+\t \t\t\r\n+\t\t \tpush (@filtered_limited_res , @$filtered_res_before_hits_limited[$i]) ;\r\n+\t \t}\r\n+ \t}\r\n+ \telse {\r\n+ \t\t\r\n+\t \tif(!@$filtered_res_before_hits_limited){ push (@filtered_limited_res , "no results") ; }\r\n+ \t}\r\n+ \treturn (\\@filtered_limited_res) ;\r\n+ }\r\n+ else { carp "No match returned from Golm for the query.\\n" }\r\n+ }\r\n+ \telse { carp "The spectrum for query is empty, Golm soap will stop.\\n" ; }\r\n+ }\r\n+ else { carp "The spectrum for query is undef, Golm soap will stop.\\n" ; }\r\n+\t\r\n+\treturn \\@filtered_limited_res ;\r\n+}\r\n+### END of SUB\r\n+\r\n+\r\n+\r\n+\r\n+=head2 METHOD filter_scores_golm_results\r\n+\t## Description : filter golm\'s hits by distance scores \r\n+\t## Input : $results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold,\r\n+\t##\t\t $DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold\r\n+\t## Ouput : \\@filtered_res ;\r\n+\t## Usage : my ($filtered_res) = filter_scores_golm_results($results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold,\r\n+\t##\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold) ;\r\n+\r\n+=cut\r\n+\r\n+sub filter_scores_golm_results() {\r\n+\t## Retrieve Values\r\n+\tmy $self = shift ;\r\n+\tmy ($results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold,\r\n+\t\t$DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold) = @_ ;\r\n+\t\t\r\n+\tmy @results = @$results ;\r\n+\tmy @filtered_res = () ;\r\n+\t\r\n+\tforeach my $res (@results){\r\n+\r\n+\t\t\tif ($res->{\'JaccardDistance\'} <= $JaccardDistanceThreshold && $res->{\'s12GowerLegendreDistance\'} <= $s12GowerLegendreDistanceThreshold\r\n+\t\t\t\t&& $res->{\'DotproductDistance\' } <= $DotproductDistanceThreshold && $res->{\'HammingDistance\'} <= $HammingDistanceThreshold && \r\n+\t\t\t\t$res->{\'EuclideanDistance\' } <= $EuclideanDistanceThreshold) {\r\n+\t\t\t\t\t\r\n+\t\t\t\tpush (@filtered_res , $res) ;\r\n+\t\t\t}\r\n+\t}\r\n+\t\r\n+\tmy $oapi = lib::golm_ws_api->new() ;\r\n+\tmy $sorted_analytes = $oapi->filter_replica_results(\\@filtered_res) ;\r\n+\t\r\n+\treturn $sorted_analytes ;\r\n+}\r\n+\r\n+\r\n+\r\n+=head2 METHOD _filter_replica_results\r\n+ ## Description : remove replicated hits, keep the ones with the lowest dot product distance\r\n+ ## Input : $results\r\n+ ## Ouput : \\@clean_res ;\r\n+ ## Usage : my ($clean_res) = filter_replica_results($results) ;\r\n+\r\n+=cut\r\n+\r\n+sub filter_replica_results() {\r\n+ ## Retrieve Values\r\n+ my $self = shift ;\r\n+ my ($results) = @_ ;\r\n+\t my %seen ;\r\n+\t my @sortAnalytes = grep { !$seen{$_->{\'analyteName\'}}++ } sort { $a->{\'DotproductDistance\'} <=> $b->{\'DotproductDistance\'} } @$results ;\r\n+\r\n+ return \\@sortAnalytes ;\r\n+}\r\n+\r\n+\r\n+\r\n+\r\n+\t\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 golm_ws_api.pm\r\n+\r\n+=head1 Exports\r\n+\r\n+=over 4\r\n+\r\n+=item :ALL is connectWSlibrarySearchGolm LibrarySearch test_query_golm filter_scores_golm_results filter_replica_results\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+Gabriel Cretin E<lt>gabriel.cretin@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 : 03 / 06 / 2016\r\n+\r\n+version 2 : 24 / 06 / 2016\r\n+\r\n+=cut\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r e3d43b8c987b lib/msp.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/msp.pm Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,642 @@\n+package lib::msp ;\n+\n+use strict;\n+use warnings ;\n+use Exporter ;\n+use Carp ;\n+\n+use Data::Dumper ;\n+use List::MoreUtils qw(uniq);\n+\n+use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS);\n+\n+our $VERSION = "1.0";\n+our @ISA = qw(Exporter);\n+our @EXPORT = qw( get_mzs get_intensities get_masses_from_string get_intensities_from_string keep_only_max_masses keep_only_max_intensities encode_spectrum_for_query sorting_descending_intensities round_num apply_relative_intensity remove_redundants);\n+our %EXPORT_TAGS = ( ALL => [qw( get_mzs get_intensities get_masses_from_string get_intensities_from_string keep_only_max_masses keep_only_max_intensities encode_spectrum_for_query sorting_descending_intensities round_num apply_relative_intensity remove_redundants)] );\n+\n+=head1 NAME\n+\n+My::Module - An example module\n+\n+=head1 SYNOPSIS\n+\n+ use My::Module;\n+ my $object = My::Module->new();\n+ print $object->as_string;\n+\n+=head1 DESCRIPTION\n+\n+This module does not really exist, it\n+was made for the sole purpose of\n+demonstrating how POD works.\n+\n+=head1 METHODS\n+\n+Methods are :\n+\n+=head2 METHOD new\n+\n+\t## Description : new\n+\t## Input : $self\n+\t## Ouput : bless $self ;\n+\t## Usage : new() ;\n+\n+=cut\n+\n+sub new {\n+ ## Variables\n+ my $self={};\n+ bless($self) ;\n+ return $self ;\n+}\n+### END of SUB\n+\n+\n+\n+=head2 METHOD get_mzs\n+\n+\t## Description : parse msp file and get mzs\n+\t## Input : $msp_file, $mzRes, $maxIon\n+\t## Output : \\@total_spectra_mzs \n+\t## Usage : my ( $mzs ) = get_mzs( $msp_file , $mzRes, $maxIon) ;\n+\t## Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]\n+=cut\n+## START of SUB\n+sub get_mzs {\n+\t## Retrieve Values\n+ my $self = shift ;\n+ my ( $msp_file, $mzRes ) = @_ ;\n+ \n+ \tmy @ions = () ;\n+ \tmy @temp_mzs = () ;\n+ \tmy @uniq_masses ;\n+ \tmy @mzs = ();\n+ \tmy @total_spectra_mzs = ();\n+ \tmy $mz ;\n+ \tmy $i = 0 ;\n+ \t \t\n+ open (MSP , "<" , $msp_file) or die $! ;\n+ \n+\t{\n+\t\tlocal $/ = \'Name\' ;\n+\t my @infos = () ;\n+\t # One line is : "Name -> Name" englobing a whole spectrum with all infos\n+\t while(my $line = <MSP>) {\n+\t \t\n+\t \tchomp $line;\n+\t \t@infos = split (/\\n/ , $line) ;\n+\t \t# Loop over all lines of a spectrum\n+\t \tfor (my $i=0 ; $i<@infos ; $i++) {\n+\t \t\t# Detect spectrum lines only\n+\t\t \tif ($infos[$i] =~ /(\\d+\\.?\\d*)\\s+(\\d+\\.?\\d*)\\s*;\\s*/) {\n+\t\t \t\t\n+\t\t \t\t@ions = split ( /;/ , $infos[$i] ) ;\n+\t\t \t\t# Retrieve mzs according to maxIons value\n+\t\t \t\tforeach my $ion (@ions) {\n+\t\t \t\t\t\n+\t\t \t\t\tif ($ion =~ /^\\s*(\\d+\\.?\\d*)\\s+(\\d+\\.?\\d*)$/) {\n+\t\t \t\t\t\t\n+\t\t \t\t\t\t$mz = $1 ;\n+\t\t \t\t\t\t# Truncate/round mzs depending on $mzRes wanted\n+\t\t \t\t\t\tif ($mzRes == 0) {\n+\t\t \t\t\t\t\tmy $mz_rounded = sprintf("%.".$mzRes."f", $mz) ;\n+\t\t \t\t\t\t\tpush (@temp_mzs , $mz_rounded) ;\n+\t\t \t\t\t\t}\n+\t\t \t\t\t\t# Check that $mzRes is not greater than the number of digits after comma\n+\t\t \t\t\t\telsif ($mzRes > 0) {\n+\t\t \t\t\t\t\tif ($mz !~ /^\\d+\\.\\d+$/) { croak "*********\\n\\nYou are trying to specify $mzRes significant decimals, but one or more masses in the input file are unitary masses.\\nYou should try again with mzRes = 0\\n\\n\\n"; }\n+\t\t \t\t\t\t\telsif($mzRes > length(( $mz =~ /.+\\.(.*)/)[0] )) {\n+\t\t \t\t\t\t\t\t$mz = sprintf("%.".$mzRes."f" , $mz) ;\n+\t\t \t\t\t\t\t}\n+\t\t \t\t\t\t\tmy $mz_rounded = _round_num($mz,$mzRes) ;\n+\t\t \t\t\t\t\tpush (@temp_mzs , $$mz_rounded) ;\n+\t\t \t\t\t\t}\n+\t\t \t\t\t}\n+\t\t \t\t}\n+\t\t \t}\n+\t \t}\n+\t \tif($line ne \'\') {\n+\t\t \t@{ $total_spectra_mzs[$i] } = @temp_mzs ;\n+\t\t\t $i++ ;\n+\t\t\t @temp_mzs = () ;\n+\t \t} \t\n+\t }\n+ }\n+ #print Dumper \\@total_spectra_mzs ;\n+ close (MSP) ;\n+ return(\\@total_spectra_mzs) ;\n+}\n+## END of SUB\n+\n+\n+\n+\n+=head2 METHOD get_intensities\n+\n+\t## Description : parse msp file and get intensities\n+\t## Input : $msp_file, $maxIons\n+\t## Output : \\@total_spectra_intensities \n+\t## Usage : my ( $intensities ) = get_mzs( $msp_file, $maxIons ) ;\n+\t## Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]\n+=cut\n+## START'..b' \\@relative_ints) ;\n+ }\n+ return \\@relative_intensities ;\n+}\n+## END of SUB\n+\n+\n+\n+=head2 METHOD remove_redundants\n+\n+\t## Description : removes ions with redundant masses\n+\t## Input : $masses $intensities\n+\t## Output : \\@intensities\n+\t## Usage : my ( $uniq_masses, $uniq_intensities ) = remove_redundants( $masses, $intensities ) ;\n+\t\n+=cut\n+## START of SUB \n+sub remove_redundants {\n+\t## Retrieve Values\n+\tmy $self = shift ;\n+ my ($masses, $intensities) = @_ ;\n+ \n+ my %uniq = () ;\n+ my @uniq_intensities = () ;\n+ \n+ ## Create hash with key = mass and value = intensity\n+ for (my $i=0 ; $i<@$masses ; $i++) {\n+ \t$uniq{ @$masses[$i] } = @$intensities[$i] ;\n+ }\n+ \n+ ## Remove redundant masses\n+ my @uniq_masses = uniq(@$masses) ;\n+ \n+ ## Keep intensities corresponding to uniq masses\n+\tforeach my $mass (@uniq_masses) {\n+\t push (@uniq_intensities , $uniq{ $mass }) ;\n+\t}\n+\t\n+\treturn (\\@uniq_masses , \\@uniq_intensities) ;\n+\t\n+} \n+## END of SUB\n+\n+\n+#********************************************************************************************************\n+#\tFONCTION DU SEUIL POUR LE BRUIT, A DECOMMENTER SI FINALEMENT CE N\'EST PAS GERE DANS LA BRIQUE MetaMS\n+#********************************************************************************************************\n+\n+\n+=head2 METHOD keep_ions_above_threshold\n+\n+\t## Description : keep only ions which intensities are above the threshold\n+\t## Input : $mzs_res_sorted, $ints_res_sorted, $noiseThreshold\n+\t## Output : $mzs_res_noise_threshold, $ints_res_noise_threshold\n+\t## Usage : my ( $mzs_res_noise_threshold, $ints_res_noise_threshold ) = keep_ions_above_threshold( $mzs_res_sorted, $ints_res_sorted, $noiseThreshold ) ;\n+\t\n+=cut\n+## START of SUB \n+#sub keep_ions_above_threshold {\n+#\t## Retrieve Values\n+#\tmy $self = shift ;\n+# my ($mzs_res_sorted, $ints_res_sorted, $noiseThreshold) = @_ ;\n+# \n+# my (@mzs_res_noise_threshold, @ints_res_noise_threshold) = ( (),() ) ;\n+# my (@mzs_res_noise_threshold_temp, @ints_res_noise_threshold_temp) = ( (),() ) ;\n+# my $i = 0 ;\n+# my $j = 0 ;\n+# # Case when we have only one array of masses (input is a string of masses and not a file)\n+# if ( ref(@$mzs_res_sorted[0]) ne "ARRAY") {\n+# \t\n+#\t\twhile( @$ints_res_sorted[$i] > $noiseThreshold && $i < scalar @$mzs_res_sorted) {\n+# \t\n+#\t \tpush ( @mzs_res_noise_threshold , @$mzs_res_sorted[$i] ) ;\n+#\t \tpush ( @ints_res_noise_threshold , @$ints_res_sorted[$i] ) ;\n+#\t \t$i++ ;\n+#\t }\n+#\t}\n+# else {\n+# \twhile( $i < @$ints_res_sorted ) {\n+# \t\t\n+# \t\twhile( $$ints_res_sorted[$i][$j] > $noiseThreshold && $j < scalar @$ints_res_sorted[$i]) {\n+# \t\t\t\n+# \t\t\tpush ( @mzs_res_noise_threshold_temp , $$mzs_res_sorted[$i][$j] ) ;\n+#\t\t \tpush ( @ints_res_noise_threshold_temp , $$ints_res_sorted[$i][$j] ) ;\n+#\t\t \t$j++ ;\n+# \t\t}\t\t\n+# \t\tpush ( @mzs_res_noise_threshold , \\@mzs_res_noise_threshold_temp ) ;\n+#\t\t push ( @ints_res_noise_threshold , \\@ints_res_noise_threshold_temp ) ;\n+# \t\t$i++ ;\n+# \t}\n+#\t}\n+#\t\n+#\treturn (\\@mzs_res_noise_threshold, \\@ints_res_noise_threshold) ;\n+#} \n+## END of SUB\n+\n+\n+#********************************************************************************************************\n+#********************************************************************************************************\n+#********************************************************************************************************\n+\n+\n+1 ;\n+\n+\n+__END__\n+\n+=head1 SUPPORT\n+\n+You can find documentation for this module with the perldoc command.\n+\n+ perldoc csv.pm\n+\n+=head1 Exports\n+\n+=over 4\n+\n+=item :ALL is get_spectra\n+\n+=back\n+\n+=head1 AUTHOR\n+\n+Gabriel Cretin E<lt>gabriel.cretin@clermont.inra.frE<gt>\n+\n+=head1 LICENSE\n+\n+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.\n+\n+=head1 VERSION\n+\n+version 1 : 03 / 06 / 2016\n+\n+version 2 : 24 / 06 / 2016\n+\n+=cut\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r e3d43b8c987b lib/output.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/output.pm Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,536 @@\n+package lib::output ;\n+\n+use strict;\n+use warnings ;\n+use Exporter ;\n+use Carp ;\n+use HTML::Template ;\n+use JSON ;\n+\n+use FindBin ;\n+use lib $FindBin::Bin ;\n+my $binPath = $FindBin::Bin ;\n+\n+use Data::Dumper ;\n+\n+use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS);\n+\n+our $VERSION = "1.0";\n+our @ISA = qw(Exporter);\n+our @EXPORT = qw(build_json_res_object excel_output write_html_body add_entries_to_tbody_object write_json_skel write_ajax_data_source excel_like_output);\n+our %EXPORT_TAGS = ( ALL => [qw(build_json_res_object excel_output write_html_body add_entries_to_tbody_object write_json_skel write_ajax_data_source excel_like_output)] );\n+\n+=head1 NAME\n+My::Module - An example module\n+\n+=head1 SYNOPSIS\n+\n+ use My::Module;\n+ my $object = My::Module->new();\n+ print $object->as_string;\n+\n+=head1 DESCRIPTION\n+\n+This module does not really exist, it\n+was made for the sole purpose of\n+demonstrating how POD works.\n+\n+=head1 METHODS\n+\n+Methods are :\n+\n+=head2 METHOD new\n+\n+\t## Description : new\n+\t## Input : $self\n+\t## Ouput : bless $self ;\n+\t## Usage : new() ;\n+\n+=cut\n+\n+sub new {\n+ ## Variables\n+ my $self={};\n+ bless($self) ;\n+ return $self ;\n+}\n+### END of SUB\n+\n+\n+\n+=head2 METHOD build_json_res_object\n+\n+\t## Description : build json from array of hits\n+\t## Input : $results\n+\t## Output : \\@json_results \n+\t## Usage : my ( \\@json_results ) = build_json_res_object( $results ) ;\n+\t## JSON structure: [\n+#\t\t\t\t\t\t\t{\n+#\t\t\t\t\t\t\t\t\'id\' : \'int\',\n+#\t\t\t\t\t\t\t\t\'nb_hits\' : int, \n+#\t\t\t\t\t\t\t\t\'searchResults\'\t:\t[\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'metaboliteID\' : GUID\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'distance_scores\' : {\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'EuclideanDistance\' : float\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'DotproductDistance\' : int\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'HammingDistance\' : int\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'JaccardDistance\' : int\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'s12GowerLegendreDistance\' : int\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'ri_infos\' : {\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'ri\' : float\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'riDiscrepancy\' : float\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'analyte\' : {\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'id\' : GUID\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'name\' : string\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'spectrum\' : {\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'id\' : GUID\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\'name\' : string\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t\t.\n+#\t\t\t\t\t\t\t\t\t\t\t\t\t]\n+#\t\t\t\t\t\t\t}\n+#\t\t\t\t\t\t\t.\n+#\t\t\t\t\t\t\t.\n+#\t\t\t\t\t\t\t.\n+#\t\t\t\t\t\t]\n+=cut\n+## START of SUB\n+sub build_json_res_object {\n+\t## Retrieve Values\n+ my $self = shift ;\n+ my ( $results ) = @_ ;\n+ \t\n+\tmy @json_results ;\n+\tmy @array_results = @$results ;\n+\t\n+\tmy $nb_hits = 0 ;\n+\tmy $i = 0 ;\n+\tmy $spectrumID = 1 ;\n+\t\n+\t\n+\t\n+\t## Loop on each spectra\n+\tforeach my $res (@array_results) {\n+\t\t\n+\t\tif (@$res[0] eq \'no results\'){\n+\t\t\n+\t\t\tmy %hit_infos = () ;\n+\t\t\t\n+\t\t\t$json_results[$i]{\'id\'} = $spectrumID++ ;\n+\t\t\t$json_results[$i]{\'nb_hits\'} = $nb_hits ;\n+\t\t\t$hit_infos{\'metaboliteID\'} = "" ;\n+\t\t\t$hit_infos{\'distance_scores\'}{\'EuclideanDistance\'} = "" ;\n+\t\t\t$hit_infos{\'distance_scores\'}{\'DotproductDistance\'} = "" ;\n+\t\t\t$hit_infos{\'distance_scores\'}{\'HammingDistance\'} = "" ;\n+\t\t\t$hit_infos{\'distance_scores\'}{\'JaccardDistance\'} = "" ;\n+\t\t\t$hit_infos{\'distance_scores\'}{\'s12GowerLegendreDistance\'} = "" ;\n+\t\t\t$hit_infos{\'ri_infos\'}{\'ri\'} = "" ;\n+\t\t\t$hit_infos{\'ri_infos\'}{\'riDiscrepancy\'} = "" ;\n+\t\t\t$hit_infos{\'analyte\'}{\'id\'} = "" ;\n+\t\t\t$hit_infos{\'analyte\'}{\'name\'} = "" ;\n+\t\t\t$hit_infos{\'spectrum\'}{\'id\'} = "" ;\n+\t\t\t$hit_infos{\'spectrum\'}{\'name\'} = "no results" ;\n+\t\t\t\n+\t\t\tpush ( @{ $json_results[$i]{\'searchResults\'} } , \\%hit_infos );\n+\t\t}\n+\t\telse {\n+\t\t\t\n+\t\t\t$nb_hits = scalar @$res;\n+\t\t\t\n+\t\t\t$json_results[$i]{\'id\'} = $spectrumID++ ;\n+\t\t\t$json_results[$i]{\'nb_hits\'} = $nb_hits ;\n+\t\t\t\n+\t\t\t## Loop on each hit of a spectrum + build json\n+\t\t\tforeach my $href (@$res) {\n+\t\t\t\t\n+\t\t\t\tif (!defined $href){\n+\t\t\t\t\t\n+\t\t\t\t\tlast ;\n+\t\t\t\t}\n+\t\t\t\telse {\n+\t\t\t\t\tmy %hash_res = %$href ;\n+\t\t\t\t\tmy %hit_infos = () ;\n+\t\t\t\t\t# Get rid of false r'..b'## Description : prepare and write json output file\n+\t## Input : $json_file, $scalar\n+\t## Output : json file\n+\t## Usage : $o_output->write_json_skel( $csv_file, $scalar ) ;\n+\t\n+=cut\n+## START of SUB\n+sub write_json_skel {\n+\t## Retrieve Values\n+ my $self = shift ;\n+ my ( $json_file, $json_obj ) = @_ ;\n+ \n+ my $utf8_encoded_json_text = encode_json $json_obj ;\n+ open(JSON, \'>:utf8\', $$json_file) or die "Can\'t create the file $$json_file\\n" ;\n+ print JSON $utf8_encoded_json_text ;\n+ close(JSON) ;\n+ \n+}\n+## END of SUB\n+\n+\n+\n+=head2 METHOD write_csv\n+\n+\t## Description : write csv output file\n+\t## Input : $xlsx_file, $csv_file\n+\t## Output : csv file\n+\t## Usage : $o_output->write_csv( $xlsx_file, $csv_file ) ;\n+\t\n+=cut\n+## START of SUB\n+sub write_csv {\n+\t## Retrieve Values\n+ my $self = shift ;\n+ my ( $csv_file, $jsons ) = @_ ;\n+ \n+ open (CSV , ">" , $csv_file) or die "Can\'t create the file $csv_file\\n" ;\n+ \n+ print CSV "\\"Num Spectre\\"\\t\\"Analyte Name\\"\\t\\"Spectrum Name\\"\\t\\"Retention Index\\"\\t\\"RI Discrepancy\\"\\t\\"DotproductDistance\\"\\t\\"EuclideanDistance\\"\\t\\"JaccardDistance\\"\\t\\"HammingDistance\\"\\t\\"s12GowerLegendreDistance\\"\\t\\"Spectrum ID\\"\\t\\"Metabolite ID\\"\\t\\"Analyte ID\\"\\n" ;\n+\t\t\t \t\t\n+ foreach my $href_grp (@$jsons) {\n+\t\t\n+\t\t\tforeach my $hit ( @{$href_grp->{\'searchResults\'}} ){\n+\t\t\t\t\n+\t\t\t\t\tprint CSV "\\"$href_grp->{id}\\"\\t\\"$hit->{analyte}{name}\\"\\t\\"$hit->{spectrum}{name}\\"\\t\\"$hit->{ri_infos}{ri}\\"\\t\\"$hit->{ri_infos}{riDiscrepancy}\\"\\t\\"$hit->{distance_scores}{DotproductDistance}\\"\\t\\"$hit->{distance_scores}{EuclideanDistance}\\"\\t\\"$hit->{distance_scores}{JaccardDistance}\\"\\t\\"$hit->{distance_scores}{HammingDistance}\\"\\t\\"$hit->{distance_scores}{s12GowerLegendreDistance}\\"\\t\\"$hit->{spectrum}{id}\\"\\t\\"$hit->{metaboliteID}\\"\\t\\"$hit->{analyte}{id}\\"\\n" ;\n+\t\t\t}\n+\t}\n+ close(CSV) ;\n+ \n+}\n+## END of SUB\n+\n+\n+\n+\n+=head2 METHOD write_ajax_data_source\n+\n+\t## Description : write csv output file\n+\t## Input : $jsons_obj\n+\t## Output : \n+\t## Usage : $o_output->write_ajax_data_source( $jsons_obj ) ;\n+\t\n+=cut\n+## START of SUB\n+sub write_ajax_data_source {\n+\t## Retrieve Values\n+ my $self = shift ;\n+ my ( $jsons_obj ) = @_ ;\n+\n+\tmy %ajax = () ;\n+\tmy $i = 0 ;\n+\t \n+\t#open (AJAX,">ajax.txt") or die "ERROR at opening file" ;\n+\t \n+\tforeach my $href_grp (@$jsons_obj) {\n+\t\t\t\n+\t\t\t\tforeach my $hit ( @{$href_grp->{\'searchResults\'}} ){\n+\t\t \t\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $href_grp->{id}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{spectrum}{name}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{analyte}{name}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{ri_infos}{ri}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{ri_infos}{riDiscrepancy}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{distance_scores}{DotproductDistance}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{distance_scores}{EuclideanDistance}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{distance_scores}{JaccardDistance}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{distance_scores}{HammingDistance}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{distance_scores}{s12GowerLegendreDistance}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{spectrum}{id}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{metaboliteID}) ;\n+\t\t\t\t\tpush (@{$ajax{ \'data\' }[$i]} , $hit->{analyte}{ID}) ;\n+\t\t\t\t\t$i++ ;\n+\t\t\t\t}\n+\t\t}\n+\t\n+\tmy $ajax = encode_json \\%ajax ;\n+\treturn $ajax ;\n+\t#print AJAX $ajax ;\n+\n+}\n+#END of SUB\n+\n+\n+\n+1 ;\n+\n+\n+__END__\n+\n+=head1 SUPPORT\n+\n+You can find documentation for this module with the perldoc command.\n+\n+ perldoc csv.pm\n+\n+=head1 Exports\n+\n+=over 4\n+\n+=item :ALL is get_spectra\n+\n+=back\n+\n+=head1 AUTHOR\n+\n+Gabriel Cretin E<lt>gabriel.cretin@clermont.inra.frE<gt>\n+Franck Giacomoni E<lt>franck.giacomoni@clermont.inra.frE<gt>\n+\n+=head1 LICENSE\n+\n+This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.\n+\n+=head1 VERSION\n+\n+version 1 : ??\n+\n+=cut\n' |
b |
diff -r 000000000000 -r e3d43b8c987b planemo_test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/planemo_test.sh Mon Dec 05 08:32:04 2016 -0500 |
b |
@@ -0,0 +1,3 @@ +planemo conda_init --conda_prefix /tmp/mc/ +planemo conda_install --conda_prefix /tmp/mc/ . +planemo test --install_galaxy --conda_dependency_resolution --conda_prefix /tmp/mc/ --no_cleanup |
b |
diff -r 000000000000 -r e3d43b8c987b t/data/inputSpectra_unit_test.msp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/t/data/inputSpectra_unit_test.msp Mon Dec 05 08:32:04 2016 -0500 |
b |
@@ -0,0 +1,10 @@ +Name: Unknown 1 +DB.idx: -1 +rt: 10.58 +Class: Unknown +rt.sd: 0.003 +Num Peaks: 19 +73.0465 826983.38; 74.0481 70018.08; 75.0319 69475.73; 100.0573 37477.24; 103.0227 43054.28; +116.0884 1433179.62; 117.0905 151975.23; 118.0869 53105.64; 128.0526 26404.77; 131.0359 22647.44; +133.0438 22141.56; 147.0666 255488.28; 48.066 49965.66; 149.0551 37762.38; 190.1069 72568.23; +191.1063 18017.34; 192.1023 6460.8; 207.0333 35435.81; 218.1028 30528.82; \ No newline at end of file |
b |
diff -r 000000000000 -r e3d43b8c987b t/data/peakspectra_test.msp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/t/data/peakspectra_test.msp Mon Dec 05 08:32:04 2016 -0500 |
b |
@@ -0,0 +1,45 @@ +Name: Unknown 1 +DB.idx: -9 +rt: 24.53 +Class: Unknown +rt.sd: 0.01 +Num Peaks: 19 + 73.0465 57.7027030289; 74.0481 4.8855062564; 75.0319 4.847663826; 100.0573 2.6149715972; 103.0227 3.004109143; + 116.0884 100; 117.0905 10.6040602224; 118.0869 3.7054420297; 128.0526 1.8423908372; 131.0359 1.5802234196; + 133.0438 1.5449256807; 147.0666 17.8266754868; 148.066 3.4863501617; 149.0551 2.6348672192; 190.1069 5.0634427805; + 191.1063 1.257158541; 192.1023 0.4508018332; 207.0333 2.4725309728; 218.1028 2.1301461153; + +Name: Histidine +DB.idx: -1 +rt: 10.58 +Class: Unknown +rt.sd: 0.003 +Num Peaks: 32 +39.022 16; 41.038 38; 41.039 12; 42.034 11; 43.041 7; +54.034 169; 55.042 104; 56.049 999; 56.05 9; 66.032 166; +66.033 34; 67.04 16; 68.048 86; 68.049 13; 69.044 41; +81.044 469; 82.052 695; 83.059 999; 93.044 606; 95.06 112; +110.07 999; 111.054 16; 112.086 2; 138.065 2; 156.074 999; + +Name: L-Alanine +DB.idx: -1 +rt: 10.58 +Class: Unknown +rt.sd: 0.003 +Num Peaks: 32 +73.0465 826983.38; 74.0481 70018.08; 75.0319 69475.73; 100.0573 37477.24; 103.0227 43054.28; +116.0884 1433179.62; 117.0905 151975.23; 118.0869 53105.64; 128.0526 26404.77; 131.0359 22647.44; +133.0438 22141.56; 147.0666 255488.28; 48.066 49965.66; 149.0551 37762.38; 190.1069 72568.23; +191.1063 18017.34; 192.1023 6460.8; 207.0333 35435.81; 218.1028 30528.82; + +Name: L-Leucine +DB.idx: -1 +rt: 10.58 +Class: Unknown +rt.sd: 0.003 +Num Peaks: 32 +59.0317 111211.31; 73.0465 1904156.25; 73.0887 176802.89; 74.0478 172098.67; 75.034 126044.58; +100.0578 148105.59; 102.0732 557823.12; 103.0737 58556.5; 116.0893 113683.96; 131.0348 50693.96; +133.0477 79174.27; 142.1041 51780.19; 147.0656 486292; 148.0669 84540.63; 149.0594 53340.05; +158.1362 4905104; 159.1367 769335.25; 159.1838 164298.34; 160.1347 213437.45; 170.0993 56866.69; +218.1033 189619.22; 232.155 215419.53; 233.1535 69567.91; 260.1492 87687.36; \ No newline at end of file |
b |
diff -r 000000000000 -r e3d43b8c987b t/golm_ws_LibrarySearch_test.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/t/golm_ws_LibrarySearch_test.t Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,656 @@\n+#! perl\n+use diagnostics;\n+use warnings;\n+no warnings qw/void/;\n+use strict;\n+no strict "refs" ;\n+use Test::More qw( no_plan );\n+use FindBin ;\n+use Carp ;\n+\n+## Specific Modules\n+use lib $FindBin::Bin ;\n+my $binPath = $FindBin::Bin ;\n+\n+\n+use lib::golm_ws_api_test qw( :ALL ) ;\n+\n+## To launch the right sequence : API, MSP...\n+my $sequence = \'MSP\' ; \n+my $current_test = 1 ;\n+\n+\n+#### #### ##### ###### ################################################ ###### ##### ##### ###### ######\n+\n+\t\t\t\t\t\t\t\t## START of API SEQUENCE ## \n+\t\t\t\t\t\t\t\n+#### #### ##### ###### ################################################ ###### ##### ##### ###### ######\n+\n+\n+if ($sequence eq "API") {\n+\t\n+\t## testing api module of golm wrapper.\n+\t## \t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+\tprint "\\n\\t\\t\\t * * * * * * \\n" ;\n+\tprint "\\t * * * - - - Test Golm API module - - - * * * \\n\\n" ;\n+\n+\t##\t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+\n+\n+\n+##\t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+# ARGS : $ws_url, $ws_proxy\n+# Structure of res : @ret = [ %val1, %val2, ... %valN ]\n+print "\\n** Test $current_test test_query_golm with default parameters **\\n" ; $current_test++;\n+is_deeply( test_query_golmTest("http://gmd.mpimp-golm.mpg.de", "http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx"),\n+1,\n+"Method \\\'test_query_golm\\\' Test Golm webservice with default spectrum");\n+\n+print "\\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\\n" ;\n+\n+\n+\n+##\t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+# ARGS : $ws_url, $ws_proxy\n+## \t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+print "\\n** Test $current_test connectWSlibrarySearchGolm with real uri and proxy **\\n" ; $current_test++;\n+isa_ok( connectWSlibrarySearchGolmTest("http://gmd.mpimp-golm.mpg.de", "http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx"), \'SOAP::Lite\' );\n+\n+\n+\n+##\t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+# ARGS : $ri, $riWindow, $gcColumn, $spectrum, $maxHits, $JaccardDistanceThreshold,\n+#\t\t$s12GowerLegendreDistanceThreshold,$DotproductDistanceThreshold,$HammingDistanceThreshold,\n+#\t\t$EuclideanDistanceThreshold,$ws_url, $ws_proxy,$default_ri, $default_ri_window, $default_gc_column\n+# Structure of res : @limited_hits = [ %val1, %val2, ... %valN ], @json_res = [ ojson1, ojson2,... ]\n+print "\\n** Test $current_test LibrarySearch with a list of mzs, intensities and real search parameters **\\n" ; $current_test++;\n+is_deeply(LibrarySearchTest(1898, 5, "VAR5", "70 3 71 3 72 16 73 999 74 87 75 78 76 4 77 5 81 1 82 6 83 13 84 4 85 3 86 4 87 5 88 4 89 52 90 4 91 2 97 2 98 1 99 4 100 12 101 16 102 9 103 116 104 11 105 26 106 2 107 1 111 1 112 1 113 4 114 11 115 7 116 5 117 93 118 9 119 8 126 1 127 3 128 3 129 101 130 19 131 25 132 4 133 60 134 8 135 4 140 1 141 1 142 4 143 13 144 2 145 6 146 1 147 276 148 44 149 27 150 3 151 1 156 1 157 70 158 12 159 5 160 148 161 26 162 7 163 8 164 1 168 1 169 2 170 1 172 3 173 4 174 1 175 4 177 4 186 2 187 1 189 28 190 7 191 13 192 2 193 1 201 5 202 1 203 3 204 23 205 162 206 31 207 16 208 2 210 2 214 1 215 2 216 8 217 88 218 18 219 8 220 1 221 6 222 1 229 23 230 6 231 11 232 3 233 4 234 3 235 1 243 1 244 2 245 1 246 2 247 1 256 1 262 3 263 1 269 2 270 1 274 4 275 1 277 4 278 1 291 7 292 2 293 1 300 1 305 4 306 1 307 4 308 1 318 1 319 122 320 37 321 17 322 3 323 1 343 1 364 2 365 1",\n+\t\t\t\t\t\t\t2, 0.9, 0.9, 0.5, 500, 0.5,"http://gmd.mpimp-golm.mpg.de", "http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx",1500, 3000, "VAR5"),\n+\t\t\n+ [\n+ {\n+ \'analyteID\' => \'0a2b3536-2245-4c0e-bdbc-495766eeec67\',\n+ \'metaboliteID\' => \'68513255-fc44-4041-bc4b-4fd2fae7541d\',\n+ \'analyteName\' => \'Glucose (1MEOX) (5TMS) BP\',\n+ \'spectrumName\' => \'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-'..b'135\',\'140\',\'141\',\'142\',\'143\',\'144\',\'145\',\'146\',\'147\',\'148\',\'149\',\'150\',\'151\',\'156\',\'157\',\'158\',\'159\',\'160\',\'161\',\'162\',\'163\',\'164\',\'168\',\'169\',\'170\',\'172\',\'173\',\'174\',\'175\',\'177\',\'186\',\'187\',\'189\',\'190\',\'191\',\'192\',\'193\',\'201\',\'202\',\'203\',\'204\',\'205\',\'206\',\'207\',\'208\',\'210\',\'214\',\'215\',\'216\',\'217\',\'218\',\'219\',\'220\',\'221\',\'222\',\'229\',\'230\',\'231\',\'232\',\'233\',\'234\',\'235\',\'243\',\'244\',\'245\',\'246\',\'247\',\'256\',\'262\',\'263\',\'269\',\'270\',\'274\',\'275\',\'277\',\'278\',\'291\',\'292\',\'293\',\'300\',\'305\',\'306\',\'307\',\'308\',\'318\',\'319\',\'320\',\'321\',\'322\',\'323\',\'343\',\'364\',\'365\'\n+ ], \n+ [\n+ \'3\',\'3\',\'16\',\'999\',\'87\',\'78\',\'4\',\'5\',\'1\',\'6\',\'13\',\'4\',\'3\',\'4\',\'5\',\'4\',\'52\',\'4\',\'2\',\'2\',\'1\',\'4\',\'12\',\'16\',\'9\',\'116\',\'11\',\'26\',\'2\',\'1\',\'1\',\'1\',\'4\',\'11\',\'7\',\'5\',\'93\',\'9\',\'8\',\'1\',\'3\',\'3\',\'101\',\'19\',\'25\',\'4\',\'60\',\'8\',\'4\',\'1\',\'1\',\'4\',\'13\',\'2\',\'6\',\'1\',\'276\',\'44\',\'27\',\'3\',\'1\',\'1\',\'70\',\'12\',\'5\',\'148\',\'26\',\'7\',\'8\',\'1\',\'1\',\'2\',\'1\',\'3\',\'4\',\'1\',\'4\',\'4\',\'2\',\'1\',\'28\',\'7\',\'13\',\'2\',\'1\',\'5\',\'1\',\'3\',\'23\',\'162\',\'31\',\'16\',\'2\',\'2\',\'1\',\'2\',\'8\',\'88\',\'18\',\'8\',\'1\',\'6\',\'1\',\'23\',\'6\',\'11\',\'3\',\'4\',\'3\',\'1\',\'1\',\'2\',\'1\',\'2\',\'1\',\'1\',\'3\',\'1\',\'2\',\'1\',\'4\',\'1\',\'4\',\'1\',\'7\',\'2\',\'1\',\'1\',\'4\',\'1\',\'4\',\'1\',\'1\',\'122\',\'37\',\'17\',\'3\',\'1\',\'1\',\'2\',\'1\'\n+ ]),\n+\t\t[\n+ 999,276,162,148,122,116,101,93,88,87,78,70,60,52,44,37,31,28,27,26,26,25,23,23,19,18,17,16,16,16,13,13,13,12,12,11,11,11,9,9,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\n+ ],\n+"Method \\\'sorting_descending_intensities\\\' return the arrays of ints sorted by descending intensity values");\n+\n+\n+\n+##\t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+# ARGS : $ref_mzs_res, $ref_ints_res\n+# Structure of res: [ mz1,mz2,... ] , [ int1,int2,... ]\n+print "\\n** Test $current_test sorting_descending_intensities remove redundant masses **\\n" ; $current_test++;\n+is_deeply(remove_redundants1Test(\n+\t\t[\n+ \'70\',\'71\',\'71\',\'73\'\n+\t\t], \n+ [\n+ \'147\',\'259\',\'276\',\'45\'\n+ ]),\n+\t\t[\n+ \'70\',\'71\',\'73\'\n+ ],\n+"Method \\\'sorting_descending_intensities\\\' return the arrays of masses of non redundant ions");\n+\n+\n+\n+##\t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+# ARGS : $ref_mzs_res, $ref_ints_res\n+# Structure of res: [ mz1,mz2,... ] , [ int1,int2,... ]\n+print "\\n** Test $current_test sorting_descending_intensities remove redundant masses **\\n" ; $current_test++;\n+is_deeply(remove_redundants2Test(\n+\t\t[\n+ \'70\',\'71\',\'71\',\'73\'\n+\t\t], \n+ [\n+ \'147\',\'259\',\'276\',\'45\'\n+ ]),\n+\t\t[\n+ \'147\',\'276\',\'45\'\n+ ],\n+"Method \\\'sorting_descending_intensities\\\' return the arrays of ints of non redundant ions");\n+\n+\n+\n+##\t\t- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n+# ARGS : $uniq_total_intensities\n+# Structure of res: [ [int1,int2,...] , ... ]\n+print "\\n** Test $current_test apply_relative_intensity make intensities to relative **\\n" ; $current_test++;\n+is_deeply(apply_relative_intensityTest(\n+\t\t[\n+ [\n+ \'1433179.62\',\'826983.38\',\'255488.28\',\'151975.23\',\'72568.23\',\'70018.08\',\'69475.73\',\'53105.64\',\'49965.66\',\'43054.28\',\'37762.38\',\'37477.24\',\'35435.81\',\'30528.82\',\'26404.77\',\'22647.44\',\'22141.56\',\'18017.34\',\'6460.8\'\n+ ]\n+ ], \n+ ),\n+\t\t[\n+ [\n+ \'100\',\'57.7027030289476\',\'17.8266754867753\',\'10.6040602224025\',\'5.063442780466\',\'4.88550625636164\',\'4.84766382597598\',\'3.7054420296599\',\'3.48635016174735\',\'3.00410914299772\',\'2.63486721922546\',\'2.61497159720985\',\'2.47253097277507\',\'2.13014611525107\',\'1.84239083723504\',\'1.58022341958784\',\'1.54492568070428\',\'1.25715854095106\',\'0.450801833199386\'\n+ ]\n+ ],\n+"Method \\\'apply_relative_intensity\\\' return the arrays of relativ intensities");\n+\n+\n+\n+}\n+else {\n+\tcroak "Can\\\'t launch any test : no sequence clearly defined !!!!\\n" ;\n+}\n+\n' |
b |
diff -r 000000000000 -r e3d43b8c987b t/lib/golm_ws_api_test.pm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/t/lib/golm_ws_api_test.pm Mon Dec 05 08:32:04 2016 -0500 |
[ |
@@ -0,0 +1,172 @@ +package lib::golm_ws_api_test ; + +use diagnostics; # this gives you more debugging information +use warnings; # this warns you of bad practices +use strict; # this prevents silly errors +use Exporter ; +use Carp ; + +use Data::Dumper ; + +our $VERSION = "1.0"; +our @ISA = qw(Exporter); +our @EXPORT = qw( keep_only_max_massesTest keep_only_max_intensitiesTest test_query_golmTest connectWSlibrarySearchGolmTest LibrarySearchTest encode_spectrum_for_queryTest get_mzsTest get_intensitiesTest get_masses_from_stringTest get_intensities_from_stringTest sorting_descending_intensities1Test sorting_descending_intensities2Test remove_redundants1Test remove_redundants2Test filter_scores_golm_resultsTest filter_replica_resultsTest apply_relative_intensityTest); +our %EXPORT_TAGS = ( ALL => [qw( keep_only_max_massesTest keep_only_max_intensitiesTest test_query_golmTest connectWSlibrarySearchGolmTest LibrarySearchTest encode_spectrum_for_queryTest get_mzsTest get_intensitiesTest get_masses_from_stringTest get_intensities_from_stringTest sorting_descending_intensities1Test sorting_descending_intensities2Test remove_redundants1Test remove_redundants2Test filter_scores_golm_resultsTest filter_replica_resultsTest apply_relative_intensityTest)] ); + + +use lib::golm_ws_api qw( :ALL ) ; +use lib::msp qw( :ALL ) ; +use lib::output qw( :ALL ) ; + +### Test API module ### + +sub test_query_golmTest { + my ($ws_url, $ws_proxy) = @_; + my $oBih = lib::golm_ws_api->new() ; + my ($status) = $oBih->test_query_golm($ws_url, $ws_proxy) ; + return ($status) ; +} + + +sub connectWSlibrarySearchGolmTest { + my ($ws_url, $ws_proxy) = @_ ; + my $oBih = lib::golm_ws_api->new() ; + my ($soap) = $oBih->connectWSlibrarySearchGolm($ws_url, $ws_proxy) ; + return ($soap) ; +} + + +sub LibrarySearchTest { + my ($ri, $riWindow, $gcColumn, $spectrum, $maxHits, $JaccardDistanceThreshold, + $s12GowerLegendreDistanceThreshold,$DotproductDistanceThreshold,$HammingDistanceThreshold, + $EuclideanDistanceThreshold,$ws_url, $ws_proxy,$default_ri, $default_ri_window, $default_gc_column) = @_ ; + my $oBih = lib::golm_ws_api->new() ; + my ($limited_hits) =$oBih->LibrarySearch($ri, $riWindow, $gcColumn, $spectrum, $maxHits, $JaccardDistanceThreshold, + $s12GowerLegendreDistanceThreshold,$DotproductDistanceThreshold,$HammingDistanceThreshold, + $EuclideanDistanceThreshold,$ws_url, $ws_proxy,$default_ri, $default_ri_window, $default_gc_column) ; + return ($limited_hits) ; +} + + +sub filter_scores_golm_resultsTest { + my ($results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold, + $DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold) = @_ ; + my $oBih = lib::golm_ws_api->new() ; + my ($filtered_res_before_hits_limited) = $oBih->filter_scores_golm_results($results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold, + $DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold) ; + return ($filtered_res_before_hits_limited) ; +} + + +sub filter_replica_resultsTest { + my ($results) = @_ ; + my $oBih = lib::golm_ws_api->new() ; + my ($sortAnalytes) = $oBih->filter_replica_results($results) ; + return ($sortAnalytes) ; +} + + + + +### Test MSP module ### + +sub get_mzsTest { + my ($inputSpectra, $mzRes) = @_; + my $omsp = lib::msp->new(); + my $mzs = $omsp->get_mzs ($inputSpectra, $mzRes) ; + return($mzs) ; +} + + +sub get_intensitiesTest { + my ($inputSpectra) = @_; + my $omsp = lib::msp->new(); + my $intensities = $omsp->get_intensities($inputSpectra) ; + return($intensities) ; +} + + +sub get_masses_from_stringTest { + my ($inputSpectra, $mzRes) = @_; + my $omsp = lib::msp->new(); + my ($ref_mzs_res) = $omsp->get_masses_from_string($inputSpectra, $mzRes) ; + return($ref_mzs_res) ; +} + + +sub get_intensities_from_stringTest { + my ($inputSpectra) = @_; + my $omsp = lib::msp->new(); + my ($ref_ints_res) = $omsp->get_intensities_from_string($inputSpectra) ; + return($ref_ints_res) ; +} + + +sub keep_only_max_massesTest { + my ($ref_mzs_res, $maxIons) = @_; + my $omsp = lib::msp->new(); + my ($mzs_res_sorted) = $omsp->keep_only_max_masses($ref_mzs_res, $maxIons) ; + return($mzs_res_sorted) ; +} + + +sub keep_only_max_intensitiesTest { + my ($ref_ints_res, $maxIons) = @_; + my $omsp = lib::msp->new(); + my ($ints_res_sorted) = $omsp->keep_only_max_intensities($ref_ints_res, $maxIons) ; + return($ints_res_sorted) ; +} + + +sub sorting_descending_intensities1Test { + my ($uniq_total_masses, $uniq_total_intensities) = @_; + my $omsp = lib::msp->new(); + my ($mzs_res_sorted, $ints_res_sorted) = $omsp->sorting_descending_intensities($uniq_total_masses, $uniq_total_intensities) ; + return($mzs_res_sorted) ; +} + + +sub sorting_descending_intensities2Test { + my ($uniq_total_masses, $uniq_total_intensities) = @_; + my $omsp = lib::msp->new(); + my ($mzs_res_sorted, $ints_res_sorted) = $omsp->sorting_descending_intensities($uniq_total_masses, $uniq_total_intensities) ; + return($ints_res_sorted) ; +} + + +sub encode_spectrum_for_queryTest { + my ($mzs_res_sorted, $relative_ints_res) = @_; + my $omsp = lib::msp->new(); + my $encoded_spectra = $omsp->encode_spectrum_for_query($mzs_res_sorted, $relative_ints_res) ; + return ($encoded_spectra) ; +} + + +sub remove_redundants1Test { + my ($ref_mzs_res, $ref_ints_res) = @_; + my $omsp = lib::msp->new(); + my ($uniq_masses , $uniq_intensities) = $omsp->remove_redundants($ref_mzs_res, $ref_ints_res, $ref_mzs_res, $ref_ints_res) ; + return ($uniq_masses ) ; +} + + +sub remove_redundants2Test { + my ($ref_mzs_res, $ref_ints_res) = @_; + my $omsp = lib::msp->new(); + my ($uniq_masses , $uniq_intensities) = $omsp->remove_redundants($ref_mzs_res, $ref_ints_res, $ref_mzs_res, $ref_ints_res) ; + return ($uniq_intensities) ; +} + + +sub apply_relative_intensityTest { + my ($uniq_total_intensities) = @_; + my $omsp = lib::msp->new(); + my ($relative_ints_res) = $omsp->apply_relative_intensity($uniq_total_intensities) ; + return ($relative_ints_res) ; +} + + + + + +1 ; \ No newline at end of file |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/KHanaoka_peakspectra.msp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/KHanaoka_peakspectra.msp Mon Dec 05 08:32:04 2016 -0500 |
b |
b'@@ -0,0 +1,995 @@\n+Name: Unknown 1\n+DB.idx: -1\n+rt: 21.716\n+Class: Unknown\n+rt.sd: 0.0034\n+Num Peaks: 35\n+ 34 1872; 36 4218; 37 39432; 38 76320; 39 394560; \n+ 40 63368; 41 582144; 42 606848; 43 431680; 44 44888; \n+ 45 499264; 46 17176; 47 15103; 49 2157; 50 3843; \n+ 51 2281; 52 2201; 53 15926; 54 5466; 55 274496; \n+ 56 14999; 60 2631168; 61 67568; 62 10726; 68 8040; \n+ 69 45736; 70 23664; 71 72120; 73 877056; 74 33392; \n+ 75 3772; 87 39608; 88 45784; 89 14154; 90 896; \n+\n+Name: Unknown 2\n+DB.idx: -2\n+rt: 3.513\n+Class: Unknown\n+rt.sd: 0.0015\n+Num Peaks: 49\n+ 38 1882; 39 92080; 40 19592; 41 480832; 42 32344; \n+ 43 236928; 44 9597; 50 1989; 51 6101; 52 3524; \n+ 53 33960; 54 7422; 55 180224; 56 962752; 57 2366976; \n+ 58 104656; 59 1985; 63 1022; 65 6145; 66 2078; \n+ 67 18928; 68 3234; 69 57408; 70 19928; 71 145600; \n+ 72 8488; 77 5033; 78 1226; 79 5690; 80 844; \n+ 81 5024; 82 1579; 83 32352; 84 4554; 85 118632; \n+ 86 8063; 93 979; 95 1734; 97 10545; 98 6114; \n+ 99 106120; 100 8584; 111 2090; 112 72392; 113 45768; \n+ 114 3665; 154 609; 155 9266; 156 1436; \n+\n+Name: Unknown 3\n+DB.idx: -3\n+rt: 23.84\n+Class: Unknown\n+rt.sd: 0.0026\n+Num Peaks: 54\n+ 37 7073; 38 20224; 39 248384; 40 35488; 41 550912; \n+ 42 136384; 43 525248; 44 31760; 45 194496; 46 8497; \n+ 47 6316; 49 2397; 50 19512; 51 29464; 52 10230; \n+ 53 63488; 54 19584; 55 630656; 56 186368; 57 1009344; \n+ 58 51240; 59 165376; 60 333120; 61 23528; 62 4084; \n+ 63 3412; 65 3729; 67 8115; 68 3773; 69 46152; \n+ 70 45040; 71 9504; 73 576704; 74 555520; 75 51688; \n+ 76 3653; 77 3575; 81 9534; 82 3455; 83 158144; \n+ 84 9385; 87 64288; 88 5187; 97 16776; 98 6155; \n+ 99 12940; 100 3073; 101 34232; 102 2837; 103 5049; \n+ 104 2812; 115 1848; 117 3546; 132 1975; \n+\n+Name: Unknown 4\n+DB.idx: -4\n+rt: 24.238\n+Class: Unknown\n+rt.sd: 0.0028\n+Num Peaks: 45\n+ 37 3606; 38 10762; 39 129176; 40 21632; 41 270080; \n+ 42 135168; 43 183936; 44 14971; 45 164352; 46 5267; \n+ 47 4082; 50 5846; 51 9314; 52 3492; 53 20872; \n+ 54 7617; 55 156672; 56 91288; 57 100008; 58 6730; \n+ 59 19280; 60 922752; 61 93328; 62 6487; 63 2150; \n+ 65 2738; 67 4649; 68 5233; 69 31944; 70 30864; \n+ 71 7478; 73 431168; 74 61272; 75 4651; 80 4459; \n+ 83 10227; 87 129904; 97 4419; 98 4035; 99 8020; \n+ 105 2057; 119 3784; 129 740; 159 4461; 160 722; \n+\n+Name: Unknown 5\n+DB.idx: -5\n+rt: 26.546\n+Class: Unknown\n+rt.sd: 0.0025\n+Num Peaks: 60\n+ 33 3190; 36 2157; 37 34912; 38 84760; 39 481600; \n+ 40 120640; 41 529984; 42 236608; 43 278784; 44 32992; \n+ 45 97512; 46 5979; 47 8652; 49 10603; 50 58488; \n+ 51 87648; 52 35960; 53 84160; 54 27776; 55 256192; \n+ 56 78720; 57 27384; 58 46680; 59 3982; 61 25072; \n+ 62 40008; 63 64536; 64 16117; 65 200256; 66 258688; \n+ 67 431680; 68 56176; 69 148288; 70 82096; 71 41056; \n+ 72 2862; 77 6989; 78 1293; 79 32568; 80 2950; \n+ 81 9911; 82 14707; 83 45944; 84 51584; 85 4913; \n+ 86 1722; 92 1862; 93 14284; 94 15111; 95 54368; \n+ 97 862592; 98 107328; 99 331648; 100 23656; 101 2449; \n+ 110 2377; 111 53768; 112 409600; 113 29776; 114 2942; \n+\n+Name: Unknown 6\n+DB.idx: -6\n+rt: 23.158\n+Class: Unknown\n+rt.sd: 0.0035\n+Num Peaks: 33\n+ 37 3709; 38 9334; 39 84024; 40 11251; 41 150592; \n+ 42 93848; 43 101920; 44 11079; 45 123480; 46 5126; \n+ 47 3737; 49 1890; 50 8897; 51 9698; 52 3186; \n+ 53 14335; 54 5375; 55 101248; 56 53168; 57 25432; \n+ 59 11406; 60 799488; 61 38376; 62 3749; 69 4646; \n+ 73 301120; 74 28576; 75 2881; 82 2492; 83 5137; \n+ 85 7704; 87 18536; 101 1836; \n+\n+Name: Unknown 7\n+DB.idx: -7\n+rt: 19.993\n+Class: Unknown\n+'..b'73; 37 5160; 38 10876; 39 75120; 40 23392; \n+ 41 168000; 42 216640; 43 194240; 44 19136; 49 1081; \n+ 50 5031; 51 6820; 52 6564; 53 11846; 54 16062; \n+ 55 113368; 56 45456; 58 20848; 68 8387; 70 70072; \n+ 71 32624; 81 2986; 82 6637; 98 66552; 99 358784; \n+ 100 22944; 101 1811; \n+\n+Name: Unknown 77\n+DB.idx: -77\n+rt: 21.336\n+Class: Unknown\n+rt.sd: 0.0052\n+Num Peaks: 57\n+ 37 1762; 38 4149; 39 45912; 40 10100; 41 101384; \n+ 42 24760; 43 188608; 44 11271; 45 14933; 49 1024; \n+ 50 4455; 51 6470; 52 2867; 53 18296; 54 8838; \n+ 55 58168; 56 122136; 57 50072; 58 99160; 59 14146; \n+ 63 1062; 65 3140; 66 1321; 67 15114; 68 17552; \n+ 69 37416; 70 22688; 71 226624; 72 20648; 77 3079; \n+ 79 3851; 80 913; 81 11450; 82 6495; 83 3289; \n+ 84 28784; 85 80680; 86 8077; 87 7288; 93 2543; \n+ 95 116288; 96 9813; 97 18256; 99 4363; 100 6846; \n+ 109 2516; 110 66224; 111 7536; 112 2475; 113 10898; \n+ 114 832; 123 1617; 125 1099; 128 44704; 129 3917; \n+ 140 733; 156 3370; \n+\n+Name: Unknown 78\n+DB.idx: -78\n+rt: 1.539\n+Class: Unknown\n+rt.sd: 0.0027\n+Num Peaks: 5\n+ 41 18320; 42 30264; 43 96280; 44 175872; 71 5191; \n+\n+Name: Unknown 79\n+DB.idx: -79\n+rt: 3.856\n+Class: Unknown\n+rt.sd: 0.005\n+Num Peaks: 19\n+ 37 1496; 38 3323; 39 25816; 40 4451; 41 58112; \n+ 42 18944; 44 131200; 45 17200; 50 2820; 51 2634; \n+ 52 909; 53 4564; 55 9369; 57 56040; 58 51176; \n+ 67 2231; 68 1267; 71 4428; 85 2075; \n+\n+Name: Unknown 80\n+DB.idx: -80\n+rt: 9.59\n+Class: Unknown\n+rt.sd: 0\n+Num Peaks: 9\n+ 38 1147; 39 7072; 50 915; 53 3684; 57 91800; \n+ 58 4287; 59 2754; 67 2405; 68 2017; \n+\n+Name: Unknown 81\n+DB.idx: -81\n+rt: 1.835\n+Class: Unknown\n+rt.sd: 0.0027\n+Num Peaks: 5\n+ 37 3251; 38 3725; 57 26000; 58 91472; 59 3480; \n+\n+Name: Unknown 82\n+DB.idx: -82\n+rt: 25.149\n+Class: Unknown\n+rt.sd: 0.0059\n+Num Peaks: 55\n+ 39 13048; 41 26008; 43 52064; 51 5166; 52 2079; \n+ 53 6989; 55 18096; 60 42016; 61 5468; 63 2229; \n+ 65 4990; 67 4048; 68 1801; 69 7099; 70 5910; \n+ 71 6618; 73 24528; 77 13327; 78 3002; 79 13280; \n+ 80 1774; 81 4542; 83 2732; 84 2345; 87 10928; \n+ 88 5885; 91 14913; 93 9365; 95 7327; 96 1669; \n+ 101 3775; 102 694; 105 8665; 107 11170; 109 4780; \n+ 115 3417; 116 1690; 119 5552; 121 7269; 122 5696; \n+ 129 1682; 131 2352; 133 5886; 134 1347; 135 10330; \n+ 136 2725; 144 1203; 147 1465; 149 5619; 159 3219; \n+ 162 2148; 163 737; 177 72744; 178 9094; 192 2312; \n+\n+Name: Unknown 83\n+DB.idx: -83\n+rt: 24.011\n+Class: Unknown\n+rt.sd: 0.0055\n+Num Peaks: 16\n+ 53 4710; 65 1762; 66 3244; 67 6272; 79 3060; \n+ 80 899; 81 15255; 82 2946; 95 29704; 96 3518; \n+ 97 4416; 98 5238; 104 1486; 111 3146; 123 1175; \n+ 154 636; \n+\n+Name: Unknown 84\n+DB.idx: -84\n+rt: 25.326\n+Class: Unknown\n+rt.sd: 0.0043\n+Num Peaks: 16\n+ 38 2086; 39 7881; 52 2800; 53 4601; 55 11121; \n+ 66 11622; 69 3875; 71 9009; 80 1160; 84 4865; \n+ 94 22680; 97 5436; 109 17560; 111 2595; 126 20216; \n+ 127 1557; \n+\n+Name: Unknown 85\n+DB.idx: -85\n+rt: 21.652\n+Class: Unknown\n+rt.sd: 0.0059\n+Num Peaks: 17\n+ 65 2127; 67 7430; 77 3782; 79 4142; 81 7575; \n+ 91 4626; 93 2850; 94 1628; 95 4707; 107 3144; \n+ 109 8172; 119 2064; 123 7560; 137 9572; 151 1039; \n+ 152 8226; 153 922; \n+\n+Name: Unknown 86\n+DB.idx: -86\n+rt: 8.182\n+Class: Unknown\n+rt.sd: 0.0051\n+Num Peaks: 5\n+ 39 6052; 53 2158; 55 9398; 83 4878; 84 3889; \n+\n+Name: Unknown 87\n+DB.idx: -87\n+rt: 16.837\n+Class: Unknown\n+rt.sd: 0\n+Num Peaks: 8\n+ 65 1470; 66 1131; 67 7522; 93 763; 95 4282; \n+ 96 911; 109 1473; 124 2052; \n+\n+Name: Unknown 88\n+DB.idx: -88\n+rt: 5.355\n+Class: Unknown\n+rt.sd: 0.006\n+Num Peaks: 6\n+ 38 1373; 39 7330; 63 771; 65 1045; 91 7439; \n+ 92 4675; \n+\n' |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/input01_peakspectra_test.msp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input01_peakspectra_test.msp Mon Dec 05 08:32:04 2016 -0500 |
b |
@@ -0,0 +1,45 @@ +Name: Unknown 1 +DB.idx: -9 +rt: 24.53 +Class: Unknown +rt.sd: 0.01 +Num Peaks: 19 + 73.0465 57.7027030289; 74.0481 4.8855062564; 75.0319 4.847663826; 100.0573 2.6149715972; 103.0227 3.004109143; + 116.0884 100; 117.0905 10.6040602224; 118.0869 3.7054420297; 128.0526 1.8423908372; 131.0359 1.5802234196; + 133.0438 1.5449256807; 147.0666 17.8266754868; 148.066 3.4863501617; 149.0551 2.6348672192; 190.1069 5.0634427805; + 191.1063 1.257158541; 192.1023 0.4508018332; 207.0333 2.4725309728; 218.1028 2.1301461153; + +Name: Histidine +DB.idx: -1 +rt: 10.58 +Class: Unknown +rt.sd: 0.003 +Num Peaks: 32 +39.022 16; 41.038 38; 41.039 12; 42.034 11; 43.041 7; +54.034 169; 55.042 104; 56.049 999; 56.05 9; 66.032 166; +66.033 34; 67.04 16; 68.048 86; 68.049 13; 69.044 41; +81.044 469; 82.052 695; 83.059 999; 93.044 606; 95.06 112; +110.07 999; 111.054 16; 112.086 2; 138.065 2; 156.074 999; + +Name: L-Alanine +DB.idx: -1 +rt: 10.58 +Class: Unknown +rt.sd: 0.003 +Num Peaks: 32 +73.0465 826983.38; 74.0481 70018.08; 75.0319 69475.73; 100.0573 37477.24; 103.0227 43054.28; +116.0884 1433179.62; 117.0905 151975.23; 118.0869 53105.64; 128.0526 26404.77; 131.0359 22647.44; +133.0438 22141.56; 147.0666 255488.28; 48.066 49965.66; 149.0551 37762.38; 190.1069 72568.23; +191.1063 18017.34; 192.1023 6460.8; 207.0333 35435.81; 218.1028 30528.82; + +Name: L-Leucine +DB.idx: -1 +rt: 10.58 +Class: Unknown +rt.sd: 0.003 +Num Peaks: 32 +59.0317 111211.31; 73.0465 1904156.25; 73.0887 176802.89; 74.0478 172098.67; 75.034 126044.58; +100.0578 148105.59; 102.0732 557823.12; 103.0737 58556.5; 116.0893 113683.96; 131.0348 50693.96; +133.0477 79174.27; 142.1041 51780.19; 147.0656 486292; 148.0669 84540.63; 149.0594 53340.05; +158.1362 4905104; 159.1367 769335.25; 159.1838 164298.34; 160.1347 213437.45; 170.0993 56866.69; +218.1033 189619.22; 232.155 215419.53; 233.1535 69567.91; 260.1492 87687.36; \ No newline at end of file |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/input03_peakspectra_full.msp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input03_peakspectra_full.msp Mon Dec 05 08:32:04 2016 -0500 |
b |
b'@@ -0,0 +1,3757 @@\n+Name: Unknown 1\n+DB.idx: -1\n+rt: 10.58\n+Class: Unknown\n+rt.sd: 0.003\n+Num Peaks: 160\n+ 55 40314.09; 57 39666.66; 58 117253; 59 677577.6; 60 56097.84; \n+ 61 173955.5; 62 11853.13; 63 19465.01; 66 37117.49; 70 85974.89; \n+ 71 135751.7; 72 173308.6; 73 5335904; 74 1773116; 75 1130890; \n+ 76 47236.83; 77 233307.3; 78 15697.65; 79 29390.93; 83 13286.93; \n+ 85 80810.94; 87 91606.72; 88 10340.81; 91 57229.14; 93 20851.29; \n+ 96 16237.26; 97 8766.646; 103 398350.4; 104 68853.35; 105 201451.8; \n+ 106 25043.94; 107 131979.1; 108 11708.79; 109 27774.11; 112 14260.24; \n+ 113 69933.57; 114 11544.05; 115 994961.7; 116 138815.4; 118 111185.6; \n+ 119 465199.8; 120 75950.29; 121 387381.6; 122 34006.61; 123 124406.5; \n+ 124 9676.763; 126 42647.79; 131 1217735; 132 195872.2; 133 2353792; \n+ 134 439221.1; 135 1294353; 136 170966; 137 480564.7; 138 54602.24; \n+ 139 37958.8; 143 16718.33; 145 100214.3; 146 15950; 147 3649214; \n+ 148 807123.6; 149 521549.1; 150 60887.41; 151 1657276; 152 179564; \n+ 153 108396.2; 161 60145.87; 162 11348.56; 163 248920.8; 164 48565.58; \n+ 165 340817.3; 166 55741.57; 167 150228.6; 168 18083.43; 169 13815.75; \n+ 175 65379.76; 176 59587.9; 177 324377.7; 178 76562.77; 179 298168.2; \n+ 180 54267.2; 181 717115.2; 182 97851.98; 183 248922.2; 184 30285.29; \n+ 185 19109.6; 189 987185.2; 190 214684.8; 191 2699204; 192 739378.4; \n+ 193 2445972; 194 584608.1; 195 558411.3; 196 80516.16; 197 144499.9; \n+ 198 19412.17; 199 11822.63; 205 1511283; 206 316598.7; 207 3009868; \n+ 208 942554; 209 786295.1; 210 135996.4; 211 2270410; 212 428942.7; \n+ 213 235514.7; 214 22584.48; 221 692183.1; 222 158001.2; 223 94198.75; \n+ 224 21684.31; 225 2950784; 226 754932.4; 227 1010403; 228 156790.7; \n+ 229 76590.65; 237 25770.03; 239 81222.09; 240 15526.31; 241 16938.92; \n+ 252 39808.12; 253 356191.5; 254 78516.85; 255 380827.9; 256 78121.55; \n+ 257 45404.27; 266 11011.84; 267 606684.1; 268 155373.1; 269 616047.6; \n+ 270 133622; 271 74292.19; 272 12069.44; 282 14274.69; 283 3516256; \n+ 284 1468884; 285 875615.8; 286 155002.1; 287 43266.43; 295 6946.443; \n+ 297 24340.22; 298 621608.8; 299 7373908; 300 5241822; 301 4332284; \n+ 302 1955755; 303 608978; 304 82828.24; 311 8346.149; 313 209749.8; \n+ 314 4568441; 315 2678491; 316 1750448; 317 353801.2; 318 93147.38; \n+ 373 7971.866; 386 8840.255; 387 41685.39; 388 13870.91; 389 7984.017; \n+\n+Name: Unknown 2\n+DB.idx: -2\n+rt: 10.01\n+Class: Unknown\n+rt.sd: 0.0043\n+Num Peaks: 88\n+ 51 16703.25; 52 380867.6; 53 30163.21; 55 24586; 56 57029.79; \n+ 57 43294.02; 58 100856.6; 59 547872.3; 60 143714.9; 61 127264.6; \n+ 62 10866.54; 64 39271.45; 65 217460.8; 66 1439916; 67 119270.2; \n+ 69 194498.4; 70 212451.6; 71 202159.5; 72 324006.9; 73 3794744; \n+ 74 1691253; 75 1167727; 76 106912.9; 78 10671.04; 79 943499.4; \n+ 80 82785.07; 84 16757.22; 85 161240.7; 86 85479.57; 87 711852.6; \n+ 88 84652.09; 89 35860.14; 90 88682.02; 91 9738.906; 96 14737.86; \n+ 98 15395.02; 99 1094075; 100 571740.3; 101 209874.3; 102 98311.56; \n+ 103 205119.2; 104 31715.82; 106 17008.92; 113 247468.8; 114 144721.3; \n+ 115 514764.7; 116 190587.5; 117 246094.2; 118 77297.08; 119 59302.23; \n+ 120 8981.871; 127 43197.05; 130 1997238; 131 1739692; 132 1344230; \n+ 133 653444; 134 117292.5; 139 27881.55; 140 8072.469; 141 9566.898; \n+ 143 44248.63; 146 2075065; 147 7306894; 148 4217708; 149 2712131; \n+ 150 324295.4; 151 82001.02; 155 22129; 156 45726.4; 157 453799.7; \n+ 158 71340.59; 159 66603.2; 171 1297166; 172 236051.3; 173 2392999; \n+ 174 418304.5; 175 204766.8; 176 22869.09; 188 46616.42; 189 6516182; \n+ '..b'71; 356 5948.731; 357 2713.801; 637 132.0638; \n+\n+Name: Unknown 259\n+DB.idx: -259\n+rt: 40.732\n+Class: Unknown\n+rt.sd: 0.0052\n+Num Peaks: 6\n+ 361 22544.38; 362 7201.522; 540 645.1866; 598 234.125; 685 203.2645; \n+ 687 116.0833; \n+\n+Name: Unknown 260\n+DB.idx: -260\n+rt: 10.125\n+Class: Unknown\n+rt.sd: 0.0018\n+Num Peaks: 5\n+ 110 12523.01; 246 20714.98; 296 664.0708; 317 3194.976; 386 777.3291; \n+\n+Name: Unknown 261\n+DB.idx: -261\n+rt: 14.288\n+Class: Unknown\n+rt.sd: 0.0023\n+Num Peaks: 7\n+ 128 5658.238; 142 6555.299; 145 20498.37; 172 9908.334; 173 13230.74; \n+ 262 12449.08; 288 3248.639; \n+\n+Name: Unknown 262\n+DB.idx: -262\n+rt: 19.273\n+Class: Unknown\n+rt.sd: 0.0026\n+Num Peaks: 6\n+ 219 15878.12; 235 18227.79; 236 2995.79; 250 3243.214; 279 4806.065; \n+ 326 2273.204; \n+\n+Name: Unknown 263\n+DB.idx: -263\n+rt: 33.399\n+Class: Unknown\n+rt.sd: 0.0044\n+Num Peaks: 18\n+ 51 860.7897; 65 1960.854; 78 5357.05; 79 18147.83; 80 9473.151; \n+ 81 6175.055; 91 16553; 92 3775.079; 93 8387.371; 94 3589.522; \n+ 106 5069.495; 107 4562.395; 108 1437.691; 120 4272.2; 121 3871.155; \n+ 339 3584.281; 340 1171.169; 410 299.0889; \n+\n+Name: Unknown 264\n+DB.idx: -264\n+rt: 20.828\n+Class: Unknown\n+rt.sd: 0.0057\n+Num Peaks: 5\n+ 155 18138.61; 245 7207.309; 246 14229.72; 263 4331.94; 292 7677.863; \n+\n+Name: Unknown 265\n+DB.idx: -265\n+rt: 27.56\n+Class: Unknown\n+rt.sd: 0.0035\n+Num Peaks: 19\n+ 67 13829.51; 68 3741.161; 79 11376.14; 80 4538.476; 81 13604.12; \n+ 82 5447.306; 92 1185.03; 94 3015.562; 95 8482.491; 96 4112.988; \n+ 107 3027.184; 108 1774.569; 109 3206.564; 110 1888.511; 121 3627.146; \n+ 122 1382.57; 249 4779.928; 279 3255.304; 404 2215.44; \n+\n+Name: Unknown 266\n+DB.idx: -266\n+rt: 35.314\n+Class: Unknown\n+rt.sd: 0.0044\n+Num Peaks: 21\n+ 315 11086.65; 316 3000.158; 317 1756.204; 318 13373.44; 386 309.8913; \n+ 387 6042.867; 388 1930.015; 389 2955.111; 419 691.2655; 433 1118; \n+ 470 651.9877; 471 439.2653; 472 281.2268; 507 336.5208; 569 281.88; \n+ 659 417.3409; 660 277.0143; 749 803.0336; 750 621.144; 751 546.3498; \n+ 753 131.7206; \n+\n+Name: Unknown 267\n+DB.idx: -267\n+rt: 10.763\n+Class: Unknown\n+rt.sd: 0.0052\n+Num Peaks: 5\n+ 110 8653.071; 246 4802.216; 272 2574.069; 317 2461.668; 386 639.219; \n+\n+Name: Unknown 268\n+DB.idx: -268\n+rt: 15.468\n+Class: Unknown\n+rt.sd: 0\n+Num Peaks: 5\n+ 167 2110.356; 383 7598.037; 384 2643.975; 385 1153.693; 386 377.6694; \n+\n+Name: Unknown 269\n+DB.idx: -269\n+rt: 32.226\n+Class: Unknown\n+rt.sd: 0.0026\n+Num Peaks: 29\n+ 84 5742.877; 373 2003.69; 374 3683; 386 416.8275; 461 710.2527; \n+ 462 345.2388; 490 208.7868; 547 943.1202; 548 1905.801; 549 925.5266; \n+ 550 626.2581; 551 3485.777; 552 1623.737; 553 712.486; 563 134.004; \n+ 564 236.025; 578 168.4707; 579 204.7347; 580 160.5804; 622 167.3; \n+ 637 519.9504; 638 1005.09; 639 727.2866; 640 349.3224; 642 155.0023; \n+ 653 360.8278; 654 465.8554; 655 338.9422; 656 190.0804; \n+\n+Name: Unknown 270\n+DB.idx: -270\n+rt: 44.137\n+Class: Unknown\n+rt.sd: 0\n+Num Peaks: 5\n+ 236 2819.389; 237 4878.922; 496 5112.832; 497 2088.046; 634 165.1467; \n+\n+Name: Unknown 271\n+DB.idx: -271\n+rt: 29.555\n+Class: Unknown\n+rt.sd: 0.0035\n+Num Peaks: 6\n+ 56 4389.736; 87 2936.118; 239 3348.377; 312 1468.037; 656 190.2346; \n+ 657 151.8169; \n+\n+Name: Unknown 272\n+DB.idx: -272\n+rt: 24.357\n+Class: Unknown\n+rt.sd: 0.005\n+Num Peaks: 6\n+ 357 2130.336; 418 490.4404; 447 2680.172; 537 1421.114; 538 849.382; \n+ 539 637.6297; \n+\n+Name: Unknown 273\n+DB.idx: -273\n+rt: 36.319\n+Class: Unknown\n+rt.sd: 0.0015\n+Num Peaks: 6\n+ 391 1035.031; 518 2536.004; 519 1278.679; 520 365.104; 702 239.6701; \n+ 703 140.9453; \n+\n+Name: Unknown 274\n+DB.idx: -274\n+rt: 30.613\n+Class: Unknown\n+rt.sd: 0.0036\n+Num Peaks: 5\n+ 407 1646.148; 408 641.563; 422 1438.547; 519 422.6036; 625 162.0096; \n+\n' |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output01.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output01.html Mon Dec 05 08:32:04 2016 -0500 |
b |
b"@@ -0,0 +1,11 @@\n+<!DOCTYPE html><html><head><meta charset='UTF-8'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/buttons/1.1.2/css/buttons.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css'/><link rel='stylesheet' href='https://code.getmdl.io/1.1.3/material.light_green-orange.min.css' /><link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons'> <style type='text/css' class='init'>\n+.card-wide.mdl-card{width:900px;height:550px}.card-wide>.mdl-card__menu{color:#fff}.list-icon{width:800px}#table_id_wrapper{overflow-x:auto;margin-left:20px;margin-right:20px;padding-top:20px}.toolbar{float:left}.dt-buttons{padding-right:10px;margin-bottom:20px}table.dataTable thead th, table.dataTable thead td{border-bottom:1px solid #A7A7A7}div.dt-button-collection{width:140px;margin-top:7px;padding:6px 6px 3px 6px;border:1px solid rgba(0,0,0,0.4);background-color:rgba(171, 171, 171, 0.8);border-radius:10px;box-shadow:0px 0px 100px rgba(255, 255, 255, 0.3)}div.dt-button-collection a.dt-button.active:not(.disabled){box-shadow:inset 1px 1px 6px rgba(102,102,102,0.69)}.buttons-copy,.buttons-print,.buttons-collection{height:40px;margin-right:10px;padding-right:0px;padding-left:0px;margin-left:10px}.mdl-button--accent.mdl-button--accent.mdl-button--raised,.mdl-button--accent.mdl-button--accent.mdl-button--fab{background-color:#E3E3E3}.mdl-button{height:40px;line-height:40px}.mdl-button:hover{transform:translateY(-3px);box-shadow:0px 6px 15px #c1c1c1}a{color:rgb(0,0,0)}.ripple{overflow:hidden;position:relative;box-sizing:border-box;transform:translate3d(0,0,0)}.ripple-effect{position:absolute;border-radius:50%;background-color:rgba(255,255,255,0.5);user-select:none;pointer-events:none;padding:0;margin:0;opacity:0.6;transform:translate3d(-50%,-50%,0)}.mdl-shadow--3dp{box-shadow:0 25px 150px rgba(0,0,0,.33),0 3px 3px -2px rgba(0,0,0,.2),0 1px 8px 0 rgba(0,0,0,.12)}.mdl-tooltip.is-active{animation:pulse 1000ms cubic-bezier(0,0,.2,1)forwards;z-index:1000}.mdl-tooltip{border-radius:20px;line-height:18px}.mdl-list__item{line-height:1.25 }.mdl-list__item-icon{font-size:35px}#large_card{height:850px}#dist_table th,td{padding:15px;text-align:left}.mdl-card__supporting-text{color:rgba(0,0,0,.87);font-size:16px;line-height:22px;text-align:justify}.dataTables_wrapper .dataTables_length{float:left;padding-top:11px;padding-left:30px}table.display tbody tr:hover td{background-color:#B9DBD5 !important}.selected{background-color:#96ADA6 !important }.buttons-colvis{padding-left:15px;padding-right:15px}select{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n+</style> <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js'></script> <script type='text/javascript' language='javascript' src='https://code.jquery.com/jquery-1.12.3.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.2.0/js/buttons.colVis.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/select/1.1.2/js/dataTables.select.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.1.2/js/dataTables.buttons.min.js'></script> "..b'ard__title\'><h1 class=\'mdl-card__title-text\'>What can the table do ?</h1></div><div class=\'mdl-card__supporting-text\'><ul class=\'list-icon mdl-list\'><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>filter_list</i> By default, the spectra numbers (N\xc2\xb0 Spectra) are ordered by ascending values. You can manage your data ordering as you wish. You can even order data according to multiple columns: SHIFT + LEFT CLICK on column headers. This will order by the first column clicked, then the second, etc. You can sort data specifically by clicking on any entry in boxes under each columns. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>delete_sweep</i> You can delete multiple entries that are selected: Select wanted entries and click on the button DELETE SELECTED ROWS. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>remove_red_eye</i> You have the possibility to toggle columns by clicking on SHOW MORE. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>save</i> You can print, copy, or export to excel and csv the table on its actual state, with the three buttons right above the table. </span></li></ul></div></div> </br><div id="large_card" class=\'card-wide mdl-card mdl-shadow--3dp\'> <figure class=\'mdl-card__media\' style=\'background-color: white\'> <img src=\'http://image005.flaticon.com/1/svg/125/125279.svg\' style=\'height: 60px; width: 60px;\'> </figure><div class=\'mdl-card__title\'><h1 class=\'mdl-card__title-text\'>Distances scores</h1></div><div class=\'mdl-card__supporting-text\'><table id="dist_table" style="color: rgba(0,0,0,.87);"><tr><td style="padding-right:10px;><b style="white-space: nowrap;"><b>S12Gower-Legendre Distance</b></td><td> The distance measure S12GowLeg = sqrt(1 - s12) is derived from the S12 coefficient of Gower & Legendre defined as s12 = a / sqrt((a + b)(a + c)), with "a" representing the number of positions at which both spectra are in "on-state" and "b" respectively "c" representing the number of positions at which only the query spectrum or the hit spectrum are in "on-state".</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Hamming Distance</b></td><td> In information theory, the Hamming distance between two strings of equal length is the number of positions for which the corresponding symbols are different. Put another way, it measures the minimum number of substitutions required to change one into the other, or the number of errors that transformed one string into the other.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Jaccard Distance</b></td><td>Number of matches (a mass with appropriate intensity in both spectra) divided by the sum of matches and mismatches (a mass where only one of both spectra has a intensity). The jaccard distance is a binary distance.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Dotproduct Distance</b></td><td>The Dotproduct distance is summing the multiplied intensities over all matching peaks within both spectra. Here, to satisfy the conditions of a metric I) non-negativity, II) identity of indiscernibles, III) symmetry and IV) subadditivity / triangle inequality, we use 1-Dotproduct. Both spectra are normalised prior to the spectral vector norm in that way, that the absolute value of the squared intensities is equal to 1.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Euclidean Distance</b></td><td>The Euclid is the square root of the sum of the squared differences over all matching peaks.</td></tr></table></div></div></div> </br></br></center> </section> </main></div></body></html>\n+\t\t\n+\t\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output01.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output01.tabular Mon Dec 05 08:32:04 2016 -0500 |
[ |
@@ -0,0 +1,13 @@ +"Num Spectre" "Analyte Name" "Spectrum Name" "Retention Index" "RI Discrepancy" "DotproductDistance" "EuclideanDistance" "JaccardDistance" "HammingDistance" "s12GowerLegendreDistance" "Spectrum ID" "Metabolite ID" "Analyte ID" +"1" "Glucose (1MEOX) (5TMS) BP" "Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-12]" "1899.05493" "1.054953" "0.4861827" "0.0871585" "0.8515625" "109" "0.784043431" "833ab58c-a8fa-4389-8b42-95e618cafb91" "68513255-fc44-4041-bc4b-4fd2fae7541d" "0a2b3536-2245-4c0e-bdbc-495766eeec67" +"1" "Galactose (1MEOX) (5TMS) BP" "Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--6]" "1902.42212" "4.422119" "0.4875465" "0.0869417042" "0.852713168" "110" "0.784997046" "6e056b61-4da9-46e3-970b-680a22e4afd0" "dd3ea070-54a6-4ea7-b99b-a6e975fdd204" "1c3ad0aa-ee78-4542-93b3-aa9fdf07add1" +"1" "Idose (1MEOX) (5TMS) BP" "Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1]" "1897.25439" "0.745605469" "0.4901554" "0.0861777" "0.8560606" "113" "0.7877858" "d00de57d-6fab-49d0-9aee-25e259da9180" "ab025068-f464-4bc6-9c92-994c29387db2" "6f4e926f-d7ef-47b6-a52c-91ff88ca567a" +"1" "Allantoin (5TMS)" "Allantoin (5TMS) [A188009-ambient-na-5]" "1896.99829" "1.001709" "0.4914575" "0.09410148" "0.8558559" "95" "0.804233432" "817f2a03-9df5-46e3-973c-b2a9675109cf" "a999f0d6-0285-41d9-a6ba-b705987b663c" "65bb54d2-6bf7-4a53-aa22-8abf71240005" +"1" "Glucose, U-13C- (1MEOX) (5TMS) BP" "Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2]" "1901.63" "3.63" "0.497226775" "0.0910335854" "0.85" "102" "0.788321555" "27d4dcdd-d351-4976-8ef9-76a0cc53f631" "441faccb-2631-4e7d-b6ca-99437265ccb8" "96441b61-2891-4e81-93dc-d0fc0ad175d4" +"2" "" "no results" "" "" "" "" "" "" "" "" "" "" +"3" "Glucose (1MEOX) (5TMS) BP" "Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-12]" "1899.05493" "1.054953" "0.487051964" "0.0868976042" "0.8604651" "111" "0.79687" "833ab58c-a8fa-4389-8b42-95e618cafb91" "68513255-fc44-4041-bc4b-4fd2fae7541d" "0a2b3536-2245-4c0e-bdbc-495766eeec67" +"3" "Galactose (1MEOX) (5TMS) BP" "Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--6]" "1902.42212" "4.422119" "0.4883618" "0.08667906" "0.86153847" "112" "0.797758937" "6e056b61-4da9-46e3-970b-680a22e4afd0" "dd3ea070-54a6-4ea7-b99b-a6e975fdd204" "1c3ad0aa-ee78-4542-93b3-aa9fdf07add1" +"3" "Idose (1MEOX) (5TMS) BP" "Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1]" "1897.25439" "0.745605469" "0.491137743" "0.0859391" "0.864661634" "115" "0.8003591" "d00de57d-6fab-49d0-9aee-25e259da9180" "ab025068-f464-4bc6-9c92-994c29387db2" "6f4e926f-d7ef-47b6-a52c-91ff88ca567a" +"3" "Allantoin (5TMS)" "Allantoin (5TMS) [A188009-ambient-na-5]" "1896.99829" "1.001709" "0.4918884" "0.09372151" "0.8660714" "97" "0.817842841" "817f2a03-9df5-46e3-973c-b2a9675109cf" "a999f0d6-0285-41d9-a6ba-b705987b663c" "65bb54d2-6bf7-4a53-aa22-8abf71240005" +"3" "Glucose, U-13C- (1MEOX) (5TMS) BP" "Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2]" "1901.63" "3.63" "0.49828127" "0.0907527059" "0.8595041" "104" "0.8015494" "27d4dcdd-d351-4976-8ef9-76a0cc53f631" "441faccb-2631-4e7d-b6ca-99437265ccb8" "96441b61-2891-4e81-93dc-d0fc0ad175d4" +"4" "" "no results" "" "" "" "" "" "" "" "" "" "" |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output01.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output01.txt Mon Dec 05 08:32:04 2016 -0500 |
[ |
@@ -0,0 +1,13 @@ +Num Spectre Analyte Name Spectrum Name Retention Index RI Discrepancy DotproductDistance EuclideanDistance JaccardDistance HammingDistance s12GowerLegendreDistance Spectrum ID Metabolite ID Analyte ID +1 Glucose (1MEOX) (5TMS) BP Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-12] 1899.05493 1.054953 0.4861827 0.0871585 0.8515625 109 0.784043431 833ab58c-a8fa-4389-8b42-95e618cafb91 68513255-fc44-4041-bc4b-4fd2fae7541d 0a2b3536-2245-4c0e-bdbc-495766eeec67 +1 Galactose (1MEOX) (5TMS) BP Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--6] 1902.42212 4.422119 0.4875465 0.0869417042 0.852713168 110 0.784997046 6e056b61-4da9-46e3-970b-680a22e4afd0 dd3ea070-54a6-4ea7-b99b-a6e975fdd204 1c3ad0aa-ee78-4542-93b3-aa9fdf07add1 +1 Idose (1MEOX) (5TMS) BP Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1] 1897.25439 0.745605469 0.4901554 0.0861777 0.8560606 113 0.7877858 d00de57d-6fab-49d0-9aee-25e259da9180 ab025068-f464-4bc6-9c92-994c29387db2 6f4e926f-d7ef-47b6-a52c-91ff88ca567a +1 Allantoin (5TMS) Allantoin (5TMS) [A188009-ambient-na-5] 1896.99829 1.001709 0.4914575 0.09410148 0.8558559 95 0.804233432 817f2a03-9df5-46e3-973c-b2a9675109cf a999f0d6-0285-41d9-a6ba-b705987b663c 65bb54d2-6bf7-4a53-aa22-8abf71240005 +1 Glucose, U-13C- (1MEOX) (5TMS) BP Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2] 1901.63 3.63 0.497226775 0.0910335854 0.85 102 0.788321555 27d4dcdd-d351-4976-8ef9-76a0cc53f631 441faccb-2631-4e7d-b6ca-99437265ccb8 96441b61-2891-4e81-93dc-d0fc0ad175d4 +2 no results +3 Glucose (1MEOX) (5TMS) BP Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-12] 1899.05493 1.054953 0.487051964 0.0868976042 0.8604651 111 0.79687 833ab58c-a8fa-4389-8b42-95e618cafb91 68513255-fc44-4041-bc4b-4fd2fae7541d 0a2b3536-2245-4c0e-bdbc-495766eeec67 +3 Galactose (1MEOX) (5TMS) BP Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--6] 1902.42212 4.422119 0.4883618 0.08667906 0.86153847 112 0.797758937 6e056b61-4da9-46e3-970b-680a22e4afd0 dd3ea070-54a6-4ea7-b99b-a6e975fdd204 1c3ad0aa-ee78-4542-93b3-aa9fdf07add1 +3 Idose (1MEOX) (5TMS) BP Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1] 1897.25439 0.745605469 0.491137743 0.0859391 0.864661634 115 0.8003591 d00de57d-6fab-49d0-9aee-25e259da9180 ab025068-f464-4bc6-9c92-994c29387db2 6f4e926f-d7ef-47b6-a52c-91ff88ca567a +3 Allantoin (5TMS) Allantoin (5TMS) [A188009-ambient-na-5] 1896.99829 1.001709 0.4918884 0.09372151 0.8660714 97 0.817842841 817f2a03-9df5-46e3-973c-b2a9675109cf a999f0d6-0285-41d9-a6ba-b705987b663c 65bb54d2-6bf7-4a53-aa22-8abf71240005 +3 Glucose, U-13C- (1MEOX) (5TMS) BP Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2] 1901.63 3.63 0.49828127 0.0907527059 0.8595041 104 0.8015494 27d4dcdd-d351-4976-8ef9-76a0cc53f631 441faccb-2631-4e7d-b6ca-99437265ccb8 96441b61-2891-4e81-93dc-d0fc0ad175d4 +4 no results |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output02.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output02.html Mon Dec 05 08:32:04 2016 -0500 |
b |
b"@@ -0,0 +1,11 @@\n+<!DOCTYPE html><html><head><meta charset='UTF-8'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/buttons/1.1.2/css/buttons.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css'/><link rel='stylesheet' href='https://code.getmdl.io/1.1.3/material.light_green-orange.min.css' /><link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons'> <style type='text/css' class='init'>\n+.card-wide.mdl-card{width:900px;height:550px}.card-wide>.mdl-card__menu{color:#fff}.list-icon{width:800px}#table_id_wrapper{overflow-x:auto;margin-left:20px;margin-right:20px;padding-top:20px}.toolbar{float:left}.dt-buttons{padding-right:10px;margin-bottom:20px}table.dataTable thead th, table.dataTable thead td{border-bottom:1px solid #A7A7A7}div.dt-button-collection{width:140px;margin-top:7px;padding:6px 6px 3px 6px;border:1px solid rgba(0,0,0,0.4);background-color:rgba(171, 171, 171, 0.8);border-radius:10px;box-shadow:0px 0px 100px rgba(255, 255, 255, 0.3)}div.dt-button-collection a.dt-button.active:not(.disabled){box-shadow:inset 1px 1px 6px rgba(102,102,102,0.69)}.buttons-copy,.buttons-print,.buttons-collection{height:40px;margin-right:10px;padding-right:0px;padding-left:0px;margin-left:10px}.mdl-button--accent.mdl-button--accent.mdl-button--raised,.mdl-button--accent.mdl-button--accent.mdl-button--fab{background-color:#E3E3E3}.mdl-button{height:40px;line-height:40px}.mdl-button:hover{transform:translateY(-3px);box-shadow:0px 6px 15px #c1c1c1}a{color:rgb(0,0,0)}.ripple{overflow:hidden;position:relative;box-sizing:border-box;transform:translate3d(0,0,0)}.ripple-effect{position:absolute;border-radius:50%;background-color:rgba(255,255,255,0.5);user-select:none;pointer-events:none;padding:0;margin:0;opacity:0.6;transform:translate3d(-50%,-50%,0)}.mdl-shadow--3dp{box-shadow:0 25px 150px rgba(0,0,0,.33),0 3px 3px -2px rgba(0,0,0,.2),0 1px 8px 0 rgba(0,0,0,.12)}.mdl-tooltip.is-active{animation:pulse 1000ms cubic-bezier(0,0,.2,1)forwards;z-index:1000}.mdl-tooltip{border-radius:20px;line-height:18px}.mdl-list__item{line-height:1.25 }.mdl-list__item-icon{font-size:35px}#large_card{height:850px}#dist_table th,td{padding:15px;text-align:left}.mdl-card__supporting-text{color:rgba(0,0,0,.87);font-size:16px;line-height:22px;text-align:justify}.dataTables_wrapper .dataTables_length{float:left;padding-top:11px;padding-left:30px}table.display tbody tr:hover td{background-color:#B9DBD5 !important}.selected{background-color:#96ADA6 !important }.buttons-colvis{padding-left:15px;padding-right:15px}select{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n+</style> <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js'></script> <script type='text/javascript' language='javascript' src='https://code.jquery.com/jquery-1.12.3.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.2.0/js/buttons.colVis.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/select/1.1.2/js/dataTables.select.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.1.2/js/dataTables.buttons.min.js'></script> "..b'ard__title\'><h1 class=\'mdl-card__title-text\'>What can the table do ?</h1></div><div class=\'mdl-card__supporting-text\'><ul class=\'list-icon mdl-list\'><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>filter_list</i> By default, the spectra numbers (N\xc2\xb0 Spectra) are ordered by ascending values. You can manage your data ordering as you wish. You can even order data according to multiple columns: SHIFT + LEFT CLICK on column headers. This will order by the first column clicked, then the second, etc. You can sort data specifically by clicking on any entry in boxes under each columns. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>delete_sweep</i> You can delete multiple entries that are selected: Select wanted entries and click on the button DELETE SELECTED ROWS. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>remove_red_eye</i> You have the possibility to toggle columns by clicking on SHOW MORE. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>save</i> You can print, copy, or export to excel and csv the table on its actual state, with the three buttons right above the table. </span></li></ul></div></div> </br><div id="large_card" class=\'card-wide mdl-card mdl-shadow--3dp\'> <figure class=\'mdl-card__media\' style=\'background-color: white\'> <img src=\'http://image005.flaticon.com/1/svg/125/125279.svg\' style=\'height: 60px; width: 60px;\'> </figure><div class=\'mdl-card__title\'><h1 class=\'mdl-card__title-text\'>Distances scores</h1></div><div class=\'mdl-card__supporting-text\'><table id="dist_table" style="color: rgba(0,0,0,.87);"><tr><td style="padding-right:10px;><b style="white-space: nowrap;"><b>S12Gower-Legendre Distance</b></td><td> The distance measure S12GowLeg = sqrt(1 - s12) is derived from the S12 coefficient of Gower & Legendre defined as s12 = a / sqrt((a + b)(a + c)), with "a" representing the number of positions at which both spectra are in "on-state" and "b" respectively "c" representing the number of positions at which only the query spectrum or the hit spectrum are in "on-state".</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Hamming Distance</b></td><td> In information theory, the Hamming distance between two strings of equal length is the number of positions for which the corresponding symbols are different. Put another way, it measures the minimum number of substitutions required to change one into the other, or the number of errors that transformed one string into the other.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Jaccard Distance</b></td><td>Number of matches (a mass with appropriate intensity in both spectra) divided by the sum of matches and mismatches (a mass where only one of both spectra has a intensity). The jaccard distance is a binary distance.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Dotproduct Distance</b></td><td>The Dotproduct distance is summing the multiplied intensities over all matching peaks within both spectra. Here, to satisfy the conditions of a metric I) non-negativity, II) identity of indiscernibles, III) symmetry and IV) subadditivity / triangle inequality, we use 1-Dotproduct. Both spectra are normalised prior to the spectral vector norm in that way, that the absolute value of the squared intensities is equal to 1.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Euclidean Distance</b></td><td>The Euclid is the square root of the sum of the squared differences over all matching peaks.</td></tr></table></div></div></div> </br></br></center> </section> </main></div></body></html>\n+\t\t\n+\t\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output02.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output02.tabular Mon Dec 05 08:32:04 2016 -0500 |
[ |
@@ -0,0 +1,9 @@ +"Num Spectre" "Analyte Name" "Spectrum Name" "Retention Index" "RI Discrepancy" "DotproductDistance" "EuclideanDistance" "JaccardDistance" "HammingDistance" "s12GowerLegendreDistance" "Spectrum ID" "Metabolite ID" "Analyte ID" +"1" "Glucose (1MEOX) (5TMS) BP" "Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]" "1899.05493" "1.054953" "0.00376573764" "0.00648652157" "0.2849162" "51" "0.404159725" "dd5bb721-ce4f-4cec-99ff-de2cb818304d" "68513255-fc44-4041-bc4b-4fd2fae7541d" "0a2b3536-2245-4c0e-bdbc-495766eeec67" +"1" "Idose (1MEOX) (5TMS) BP" "Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1]" "1897.25439" "0.745605469" "0.0041610254" "0.007327365" "0.238709673" "37" "0.367506444" "d00de57d-6fab-49d0-9aee-25e259da9180" "ab025068-f464-4bc6-9c92-994c29387db2" "6f4e926f-d7ef-47b6-a52c-91ff88ca567a" +"1" "Galactose (1MEOX) (5TMS) BP" "Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--9]" "1902.42212" "4.422119" "0.004838638" "0.007118009" "0.31937173" "61" "0.428936034" "c1226b8e-944e-4d32-ae01-8a9d12465d34" "dd3ea070-54a6-4ea7-b99b-a6e975fdd204" "1c3ad0aa-ee78-4542-93b3-aa9fdf07add1" +"1" "Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP" "Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-1]" "1893.44385" "4.55619574" "0.048192542" "0.02056068" "0.4473684" "102" "0.5224351" "2b364030-9fa7-4066-b685-52d7946110a6" "00ce759f-d1f9-492e-89f7-b7400a34c72d" "da9d76f5-a2af-4fd1-89e1-c8426ad16980" +"1" "Glucose, U-13C- (1MEOX) (5TMS) BP" "Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2]" "1901.63" "3.63" "0.0682447553" "0.027927408" "0.514285743" "90" "0.586345" "27d4dcdd-d351-4976-8ef9-76a0cc53f631" "441faccb-2631-4e7d-b6ca-99437265ccb8" "96441b61-2891-4e81-93dc-d0fc0ad175d4" +"1" "Allantoin (5TMS)" "Allantoin (5TMS) [A188009-ambient-na-6]" "1896.99829" "1.001709" "0.07800486" "0.02792935" "0.615" "123" "0.6662978" "063fa226-ed62-4d9f-9d5c-ee52c0974e55" "a999f0d6-0285-41d9-a6ba-b705987b663c" "65bb54d2-6bf7-4a53-aa22-8abf71240005" +"1" "Erythrose-4-phosphate (1MEOX) (4TMS) MP" "Erythrose-4-phosphate (1MEOX) (4TMS) MP [A191009-ambient-na-1]" "1895.98438" "2.01558065" "0.0896345749" "0.0207340773" "0.6666667" "278" "0.6522111" "85927200-53a4-492a-ad57-0a7b1d8a6e85" "d4f07f67-d45b-43b6-bd4c-d08708d1a7ad" "2665f816-5c52-45ed-901e-4481cf048257" +"1" "Pyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP" "Pyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP [A190013-ambient-no-9]" "1902.77417" "4.77417" "0.111977287" "0.0264962576" "0.6551724" "209" "0.673893869" "8bbd7202-8794-4486-8b16-61d8dff4c5bd" "87e988c4-f26c-4e03-9a40-1b0c0b36ca67" "163bf790-e995-46a9-8059-446172ddca0f" |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output02.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output02.txt Mon Dec 05 08:32:04 2016 -0500 |
[ |
@@ -0,0 +1,9 @@ +Num Spectre Analyte Name Spectrum Name Retention Index RI Discrepancy DotproductDistance EuclideanDistance JaccardDistance HammingDistance s12GowerLegendreDistance Spectrum ID Metabolite ID Analyte ID +1 Glucose (1MEOX) (5TMS) BP Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23] 1899.05493 1.054953 0.00376573764 0.00648652157 0.2849162 51 0.404159725 dd5bb721-ce4f-4cec-99ff-de2cb818304d 68513255-fc44-4041-bc4b-4fd2fae7541d 0a2b3536-2245-4c0e-bdbc-495766eeec67 +1 Idose (1MEOX) (5TMS) BP Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1] 1897.25439 0.745605469 0.0041610254 0.007327365 0.238709673 37 0.367506444 d00de57d-6fab-49d0-9aee-25e259da9180 ab025068-f464-4bc6-9c92-994c29387db2 6f4e926f-d7ef-47b6-a52c-91ff88ca567a +1 Galactose (1MEOX) (5TMS) BP Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--9] 1902.42212 4.422119 0.004838638 0.007118009 0.31937173 61 0.428936034 c1226b8e-944e-4d32-ae01-8a9d12465d34 dd3ea070-54a6-4ea7-b99b-a6e975fdd204 1c3ad0aa-ee78-4542-93b3-aa9fdf07add1 +1 Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-1] 1893.44385 4.55619574 0.048192542 0.02056068 0.4473684 102 0.5224351 2b364030-9fa7-4066-b685-52d7946110a6 00ce759f-d1f9-492e-89f7-b7400a34c72d da9d76f5-a2af-4fd1-89e1-c8426ad16980 +1 Glucose, U-13C- (1MEOX) (5TMS) BP Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2] 1901.63 3.63 0.0682447553 0.027927408 0.514285743 90 0.586345 27d4dcdd-d351-4976-8ef9-76a0cc53f631 441faccb-2631-4e7d-b6ca-99437265ccb8 96441b61-2891-4e81-93dc-d0fc0ad175d4 +1 Allantoin (5TMS) Allantoin (5TMS) [A188009-ambient-na-6] 1896.99829 1.001709 0.07800486 0.02792935 0.615 123 0.6662978 063fa226-ed62-4d9f-9d5c-ee52c0974e55 a999f0d6-0285-41d9-a6ba-b705987b663c 65bb54d2-6bf7-4a53-aa22-8abf71240005 +1 Erythrose-4-phosphate (1MEOX) (4TMS) MP Erythrose-4-phosphate (1MEOX) (4TMS) MP [A191009-ambient-na-1] 1895.98438 2.01558065 0.0896345749 0.0207340773 0.6666667 278 0.6522111 85927200-53a4-492a-ad57-0a7b1d8a6e85 d4f07f67-d45b-43b6-bd4c-d08708d1a7ad 2665f816-5c52-45ed-901e-4481cf048257 +1 Pyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP Pyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP [A190013-ambient-no-9] 1902.77417 4.77417 0.111977287 0.0264962576 0.6551724 209 0.673893869 8bbd7202-8794-4486-8b16-61d8dff4c5bd 87e988c4-f26c-4e03-9a40-1b0c0b36ca67 163bf790-e995-46a9-8059-446172ddca0f |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output03.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output03.html Mon Dec 05 08:32:04 2016 -0500 |
b |
b"@@ -0,0 +1,11 @@\n+<!DOCTYPE html><html><head><meta charset='UTF-8'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/buttons/1.1.2/css/buttons.dataTables.min.css'><link rel='stylesheet' type='text/css' href='https://cdn.datatables.net/r/dt/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.9,af-2.0.0,b-1.0.3,b-colvis-1.0.3,b-html5-1.0.3,b-print-1.0.3,se-1.0.1/datatables.min.css'/><link rel='stylesheet' href='https://code.getmdl.io/1.1.3/material.light_green-orange.min.css' /><link rel='stylesheet' href='https://fonts.googleapis.com/icon?family=Material+Icons'> <style type='text/css' class='init'>\n+.card-wide.mdl-card{width:900px;height:550px}.card-wide>.mdl-card__menu{color:#fff}.list-icon{width:800px}#table_id_wrapper{overflow-x:auto;margin-left:20px;margin-right:20px;padding-top:20px}.toolbar{float:left}.dt-buttons{padding-right:10px;margin-bottom:20px}table.dataTable thead th, table.dataTable thead td{border-bottom:1px solid #A7A7A7}div.dt-button-collection{width:140px;margin-top:7px;padding:6px 6px 3px 6px;border:1px solid rgba(0,0,0,0.4);background-color:rgba(171, 171, 171, 0.8);border-radius:10px;box-shadow:0px 0px 100px rgba(255, 255, 255, 0.3)}div.dt-button-collection a.dt-button.active:not(.disabled){box-shadow:inset 1px 1px 6px rgba(102,102,102,0.69)}.buttons-copy,.buttons-print,.buttons-collection{height:40px;margin-right:10px;padding-right:0px;padding-left:0px;margin-left:10px}.mdl-button--accent.mdl-button--accent.mdl-button--raised,.mdl-button--accent.mdl-button--accent.mdl-button--fab{background-color:#E3E3E3}.mdl-button{height:40px;line-height:40px}.mdl-button:hover{transform:translateY(-3px);box-shadow:0px 6px 15px #c1c1c1}a{color:rgb(0,0,0)}.ripple{overflow:hidden;position:relative;box-sizing:border-box;transform:translate3d(0,0,0)}.ripple-effect{position:absolute;border-radius:50%;background-color:rgba(255,255,255,0.5);user-select:none;pointer-events:none;padding:0;margin:0;opacity:0.6;transform:translate3d(-50%,-50%,0)}.mdl-shadow--3dp{box-shadow:0 25px 150px rgba(0,0,0,.33),0 3px 3px -2px rgba(0,0,0,.2),0 1px 8px 0 rgba(0,0,0,.12)}.mdl-tooltip.is-active{animation:pulse 1000ms cubic-bezier(0,0,.2,1)forwards;z-index:1000}.mdl-tooltip{border-radius:20px;line-height:18px}.mdl-list__item{line-height:1.25 }.mdl-list__item-icon{font-size:35px}#large_card{height:850px}#dist_table th,td{padding:15px;text-align:left}.mdl-card__supporting-text{color:rgba(0,0,0,.87);font-size:16px;line-height:22px;text-align:justify}.dataTables_wrapper .dataTables_length{float:left;padding-top:11px;padding-left:30px}table.display tbody tr:hover td{background-color:#B9DBD5 !important}.selected{background-color:#96ADA6 !important }.buttons-colvis{padding-left:15px;padding-right:15px}select{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n+</style> <script type='text/javascript' language='javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js'></script> <script type='text/javascript' language='javascript' src='https://code.jquery.com/jquery-1.12.3.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.2.0/js/buttons.colVis.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/select/1.1.2/js/dataTables.select.min.js'></script> <script type='text/javascript' language='javascript' src='https://cdn.datatables.net/buttons/1.1.2/js/dataTables.buttons.min.js'></script> "..b'ard__title\'><h1 class=\'mdl-card__title-text\'>What can the table do ?</h1></div><div class=\'mdl-card__supporting-text\'><ul class=\'list-icon mdl-list\'><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>filter_list</i> By default, the spectra numbers (N\xc2\xb0 Spectra) are ordered by ascending values. You can manage your data ordering as you wish. You can even order data according to multiple columns: SHIFT + LEFT CLICK on column headers. This will order by the first column clicked, then the second, etc. You can sort data specifically by clicking on any entry in boxes under each columns. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>delete_sweep</i> You can delete multiple entries that are selected: Select wanted entries and click on the button DELETE SELECTED ROWS. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>remove_red_eye</i> You have the possibility to toggle columns by clicking on SHOW MORE. </span></li><li class=\'mdl-list__item\'> <span class=\'mdl-list__item-primary-content\'> <i class=\'material-icons mdl-list__item-icon\'>save</i> You can print, copy, or export to excel and csv the table on its actual state, with the three buttons right above the table. </span></li></ul></div></div> </br><div id="large_card" class=\'card-wide mdl-card mdl-shadow--3dp\'> <figure class=\'mdl-card__media\' style=\'background-color: white\'> <img src=\'http://image005.flaticon.com/1/svg/125/125279.svg\' style=\'height: 60px; width: 60px;\'> </figure><div class=\'mdl-card__title\'><h1 class=\'mdl-card__title-text\'>Distances scores</h1></div><div class=\'mdl-card__supporting-text\'><table id="dist_table" style="color: rgba(0,0,0,.87);"><tr><td style="padding-right:10px;><b style="white-space: nowrap;"><b>S12Gower-Legendre Distance</b></td><td> The distance measure S12GowLeg = sqrt(1 - s12) is derived from the S12 coefficient of Gower & Legendre defined as s12 = a / sqrt((a + b)(a + c)), with "a" representing the number of positions at which both spectra are in "on-state" and "b" respectively "c" representing the number of positions at which only the query spectrum or the hit spectrum are in "on-state".</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Hamming Distance</b></td><td> In information theory, the Hamming distance between two strings of equal length is the number of positions for which the corresponding symbols are different. Put another way, it measures the minimum number of substitutions required to change one into the other, or the number of errors that transformed one string into the other.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;">Jaccard Distance</b></td><td>Number of matches (a mass with appropriate intensity in both spectra) divided by the sum of matches and mismatches (a mass where only one of both spectra has a intensity). The jaccard distance is a binary distance.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Dotproduct Distance</b></td><td>The Dotproduct distance is summing the multiplied intensities over all matching peaks within both spectra. Here, to satisfy the conditions of a metric I) non-negativity, II) identity of indiscernibles, III) symmetry and IV) subadditivity / triangle inequality, we use 1-Dotproduct. Both spectra are normalised prior to the spectral vector norm in that way, that the absolute value of the squared intensities is equal to 1.</td></tr><tr><td style="padding-right:10px;"><b style="white-space: nowrap;padding-right:60px;">Euclidean Distance</b></td><td>The Euclid is the square root of the sum of the squared differences over all matching peaks.</td></tr></table></div></div></div> </br></br></center> </section> </main></div></body></html>\n+\t\t\n+\t\n\\ No newline at end of file\n' |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output03.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output03.tabular Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,412 @@\n+"Num Spectre"\t"Analyte Name"\t"Spectrum Name"\t"Retention Index"\t"RI Discrepancy"\t"DotproductDistance"\t"EuclideanDistance"\t"JaccardDistance"\t"HammingDistance"\t"s12GowerLegendreDistance"\t"Spectrum ID"\t"Metabolite ID"\t"Analyte ID"\n+"1"\t"Erythrose-4-phosphate (1MEOX) (4TMS) MP"\t"Erythrose-4-phosphate (1MEOX) (4TMS) MP [A191009-ambient-na-5]"\t"1895.98438"\t"2.01558065"\t"0.417125851"\t"0.047484044"\t"0.6108108"\t"226"\t"0.628439844"\t"1b34c722-1fd3-4d61-a48b-da2614f96e23"\t"d4f07f67-d45b-43b6-bd4c-d08708d1a7ad"\t"2665f816-5c52-45ed-901e-4481cf048257"\n+"2"\t"Glucose (1MEOX) (5TMS) BP"\t"Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-2]"\t"1899.05493"\t"1.054953"\t"0.4496568"\t"0.07338332"\t"0.7784431"\t"130"\t"0.796108663"\t"34a5b91e-e473-4ed6-9a40-067e0cd944f9"\t"68513255-fc44-4041-bc4b-4fd2fae7541d"\t"0a2b3536-2245-4c0e-bdbc-495766eeec67"\n+"2"\t"Galactose (1MEOX) (5TMS) BP"\t"Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--8]"\t"1902.42212"\t"4.422119"\t"0.4884424"\t"0.0594931729"\t"0.75"\t"207"\t"0.7356502"\t"9c570b75-fe0c-43b8-9311-7b8af17dd55b"\t"dd3ea070-54a6-4ea7-b99b-a6e975fdd204"\t"1c3ad0aa-ee78-4542-93b3-aa9fdf07add1"\n+"3"\t"Galactose (1MEOX) (5TMS) BP"\t"Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--2]"\t"1902.42212"\t"4.422119"\t"0.38635543"\t"0.0406771079"\t"0.8201285"\t"383"\t"0.7784506"\t"0bfc9541-70d5-4d50-89c4-351a87971133"\t"dd3ea070-54a6-4ea7-b99b-a6e975fdd204"\t"1c3ad0aa-ee78-4542-93b3-aa9fdf07add1"\n+"3"\t"Glucose (1MEOX) (5TMS) BP"\t"Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-2]"\t"1899.05493"\t"1.054953"\t"0.397179246"\t"0.06756685"\t"0.75287354"\t"131"\t"0.776361"\t"34a5b91e-e473-4ed6-9a40-067e0cd944f9"\t"68513255-fc44-4041-bc4b-4fd2fae7541d"\t"0a2b3536-2245-4c0e-bdbc-495766eeec67"\n+"3"\t"Idose (1MEOX) (5TMS) BP"\t"Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1]"\t"1897.25439"\t"0.745605469"\t"0.432195932"\t"0.07130679"\t"0.629411757"\t"107"\t"0.6740747"\t"d00de57d-6fab-49d0-9aee-25e259da9180"\t"ab025068-f464-4bc6-9c92-994c29387db2"\t"6f4e926f-d7ef-47b6-a52c-91ff88ca567a"\n+"3"\t"Glucose, U-13C- (1MEOX) (5TMS) BP"\t"Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-10]"\t"1901.63"\t"3.63"\t"0.442519277"\t"0.050286"\t"0.76"\t"266"\t"0.7361843"\t"0d5164ce-be48-454d-979b-ed8b92e32c1d"\t"441faccb-2631-4e7d-b6ca-99437265ccb8"\t"96441b61-2891-4e81-93dc-d0fc0ad175d4"\n+"3"\t"Propanoic acid, 3-amino-3-(4-hydroxyphenyl)- (3TMS)"\t"Propanoic acid, 3-amino-3-(4-hydroxyphenyl)- (3TMS) [A189024-ambient-na-2]"\t"1897.83862"\t"0.161383286"\t"0.444237381"\t"0.04988712"\t"0.717086852"\t"256"\t"0.6841814"\t"c1d0193b-0442-41fe-aab0-fc2438624170"\t"151fe4e1-8ae4-43fc-aa1f-cf6e2a62b7ff"\t"471f9ab0-1cf5-40d3-ba88-edc2458d3242"\n+"3"\t"Pyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP"\t"Pyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP [A190013-ambient-no-1]"\t"1902.77417"\t"4.77417"\t"0.4479848"\t"0.0491427779"\t"0.7304582"\t"271"\t"0.6947696"\t"7508f46a-70b0-43eb-b5b6-0421ff41c0e8"\t"87e988c4-f26c-4e03-9a40-1b0c0b36ca67"\t"163bf790-e995-46a9-8059-446172ddca0f"\n+"3"\t"Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP"\t"Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-1]"\t"1893.44385"\t"4.55619574"\t"0.452163756"\t"0.06325701"\t"0.6106195"\t"138"\t"0.63247633"\t"2b364030-9fa7-4066-b685-52d7946110a6"\t"00ce759f-d1f9-492e-89f7-b7400a34c72d"\t"da9d76f5-a2af-4fd1-89e1-c8426ad16980"\n+"3"\t"Glucose, 2-amino-2-deoxy- (5TMS) MP"\t"Glucose, 2-amino-2-deoxy- (5TMS) MP [A193015-ambient-DL--3]"\t"1899.495"\t"1.49494946"\t"0.474485427"\t"0.0493914336"\t"0.7429306"\t"289"\t"0.7034532"\t"754097ce-c7df-40cb-bec1-ba8b0fad83f8"\t"2b4d44b2-d5ac-4da4-9be6-a4ae9574e4a6"\t"539fe164-0ea9-4509-bf37-fc9bc8073646"\n+"4"\t"Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP"\t"Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-1]"\t"1893.44385"\t"4.55619574"\t"0.40254572"\t"0.05791846"\t"0.445833325"\t"107"\t"0.528728"\t"2b364030-9fa7-4066-b685-52d7946110a6"\t"00ce759f-d1f9-492e-89f7-b7400a34c72d"\t"da9d76f5-a2af-4fd1-89e1-c8426ad16980"\n+"4"\t"Galactose (1MEOX) (5TMS) BP"\t"Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--2]"\t"1902.42212"\t"4.422119"\t"0.4033'..b'EOX) (3TMS) MP"\t"Glucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-2]"\t"1893.44385"\t"4.55619574"\t"0.49236843"\t"0.0423520021"\t"0.5974499"\t"328"\t"0.6059947"\t"8bf796f1-f7cf-4df5-afbc-979b0d95a383"\t"00ce759f-d1f9-492e-89f7-b7400a34c72d"\t"da9d76f5-a2af-4fd1-89e1-c8426ad16980"\n+"229"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"230"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"231"\t"Glucose (1MEOX) (5TMS) BP"\t"Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-24]"\t"1899.05493"\t"1.054953"\t"0.191139191"\t"0.0709223449"\t"0.8947368"\t"68"\t"0.878837764"\t"d87f501a-9d45-4244-9461-f8dd1943930e"\t"68513255-fc44-4041-bc4b-4fd2fae7541d"\t"0a2b3536-2245-4c0e-bdbc-495766eeec67"\n+"231"\t"Glucose, U-13C- (1MEOX) (5TMS) BP"\t"Glucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2]"\t"1901.63"\t"3.63"\t"0.193600208"\t"0.0558800921"\t"0.887096763"\t"110"\t"0.8399839"\t"27d4dcdd-d351-4976-8ef9-76a0cc53f631"\t"441faccb-2631-4e7d-b6ca-99437265ccb8"\t"96441b61-2891-4e81-93dc-d0fc0ad175d4"\n+"231"\t"Galactose (1MEOX) (5TMS) BP"\t"Galactose (1MEOX) (5TMS) BP [A191002-ambient-DL--10]"\t"1902.42212"\t"4.422119"\t"0.216909975"\t"0.06141944"\t"0.8869565"\t"102"\t"0.845184863"\t"314b38dc-9bfb-4a7f-aaaa-bd80ef4ec82d"\t"dd3ea070-54a6-4ea7-b99b-a6e975fdd204"\t"1c3ad0aa-ee78-4542-93b3-aa9fdf07add1"\n+"231"\t"Allantoin (5TMS)"\t"Allantoin (5TMS) [A188009-ambient-na-2]"\t"1896.99829"\t"1.001709"\t"0.242943108"\t"0.08852613"\t"0.887096763"\t"55"\t"0.8791416"\t"bb9eafcc-28ff-4a63-8786-2e5e1053b337"\t"a999f0d6-0285-41d9-a6ba-b705987b663c"\t"65bb54d2-6bf7-4a53-aa22-8abf71240005"\n+"232"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"233"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"234"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"235"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"236"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"237"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"238"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"239"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"240"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"241"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"242"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"243"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"244"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"245"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"246"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"247"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"248"\t"Nonadecane"\t"Nonadecane [A190001-ambient-n--1]"\t"1900"\t"2"\t"0.05944854"\t"0.04527639"\t"0.7586207"\t"44"\t"0.7132295"\t"44b956d8-a487-4269-baee-49e6ba5658c3"\t"5dff1f48-853a-4ce2-852c-81c871ef1da6"\t"5dff1f48-853a-4ce2-852c-81c871ef1da6"\n+"249"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"250"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"251"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"252"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"253"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"254"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"255"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"256"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"257"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"258"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"259"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"260"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"261"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"262"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"263"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"264"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"265"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"266"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"267"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"268"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"269"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"270"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"271"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"272"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"273"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n+"274"\t""\t"no results"\t""\t""\t""\t""\t""\t""\t""\t""\t""\t""\n' |
b |
diff -r 000000000000 -r e3d43b8c987b test-data/output03.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/output03.txt Mon Dec 05 08:32:04 2016 -0500 |
[ |
b'@@ -0,0 +1,412 @@\n+Num Spectre\tAnalyte Name\tSpectrum Name\tRetention Index\tRI Discrepancy\tDotproductDistance\tEuclideanDistance\tJaccardDistance\tHammingDistance\ts12GowerLegendreDistance\tSpectrum ID\tMetabolite ID\tAnalyte ID\n+1\tErythrose-4-phosphate (1MEOX) (4TMS) MP\tErythrose-4-phosphate (1MEOX) (4TMS) MP [A191009-ambient-na-5]\t1895.98438\t2.01558065\t0.417125851\t0.047484044\t0.6108108\t226\t0.628439844\t1b34c722-1fd3-4d61-a48b-da2614f96e23\td4f07f67-d45b-43b6-bd4c-d08708d1a7ad\t2665f816-5c52-45ed-901e-4481cf048257\n+2\tGlucose (1MEOX) (5TMS) BP\tGlucose (1MEOX) (5TMS) BP [A191001-ambient-na-2]\t1899.05493\t1.054953\t0.4496568\t0.07338332\t0.7784431\t130\t0.796108663\t34a5b91e-e473-4ed6-9a40-067e0cd944f9\t68513255-fc44-4041-bc4b-4fd2fae7541d\t0a2b3536-2245-4c0e-bdbc-495766eeec67\n+2\tGalactose (1MEOX) (5TMS) BP\tGalactose (1MEOX) (5TMS) BP [A191002-ambient-DL--8]\t1902.42212\t4.422119\t0.4884424\t0.0594931729\t0.75\t207\t0.7356502\t9c570b75-fe0c-43b8-9311-7b8af17dd55b\tdd3ea070-54a6-4ea7-b99b-a6e975fdd204\t1c3ad0aa-ee78-4542-93b3-aa9fdf07add1\n+3\tGalactose (1MEOX) (5TMS) BP\tGalactose (1MEOX) (5TMS) BP [A191002-ambient-DL--2]\t1902.42212\t4.422119\t0.38635543\t0.0406771079\t0.8201285\t383\t0.7784506\t0bfc9541-70d5-4d50-89c4-351a87971133\tdd3ea070-54a6-4ea7-b99b-a6e975fdd204\t1c3ad0aa-ee78-4542-93b3-aa9fdf07add1\n+3\tGlucose (1MEOX) (5TMS) BP\tGlucose (1MEOX) (5TMS) BP [A191001-ambient-na-2]\t1899.05493\t1.054953\t0.397179246\t0.06756685\t0.75287354\t131\t0.776361\t34a5b91e-e473-4ed6-9a40-067e0cd944f9\t68513255-fc44-4041-bc4b-4fd2fae7541d\t0a2b3536-2245-4c0e-bdbc-495766eeec67\n+3\tIdose (1MEOX) (5TMS) BP\tIdose (1MEOX) (5TMS) BP [A191005-ambient-na-1]\t1897.25439\t0.745605469\t0.432195932\t0.07130679\t0.629411757\t107\t0.6740747\td00de57d-6fab-49d0-9aee-25e259da9180\tab025068-f464-4bc6-9c92-994c29387db2\t6f4e926f-d7ef-47b6-a52c-91ff88ca567a\n+3\tGlucose, U-13C- (1MEOX) (5TMS) BP\tGlucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-10]\t1901.63\t3.63\t0.442519277\t0.050286\t0.76\t266\t0.7361843\t0d5164ce-be48-454d-979b-ed8b92e32c1d\t441faccb-2631-4e7d-b6ca-99437265ccb8\t96441b61-2891-4e81-93dc-d0fc0ad175d4\n+3\tPropanoic acid, 3-amino-3-(4-hydroxyphenyl)- (3TMS)\tPropanoic acid, 3-amino-3-(4-hydroxyphenyl)- (3TMS) [A189024-ambient-na-2]\t1897.83862\t0.161383286\t0.444237381\t0.04988712\t0.717086852\t256\t0.6841814\tc1d0193b-0442-41fe-aab0-fc2438624170\t151fe4e1-8ae4-43fc-aa1f-cf6e2a62b7ff\t471f9ab0-1cf5-40d3-ba88-edc2458d3242\n+3\tPyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP\tPyruvic acid, 4-hydroxyphenyl- (1MEOX) (2TMS) MP [A190013-ambient-no-1]\t1902.77417\t4.77417\t0.4479848\t0.0491427779\t0.7304582\t271\t0.6947696\t7508f46a-70b0-43eb-b5b6-0421ff41c0e8\t87e988c4-f26c-4e03-9a40-1b0c0b36ca67\t163bf790-e995-46a9-8059-446172ddca0f\n+3\tGlucuronic acid-3,6-lactone (1MEOX) (3TMS) MP\tGlucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-1]\t1893.44385\t4.55619574\t0.452163756\t0.06325701\t0.6106195\t138\t0.63247633\t2b364030-9fa7-4066-b685-52d7946110a6\t00ce759f-d1f9-492e-89f7-b7400a34c72d\tda9d76f5-a2af-4fd1-89e1-c8426ad16980\n+3\tGlucose, 2-amino-2-deoxy- (5TMS) MP\tGlucose, 2-amino-2-deoxy- (5TMS) MP [A193015-ambient-DL--3]\t1899.495\t1.49494946\t0.474485427\t0.0493914336\t0.7429306\t289\t0.7034532\t754097ce-c7df-40cb-bec1-ba8b0fad83f8\t2b4d44b2-d5ac-4da4-9be6-a4ae9574e4a6\t539fe164-0ea9-4509-bf37-fc9bc8073646\n+4\tGlucuronic acid-3,6-lactone (1MEOX) (3TMS) MP\tGlucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-1]\t1893.44385\t4.55619574\t0.40254572\t0.05791846\t0.445833325\t107\t0.528728\t2b364030-9fa7-4066-b685-52d7946110a6\t00ce759f-d1f9-492e-89f7-b7400a34c72d\tda9d76f5-a2af-4fd1-89e1-c8426ad16980\n+4\tGalactose (1MEOX) (5TMS) BP\tGalactose (1MEOX) (5TMS) BP [A191002-ambient-DL--2]\t1902.42212\t4.422119\t0.403359115\t0.0413857177\t0.7048832\t332\t0.694246054\t0bfc9541-70d5-4d50-89c4-351a87971133\tdd3ea070-54a6-4ea7-b99b-a6e975fdd204\t1c3ad0aa-ee78-4542-93b3-aa9fdf07add1\n+4\tGlucose (1MEOX) (5TMS) BP\tGlucose (1MEOX) (5TMS) BP [A191001-ambient-na-12]\t1899.05493\t1.054953\t0.410697162\t0.06408566\t0.56\t112\t0.6205492\t833ab58c-a8fa-4389-8b42-95e618cafb91\t68513255-fc44-4'..b'204\t0.0328352377\t0.6\t330\t0.608352542\t8bf796f1-f7cf-4df5-afbc-979b0d95a383\t00ce759f-d1f9-492e-89f7-b7400a34c72d\tda9d76f5-a2af-4fd1-89e1-c8426ad16980\n+226\tGalactose_3_5TMS\tGalactose_3_5TMS [A190022-ambient-na-1]\t1896.3114\t1.68858171\t0.363172352\t0.0492873862\t0.408026755\t122\t0.504798055\tef78eeb1-ec7f-453d-90bd-cd1bf3b04153\tf01236e3-4d1e-493a-bd99-3aca2801f86e\t17441428-6e9c-4caf-84d5-561b494df795\n+226\tGlucose, 2-amino-2-deoxy- (5TMS) MP\tGlucose, 2-amino-2-deoxy- (5TMS) MP [A193015-ambient-DL--8]\t1899.495\t1.49494946\t0.400953531\t0.05295159\t0.2972028\t85\t0.414242685\t11e07008-ff9d-4d76-9b09-590beaa90f22\t2b4d44b2-d5ac-4da4-9be6-a4ae9574e4a6\t539fe164-0ea9-4509-bf37-fc9bc8073646\n+226\tGlucose, U-13C- (1MEOX) (5TMS) BP\tGlucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-7]\t1901.63\t3.63\t0.453271121\t0.0621097945\t0.7617021\t179\t0.738404453\t6c360eba-d726-44d9-a666-d0695d8448cf\t441faccb-2631-4e7d-b6ca-99437265ccb8\t96441b61-2891-4e81-93dc-d0fc0ad175d4\n+226\tErythrose-4-phosphate (1MEOX) (4TMS) MP\tErythrose-4-phosphate (1MEOX) (4TMS) MP [A191009-ambient-na-5]\t1895.98438\t2.01558065\t0.483825535\t0.0507976674\t0.461333334\t173\t0.5301436\t1b34c722-1fd3-4d61-a48b-da2614f96e23\td4f07f67-d45b-43b6-bd4c-d08708d1a7ad\t2665f816-5c52-45ed-901e-4481cf048257\n+227\t\tno results\t\t\t\t\t\t\t\t\t\t\n+228\tGlucuronic acid-3,6-lactone (1MEOX) (3TMS) MP\tGlucuronic acid-3,6-lactone (1MEOX) (3TMS) MP [A189014-ambient-na-2]\t1893.44385\t4.55619574\t0.49236843\t0.0423520021\t0.5974499\t328\t0.6059947\t8bf796f1-f7cf-4df5-afbc-979b0d95a383\t00ce759f-d1f9-492e-89f7-b7400a34c72d\tda9d76f5-a2af-4fd1-89e1-c8426ad16980\n+229\t\tno results\t\t\t\t\t\t\t\t\t\t\n+230\t\tno results\t\t\t\t\t\t\t\t\t\t\n+231\tGlucose (1MEOX) (5TMS) BP\tGlucose (1MEOX) (5TMS) BP [A191001-ambient-na-24]\t1899.05493\t1.054953\t0.191139191\t0.0709223449\t0.8947368\t68\t0.878837764\td87f501a-9d45-4244-9461-f8dd1943930e\t68513255-fc44-4041-bc4b-4fd2fae7541d\t0a2b3536-2245-4c0e-bdbc-495766eeec67\n+231\tGlucose, U-13C- (1MEOX) (5TMS) BP\tGlucose, U-13C- (1MEOX) (5TMS) BP [A191001-13C-na-2]\t1901.63\t3.63\t0.193600208\t0.0558800921\t0.887096763\t110\t0.8399839\t27d4dcdd-d351-4976-8ef9-76a0cc53f631\t441faccb-2631-4e7d-b6ca-99437265ccb8\t96441b61-2891-4e81-93dc-d0fc0ad175d4\n+231\tGalactose (1MEOX) (5TMS) BP\tGalactose (1MEOX) (5TMS) BP [A191002-ambient-DL--10]\t1902.42212\t4.422119\t0.216909975\t0.06141944\t0.8869565\t102\t0.845184863\t314b38dc-9bfb-4a7f-aaaa-bd80ef4ec82d\tdd3ea070-54a6-4ea7-b99b-a6e975fdd204\t1c3ad0aa-ee78-4542-93b3-aa9fdf07add1\n+231\tAllantoin (5TMS)\tAllantoin (5TMS) [A188009-ambient-na-2]\t1896.99829\t1.001709\t0.242943108\t0.08852613\t0.887096763\t55\t0.8791416\tbb9eafcc-28ff-4a63-8786-2e5e1053b337\ta999f0d6-0285-41d9-a6ba-b705987b663c\t65bb54d2-6bf7-4a53-aa22-8abf71240005\n+232\t\tno results\t\t\t\t\t\t\t\t\t\t\n+233\t\tno results\t\t\t\t\t\t\t\t\t\t\n+234\t\tno results\t\t\t\t\t\t\t\t\t\t\n+235\t\tno results\t\t\t\t\t\t\t\t\t\t\n+236\t\tno results\t\t\t\t\t\t\t\t\t\t\n+237\t\tno results\t\t\t\t\t\t\t\t\t\t\n+238\t\tno results\t\t\t\t\t\t\t\t\t\t\n+239\t\tno results\t\t\t\t\t\t\t\t\t\t\n+240\t\tno results\t\t\t\t\t\t\t\t\t\t\n+241\t\tno results\t\t\t\t\t\t\t\t\t\t\n+242\t\tno results\t\t\t\t\t\t\t\t\t\t\n+243\t\tno results\t\t\t\t\t\t\t\t\t\t\n+244\t\tno results\t\t\t\t\t\t\t\t\t\t\n+245\t\tno results\t\t\t\t\t\t\t\t\t\t\n+246\t\tno results\t\t\t\t\t\t\t\t\t\t\n+247\t\tno results\t\t\t\t\t\t\t\t\t\t\n+248\tNonadecane\tNonadecane [A190001-ambient-n--1]\t1900\t2\t0.05944854\t0.04527639\t0.7586207\t44\t0.7132295\t44b956d8-a487-4269-baee-49e6ba5658c3\t5dff1f48-853a-4ce2-852c-81c871ef1da6\t5dff1f48-853a-4ce2-852c-81c871ef1da6\n+249\t\tno results\t\t\t\t\t\t\t\t\t\t\n+250\t\tno results\t\t\t\t\t\t\t\t\t\t\n+251\t\tno results\t\t\t\t\t\t\t\t\t\t\n+252\t\tno results\t\t\t\t\t\t\t\t\t\t\n+253\t\tno results\t\t\t\t\t\t\t\t\t\t\n+254\t\tno results\t\t\t\t\t\t\t\t\t\t\n+255\t\tno results\t\t\t\t\t\t\t\t\t\t\n+256\t\tno results\t\t\t\t\t\t\t\t\t\t\n+257\t\tno results\t\t\t\t\t\t\t\t\t\t\n+258\t\tno results\t\t\t\t\t\t\t\t\t\t\n+259\t\tno results\t\t\t\t\t\t\t\t\t\t\n+260\t\tno results\t\t\t\t\t\t\t\t\t\t\n+261\t\tno results\t\t\t\t\t\t\t\t\t\t\n+262\t\tno results\t\t\t\t\t\t\t\t\t\t\n+263\t\tno results\t\t\t\t\t\t\t\t\t\t\n+264\t\tno results\t\t\t\t\t\t\t\t\t\t\n+265\t\tno results\t\t\t\t\t\t\t\t\t\t\n+266\t\tno results\t\t\t\t\t\t\t\t\t\t\n+267\t\tno results\t\t\t\t\t\t\t\t\t\t\n+268\t\tno results\t\t\t\t\t\t\t\t\t\t\n+269\t\tno results\t\t\t\t\t\t\t\t\t\t\n+270\t\tno results\t\t\t\t\t\t\t\t\t\t\n+271\t\tno results\t\t\t\t\t\t\t\t\t\t\n+272\t\tno results\t\t\t\t\t\t\t\t\t\t\n+273\t\tno results\t\t\t\t\t\t\t\t\t\t\n+274\t\tno results\t\t\t\t\t\t\t\t\t\t\n' |