Mercurial > repos > devteam > data_manager_fetch_genome_dbkeys_all_fasta
changeset 11:5ca251be8236 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_genome_dbkeys_all_fasta commit b56485a8b386fc6f17219850e30e5656c159f231"
author | iuc |
---|---|
date | Wed, 16 Oct 2019 04:16:14 -0400 |
parents | 872d7cf608f9 |
children | 545a0f7663ef |
files | data_manager/.pytest_cache/README.md data_manager/.pytest_cache/v/cache/lastfailed data_manager/.pytest_cache/v/cache/nodeids data_manager/__pycache__/data_manager_fetch_genome_all_fasta_dbkeys.cpython-36-PYTEST.pyc data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml test-data/phiX174.data_manager_json tool-data/dbkeys.loc.sample |
diffstat | 8 files changed, 12 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/.pytest_cache/README.md Mon Aug 13 08:43:15 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -# pytest cache directory # - -This directory contains data from the pytest's cache plugin, -which provides the `--lf` and `--ff` options, as well as the `cache` fixture. - -**Do not** commit this to version control. - -See [the docs](https://docs.pytest.org/en/latest/cache.html) for more information.
--- a/data_manager/.pytest_cache/v/cache/lastfailed Mon Aug 13 08:43:15 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -{ - "data_manager_fetch_genome_all_fasta_dbkeys.py::data_manager_fetch_genome_all_fasta_dbkeys.download_from_url": true -} \ No newline at end of file
--- a/data_manager/.pytest_cache/v/cache/nodeids Mon Aug 13 08:43:15 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -[ - "data_manager_fetch_genome_all_fasta_dbkeys.py::data_manager_fetch_genome_all_fasta_dbkeys.download_from_url" -] \ No newline at end of file
Binary file data_manager/__pycache__/data_manager_fetch_genome_all_fasta_dbkeys.cpython-36-PYTEST.pyc has changed
--- a/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py Mon Aug 13 08:43:15 2018 -0400 +++ b/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py Wed Oct 16 04:16:14 2019 -0400 @@ -3,6 +3,7 @@ import bz2 import gzip +import json import optparse import os import shutil @@ -11,7 +12,6 @@ import tempfile import zipfile from ftplib import FTP -from json import dumps, loads try: # For Python 3.0 and later @@ -452,7 +452,8 @@ filename = args[0] - params = loads(open(filename).read()) + with open(filename) as fh: + params = json.load(fh) target_directory = params['output_data'][0]['extra_files_path'] os.mkdir(target_directory) data_manager_dict = {} @@ -488,7 +489,8 @@ finally: cleanup_before_exit(tmp_dir) # save info to json file - open(filename, 'w').write(dumps(data_manager_dict)) + with open(filename, 'w') as fh: + json.dump(data_manager_dict, fh, sort_keys=True) if __name__ == "__main__":
--- a/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml Mon Aug 13 08:43:15 2018 -0400 +++ b/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml Wed Oct 16 04:16:14 2019 -0400 @@ -1,4 +1,4 @@ -<tool id="data_manager_fetch_genome_all_fasta_dbkey" name="Create DBKey and Reference Genome" version="0.0.2" tool_type="manage_data"> +<tool id="data_manager_fetch_genome_all_fasta_dbkey" name="Create DBKey and Reference Genome" version="0.0.3" tool_type="manage_data"> <description>fetching</description> <command detect_errors="exit_code"><![CDATA[ python '$__tool_directory__/data_manager_fetch_genome_all_fasta_dbkeys.py' @@ -78,9 +78,10 @@ <tests> <!-- TODO: need some way to test that new entry was added to data table --> <test> - <param name="dbkey" value="anoGam1"/> - <param name="sequence_name" value=""/> - <param name="sequence_id" value=""/> + <param name="dbkey" value="phiX174"/> + <param name="dbkey_source|dbkey_source_selector" value="new"/> + <param name="sequence_name" value="phiX174 sequence name"/> + <param name="sequence_id" value="phix174"/> <param name="reference_source_selector" value="history"/> <param name="input_fasta" value="phiX174.fasta"/> <param name="sort_selector" value="as_is"/>
--- a/test-data/phiX174.data_manager_json Mon Aug 13 08:43:15 2018 -0400 +++ b/test-data/phiX174.data_manager_json Wed Oct 16 04:16:14 2019 -0400 @@ -1,1 +1,1 @@ -{"data_tables": {"all_fasta": [{"path": "anoGam1.fa", "dbkey": "anoGam1", "name": "A. gambiae Feb. 2003 (IAGEC MOZ2/anoGam1) (anoGam1)", "value": "anoGam1"}]}} \ No newline at end of file +{"data_tables": {"__dbkeys__": [{"len_path": "phiX174.len", "name": "phiX174", "value": "phiX174"}], "all_fasta": [{"dbkey": "phiX174", "name": "phiX174 sequence name", "path": "phix174.fa", "value": "phix174"}]}} \ No newline at end of file