# HG changeset patch
# User galaxyp
# Date 1368221282 14400
# Node ID 201a156333545684adde1c38211bd292323a703e
Initial commit.
diff -r 000000000000 -r 201a15633354 export.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/export.xml Fri May 10 17:28:02 2013 -0400
@@ -0,0 +1,32 @@
+
+
+
+
+ macros.xml
+
+
+
+
+ mzmatch_wrapper.py --executable 'convert.ConvertToText' --config $config
+
+
+ -i $input1 -o $output
+
+
+
+
+
+
+
+
+**What it does**
+
+Converts the contents of a PeakML file to a tab-separated text file. In order to make the file useable in a spreadsheet environment, only the top-level data for each measurement is given in the file.
+
+**Citation**
+
+For the underlying tool, please cite ``PeakML/mzMatch: A File Format, Java Library, R Library, and Tool-Chain for Mass Spectrometry Data Analysis. Richard A. Scheltema, Andris Jankevics, Ritsert C. Jansen, Morris A. Swertz, and Rainer Breitling. Analytical Chemistry 2011 83 (7), pp 2786-2793``
+
+If you use this tool in Galaxy, please cite Chilton J, et al. https://bitbucket.org/galaxyp/galaxyp-toolshed-mzmatch
+
+
diff -r 000000000000 -r 201a15633354 extract_background_ions.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_background_ions.xml Fri May 10 17:28:02 2013 -0400
@@ -0,0 +1,39 @@
+
diff -r 000000000000 -r 201a15633354 extract_mass_chromatograms.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/extract_mass_chromatograms.xml Fri May 10 17:28:02 2013 -0400
@@ -0,0 +1,48 @@
+
diff -r 000000000000 -r 201a15633354 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Fri May 10 17:28:02 2013 -0400
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+ mzmatch
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r 201a15633354 mzmatch_2.0.jar
Binary file mzmatch_2.0.jar has changed
diff -r 000000000000 -r 201a15633354 mzmatch_wrapper.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mzmatch_wrapper.py Fri May 10 17:28:02 2013 -0400
@@ -0,0 +1,63 @@
+from os.path import dirname, join, abspath
+import sys
+from optparse import OptionParser
+from ConfigParser import SafeConfigParser
+import subprocess
+
+DEBUG = False
+
+
+def main():
+ (options, args) = _parse_args()
+ for executable, config_path in zip(options.executables, options.configs):
+ command_handler = COMMAND_HANDLERS.get(executable, _run_mzmatch)
+ command_handler(executable, config_path)
+
+
+def _run_shell(executable, config_path):
+ command = open(config_path, "r").read().strip()
+ if DEBUG:
+ print "Running shell command %s" % command
+ _exec(command)
+
+
+def _run_mzmatch(executable, config_path):
+ command_prefix = "java -cp %s" % _jar_path()
+ java_class = "mzmatch.ipeak.%s" % executable
+ args = open(config_path, "r").read().strip()
+ _exec("%s %s %s" % (command_prefix, java_class, args))
+
+
+def _jar_path():
+ py_path = __file__
+ jar_path = join(dirname(py_path), "mzmatch_2.0.jar")
+ return jar_path
+
+COMMAND_HANDLERS = {
+ "__SHELL__": _run_shell,
+}
+
+
+def _exec(command):
+ proc = subprocess.Popen(args=command, shell=True)
+ return_code = proc.wait()
+ if return_code != 0:
+ print "Error executing command [%s], return code is %d" % (command, return_code)
+ sys.exit(return_code)
+
+
+def _parse_args():
+ parser = OptionParser()
+ parser.add_option("-e", "--executable", dest="executables", default=[], action="append")
+ parser.add_option("-c", "--config", dest="configs", default=[], action="append")
+ return parser.parse_args()
+
+
+def _load_options(config_path):
+ config_parser = SafeConfigParser()
+ config_parser.optionxform = str
+ config_parser.read(config_path)
+ return config_parser
+
+if __name__ == "__main__":
+ main()
diff -r 000000000000 -r 201a15633354 noise_filter.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/noise_filter.xml Fri May 10 17:28:02 2013 -0400
@@ -0,0 +1,46 @@
+
+
+
+
+ macros.xml
+
+
+
+
+ mzmatch_wrapper.py --executable 'filter.NoiseFilter' --config $config
+
+
+ -i $input1 -o $output -rejected $output_rejected #if $codadw.specify # -codadw $codadw.codadw #end if#
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**What it does**
+
+Filters noise from PeakML files, containing mass chromatograms at the lowest level. When the file contains a list of sets of mass chromatograms, the maximum score for the used method is calculated and compared to the given threshold. This is the best approach, as we expect that high quality can match up to low quality signals at the same mass and retention time. Only those entries scoring above the given threshold are stored in the output file. The rejected can be stored in a separate file (option 'rejected') for inspection or recovery.
+
+The option 'codadw' can be used to set the threshold for the CoDA Durbin-Watson noise filtering approach. Normally the Durbin-Watson criterion results in a value between 0 and 4, where higher means a large amount of periodicity in the signal and lower vica versa. For mass chromatograms we expect little periodicity in the signal, thus a lower value is preferable. However, in order to preserve unity in our quality scores the CoDA-DW score is scaled between 0..1, where higher is better (less periodicity in the signal). As a general rule-of-thumb, for high quality mass chromatograms a score >0.8 is expected.
+
+Remarks:
+- CoDA-DW is scaled between 0..1, where higher is better mass chromatogram quality.
+
+**Citation**
+
+For the underlying tool, please cite ``PeakML/mzMatch: A File Format, Java Library, R Library, and Tool-Chain for Mass Spectrometry Data Analysis. Richard A. Scheltema, Andris Jankevics, Ritsert C. Jansen, Morris A. Swertz, and Rainer Breitling. Analytical Chemistry 2011 83 (7), pp 2786-2793``
+
+If you use this tool in Galaxy, please cite Chilton J, et al. https://bitbucket.org/galaxyp/galaxyp-toolshed-mzmatch
+
+