Next changeset 1:c95c37aad7b4 (2017-02-03) |
Commit message:
Uploaded |
added:
nmrml2isa-galaxy/.gitignore nmrml2isa-galaxy/.travis.yml nmrml2isa-galaxy/README.md nmrml2isa-galaxy/galaxy/nmrml2isa/README.rst nmrml2isa-galaxy/galaxy/nmrml2isa/nmrml2isa.xml nmrml2isa-galaxy/galaxy/nmrml2isa/nmrml2isa_macros.xml nmrml2isa-galaxy/galaxy/nmrml2isa/ontology_search.py nmrml2isa-galaxy/galaxy/nmrml2isa/pub_role.loc nmrml2isa-galaxy/galaxy/nmrml2isa/pub_status.loc nmrml2isa-galaxy/galaxy/nmrml2isa/shed.yml nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study.zip nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/a_test_metabolite_profiling_NMR_spectroscopy.txt nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/i_Investigation.txt nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/index.html nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/s_test.txt nmrml2isa-galaxy/galaxy/nmrml2isa/tool-data/get_status_ont.py nmrml2isa-galaxy/galaxy/nmrml2isa/wrapper.py nmrml2isa-galaxy/test.sh |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/.gitignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/.gitignore Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -0,0 +1,7 @@ +*.pyc +.idea +*.egg-info +.egg +*~ +*. +.DS_Store |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/.travis.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/.travis.yml Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -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/nmrml2isa/ + +script: + - planemo test --install_galaxy --no_cache_galaxy --conda_dependency_resolution ${TRAVIS_BUILD_DIR}/galaxy/nmrml2isa/ --galaxy_branch "dev" + |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/README.md Fri Feb 03 11:25:37 2017 -0500 |
[ |
@@ -0,0 +1,32 @@ +nmrml2isa for galaxy +=============== + +[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat-square)](http://bioconda.github.io/recipes/nmrml2isa/README.html) [![Build Status](https://travis-ci.org/ISA-tools/nmrml2isa-galaxy.svg?branch=master)](https://travis-ci.org/ISA-tools/nmrml2isa-galaxy) + +This is a Galaxy wrapper for the nmrml2isa 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 + +nmrml2isa 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) |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/nmrml2isa.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/nmrml2isa.xml Fri Feb 03 11:25:37 2017 -0500 |
[ |
b'@@ -0,0 +1,256 @@\n+<tool id="nmrml2isa" name="nmrml2isa" version="0.1.0">\n+ <description>Parser to get meta information from nmrML files and create an ISA-Tab structure</description>\n+ \n+ <macros>\n+ <import>nmrml2isa_macros.xml</import>\n+ </macros>\n+\n+ <code file="ontology_search.py" />\n+\n+ <requirements>\n+ <requirement type="package" version="0.3.0">nmrml2isa</requirement>\n+ </requirements>\n+\n+ <stdio>\n+ <exit_code range="1:" />\n+ </stdio>\n+ \n+ <command interpreter="python"><![CDATA[\n+ #set $s_submission_date = ""\n+ #set $s_release_date = ""\n+ #set $s_description = ""\n+ #set $s_pubmed = ""\n+ #set $s_pub_doi = ""\n+ #set $s_pub_status = ""\n+ #set $s_pub_author = ""\n+ #set $s_pub_title = ""\n+\n+ #set $s_first_name = ""\n+ #set $s_mid_initials = ""\n+ #set $s_last_name = ""\n+ #set $s_telephone = ""\n+ #set $s_fax = ""\n+ #set $s_affiliation = ""\n+ #set $s_role = ""\n+ #set $s_mail = ""\n+ #set $s_address = ""\n+\n+ #set $i_submission_date = ""\n+ #set $i_release_date = ""\n+ #set $i_description = ""\n+ #set $i_pubmed = ""\n+ #set $i_pub_doi = ""\n+ #set $i_pub_title = ""\n+ #set $i_pub_status = ""\n+ #set $i_pub_author = ""\n+\n+ #set $i_first_name = ""\n+ #set $i_mid_initials = ""\n+ #set $i_last_name = ""\n+ #set $i_telephone = ""\n+ #set $i_fax = ""\n+ #set $i_affiliation = ""\n+ #set $i_role = ""\n+ #set $i_mail = ""\n+ #set $i_address = ""\n+\n+ #set $organism_text = ""\n+ #set $organism_ref = ""\n+ #set $organism_iri = ""\n+ #set $organism_variant_text = ""\n+ #set $organism_variant_ref = ""\n+ #set $organism_variant_iri = ""\n+ #set $organism_part_text = ""\n+ #set $organism_part_ref = ""\n+ #set $organism_part_iri = ""\n+\n+\n+ #if $study_meta.study_select=="show"\n+ \t#set $submission_date = $study_meta.s_submission_date\n+ \t#set $s_release_date = $study_meta.s_release_date\n+ #set $s_description = $study_meta.s_description\n+ \t#set $s_pubmed = $study_meta.s_pubmed\n+ \t#set $s_pub_doi = $study_meta.s_pub_doi\n+ #set $s_pub_status = $study_meta.s_pub_status\n+ #set $s_pub_author = $study_meta.s_pub_author\n+ #set $s_pub_title = $study_meta.s_pub_title\n+ #end if\n+\n+ #if ($s_contacts.s_contacts_select=="show"):\n+ \t#set $s_first_name = $s_contacts.s_first_name\n+ #set $s_mid_initials = $s_contacts.s_mid_initials\n+ #set $s_last_name = $s_contacts.s_last_name\n+ #set $s_telephone = $s_contacts.s_telephone\n+ #set $s_fax = $s_contacts.s_fax\n+ #set $s_affiliation = $s_contacts.s_affiliation\n+ #set $s_role = $s_contacts.s_role\n+ #set $s_mail = $s_contacts.s_mail\n+ #set $s_address = $s_contacts.s_address\n+ #end if\n+\n+ #if ($i_contacts.i_contacts_select=="show"):\n+ \t#set $i_first_name = $i_contacts.i_first_name\n+ #set $i_mid_initials = $i_contacts.i_mid_initials\n+ #set $i_last_name = $i_contacts.i_last_name\n+ #set $i_telephone = $i_contacts.i_telephone\n+ #set $i_fax = $i_contacts.i_fax\n+ #set $i_affiliation = $i_contacts.i_affiliation\n+ #set $i_role = $i_contacts.i_role\n+ #set $i_mail = $i_contacts.i_mail\n+ #set $i_address = $i_contacts.i_address\n+ #end if\n+\n+ #if ($invest_meta.invest_select=="show"):\n+ \t#set $i_submission_date = $invest_meta.i_submission_date\n+ #set $i_release_date = $invest_meta.i_release_date \n+ #set $i_description = $invest_meta.i_description\n+ #set $i_pubmed = $invest_meta.i_pubmed\n+ #set $i_pub_doi = $invest_meta.i_pub_doi\n+ #set $i_pub_title = $invest_meta.i_pub_title\n+ #set $i_pub_status = $invest_meta.i_pub_status\n+ #set $i_pub_author = $invest_meta.i_pub_author\n+ #end if\n+\n+ #if ($exp_meta.exp_select=="show"):\n+ \t#set $organism_text = $exp_meta.organism_text\n+ #set $organism_ref = $exp_meta.organism_ref\n+ #set $organism_iri '..b'nt_ref "$organism_variant_ref"\n+ --organism_variant_iri "$organism_variant_iri"\n+ --organism_part_text "$organism_part_text"\n+ --organism_part_ref "$organism_part_ref"\n+ --organism_part_iri "$organism_part_iri";\n+\n+ ln -s ./"$name_of_study" study_dir;\n+\n+ cd study_dir;\n+ zip isa.zip i_* a_* s_* && mv isa.zip "$ISA_zip";\n+ ]]>\n+ </command>\n+\n+ <inputs>\n+ <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" />\n+ <param format="zip" name="inputzip" type="data" label="nmrML zip file" help="A zipped folder of nmrML files"/>\n+ <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 see link for example format"/>\n+ <expand macro="studymacro"/>\n+ <expand macro="investmacro"/>\n+ <expand macro="expmacro"/>\n+ <expand macro="scontactmacro"/>\n+ <expand macro="icontactmacro"/>\n+ </inputs>\n+ <outputs>\n+<!--\n+Notes:\n+\n+- Multiple a_ files\n+- Single s_ as per mzml2isa definition (ISA does allow more than one s_ file).\n+- Single i_ file.\n+\n+The html output is now redundant, have left as hidden for now in case we revert back later. However,\n+this would require changing the out_dir for wrapper.py back to $html_file.extra_files_path. i.e.\n+\'wrapper.py -out_dir $html_file.extra_files_path\'\n+\n+-->\n+ <data format="html" name="html_file" label="" hidden="true" />\n+ <data name="ISA_zip" format="zip" label="ISA Zip file"/>\n+ <collection type="list" label="A Files" name="a_files">\n+ <discover_datasets pattern="(?P<designation>a_.+)\\.txt" directory="study_dir" format="tabular"/>\n+ </collection>\n+ <collection type="list" label="S Files" name="s_files">\n+ <discover_datasets pattern="(?P<designation>s_.+)\\.txt" directory="study_dir" format="tabular"/>\n+ </collection>\n+ <data name="i_file" format="tabular" label="I File" from_work_dir="study_dir/i_Investigation.txt" visible="true"/>\n+ </outputs>\n+ <tests>\n+ <test>\n+ <param name="name_of_study" value="test" />\n+ <param name="inputzip" value="metabolomics_study.zip" ftype="zip" />\n+ <output name="html_file" value="metabolomics_study/test/index.html" />\n+ <output name="i_file" value="metabolomics_study/test/i_Investigation.txt" />\n+ <output_collection name="a_files" type="list" count="1">\n+ <element name="a_test_metabolite_profiling_NMR_spectroscopy">\n+ <assert_contents>\n+ <has_n_columns n="81" />\n+ </assert_contents>\n+ </element>\n+ </output_collection>\n+ <output_collection name="s_files" type="list" count="1">\n+ <element name="s_test">\n+ <assert_contents>\n+ <has_n_columns n="12" />\n+ </assert_contents>\n+ </element>\n+ </output_collection>\n+ </test>\n+ </tests>\n+ <help><![CDATA[\n+**Overview**\n+ A program to automatically generate ISA-Tab metadata files from nmrML data files.\n+\n+ Additional meta-information not found within the nmrML file can be added either through a JSON file or via the drop\n+ down menus. However, it is recommended that the nmrML2ISA tool is used to create a semi-completed ISA-Tab file structure\n+ that is further annotated using ISAcreator https://github.com/ISA-tools/ISAcreator\n+\n+ ]]></help>\n+ <citations>\n+ <citation type="doi">10.1002/0471250953.bi1413s53</citation>\n+ <citation type="doi">10.1007/s11306-015-0879-3</citation>\n+ <citation type="doi">10.1038/ng.1054</citation>\n+ </citations>\n+</tool>\n+\n+\n+\n+\n' |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/nmrml2isa_macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/nmrml2isa_macros.xml Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -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> |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/ontology_search.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/ontology_search.py Fri Feb 03 11:25:37 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 + |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/pub_role.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/pub_role.loc Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -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" |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/pub_status.loc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/pub_status.loc Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -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" |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/shed.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/shed.yml Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -0,0 +1,15 @@ +name: nmrml2isa +owner: rjmweber +description: Contains a tool dependency definition that downloads and extract version 0.2.1 of nmrml2isa. +homepage_url: https://github.com/ISA-tools/nmrml2isa +long_description: nmrml2isa is a Python program that can be used to generate an ISA-Tab structure out of nmrML 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/nmrml2isa +type: unrestricted +categories: + - "Metabolomics" +include: + - nmrml2isa.xml + - static/images/** + - test-data/** + - README.rst + |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study.zip |
b |
Binary file nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study.zip has changed |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/a_test_metabolite_profiling_NMR_spectroscopy.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/a_test_metabolite_profiling_NMR_spectroscopy.txt Fri Feb 03 11:25:37 2017 -0500 |
[ |
@@ -0,0 +1,4 @@ +"Sample Name" "Protocol REF" "Parameter Value[Extraction Method]" "Term Source REF" "Term Accession Number" "Extract Name" "Protocol REF" "Parameter Value[NMR tube type]" "Term Source REF" "Term Accession Number" "Parameter Value[Solvent]" "Term Source REF" "Term Accession Number" "Parameter Value[Sample pH]" "Parameter Value[Temperature]" "Unit" "Term Source REF" "Term Accession Number" "Labeled Extract Name" "Label" "Term Source REF" "Term Accession Number" "Protocol REF" "Parameter Value[Instrument manufacturer]" "Term Source REF" "Term Accession Number" "Parameter Value[Instrument]" "Term Source REF" "Term Accession Number" "Parameter Value[NMR Probe]" "Term Source REF" "Term Accession Number" "Parameter Value[Instrument software]" "Term Source REF" "Term Accession Number" "Parameter Value[Instrument software version]" "Parameter Value[Acquisition Nucleus]" "Term Source REF" "Term Accession Number" "Parameter Value[Number of transients]" "Parameter Value[Number of steady state scans]" "Parameter Value[Pulse sequence]" "Term Source REF" "Term Accession Number" "Parameter Value[Pulse Width]" "Unit" "Term Source REF" "Term Accession Number" "Parameter Value[Sweep Width]" "Unit" "Term Source REF" "Term Accession Number" "Parameter Value[Relaxation Delay]" "Unit" "Term Source REF" "Term Accession Number" "Parameter Value[Magnetic field strength]" "Unit" "Term Source REF" "Term Accession Number" "Parameter Value[Acquisition Parameter Data Format]" "Term Source REF" "Term Accession Number" "Protocol REF" "NMR Assay Name" "Free Induction Decay 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" "Data Transformation Name" "Term Source REF" "Term Accession Number" "Metabolite Assignment File" +"ADG10003u_007" "Extraction" "" "" "" "" "NMR sample" "Sample-tube" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400132" "" "" "" "" "300.0" "kelvin" "UO" "http://purl.obolibrary.org/obo/UO_0000012" "" "" "" "" "NMR spectroscopy" "Bruker" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400256" "Bruker NMR instrument" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400198" "5 mm PATXI 1H-13C/15N XYZ-GRD Z561501/0002" "" "" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "Version 3.5" "hydrogen atom" "CHEBI" "http://purl.obolibrary.org/obo/CHEBI_49637" "128" "8" "noesypr1d" "" "" "7.75" "microsecond" "UO" "http://purl.obolibrary.org/obo/UO_0000029" "14005.602241" "hertz" "UO" "http://purl.obolibrary.org/obo/UO_0000106" "3.0" "second" "UO" "http://purl.obolibrary.org/obo/UO_0000010" "16.438" "tesla" "UO" "http://purl.obolibrary.org/obo/UO_0000228" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "NMR assay" "ADG10003u_007" "ADG10003u_007/10/fid" "Data transformation" "" "<zipfile.ZipExtFile object at 0x7f28f715f390>" "Metabolite identification" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "Version 3.5" "phase correction" "NMRCV" "http://nmrML.org/nmrCV#NMR:1000071" "fourier transformation" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400044" "" +"ADG10003u_008" "Extraction" "" "" "" "" "NMR sample" "Sample-tube" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400132" "" "" "" "" "300.0" "kelvin" "UO" "http://purl.obolibrary.org/obo/UO_0000012" "" "" "" "" "NMR spectroscopy" "Bruker" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400256" "Bruker NMR instrument" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400198" "5 mm PATXI 1H-13C/15N XYZ-GRD Z561501/0002" "" "" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "Version 3.5" "hydrogen atom" "CHEBI" "http://purl.obolibrary.org/obo/CHEBI_49637" "128" "8" "noesypr1d" "" "" "7.86" "microsecond" "UO" "http://purl.obolibrary.org/obo/UO_0000029" "14005.602241" "hertz" "UO" "http://purl.obolibrary.org/obo/UO_0000106" "3.0" "second" "UO" "http://purl.obolibrary.org/obo/UO_0000010" "16.438" "tesla" "UO" "http://purl.obolibrary.org/obo/UO_0000228" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "NMR assay" "ADG10003u_008" "ADG10003u_008/10/fid" "Data transformation" "" "<zipfile.ZipExtFile object at 0x7f28f715f3d0>" "Metabolite identification" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "Version 3.5" "phase correction" "NMRCV" "http://nmrML.org/nmrCV#NMR:1000071" "fourier transformation" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400044" "" +"ADG10003u_009" "Extraction" "" "" "" "" "NMR sample" "Sample-tube" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400132" "" "" "" "" "300.0" "kelvin" "UO" "http://purl.obolibrary.org/obo/UO_0000012" "" "" "" "" "NMR spectroscopy" "Bruker" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400256" "Bruker NMR instrument" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400198" "5 mm PATXI 1H-13C/15N XYZ-GRD Z561501/0002" "" "" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "Version 3.5" "hydrogen atom" "CHEBI" "http://purl.obolibrary.org/obo/CHEBI_49637" "128" "8" "noesypr1d" "" "" "8.16" "microsecond" "UO" "http://purl.obolibrary.org/obo/UO_0000029" "14005.602241" "hertz" "UO" "http://purl.obolibrary.org/obo/UO_0000106" "3.0" "second" "UO" "http://purl.obolibrary.org/obo/UO_0000010" "16.438" "tesla" "UO" "http://purl.obolibrary.org/obo/UO_0000228" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "NMR assay" "ADG10003u_009" "ADG10003u_009/10/fid" "Data transformation" "" "<zipfile.ZipExtFile object at 0x7f28f715f450>" "Metabolite identification" "Bruker UXNMR/XWIN-NMR format" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400320" "Version 3.5" "phase correction" "NMRCV" "http://nmrML.org/nmrCV#NMR:1000071" "fourier transformation" "NMRCV" "http://nmrML.org/nmrCV#NMR:1400044" "" |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/i_Investigation.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/i_Investigation.txt Fri Feb 03 11:25:37 2017 -0500 |
[ |
@@ -0,0 +1,94 @@ +ONTOLOGY SOURCE REFERENCE +Term Source Name "EFO" "CHMO" "OBI" "NCIT" "NMRCV" "UO" "CHEBI" +Term Source File "http://data.bioontology.org/ontologies/EFO" "http://data.bioontology.org/ontologies/CHMO" "http://data.bioontology.org/ontologies/OBI" "http://data.bioontology.org/ontologies/NCIT" "http://nmrml.org/cv/v1.0.rc1/nmrCV.owl" "http://purl.obolibrary.org/obo/uo.owl" "http://purl.bioontology.org/ontology/CHEBI" +Term Source Version "119" "12" "23" "34" "1.0.rc1" "1.2" "141" +Term Source Description "Experimental Factor Ontology" "Chemical Methods Ontology" "Ontology for Biomedical Investigations" "National Cancer Institute Thesaurus" "NMR Controled Vocabulary" "Units of measurement Ontology" "Chemical Entities of Biological Interest" +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] "nmrml2isa 0.3.0" +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 "" "" "" "" "" +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_NMR_spectroscopy.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 "NMR spectroscopy" +Study Assay Technology Type Term Accession Number "http://purl.obolibrary.org/obo/OBI_0000623" +Study Assay Technology Type Term Source REF "OBI" +Study Assay Technology Platform "{'ref': 'NMRCV', 'name': 'Bruker NMR instrument', 'accession': 'http://nmrML.org/nmrCV#NMR:1400198'}" +STUDY PROTOCOLS +Study Protocol Name "Extraction" "NMR sample" "NMR spectroscopy" "NMR assay" "Data transformation" "Metabolite identification" "Sample collection" +Study Protocol Type "Extraction" "NMR sample" "NMR spectroscopy" "NMR assay" "Data transformation" "Metabolite identification" "Sample collection" +Study Protocol Type Term Accession Number "" "" "" "" "" "" "" +Study Protocol Type Term Source REF "" "" "" "" "" "" "" +Study Protocol Description "" "" "" "" "" "" "" +Study Protocol URI "" "" "" "" "" "" "" +Study Protocol Version "" "" "" "" "" "" "" +Study Protocol Parameters Name "Extraction Method" "NMR tube type;Temperature;Sample pH;Solvent" "Magnetic field strength;Pulse sequence name;Instrument;NMR Probe;Number of transients" "" "" "" "" +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 "mse" +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 "" |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/index.html Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -0,0 +1,1 @@ +<a href="test/a_test_metabolite_profiling_NMR_spectroscopy.txt">a_test_metabolite_profiling_NMR_spectroscopy.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/> \ No newline at end of file |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/s_test.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/test-data/metabolomics_study/test/s_test.txt Fri Feb 03 11:25:37 2017 -0500 |
[ |
@@ -0,0 +1,4 @@ +"Source Name" "Characteristics[Organism]" "Term Source REF" "Term Accession Number" "Characteristics[Organism variant]" "Term Source REF" "Term Accession Number" "Characteristics[Organism part]" "Term Source REF" "Term Accession Number" "Protocol REF" "Sample Name" +"" "" "" "" "" "" "" "" "" "" "Sample collection" "ADG10003u_007" +"" "" "" "" "" "" "" "" "" "" "Sample collection" "ADG10003u_008" +"" "" "" "" "" "" "" "" "" "" "Sample collection" "ADG10003u_009" |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/tool-data/get_status_ont.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/tool-data/get_status_ont.py Fri Feb 03 11:25:37 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') + + |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/galaxy/nmrml2isa/wrapper.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/galaxy/nmrml2isa/wrapper.py Fri Feb 03 11:25:37 2017 -0500 |
[ |
b'@@ -0,0 +1,229 @@\n+#!/usr/bin/env python\n+\n+import sys\n+import json\n+import os\n+import argparse\n+import textwrap\n+import csv\n+import inspect\n+\n+\n+def ontology_lookup(name, table):\n+ # takes in ontology name and source (e.g. loc file) and outputs the associated accesion number\n+ filename = inspect.getframeinfo(inspect.currentframe()).filename\n+ path = os.path.dirname(os.path.abspath(filename))\n+\n+ # check if correct table\n+ if table=="role":\n+ tablepth = os.path.join(path, \'pub_role.loc\')\n+ elif table=="status":\n+ tablepth = os.path.join(path, \'pub_status.loc\')\n+ else:\n+ print "Table not recognised"\n+ return ""\n+\n+ with open(tablepth, "rb") as csvfile:\n+ reader = csv.reader(csvfile, delimiter=\'\\t\')\n+ ont_dict = dict((k, v) for k, v in reader)\n+ try:\n+ print ont_dict[name]\n+ return ont_dict[name]\n+ except KeyError:\n+ return ""\n+\n+\n+\n+def main():\n+\n+ p = argparse.ArgumentParser(prog=\'PROG\',\n+ formatter_class=argparse.RawDescriptionHelpFormatter,\n+ description=\'\'\'nmrml2isa\'\'\',\n+ epilog=textwrap.dedent(\'\'\'\\\n+ -------------------------------------------------------------------------\n+ \'\'\'))\n+\n+\n+ p.add_argument(\'-inputzip\', dest=\'inputzip\', required=True)\n+ p.add_argument(\'-out_dir\', dest=\'out_dir\', required=True)\n+ p.add_argument(\'-html_file\', dest=\'html_file\', required=True)\n+ p.add_argument(\'-study_title\', dest=\'study_title\', required=True)\n+\n+ p.add_argument(\'-jsontxt\', dest=\'jsontxt\', required=False, nargs=\'?\')\n+\n+ p.add_argument(\'--s_submission_date\', dest=\'s_submission_date\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_release_date\', dest=\'s_release_date\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_description\', dest=\'s_description\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_pubmed\', dest=\'s_pubmed\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_pub_doi\', dest=\'s_pub_doi\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_pub_status\', dest=\'s_pub_status\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_pub_author\', dest=\'s_pub_author\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_pub_title\', dest=\'s_pub_title\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_first_name\', dest=\'s_first_name\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_mid_initials\', dest=\'s_mid_initials\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_last_name\', dest=\'s_last_name\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_telephone\', dest=\'s_telephone\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_fax\', dest=\'s_fax\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_affiliation\', dest=\'s_affiliation\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_role\', dest=\'s_role\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_mail\', dest=\'s_mail\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--s_address\', dest=\'s_address\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--i_submission_date\', dest=\'i_submission_date\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--i_release_date\', dest=\'i_release_date\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--i_description\', dest=\'i_description\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--i_pubmed\', dest=\'i_pubmed\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--i_pub_doi\', dest=\'i_pub_doi\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--i_pub_title\', dest=\'i_pub_title\', required=False, default="", nargs=\'?\')\n+ p.add_argument(\'--i_pub_status\', dest=\'i_pub_status\', required=False'..b'm_part_ref\n+\n+ # USERMETA[\'investigation\'][\'identifier\'] = # uses study identifier\n+ USERMETA[\'investigation\'][\'description\'] = args.i_description\n+ USERMETA[\'investigation\'][\'submission_date\'] = args.i_submission_date\n+ USERMETA[\'investigation\'][\'release_date\'] = args.i_release_date\n+\n+ USERMETA[\'investigation_publication\'][\'pubmed\'] = args.i_pubmed\n+ USERMETA[\'investigation_publication\'][\'author_list\'] = args.i_pub_author\n+ USERMETA[\'investigation_publication\'][\'title\'] = args.i_pub_title\n+ USERMETA[\'investigation_publication\'][\'doi\'] = args.i_pub_doi\n+ USERMETA[\'investigation_publication\'][\'status\'][\'name\'] = args.i_pub_status\n+ USERMETA[\'investigation_publication\'][\'status\'][\'accession\'] = ontology_lookup(args.i_pub_status, \'status\')\n+\n+ USERMETA[\'investigation_contacts\'][0][\'first_name\'] = args.i_first_name\n+ USERMETA[\'investigation_contacts\'][0][\'last_name\'] = args.i_last_name\n+ USERMETA[\'investigation_contacts\'][0][\'mid\'] = args.i_mid_initials\n+ USERMETA[\'investigation_contacts\'][0][\'email\'] = args.i_mail\n+ USERMETA[\'investigation_contacts\'][0][\'fax\'] = args.i_fax\n+ USERMETA[\'investigation_contacts\'][0][\'phone\'] = args.i_telephone\n+ USERMETA[\'investigation_contacts\'][0][\'adress\'] = args.i_address\n+ USERMETA[\'investigation_contacts\'][0][\'affiliation\'] = args.i_affiliation\n+ USERMETA[\'investigation_contacts\'][0][\'roles\'][\'name\'] = args.i_role\n+ USERMETA[\'investigation_contacts\'][0][\'roles\'][\'accession\'] = ontology_lookup(args.i_role, \'role\')\n+\n+ USERMETA[\'study\'][\'title\'] = args.study_title\n+ USERMETA[\'study\'][\'description\'] = args.s_description\n+ USERMETA[\'study\'][\'submission_date\'] = args.s_submission_date\n+ USERMETA[\'study\'][\'release_date\'] = args.s_release_date\n+\n+ USERMETA[\'study_publication\'][\'pubmed\'] = args.s_pubmed\n+ USERMETA[\'study_publication\'][\'author_list\'] = args.s_pub_author\n+ USERMETA[\'study_publication\'][\'title\'] = args.s_pub_title\n+ USERMETA[\'study_publication\'][\'doi\'] = args.s_pub_doi\n+ USERMETA[\'study_publication\'][\'status\'][\'name\'] = args.s_pub_status\n+ USERMETA[\'study_publication\'][\'status\'][\'accession\'] = ontology_lookup(args.s_pub_status, \'status\')\n+\n+ USERMETA[\'study_contacts\'][0][\'first_name\'] = args.s_first_name\n+ USERMETA[\'study_contacts\'][0][\'last_name\'] = args.s_last_name\n+ USERMETA[\'study_contacts\'][0][\'mid\'] = args.s_mid_initials\n+ USERMETA[\'study_contacts\'][0][\'email\'] = args.s_mail\n+ USERMETA[\'study_contacts\'][0][\'fax\'] = args.s_fax\n+ USERMETA[\'study_contacts\'][0][\'phone\'] = args.s_telephone\n+ USERMETA[\'study_contacts\'][0][\'adress\'] = args.s_address\n+ USERMETA[\'study_contacts\'][0][\'affiliation\'] = args.s_affiliation\n+ USERMETA[\'study_contacts\'][0][\'roles\'][\'name\'] = args.s_role\n+ USERMETA[\'study_contacts\'][0][\'roles\'][\'accession\'] = ontology_lookup(args.s_role, \'role\')\n+\n+\n+ try:\n+ from nmrml2isa.parsing import full_parse\n+ # import progressbar as pb\n+ # parse the files\n+ full_parse(args.inputzip, args.out_dir, args.study_title, usermeta=USERMETA, verbose=True)\n+\n+ except ImportError:\n+ import tempfile\n+ temp = tempfile.NamedTemporaryFile()\n+ temp.write(json.dumps(USERMETA))\n+ temp.seek(0)\n+ os.system("nmrml2isa -i %s -o %s -s %s -m %s" % (args.inputzip, args.out_dir, args.study_title, temp.name))\n+ temp.close()\n+\n+ html_code = \'<a href="%s/a_%s_metabolite_profiling_NMR_spectroscopy.txt">a_%s_metabolite_profiling_NMR_spectroscopy.txt</a>\' \\\n+ \'<br/><a href="%s/i_Investigation.txt">i_Investigation.txt</a><br/>\' \\\n+ \'<a href="%s/s_%s.txt">s_test.txt</a><br/>\' % tuple([args.study_title] * 6)\n+\n+ with open(args.html_file, \'wb\') as f:\n+ f.write(html_code)\n+\n+\n+\n+if __name__ == "__main__":\n+ main()\n' |
b |
diff -r 000000000000 -r 5990ad113145 nmrml2isa-galaxy/test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nmrml2isa-galaxy/test.sh Fri Feb 03 11:25:37 2017 -0500 |
b |
@@ -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/nmrml2isa-galaxy.git +planemo dependency_script -r packages/package_nmrml2isa_0_4_22/ +. env.sh +bash dep_install.sh +planemo test --galaxy_root=../galaxy galaxy/nmrml2isa/ +rm env.sh +rm dep_install.sh +deactivate #exit virtualenv +rm -r planemo-venv +rm -r lib + + |