changeset 0:735479de6964 draft

Uploaded
author tomnl
date Fri, 03 Feb 2017 11:39:54 -0500
parents
children 628b9944d1c7
files mzml2isa-galaxy/.gitignore mzml2isa-galaxy/.travis.yml mzml2isa-galaxy/README.md mzml2isa-galaxy/galaxy/mzml2isa/README.rst mzml2isa-galaxy/galaxy/mzml2isa/mzml2isa.xml mzml2isa-galaxy/galaxy/mzml2isa/mzml2isa_macros.xml mzml2isa-galaxy/galaxy/mzml2isa/ontology_search.py mzml2isa-galaxy/galaxy/mzml2isa/pub_role.loc mzml2isa-galaxy/galaxy/mzml2isa/pub_status.loc mzml2isa-galaxy/galaxy/mzml2isa/shed.yml mzml2isa-galaxy/galaxy/mzml2isa/static/images/mzml2isa.png mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study.zip mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/a_test_metabolite_profiling_mass_spectrometry.txt mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/i_Investigation.txt mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/index.html mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/s_test.txt mzml2isa-galaxy/galaxy/mzml2isa/tool-data/get_status_ont.py mzml2isa-galaxy/galaxy/mzml2isa/wrapper.py mzml2isa-galaxy/test.sh
diffstat 18 files changed, 963 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/.gitignore	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,6 @@
+*.pyc
+.idea
+*.egg-info
+.egg
+*~
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/.travis.yml	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,16 @@
+language: python
+
+before_install:
+ - sudo apt-get install -y python-virtualenv
+ - virtualenv planemo-venv
+ - . planemo-venv/bin/activate
+ - pip install --upgrade pip setuptools
+ - pip install planemo
+ - planemo conda_init
+
+install:
+ - planemo conda_install ${TRAVIS_BUILD_DIR}/galaxy/mzml2isa/
+
+script:
+ - planemo test --install_galaxy --no_cache_galaxy --conda_dependency_resolution ${TRAVIS_BUILD_DIR}/galaxy/mzml2isa/ --galaxy_branch "dev"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/README.md	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,33 @@
+mzml2isa for galaxy
+===============
+
+[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io/recipes/mzml2isa/README.html) [![Build Status](https://travis-ci.org/ISA-tools/mzml2isa-galaxy.svg?branch=master)](https://travis-ci.org/ISA-tools/mzml2isa-galaxy)
+
+
+This is a Galaxy wrapper for the mzml2isa python package tool.
+
+- Full documentation: http://2isa.readthedocs.io/en/latest/
+- Python PyPi package: https://pypi.python.org/pypi/mzml2isa/
+- Github code: https://github.com/ISA-tools/mzml2isa
+
+mzml2isa is a program that allows you to convert metabolomic studies in .mzML format to the open ISA-Tab standard supported by the MetaboLights database.
+
+Installation
+===============
+
+The recommended installation is by means of the toolshed (https://toolshed.g2.bx.psu.edu/). Dependencies should be installed automatically when using Galaxy version >= 16.10. 
+
+The dependencies are dealt with Bioconda. To ensure that Bioconda is working check to make sure the following settings are in the config/galaxy.ini file.
+
+```
+# dependencies before each job runs.
+conda_auto_install = True
+# Set to True to instruct Galaxy to install Conda from the web automatically
+# if it cannot find a local copy and conda_exec is not configured.
+conda_auto_init = True
+```
+
+
+Licence
+===============
+GNU General Public License v3 (GPLv3)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/mzml2isa.xml	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,258 @@
+<tool id="mzml2isa" name="mzml2isa" version="0.1.0">
+    <description>Parser to get meta information from mzML files and create an ISA-Tab structure</description>
+    
+    <macros>
+        <import>mzml2isa_macros.xml</import>
+    </macros>
+
+    <code file="ontology_search.py" />
+
+    <requirements>
+        <requirement type="package" version="0.4.24">mzml2isa</requirement>
+    </requirements>
+
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+    
+    <command interpreter="python"><![CDATA[
+    #set $s_submission_date = ""
+    #set $s_release_date = ""
+    #set $s_description = ""
+    #set $s_pubmed = ""
+    #set $s_pub_doi = ""
+    #set $s_pub_status = ""
+    #set $s_pub_author = ""
+    #set $s_pub_title = ""
+
+    #set $s_first_name = ""
+    #set $s_mid_initials = ""
+    #set $s_last_name = ""
+    #set $s_telephone = ""
+    #set $s_fax = ""
+    #set $s_affiliation = ""
+    #set $s_role = ""
+    #set $s_mail = ""
+    #set $s_address = ""
+
+    #set $i_submission_date = ""
+    #set $i_release_date = ""
+    #set $i_description = ""
+    #set $i_pubmed = ""
+    #set $i_pub_doi = ""
+    #set $i_pub_title = ""
+    #set $i_pub_status = ""
+    #set $i_pub_author = ""
+
+    #set $i_first_name = ""
+    #set $i_mid_initials = ""
+    #set $i_last_name = ""
+    #set $i_telephone = ""
+    #set $i_fax = ""
+    #set $i_affiliation = ""
+    #set $i_role = ""
+    #set $i_mail = ""
+    #set $i_address = ""
+
+    #set $organism_text = ""
+    #set $organism_ref = ""
+    #set $organism_iri = ""
+    #set $organism_variant_text = ""
+    #set $organism_variant_ref = ""
+    #set $organism_variant_iri = ""
+    #set $organism_part_text = ""
+    #set $organism_part_ref = ""
+    #set $organism_part_iri = ""
+
+
+    #if $study_meta.study_select=="show"
+    	#set $submission_date =  $study_meta.s_submission_date
+    	#set $s_release_date = $study_meta.s_release_date
+        #set $s_description = $study_meta.s_description
+    	#set $s_pubmed = $study_meta.s_pubmed
+    	#set $s_pub_doi = $study_meta.s_pub_doi
+        #set $s_pub_status = $study_meta.s_pub_status
+        #set $s_pub_author = $study_meta.s_pub_author
+        #set $s_pub_title = $study_meta.s_pub_title
+    #end if
+
+    #if ($s_contacts.s_contacts_select=="show"):
+    	#set $s_first_name = $s_contacts.s_first_name
+        #set $s_mid_initials = $s_contacts.s_mid_initials
+        #set $s_last_name = $s_contacts.s_last_name
+        #set $s_telephone = $s_contacts.s_telephone
+        #set $s_fax = $s_contacts.s_fax
+        #set $s_affiliation = $s_contacts.s_affiliation
+        #set $s_role = $s_contacts.s_role
+        #set $s_mail = $s_contacts.s_mail
+        #set $s_address = $s_contacts.s_address
+    #end if
+
+    #if ($i_contacts.i_contacts_select=="show"):
+    	#set $i_first_name = $i_contacts.i_first_name
+        #set $i_mid_initials = $i_contacts.i_mid_initials
+        #set $i_last_name = $i_contacts.i_last_name
+        #set $i_telephone = $i_contacts.i_telephone
+        #set $i_fax = $i_contacts.i_fax
+        #set $i_affiliation = $i_contacts.i_affiliation
+        #set $i_role = $i_contacts.i_role
+        #set $i_mail = $i_contacts.i_mail
+        #set $i_address = $i_contacts.i_address
+    #end if
+
+    #if ($invest_meta.invest_select=="show"):
+    	#set $i_submission_date = $invest_meta.i_submission_date
+        #set $i_release_date = $invest_meta.i_release_date 
+        #set $i_description = $invest_meta.i_description
+        #set $i_pubmed = $invest_meta.i_pubmed
+        #set $i_pub_doi = $invest_meta.i_pub_doi
+        #set $i_pub_title = $invest_meta.i_pub_title
+        #set $i_pub_status = $invest_meta.i_pub_status
+        #set $i_pub_author = $invest_meta.i_pub_author
+    #end if
+
+    #if ($exp_meta.exp_select=="show"):
+    	#set $organism_text = $exp_meta.organism_text
+        #set $organism_ref = $exp_meta.organism_ref
+        #set $organism_iri = $exp_meta.organism_iri
+        #set $organism_variant_text = $exp_meta.organism_variant_text 
+        #set $organism_variant_ref = $exp_meta.organism_variant_ref 
+        #set $organism_variant_iri = $exp_meta.organism_variant_iri
+        #set $organism_part_text = $exp_meta.organism_part_text
+        #set $organism_part_ref = $exp_meta.organism_part_ref 
+        #set $organism_part_iri = $exp_meta.organism_part_iri
+    #end if
+
+
+    wrapper.py -inputzip "$inputzip"
+               -jsontxt "$jsontxt"
+               -html_file "$html_file"
+               -out_dir .
+               -study_title "$name_of_study"
+               --s_submission_date "$s_submission_date"
+               --s_release_date "$s_release_date"
+               --s_description "$s_description"
+               --s_pubmed "$s_pubmed"
+               --s_pub_doi "$s_pub_doi"
+               --s_pub_status "$s_pub_status"
+               --s_pub_title "$s_pub_title"
+               --s_pub_author "$s_pub_author"
+               --s_first_name "$s_first_name"
+               --s_mid_initials "$s_mid_initials"
+               --s_last_name "$s_last_name"
+               --s_telephone "$s_telephone"
+               --s_fax "$s_fax"
+               --s_affiliation "$s_affiliation"
+               --s_role "$s_role"
+               --s_mail "$s_mail"
+               --s_address "$s_address"
+               --i_submission_date "$i_submission_date"
+               --i_release_date "$i_release_date"
+               --i_description "$i_description"
+               --i_pubmed "$i_pubmed"
+               --i_pub_doi "$i_pub_doi"
+               --i_pub_title "$i_pub_title"
+               --i_pub_status "$i_pub_status"
+               --i_pub_author "$i_pub_author"
+               --i_first_name "$i_first_name"
+               --i_mid_initials "$i_mid_initials"
+               --i_last_name "$i_last_name"
+               --i_telephone "$i_telephone"
+               --i_fax "$i_fax"
+               --i_affiliation "$i_affiliation"
+               --i_role "$i_role"
+               --i_mail "$i_mail"
+               --i_address "$i_address"
+               --organism_text "$organism_text"
+               --organism_ref "$organism_ref"
+               --organism_iri "$organism_iri"
+               --organism_variant_text "$organism_variant_text"
+               --organism_variant_ref "$organism_variant_ref"
+               --organism_variant_iri "$organism_variant_iri"
+               --organism_part_text "$organism_part_text"
+               --organism_part_ref "$organism_part_ref"
+	           --organism_part_iri "$organism_part_iri";
+
+	       ln -s ./"$name_of_study" study_dir;
+
+	       cd study_dir;
+	       zip isa.zip i_* a_* s_* && mv isa.zip "$ISA_zip";
+	       ]]>
+    </command>
+
+    <inputs>
+        <param name="name_of_study" type="text" label="Name study" help="This should not contain any spaces as the name will be used a prefix for ISA-tab file names" />
+        <param format="zip" name="inputzip" type="data" label="mzML zip file"  help="A zipped folder of mzML files"/>
+        <param optional="true" format="txt" name="jsontxt" type="data" label="Additional user Metadata in json"  help="A user can add additional metadata directory through a json file"/>
+        <expand macro="studymacro"/>
+        <expand macro="investmacro"/>
+        <expand macro="expmacro"/>
+        <expand macro="scontactmacro"/>
+        <expand macro="icontactmacro"/>
+    </inputs>
+    <outputs>
+<!--
+Notes:
+
+- Multiple a_ files
+- Single s_ as per mzml2isa definition (ISA does allow more than one s_ file).
+- Single i_ file.
+
+The html output is now redundant, have left as hidden for now in case we revert back later. However,
+this would require changing the out_dir for wrapper.py back to $html_file.extra_files_path. i.e.
+'wrapper.py -out_dir $html_file.extra_files_path'
+
+-->
+    <data format="html" name="html_file" label="" hidden="true" />
+    <data name="ISA_zip" format="zip" label="ISA Zip file"/>
+    <collection type="list" label="A Files" name="a_files">
+        <discover_datasets pattern="(?P&lt;designation&gt;a_.+)\.txt" directory="study_dir" format="tabular"/>
+	</collection>
+	<collection type="list" label="S Files" name="s_files">
+		<discover_datasets pattern="(?P&lt;designation&gt;s_.+)\.txt" directory="study_dir" format="tabular"/>
+	</collection>
+	<data name="i_file" format="tabular" label="I File" from_work_dir="study_dir/i_Investigation.txt" visible="true"/>
+    </outputs>
+
+    <tests>
+        <test>
+            <param name="name_of_study" value="test" />
+            <param name="inputzip" value="metabolomics_study.zip" ftype="zip" />
+            <output name="html_file" value="metabolomics_study/test/index.html" />
+            <output name="i_file" value="metabolomics_study/test/i_Investigation.txt" />
+            <output_collection name="a_files" type="list" count="1">
+                <element name="a_test_metabolite_profiling_mass_spectrometry">
+                    <assert_contents>
+                        <has_n_columns n="77" />
+                    </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="s_files" type="list" count="1">
+                <element name="s_test">
+                    <assert_contents>
+                        <has_n_columns n="12" />
+                    </assert_contents>
+                </element>
+            </output_collection>
+        </test>
+    </tests>
+    <help><![CDATA[
+**Overview**
+ A program to automatically generate ISA-Tab metadata files from metabolomics raw XML (mzML and imzML) data files.
+
+ Additional meta-information not found within the mzML file can be added either through a JSON file or via the drop
+ down menus. However, it is recommended that the mzML2ISA tool is used to create a semi-completed ISA-Tab file structure
+ that is further annotated using ISAcreator https://github.com/ISA-tools/ISAcreator
+
+.. image::mzml2isa.png
+    ]]></help>
+    <citations>
+        <citation type="doi">10.1002/0471250953.bi1413s53</citation>
+        <citation type="doi">10.1007/s11306-015-0879-3</citation>
+        <citation type="doi">10.1038/ng.1054</citation>
+    </citations>
+</tool>
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/mzml2isa_macros.xml	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,112 @@
+<macros>
+    <xml name="studymacro" >
+      <conditional name="study_meta">
+            <param name="study_select" type="select" label="Add study meta" help="">
+                <option value="hide" selected="true">Hide</option>
+                <option value="show">Show</option>
+            </param>
+            <when value="hide"/>
+            <when value="show">
+                <!--<param name="study_title" type="text" label="Study Title"/>-->
+                <param name="s_submission_date" type="text" label="Submission date" help="Date in format YYYY-MM-DD e.g 2016-07-03"/>
+                <param name="s_release_date" type="text" label="Release date" help="Date in format YYYY-MM-DD e.g 2016-07-03"/>
+                <param name="s_description" type="text" label="Description" size="30" help="Short description of the study"/>
+                <param name="s_pubmed" type="text" label="Publication PubMed identifier"/>
+                <param name="s_pub_doi" type="text" label="Publication DOI"/>
+                <param name="s_pub_title" type="text" label="Publication Title"/>
+                <param name="s_pub_status" type="select" label="Publication Status" dynamic_options = "getNames('status')"/>
+                <param name="s_pub_author" type="text" label="Publication Authors"/>
+
+            </when>
+        </conditional>
+    </xml>
+
+    <xml name="investmacro">
+        <conditional name="invest_meta">
+            <param name="invest_select" type="select" label="Add investigation meta" help="">
+                <option value="hide" selected="true">Hide</option>
+                <option value="show">Show</option>
+            </param>
+            <when value="hide"/>
+            <when value="show">
+                <param name="i_submission_date" type="text" label="Submission date" help="Date in format YYYY-MM-DD e.g 2016-07-03"/>
+                <param name="i_release_date" type="text" label="Release date"  help="Date in format YYYY-MM-DD e.g 2016-07-03"/>
+                <param name="i_description" type="text" label="Description" size="30" help="Short description of the investigation"/>
+                <param name="i_pubmed" type="text" label="Publication PubMed identifier"/>
+                <param name="i_pub_doi" type="text" label="Publication DOI"/>
+                <param name="i_pub_title" type="text" label="Publication Title"/>
+                <param name="i_pub_status" type="select" label="Publication Status" dynamic_options = "getNames('status')"/>
+                <param name="i_pub_author" type="text" label="Publication Authors"/>
+            </when>
+        </conditional>
+    </xml>
+
+    <xml name="scontactmacro">
+        <conditional name="s_contacts">
+            <param name="s_contacts_select" type="select" label="Add contact (study)" help="">
+            <option value="hide" selected="true">Hide</option>
+            <option value="show">Show</option>
+            </param>
+            <when value="hide"/>
+            <when value="show">
+              <param name="s_first_name" type="text" label="First name" />
+              <param name="s_mid_initials" type="text" label="Mid initials"/>
+              <param name="s_last_name" type="text" label="Last name"/>
+              <param name="s_telephone" type="text" label="Telephone"/>
+              <param name="s_fax" type="text" label="fax"/>
+              <param name="s_affiliation" type="text" label="Affiliation"/>
+              <param name="s_role" type="select" label="Role" help="Role in study publication" dynamic_options = "getNames('role')"/>
+              <param name="s_mail" type="text" label="Mail"/>
+              <param name="s_address" type="text" label="Address"/>
+             </when>
+       </conditional>
+    </xml>
+
+
+    <xml name="icontactmacro">
+        <conditional name="i_contacts">
+            <param name="i_contacts_select" type="select" label="Add contact (investigation)" help="">
+            <option value="hide" selected="true">Hide</option>
+            <option value="show">Show</option>
+            </param>
+            <when value="hide"/>
+            <when value="show">
+              <param name="i_first_name" type="text" label="First name" />
+              <param name="i_mid_initials" type="text" label="Mid initials"/>
+              <param name="i_last_name" type="text" label="Last name"/>
+              <param name="i_telephone" type="text" label="Telephone"/>
+              <param name="i_fax" type="text" label="fax"/>
+              <param name="i_affiliation" type="text" label="Affiliation"/>
+              <param name="i_role" type="select" label="Role" help="Role in investigation publication" dynamic_options = "getNames('role')"/>
+              <param name="i_mail" type="text" label="Mail"/>
+              <param name="i_address" type="text" label="Address"/>
+             </when>
+       </conditional>
+    </xml>
+
+
+
+    <xml name="expmacro">
+      <conditional name="exp_meta">
+            <param name="exp_select" type="select" label="Add experimental meta" help="">
+                <option value="hide" selected="true">Hide</option>
+                <option value="show">Show</option>
+            </param>
+            <when value="hide"/>
+
+            <when value="show">
+                <param name="organism_text" type="text" label="Organism name (text)"  help="Ontological names can be search for on http://www.ontobee.org/ e.g. Homo sapiens"/>
+                <param name="organism_ref" type="text" label="Organism name (ontology reference)" help="e.g. NCBITAXON"/>
+                <param name="organism_iri" type="text" label="Organism name (link to ontology source)" help="e.g. http://purl.obolibrary.org/obo/NCBITaxon_9606"/>
+                <param name="organism_variant_text" type="text" label="Organism variant (text)" help="e.g. Saccharomyces cerevisiae M3836" />
+                <param name="organism_variant_ref" type="text" label="Organism variant (ontology reference)"  help="e.g. NCBITAXON"/>
+                <param name="organism_variant_iri" type="text" label="Organism variant (link to ontology source)" help="e.g. http://purl.obolibrary.org/obo/NCBITaxon_1162671"/>
+                <param name="organism_part_text" type="text" label="Organism part (text)" help="e.g. lacrimal artery"/>
+                <param name="organism_part_ref" type="text" label="Organism part (ontology reference)"  help="e.g. UBERON"/>
+                <param name="organism_part_iri" type="text" label="Organism part (link to ontology source)" help="e.g. http://purl.obolibrary.org/obo/UBERON_0001622"/>
+
+            </when>
+        </conditional>
+    </xml>
+
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/ontology_search.py	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+import os
+import csv
+import inspect
+
+
+def getNames(source="role"):
+
+
+    filename = inspect.getframeinfo(inspect.currentframe()).filename
+    path = os.path.dirname(os.path.abspath(filename))
+
+
+    if source == "role":
+        tablepth = os.path.join(path, 'pub_role.loc')
+    elif source == "status":
+        tablepth = os.path.join(path, 'pub_status.loc')
+    else:
+        print "Table not recognised"
+        return ""
+
+    print tablepth
+
+    with open(tablepth, "rb") as csvfile:
+        reader = csv.reader(csvfile, delimiter='\t')
+        l = list(reader)
+
+    l = [i + [""] for i in l]
+
+    l.sort(key=lambda x: x[0])
+
+    return l
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/pub_role.loc	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,33 @@
+"Biographer"	"http://purl.org/spar/pro/biographer"
+"Critic"	"http://purl.org/spar/pro/critic"
+"Librarian"	"http://purl.org/spar/pro/librarian"
+"Illustrator"	"http://purl.org/spar/pro/illustrator"
+"Producer"	"http://purl.org/spar/pro/producer"
+"Ghost writer"	"http://purl.org/spar/pro/ghost-writer"
+"Deputy editor"	"http://purl.org/spar/pro/deputy-editor"
+"Senior editor"	"http://purl.org/spar/pro/senior-editor"
+"Production editor"	"http://purl.org/spar/pro/production-editor"
+"Author"	"http://purl.org/spar/pro/author"
+"Author's agent"	"http://purl.org/spar/pro/authors-agent"
+"Translator"	"http://purl.org/spar/pro/translator"
+"Commissioning editor"	"http://purl.org/spar/pro/commissioning-editor"
+"Publisher"	"http://purl.org/spar/pro/publisher"
+"Proof reader"	"http://purl.org/spar/pro/proof-reader"
+"Managing editor"	"http://purl.org/spar/pro/managing-editor"
+"Copy editor"	"http://purl.org/spar/pro/copy-editor"
+"Journalist"	"http://purl.org/spar/pro/journalist"
+"Blogger"	"http://purl.org/spar/pro/blogger"
+"Guest editor"	"http://purl.org/spar/pro/guest-editor"
+"Reader"	"http://purl.org/spar/pro/reader"
+"Contributor"	"http://purl.org/spar/pro/contributor"
+"Reviewer"	"http://purl.org/spar/pro/reviewer"
+"Printer"	"http://purl.org/spar/pro/printer"
+"Editor"	"http://purl.org/spar/pro/editor"
+"Executive editor"	"http://purl.org/spar/pro/executive-editor"
+"Archivist"	"http://purl.org/spar/pro/archivist"
+"Distributor"	"http://purl.org/spar/pro/distributor"
+"Copyright owner"	"http://purl.org/spar/pro/copyright-owner"
+"Compiler"	"http://purl.org/spar/pro/compiler"
+"Peer reviewer"	"http://purl.org/spar/pro/peer-reviewer"
+"Editor-in-chief"	"http://purl.org/spar/pro/editor-in-chief"
+"Series editor"	"http://purl.org/spar/pro/series-editor"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/pub_status.loc	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,36 @@
+"Peer reviewed"	"http://purl.org/spar/pso/peer-reviewed"
+"Published"	"http://purl.org/spar/pso/published"
+"Draft"	"http://purl.org/spar/pso/draft"
+"Anonymized"	"http://purl.org/spar/pso/anonymized"
+"Intermediate draft"	"http://purl.org/spar/pso/intermediate-draft"
+"Republished"	"http://purl.org/spar/pso/republished"
+"Open access"	"http://purl.org/spar/pso/open-access"
+"Closed access"	"http://purl.org/spar/pso/closed-access"
+"Under review"	"http://purl.org/spar/pso/under-review"
+"Corrected"	"http://purl.org/spar/pso/corrected"
+"Confidential"	"http://purl.org/spar/pso/confidential"
+"Rejected for publication"	"http://purl.org/spar/pso/rejected-for-publication"
+"Unpublished"	"http://purl.org/spar/pso/unpublished"
+"Catalogued"	"http://purl.org/spar/pso/catalogued"
+"Enhanced"	"http://purl.org/spar/pso/enhanced"
+"Green open access"	"http://purl.org/spar/pso/green-open-access"
+"Reviewed"	"http://purl.org/spar/pso/reviewed"
+"Restricted access"	"http://purl.org/spar/pso/restricted-access"
+"Withdrawn from submission"	"http://purl.org/spar/pso/withdrawn-from-submission"
+"Embargoed"	"http://purl.org/spar/pso/embargoed"
+"Revised"	"http://purl.org/spar/pso/revised"
+"Accepted for publication"	"http://purl.org/spar/pso/accepted-for-publication"
+"Final draft"	"http://purl.org/spar/pso/final-draft"
+"Archived"	"http://purl.org/spar/pso/archived"
+"Proof"	"http://purl.org/spar/pso/proof"
+"Version of record"	"http://purl.org/spar/pso/version-of-record"
+"Gold open access"	"http://purl.org/spar/pso/gold-open-access"
+"Gratis open access"	"http://purl.org/spar/pso/gratis-open-access"
+"Subscription access"	"http://purl.org/spar/pso/subscription-access"
+"Non-confidential"	"http://purl.org/spar/pso/non-confidential"
+"Initial draft"	"http://purl.org/spar/pso/initial-draft"
+"Retracted from publication"	"http://purl.org/spar/pso/retracted-from-publication"
+"Copy-edited"	"http://purl.org/spar/pso/copy-edited"
+"Submitted"	"http://purl.org/spar/pso/submitted"
+"Libre open access"	"http://purl.org/spar/pso/libre-open-access"
+"In press"	"http://purl.org/spar/pso/in-press"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/shed.yml	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,16 @@
+name: mzml2isa
+owner: rjmweber
+description: Contains a tool dependency definition that downloads and extract version 0.4.19 of mzml2isa.
+homepage_url: https://github.com/ISA-tools/mzml2isa
+long_description: mzml2isa is a Python program that can be used to generate an ISA-Tab structure out of mzML files, providing the backbone of a study which can then be edited with an ISA editing tool (see MetaboLights pre-packaged ISA Creator - http://www.ebi.ac.uk/metabolights/)
+remote_repository_url: https://github.com/ISA-tools/mzml2isa
+type: unrestricted
+categories:
+  - "Metabolomics"
+include:
+  - mzml2isa.xml
+  - static/images/**
+  - test-data/**
+  - tool-data/**
+  - README.rst
+
Binary file mzml2isa-galaxy/galaxy/mzml2isa/static/images/mzml2isa.png has changed
Binary file mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/a_test_metabolite_profiling_mass_spectrometry.txt	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,7 @@
+"Sample Name"	"Protocol REF"	"Parameter Value[Post Extraction]"	"Parameter Value[Derivatization]"	"Extract Name"	"Protocol REF"	"Parameter Value[Chromatography Instrument]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Column model]"	"Parameter Value[Column type]"	"Labeled Extract Name"	"Label"	"Term Source REF"	"Term Accession Number"	"Protocol REF"	"Parameter Value[Scan polarity]"	"Parameter Value[Scan m/z range]"	"Unit"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Instrument]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Ion source]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Mass analyzer]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Inlet type]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Detector]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Detector mode]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Native spectrum identifier format]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Data file content]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Data file checksum type]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Raw data file format]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Instrument manufacturer]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Instrument serial number]"	"Parameter Value[Instrument software]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Number of scans]"	"Parameter Value[Time range]"	"Unit"	"Term Source REF"	"Term Accession Number"	"MS Assay Name"	"Raw Spectral Data File"	"Protocol REF"	"Normalization Name"	"Derived Spectral Data File"	"Protocol REF"	"Parameter Value[Data Transformation software]"	"Term Source REF"	"Term Accession Number"	"Parameter Value[Data Transformation software version]"	"Data Transformation Name"	"Term Source REF"	"Term Accession Number"	"Metabolite Assignment File"
+"5_samp"	"Extraction"	""	""	""	"Chromatography"	""	""	""	""	""	""	""	""	""	"Mass spectrometry"	"positive scan"	"140-2000"	"m/z"	"MS"	"http://purl.obolibrary.org/obo/MS_1000040"	"LTQ FT"	"MS"	"http://purl.obolibrary.org/obo/MS_1000448"	"electrospray ionization"	"MS"	"http://purl.obolibrary.org/obo/MS_1000073"	"radial ejection linear ion trap"	"MS"	"http://purl.obolibrary.org/obo/MS_1000083"	"electrospray inlet"	"MS"	"http://purl.obolibrary.org/obo/MS_1000057"	"electron multiplier"	"MS"	"http://purl.obolibrary.org/obo/MS_1000253"	""	""	""	"Thermo nativeID format"	"MS"	"http://purl.obolibrary.org/obo/MS_1000768"	"MSn spectrum"	"MS"	"http://purl.obolibrary.org/obo/MS_1000580"	"SHA-1"	"MS"	"http://purl.obolibrary.org/obo/MS_1000569"	"Thermo RAW file"	"MS"	"http://purl.obolibrary.org/obo/MS_1000563"	"Thermo Fisher Scientific instrument model"	"MS"	"http://purl.obolibrary.org/obo/MS_1000483"	"SN06061F"	"Xcalibur"	"MS"	"http://purl.obolibrary.org/obo/MS_1000532"	"48"	"0.0049-0.4872"	"minute"	"UO"	"http://purl.obolibrary.org/obo/UO_0000031"	"5_samp"	""	"Data transformation"	""	"5_samp.mzML"	"Metabolite identification"	"ProteoWizard"	"MS"	"http://purl.obolibrary.org/obo/MS_1000615"	"1.4.0"	"Conversion to mzML"	"MS"	"http://purl.obolibrary.org/obo/MS_1000544"	""
+"3_samp"	"Extraction"	""	""	""	"Chromatography"	""	""	""	""	""	""	""	""	""	"Mass spectrometry"	"positive scan"	"140-2000"	"m/z"	"MS"	"http://purl.obolibrary.org/obo/MS_1000040"	"LTQ FT"	"MS"	"http://purl.obolibrary.org/obo/MS_1000448"	"electrospray ionization"	"MS"	"http://purl.obolibrary.org/obo/MS_1000073"	"radial ejection linear ion trap"	"MS"	"http://purl.obolibrary.org/obo/MS_1000083"	"electrospray inlet"	"MS"	"http://purl.obolibrary.org/obo/MS_1000057"	"electron multiplier"	"MS"	"http://purl.obolibrary.org/obo/MS_1000253"	""	""	""	"Thermo nativeID format"	"MS"	"http://purl.obolibrary.org/obo/MS_1000768"	"MSn spectrum"	"MS"	"http://purl.obolibrary.org/obo/MS_1000580"	"SHA-1"	"MS"	"http://purl.obolibrary.org/obo/MS_1000569"	"Thermo RAW file"	"MS"	"http://purl.obolibrary.org/obo/MS_1000563"	"Thermo Fisher Scientific instrument model"	"MS"	"http://purl.obolibrary.org/obo/MS_1000483"	"SN06061F"	"Xcalibur"	"MS"	"http://purl.obolibrary.org/obo/MS_1000532"	"48"	"0.0049-0.4872"	"minute"	"UO"	"http://purl.obolibrary.org/obo/UO_0000031"	"3_samp"	""	"Data transformation"	""	"3_samp.mzML"	"Metabolite identification"	"ProteoWizard"	"MS"	"http://purl.obolibrary.org/obo/MS_1000615"	"1.4.0"	"Conversion to mzML"	"MS"	"http://purl.obolibrary.org/obo/MS_1000544"	""
+"2_samp"	"Extraction"	""	""	""	"Chromatography"	""	""	""	""	""	""	""	""	""	"Mass spectrometry"	"positive scan"	"140-2000"	"m/z"	"MS"	"http://purl.obolibrary.org/obo/MS_1000040"	"LTQ FT"	"MS"	"http://purl.obolibrary.org/obo/MS_1000448"	"electrospray ionization"	"MS"	"http://purl.obolibrary.org/obo/MS_1000073"	"radial ejection linear ion trap"	"MS"	"http://purl.obolibrary.org/obo/MS_1000083"	"electrospray inlet"	"MS"	"http://purl.obolibrary.org/obo/MS_1000057"	"electron multiplier"	"MS"	"http://purl.obolibrary.org/obo/MS_1000253"	""	""	""	"Thermo nativeID format"	"MS"	"http://purl.obolibrary.org/obo/MS_1000768"	"MSn spectrum"	"MS"	"http://purl.obolibrary.org/obo/MS_1000580"	"SHA-1"	"MS"	"http://purl.obolibrary.org/obo/MS_1000569"	"Thermo RAW file"	"MS"	"http://purl.obolibrary.org/obo/MS_1000563"	"Thermo Fisher Scientific instrument model"	"MS"	"http://purl.obolibrary.org/obo/MS_1000483"	"SN06061F"	"Xcalibur"	"MS"	"http://purl.obolibrary.org/obo/MS_1000532"	"48"	"0.0049-0.4872"	"minute"	"UO"	"http://purl.obolibrary.org/obo/UO_0000031"	"2_samp"	""	"Data transformation"	""	"2_samp.mzML"	"Metabolite identification"	"ProteoWizard"	"MS"	"http://purl.obolibrary.org/obo/MS_1000615"	"1.4.0"	"Conversion to mzML"	"MS"	"http://purl.obolibrary.org/obo/MS_1000544"	""
+"1_samp"	"Extraction"	""	""	""	"Chromatography"	""	""	""	""	""	""	""	""	""	"Mass spectrometry"	"positive scan"	"140-2000"	"m/z"	"MS"	"http://purl.obolibrary.org/obo/MS_1000040"	"LTQ FT"	"MS"	"http://purl.obolibrary.org/obo/MS_1000448"	"electrospray ionization"	"MS"	"http://purl.obolibrary.org/obo/MS_1000073"	"radial ejection linear ion trap"	"MS"	"http://purl.obolibrary.org/obo/MS_1000083"	"electrospray inlet"	"MS"	"http://purl.obolibrary.org/obo/MS_1000057"	"electron multiplier"	"MS"	"http://purl.obolibrary.org/obo/MS_1000253"	""	""	""	"Thermo nativeID format"	"MS"	"http://purl.obolibrary.org/obo/MS_1000768"	"MSn spectrum"	"MS"	"http://purl.obolibrary.org/obo/MS_1000580"	"SHA-1"	"MS"	"http://purl.obolibrary.org/obo/MS_1000569"	"Thermo RAW file"	"MS"	"http://purl.obolibrary.org/obo/MS_1000563"	"Thermo Fisher Scientific instrument model"	"MS"	"http://purl.obolibrary.org/obo/MS_1000483"	"SN06061F"	"Xcalibur"	"MS"	"http://purl.obolibrary.org/obo/MS_1000532"	"48"	"0.0049-0.4872"	"minute"	"UO"	"http://purl.obolibrary.org/obo/UO_0000031"	"1_samp"	""	"Data transformation"	""	"1_samp.mzML"	"Metabolite identification"	"ProteoWizard"	"MS"	"http://purl.obolibrary.org/obo/MS_1000615"	"1.4.0"	"Conversion to mzML"	"MS"	"http://purl.obolibrary.org/obo/MS_1000544"	""
+"6_samp"	"Extraction"	""	""	""	"Chromatography"	""	""	""	""	""	""	""	""	""	"Mass spectrometry"	"positive scan"	"140-2000"	"m/z"	"MS"	"http://purl.obolibrary.org/obo/MS_1000040"	"LTQ FT"	"MS"	"http://purl.obolibrary.org/obo/MS_1000448"	"electrospray ionization"	"MS"	"http://purl.obolibrary.org/obo/MS_1000073"	"radial ejection linear ion trap"	"MS"	"http://purl.obolibrary.org/obo/MS_1000083"	"electrospray inlet"	"MS"	"http://purl.obolibrary.org/obo/MS_1000057"	"electron multiplier"	"MS"	"http://purl.obolibrary.org/obo/MS_1000253"	""	""	""	"Thermo nativeID format"	"MS"	"http://purl.obolibrary.org/obo/MS_1000768"	"MSn spectrum"	"MS"	"http://purl.obolibrary.org/obo/MS_1000580"	"SHA-1"	"MS"	"http://purl.obolibrary.org/obo/MS_1000569"	"Thermo RAW file"	"MS"	"http://purl.obolibrary.org/obo/MS_1000563"	"Thermo Fisher Scientific instrument model"	"MS"	"http://purl.obolibrary.org/obo/MS_1000483"	"SN06061F"	"Xcalibur"	"MS"	"http://purl.obolibrary.org/obo/MS_1000532"	"48"	"0.0049-0.4872"	"minute"	"UO"	"http://purl.obolibrary.org/obo/UO_0000031"	"6_samp"	""	"Data transformation"	""	"6_samp.mzML"	"Metabolite identification"	"ProteoWizard"	"MS"	"http://purl.obolibrary.org/obo/MS_1000615"	"1.4.0"	"Conversion to mzML"	"MS"	"http://purl.obolibrary.org/obo/MS_1000544"	""
+"4_samp"	"Extraction"	""	""	""	"Chromatography"	""	""	""	""	""	""	""	""	""	"Mass spectrometry"	"positive scan"	"140-2000"	"m/z"	"MS"	"http://purl.obolibrary.org/obo/MS_1000040"	"LTQ FT"	"MS"	"http://purl.obolibrary.org/obo/MS_1000448"	"electrospray ionization"	"MS"	"http://purl.obolibrary.org/obo/MS_1000073"	"radial ejection linear ion trap"	"MS"	"http://purl.obolibrary.org/obo/MS_1000083"	"electrospray inlet"	"MS"	"http://purl.obolibrary.org/obo/MS_1000057"	"electron multiplier"	"MS"	"http://purl.obolibrary.org/obo/MS_1000253"	""	""	""	"Thermo nativeID format"	"MS"	"http://purl.obolibrary.org/obo/MS_1000768"	"MSn spectrum"	"MS"	"http://purl.obolibrary.org/obo/MS_1000580"	"SHA-1"	"MS"	"http://purl.obolibrary.org/obo/MS_1000569"	"Thermo RAW file"	"MS"	"http://purl.obolibrary.org/obo/MS_1000563"	"Thermo Fisher Scientific instrument model"	"MS"	"http://purl.obolibrary.org/obo/MS_1000483"	"SN06061F"	"Xcalibur"	"MS"	"http://purl.obolibrary.org/obo/MS_1000532"	"48"	"0.0049-0.4872"	"minute"	"UO"	"http://purl.obolibrary.org/obo/UO_0000031"	"4_samp"	""	"Data transformation"	""	"4_samp.mzML"	"Metabolite identification"	"ProteoWizard"	"MS"	"http://purl.obolibrary.org/obo/MS_1000615"	"1.4.0"	"Conversion to mzML"	"MS"	"http://purl.obolibrary.org/obo/MS_1000544"	""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/i_Investigation.txt	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,94 @@
+ONTOLOGY SOURCE REFERENCE
+Term Source Name	"MS"	"CSEO"	"NCBITAXON"	"EFO"	"BTO"	"CHMO"	"NCIT"	"UO"	"OBI"	"PSO"	"PRO"	"MI"	"CRISP"
+Term Source File	"http://data.bioontology.org/ontologies/MS"	"http://data.bioontology.org/ontologies/CSEO"	"http://data.bioontology.org/ontologies/NCBITAXON"	"http://data.bioontology.org/ontologies/EFO"	"http://data.bioontology.org/ontologies/BTO"	"http://data.bioontology.org/ontologies/CHMO"	"http://data.bioontology.org/ontologies/NCIT"	"http://data.bioontology.org/ontologies/UO"	"http://data.bioontology.org/ontologies/OBI"	"http://purl.org/spar/pso"	"http://purl.org/spar/pro"	"http://purl.obolibrary.org/obo/mi.owl"	"http://purl.bioontology.org/ontology/CRISP"
+Term Source Version	"103"	"2"	"4"	"132"	"26"	"16"	"40"	"43"	"25"	""	""	""	""
+Term Source Description	"Mass Spectrometry Ontology"	"Cigarette Smoke Exposure Ontology"	"National Center for Biotechnology Information (NCBI) Organismal Classification"	"Experimental Factor Ontology"	"BRENDA Tissue and Enzyme Source Ontology"	"Chemical Methods Ontology"	"National Cancer Institute Thesaurus"	"Units of Measurement Ontology"	"Ontology for Biomedical Investigations"	"Publishing Status Ontology"	"Publishing Roles Ontology"	"PSI Molecular Interactions"	"Computer Retrieval of Information on Scientific Projects Thesaurus"
+INVESTIGATION
+Investigation Identifier	"test"
+Investigation Title	"Investigation"
+Investigation Description	""
+Investigation Submission Date	""
+Investigation Public Release Date	""
+Comment[Created With Configuration]	""
+Comment[Last Opened With Configuration]	""
+Comment[Created With Tool]	"mzml2isa 0.4.24"
+INVESTIGATION PUBLICATIONS
+Investigation PubMed ID	""
+Investigation Publication DOI	""
+Investigation Publication Author List	""
+Investigation Publication Title	""
+Investigation Publication Status	""
+Investigation Publication Status Term Accession Number	""
+Investigation Publication Status Term Source REF	"PSO"
+INVESTIGATION CONTACTS
+Investigation Person Last Name	""	
+Investigation Person First Name	""	
+Investigation Person Mid Initials	""	
+Investigation Person Email	""	
+Investigation Person Phone	""	
+Investigation Person Fax	""	
+Investigation Person Address	""	
+Investigation Person Affiliation	""	
+Investigation Person Roles	""	
+Investigation Person Roles Term Accession Number	""	
+Investigation Person Roles Term Source REF	""	
+STUDY
+Study Identifier	"test"
+Study Title	"test"
+Study Description	""
+Study Submission Date	""
+Study Public Release Date	""
+Study File Name	"s_test.txt"
+STUDY DESIGN DESCRIPTORS
+Study Design Type	""
+Study Design Type Term Accession Number	""
+Study Design Type Term Source REF	""
+STUDY PUBLICATIONS
+Study PubMed ID	""
+Study Publication DOI	""
+Study Publication Author List	""
+Study Publication Title	""
+Study Publication Status	""
+Study Publication Status Term Accession Number	""
+Study Publication Status Term Source REF	"PSO"
+STUDY FACTORS
+Study Factor Name	""
+Study Factor Type	""
+Study Factor Type Term Accession Number	""
+Study Factor Type Term Source REF	""
+STUDY ASSAYS
+Study Assay File Name	"a_test_metabolite_profiling_mass_spectrometry.txt"
+Study Assay Measurement Type	"metabolite profiling"
+Study Assay Measurement Type Term Accession Number	"http://purl.obolibrary.org/obo/OBI_0000366"
+Study Assay Measurement Type Term Source REF	"OBI"
+Study Assay Technology Type	"mass spectrometry"
+Study Assay Technology Type Term Accession Number	"http://purl.obolibrary.org/obo/OBI_0000470"
+Study Assay Technology Type Term Source REF	"OBI"
+Study Assay Technology Platform	"LTQ FT"
+STUDY PROTOCOLS
+Study Protocol Name	"Sample collection"	"Extraction"	"Chromatography"	"Mass spectrometry"	"Data transformation"	"Metabolite identification"
+Study Protocol Type	"Sample collection"	"Extraction"	"Chromatography"	"Mass spectrometry"	"Data transformation"	"Metabolite identification"
+Study Protocol Type Term Accession Number	"http://purl.bioontology.org/ontology/CRISP/4009-0034"	"http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#C61575"	"http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#C16431"	"http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#C17156"	"http://purl.obolibrary.org/obo/OBI_0200000"	"http://purl.obolibrary.org/obo/MI_2131"
+Study Protocol Type Term Source REF	"CRISP"	"NCIT"	"NCIT"	"NCIT"	"OBI"	"MI"
+Study Protocol Description	""	""	""	""	""	""
+Study Protocol URI	""	""	""	""	""	""
+Study Protocol Version	""	""	""	""	""	""
+Study Protocol Parameters Name	""	"Post Extraction;Derivatization"	"Chromatography Instrument;Column type;Column model"	"Instrument software;Detector mode;Spectrum representation;Inlet type;Number of scans;Scan m/z range;Detector;Instrument serial number;Raw data file checksum type;Mass analyzer;Instrument manufacturer;Raw data file format;Scan polarity;Raw data file checksum value;Instrument software version;Native spectrum identifier format;Instrument;Data file content;Time range;Ion source"	""	"Data Transformation software;Data Transformation software version"
+Study Protocol Parameters Name Term Accession Number	""	";"	";;"	";;;;;;;;;;;;;;;;;;;"	""	";"
+Study Protocol Parameters Name Term Source REF	""	";"	";;"	";;;;;;;;;;;;;;;;;;;"	""	";"
+Study Protocol Components Name	""	""	""	""	""	""
+Study Protocol Components Type	""	""	""	""	""	""
+Study Protocol Components Type Term Accession Number	""	""	""	""	""	""
+Study Protocol Components Type Term Source REF	""	""	""	""	""	""
+STUDY CONTACTS
+Study Person Last Name	""
+Study Person First Name	""
+Study Person Mid Initials	""
+Study Person Email	""
+Study Person Phone	""
+Study Person Fax	""
+Study Person Address	""
+Study Person Affiliation	""
+Study Person Roles	""
+Study Person Roles Term Accession Number	""
+Study Person Roles Term Source REF 	""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/index.html	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,1 @@
+<a href="test/a_test_metabolite_profiling_mass_spectrometry.txt">a_test_metabolite_profiling_mass_spectrometry.txt</a><br/><a href="test/i_Investigation.txt">i_Investigation.txt</a><br/><a href="test/s_test.txt">s_test.txt</a><br/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/test-data/metabolomics_study/test/s_test.txt	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,7 @@
+"Source Name"	"Characteristics[Organism]"	"Term Source REF"	"Term Accession Number"	"Characteristics[Variant]"	"Term Source REF"	"Term Accession Number"	"Characteristics[Organism part]"	"Term Source REF"	"Term Accession Number"	"Protocol REF"	"Sample Name"
+""	""	""	""	""	""	""	""	""	""	"Sample collection"	"5_samp"
+""	""	""	""	""	""	""	""	""	""	"Sample collection"	"3_samp"
+""	""	""	""	""	""	""	""	""	""	"Sample collection"	"2_samp"
+""	""	""	""	""	""	""	""	""	""	"Sample collection"	"1_samp"
+""	""	""	""	""	""	""	""	""	""	"Sample collection"	"6_samp"
+""	""	""	""	""	""	""	""	""	""	"Sample collection"	"4_samp"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/tool-data/get_status_ont.py	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,51 @@
+import sys
+import os
+import json
+import urllib.error
+import urllib.request as rq
+from urllib.parse import quote
+import csv 
+
+###############################################################################
+# Python3 script to get tab seperated maf_index.loc files for drop down menus
+###############################################################################
+# Code modified from mzm2isa-qt python package developed by Martin Larralde
+# https://github.com/althonos/mzml2isa-qt/scrapers.py
+
+
+def get_ont_loc(jsonSourceUrl, sparName, ontoClass, filepth):
+    onto = json.loads(rq.urlopen(jsonSourceUrl).read().decode('utf-8'))
+    info = []
+    for x in onto:
+        if '@type' in x:
+            if ontoClass in x['@type']:
+                info.append(x)
+    info = [ (x['http://www.w3.org/2000/01/rdf-schema#label'],x['@id']) for x in info ]
+
+    ontd  = {x[0]['@value'].capitalize():y for (x,y) in info}
+
+    with open(filepth, 'w') as f:
+        writer = csv.writer(f, delimiter='\t', quoting=csv.QUOTE_ALL)
+        writer.writerow(["name", "link"])
+        for key, value in ontd.items():
+            writer.writerow([key, value])
+
+    return ontd
+
+#-------------------------------
+# publication status ontology
+#-------------------------------
+jsonSourceUrl = "http://www.sparontologies.net/ontologies/pso/source.json"
+sparName = "pso"
+ontoClass = "http://purl.org/spar/pso/PublicationStatus"
+get_ont_loc(jsonSourceUrl, sparName, ontoClass, './pub_status.loc')
+
+#-------------------------------
+# Job role ontology
+#-------------------------------
+jsonSourceUrl = "http://www.sparontologies.net/ontologies/pro/source.json"
+sparName = "pro"
+ontoClass = "http://purl.org/spar/pro/PublishingRole"
+get_ont_loc(jsonSourceUrl, sparName, ontoClass, './pub_role.loc')
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/galaxy/mzml2isa/wrapper.py	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,238 @@
+#!/usr/bin/env python
+
+import sys
+import json
+import os
+import argparse
+import textwrap
+import csv
+import inspect
+
+
+def ontology_lookup(name, table):
+    # takes in accession number outputs the name
+    filename = inspect.getframeinfo(inspect.currentframe()).filename
+    path = os.path.dirname(os.path.abspath(filename))
+
+
+    # check if correct table
+    if table=="role":
+        tablepth = os.path.join(path, 'pub_role.loc')
+    elif table=="status":
+        tablepth = os.path.join(path, 'pub_status.loc')
+    else:
+        print "Table not recognised"
+        return ""
+
+    with open(tablepth, "rb") as csvfile:
+        reader = csv.reader(csvfile, delimiter='\t')
+        ont_dict = dict((k, v) for v, k in reader)
+        try:
+            return ont_dict[name]
+        except KeyError:
+            return ""
+
+
+
+def main():
+
+    p = argparse.ArgumentParser(prog='PROG',
+                                formatter_class=argparse.RawDescriptionHelpFormatter,
+                                description='''DI-MS processing for DMA''',
+                                epilog=textwrap.dedent('''\
+                            -------------------------------------------------------------------------
+                            '''))
+
+
+    p.add_argument('-inputzip', dest='inputzip', required=True)
+    p.add_argument('-out_dir', dest='out_dir', required=True)
+    p.add_argument('-html_file', dest='html_file', required=True)
+    p.add_argument('-study_title', dest='study_title', required=True)
+
+    p.add_argument('-jsontxt', dest='jsontxt', required=False, nargs='?')
+
+    p.add_argument('--s_submission_date', dest='s_submission_date', required=False, default="", nargs='?')
+    p.add_argument('--s_release_date', dest='s_release_date', required=False, default="", nargs='?')
+    p.add_argument('--s_description', dest='s_description', required=False, default="", nargs='?')
+    p.add_argument('--s_pubmed', dest='s_pubmed', required=False, default="", nargs='?')
+    p.add_argument('--s_pub_doi', dest='s_pub_doi', required=False, default="", nargs='?')
+    p.add_argument('--s_pub_status', dest='s_pub_status', required=False, default="", nargs='?')
+    p.add_argument('--s_pub_author', dest='s_pub_author', required=False, default="", nargs='?')
+    p.add_argument('--s_pub_title', dest='s_pub_title', required=False, default="", nargs='?')
+    p.add_argument('--s_first_name', dest='s_first_name', required=False, default="", nargs='?')
+    p.add_argument('--s_mid_initials', dest='s_mid_initials', required=False, default="", nargs='?')
+    p.add_argument('--s_last_name', dest='s_last_name', required=False, default="", nargs='?')
+    p.add_argument('--s_telephone', dest='s_telephone', required=False, default="", nargs='?')
+    p.add_argument('--s_fax', dest='s_fax', required=False, default="", nargs='?')
+    p.add_argument('--s_affiliation', dest='s_affiliation', required=False, default="", nargs='?')
+    p.add_argument('--s_role', dest='s_role', required=False, default="", nargs='?')
+    p.add_argument('--s_mail', dest='s_mail', required=False, default="", nargs='?')
+    p.add_argument('--s_address', dest='s_address', required=False, default="", nargs='?')
+    p.add_argument('--i_submission_date', dest='i_submission_date', required=False, default="", nargs='?')
+    p.add_argument('--i_release_date', dest='i_release_date', required=False, default="", nargs='?')
+    p.add_argument('--i_description', dest='i_description', required=False, default="", nargs='?')
+    p.add_argument('--i_pubmed', dest='i_pubmed', required=False, default="", nargs='?')
+    p.add_argument('--i_pub_doi', dest='i_pub_doi', required=False, default="", nargs='?')
+    p.add_argument('--i_pub_title', dest='i_pub_title', required=False, default="", nargs='?')
+    p.add_argument('--i_pub_status', dest='i_pub_status', required=False, default="", nargs='?')
+    p.add_argument('--i_pub_author', dest='i_pub_author', required=False, default="", nargs='?')
+    p.add_argument('--i_first_name', dest='i_first_name', required=False, default="", nargs='?')
+    p.add_argument('--i_mid_initials', dest='i_mid_initials', required=False, default="", nargs='?')
+    p.add_argument('--i_last_name', dest='i_last_name', required=False, default="", nargs='?')
+    p.add_argument('--i_telephone', dest='i_telephone', required=False, default="", nargs='?')
+    p.add_argument('--i_fax', dest='i_fax', required=False, default="", nargs='?')
+    p.add_argument('--i_affiliation', dest='i_affiliation', required=False, default="", nargs='?')
+    p.add_argument('--i_role', dest='i_role', required=False, default="", nargs='?')
+    p.add_argument('--i_mail', dest='i_mail', required=False, default="", nargs='?')
+    p.add_argument('--i_address', dest='i_address', required=False, default="", nargs='?')
+    p.add_argument('--organism_text', dest='organism_text', required=False, default="", nargs='?')
+    p.add_argument('--organism_ref', dest='organism_ref', required=False, default="", nargs='?')
+    p.add_argument('--organism_iri', dest='organism_iri', required=False, default="", nargs='?')
+    p.add_argument('--organism_part_text', dest='organism_part_text', required=False, default="", nargs='?')
+    p.add_argument('--organism_part_ref', dest='organism_part_ref', required=False, default="", nargs='?')
+    p.add_argument('--organism_part_iri', dest='organism_part_iri', required=False, default="", nargs='?')
+    p.add_argument('--organism_variant_text', dest='organism_variant_text', required=False, default="", nargs='?')
+    p.add_argument('--organism_variant_ref', dest='organism_variant_ref', required=False, default="", nargs='?')
+    p.add_argument('--organism_variant_iri', dest='organism_variant_iri', required=False, default="", nargs='?')
+
+    args = p.parse_args()
+
+    USERMETA = {'characteristics': {'organism': {'name': '', 'accession': '', 'ref': ''},
+                                    'organism_variant': {'name': '', 'accession': '', 'ref': ''},
+                                    'organism_part': {'name': '', 'accession': '', 'ref': ''},
+                                    },
+                'investigation': {'identifier': '', 'title': 'Investigation', 'description': '',
+                                  'submission_date': '', 'release_date': ''
+                                  },
+                'investigation_publication': {'pubmed': '', 'doi': '', 'author_list': '', 'title': '',
+                                              'status': {'name': '', 'accession': '', 'ref': 'PSO'},
+                                              },
+
+                'study': {
+                    'title': '', 'description': '', 'submission_date': '', 'release_date': '',
+                },
+                'study_publication': {'pubmed': '', 'doi': '', 'author_list': '', 'title': '',
+                                      'status': {'name': '', 'accession': '', 'ref': 'PSO'},
+                                      },
+
+                'description': {'sample_collect': '', 'extraction': '', 'chroma': '', 'mass_spec': '',
+                                'data_trans': '', 'metabo_id': ''
+                                },
+
+                # Multiple Values Parameters
+                'study_contacts': [
+                    {'first_name': '', 'last_name': '', 'mid': '', 'email': '',
+                     'fax': '', 'phone': '', 'adress': '', 'affiliation': '',
+                     'roles': {'name': '', 'accession': '', 'ref': ''},
+                     },
+                ],
+
+                'investigation_contacts': [
+                    {'first_name': '', 'last_name': '', 'mid': '', 'email': '',
+                     'fax': '', 'phone': '', 'adress': '', 'affiliation': '',
+                     'roles': {'name': '', 'accession': '', 'ref': ''},
+                     },
+                ],
+
+                'Post Extraction': {'value': ''},
+                'Derivatization': {'value': ''},
+                'Chromatography Instrument': {'name': '', 'ref': '', 'accession': ''},
+                'Column type': {'value': ''},
+                'Column model': {'value': ''},
+                }
+
+    # check if using json file
+    if args.jsontxt and os.path.isfile(args.jsontxt):
+        with open(args.jsontxt, 'r') as f:
+            USERMETA = json.load(f)
+    else:
+
+        # Fill in USERMETA dictionary
+        USERMETA['characteristics']['organism']['value'] = args.organism_text
+        USERMETA['characteristics']['organism']['accession'] = args.organism_iri
+        USERMETA['characteristics']['organism']['ref'] = args.organism_ref
+
+        USERMETA['characteristics']['organism_variant']['value'] = args.organism_variant_text
+        USERMETA['characteristics']['organism_variant']['accession'] = args.organism_variant_iri
+        USERMETA['characteristics']['organism_variant']['ref'] = args.organism_variant_ref
+
+        USERMETA['characteristics']['organism_part']['value'] = args.organism_part_text
+        USERMETA['characteristics']['organism_part']['accession'] = args.organism_part_iri
+        USERMETA['characteristics']['organism_part']['ref'] = args.organism_part_ref
+
+        # USERMETA['investigation']['identifier'] = # uses study identifier
+        USERMETA['investigation']['description'] = args.i_description
+        USERMETA['investigation']['submission_date'] = args.i_submission_date
+        USERMETA['investigation']['release_date'] = args.i_release_date
+
+        USERMETA['investigation_publication']['pubmed'] = args.i_pubmed
+        USERMETA['investigation_publication']['author_list'] = args.i_pub_author
+        USERMETA['investigation_publication']['title'] = args.i_pub_title
+        USERMETA['investigation_publication']['doi'] = args.i_pub_doi
+        USERMETA['investigation_publication']['status']['name'] = ontology_lookup(args.i_pub_status, 'status')
+        USERMETA['investigation_publication']['status']['accession'] = args.i_pub_status
+
+        USERMETA['investigation_contacts'][0]['first_name'] = args.i_first_name
+        USERMETA['investigation_contacts'][0]['last_name'] = args.i_last_name
+        USERMETA['investigation_contacts'][0]['mid'] = args.i_mid_initials
+        USERMETA['investigation_contacts'][0]['email'] = args.i_mail
+        USERMETA['investigation_contacts'][0]['fax'] = args.i_fax
+        USERMETA['investigation_contacts'][0]['phone'] = args.i_telephone
+        USERMETA['investigation_contacts'][0]['adress'] = args.i_address
+        USERMETA['investigation_contacts'][0]['affiliation'] = args.i_affiliation
+        USERMETA['investigation_contacts'][0]['roles']['name'] = ontology_lookup(args.i_role, 'role')
+        USERMETA['investigation_contacts'][0]['roles']['accession'] = args.i_role
+
+        USERMETA['study']['title'] = args.study_title
+        USERMETA['study']['description'] = args.s_description
+        USERMETA['study']['submission_date'] = args.s_submission_date
+        USERMETA['study']['release_date'] = args.s_release_date
+
+        USERMETA['study_publication']['pubmed'] = args.s_pubmed
+        USERMETA['study_publication']['author_list'] = args.s_pub_author
+        USERMETA['study_publication']['title'] = args.s_pub_title
+        USERMETA['study_publication']['doi'] = args.s_pub_doi
+        USERMETA['study_publication']['status']['name'] = ontology_lookup(args.s_pub_status, 'status')
+        USERMETA['study_publication']['status']['accession'] = args.s_pub_status
+
+        USERMETA['study_contacts'][0]['first_name'] = args.s_first_name
+        USERMETA['study_contacts'][0]['last_name'] = args.s_last_name
+        USERMETA['study_contacts'][0]['mid'] = args.s_mid_initials
+        USERMETA['study_contacts'][0]['email'] = args.s_mail
+        USERMETA['study_contacts'][0]['fax'] = args.s_fax
+        USERMETA['study_contacts'][0]['phone'] = args.s_telephone
+        USERMETA['study_contacts'][0]['adress'] = args.s_address
+        USERMETA['study_contacts'][0]['affiliation'] = args.s_affiliation
+        USERMETA['study_contacts'][0]['roles']['name'] = ontology_lookup(args.s_role, 'role')
+        USERMETA['study_contacts'][0]['roles']['accession'] = args.s_role
+
+
+    try:
+        from mzml2isa.parsing import full_parse
+        # import progressbar as pb
+        # parse the files
+        full_parse(args.inputzip, args.out_dir, args.study_title, usermeta=USERMETA, split=True, merge=False, verbose=True,
+                   multip=False)
+
+    except ImportError:
+        import tempfile
+        temp = tempfile.NamedTemporaryFile()
+        temp.write(json.dumps(USERMETA))
+        temp.seek(0)
+        os.system("mzml2isa -i %s -o %s -s %s -m %s" % (args.inputzip, args.out_dir, args.study_title, temp.name))
+        temp.close()
+
+    # The html output is now redundant, the output will be hidden to end user. Have left here in case we need to
+    # revert back to the old output style. If this is the case we need to use
+    # 'wrapper.py -out_dir $html_file.extra_files_path' in the xml code
+    html_code = '<a href="%s/a_%s_metabolite_profiling_mass_spectrometry.txt">a_%s_metabolite_profiling_mass_spectrometry.txt</a>' \
+                '<br/><a href="%s/i_Investigation.txt">i_Investigation.txt</a><br/>' \
+                '<a href="%s/s_%s.txt">s_test.txt</a><br/>' % tuple([args.study_title] * 6)
+
+    with open(args.html_file, 'wb') as f:
+        f.write(html_code)
+
+
+
+if __name__ == "__main__":
+    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mzml2isa-galaxy/test.sh	Fri Feb 03 11:39:54 2017 -0500
@@ -0,0 +1,22 @@
+sudo apt-get install python-dev libxml2-dev libxslt1-dev zlib1g-dev
+sudo apt-get install -y python-virtualenv
+virtualenv planemo-venv
+. planemo-venv/bin/activate
+pip install --upgrade pip setuptools
+pip install planemo
+#planemo travis_before_install
+#. .travis/env.sh # source environment created by planemo
+export DOWNLOAD_CACHE=$HOME/download_cache
+mkdir $DOWNLOAD_CACHE
+#git clone https://github.com/ISA-tools/mzml2isa-galaxy.git
+planemo dependency_script -r packages/package_mzml2isa_0_4_22/
+. env.sh
+bash dep_install.sh
+planemo test --galaxy_root=../galaxy galaxy/mzml2isa/
+rm env.sh
+rm dep_install.sh
+deactivate #exit virtualenv
+rm -r planemo-venv
+rm -r lib
+
+