# HG changeset patch # User thanhlv # Date 1550507954 18000 # Node ID 87341275b335f2e5a370b65ea166ba65f6f2dd98 # Parent 8beb2af51dc5233b41f8df77fe6106122eda28cd Deleted selected files diff -r 8beb2af51dc5 -r 87341275b335 data_manager_build_ariba_database/data_manager/ariba_data_base_builder.py --- a/data_manager_build_ariba_database/data_manager/ariba_data_base_builder.py Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -import argparse -import json -import os -import shutil - - -def main(args): - output_path = os.getcwd() - db_folder = [d for d in os.listdir(output_path) if os.path.isdir(d)] - params = json.loads(open(args.output).read()) - target_directory = params['output_data'][0]['extra_files_path'] - os.mkdir(target_directory) - data_manager_entry = [] - for db in db_folder: - print("Current: ".format(os.path.join(output_path, d))) - print("Target: {}".format(target_directory)) - shutil.move(os.path.join(output_path, d), os.path.join(target_directory, d)) - data_manager_entry.append(dict(value=db.lower(), - name=db, - path=target_directory) - ) - data_manager_json = dict(data_tables=dict(ariba_databases=data_manager_entry)) - file(args.output, 'w').write(json.dumps(data_manager_json)) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser(description='Create data manager json.') - # parser.add_argument('--db', dest='database', action='store', help='Database name') - parser.add_argument('--out', dest='output', action='store', help='JSON filename') - args = parser.parse_args() - main(args) - \ No newline at end of file diff -r 8beb2af51dc5 -r 87341275b335 data_manager_build_ariba_database/data_manager/ariba_database_builder.xml --- a/data_manager_build_ariba_database/data_manager/ariba_database_builder.xml Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ - - - database builder - - ariba version | head head -n 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 110.1099/mgen.0.000131 - - diff -r 8beb2af51dc5 -r 87341275b335 data_manager_build_ariba_database/data_manager/ariba_database_builder.xml.bk --- a/data_manager_build_ariba_database/data_manager/ariba_database_builder.xml.bk Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ - - - database builder - - ariba version | head head -n 1 - - - - - - - - - - - - - - - - - - - 110.1099/mgen.0.000131 - - diff -r 8beb2af51dc5 -r 87341275b335 data_manager_build_ariba_database/data_manager_conf.xml --- a/data_manager_build_ariba_database/data_manager_conf.xml Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ - - - - - - - - - - ariba_databases/${value} - - ${GALAXY_DATA_MANAGER_DATA_PATH}/ariba_databases/${value} - abspath - - - - - diff -r 8beb2af51dc5 -r 87341275b335 data_manager_build_ariba_database/macros.xml --- a/data_manager_build_ariba_database/macros.xml Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - 0.1.0 - - - ariba - - - - - ariba version | head -n 1 - - - - - 10.1099/mgen.0.000131 - - - - \ No newline at end of file diff -r 8beb2af51dc5 -r 87341275b335 data_manager_build_ariba_database/tool-data/ariba_databases.loc.sample diff -r 8beb2af51dc5 -r 87341275b335 data_manager_build_ariba_database/tool_data_table_conf.xml.sample --- a/data_manager_build_ariba_database/tool_data_table_conf.xml.sample Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ - - - - - value, name, path - -
-
diff -r 8beb2af51dc5 -r 87341275b335 help-command.txt --- a/help-command.txt Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -usage: ariba - -ARIBA: Antibiotic Resistance Identification By Assembly - -optional arguments: - -h, --help show this help message and exit - -Available commands: - - aln2meta Converts multi-aln fasta and SNPs to metadata - expandflag Expands flag column of report file - flag Translate the meaning of a flag - getref Download reference data - micplot Make violin/dot plots using MIC data - prepareref Prepare reference data for input to "run" - pubmlstget Download species from PubMLST and make db - pubmlstspecies - Get list of available species from PubMLST - refquery Get cluster or sequence info from prepareref output - run Run the local assembly pipeline - summary Summarise multiple reports made by "run" - test Run small built-in test dataset - version Get versions and exit diff -r 8beb2af51dc5 -r 87341275b335 planemo_command/planemo_command_ariba.sh --- a/planemo_command/planemo_command_ariba.sh Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -planemo tool_init \ - --force \ - --id "ariba_run" \ - --name "Antimicrobial Resistance Identification By Assembly" \ - --requirement ariba@2.13.1 \ - --example_command 'ariba run $DBNAME reads1.fastq reads2.fastq out.run' \ - --example_input 2.fastq \ - --example_output out.run \ - --cite_url 'https://github.com/sanger-pathogens/ariba' \ No newline at end of file diff -r 8beb2af51dc5 -r 87341275b335 planemo_command/planemo_command_ariba_flag.sh --- a/planemo_command/planemo_command_ariba_flag.sh Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -planemo tool_init \ - --force \ - --id "ariba_flag" \ - --name "Antimicrobial Resistance Identification By Assembly" \ - --requirement ariba@2.13.1 \ - --example_command 'ariba run $DBNAME reads1.fastq reads2.fastq out.run' \ - --example_input 2.fastq \ - --example_output out.run \ - --cite_url 'https://github.com/sanger-pathogens/ariba' \ No newline at end of file diff -r 8beb2af51dc5 -r 87341275b335 test.ipynb --- a/test.ipynb Mon Feb 18 11:36:47 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "name = \"thanh\"\n", - "data_manager_entry = {}\n", - "data_manager_entry['value'] = name.lower()\n", - "data_manager_entry['name'] = name\n", - "data_manager_entry['path'] = '.'\n", - "data_manager_json = dict(data_tables=dict(busco=data_manager_entry))" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'value': 'thanh', 'name': 'thanh', 'path': '.'}" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "data_manager_entry" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'data_tables': {'busco': {'value': 'thanh', 'name': 'thanh', 'path': '.'}}}" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "data_manager_json" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "import os\n", - "directories=[d for d in os.listdir(os.getcwd()) if os.path.isdir(d)]" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[{'value': 'database', 'name': 'DATABASE'},\n", - " {'value': 'data_manager_build_ariba_database',\n", - " 'name': 'DATA_MANAGER_BUILD_ARIBA_DATABASE'},\n", - " {'value': 'test-data', 'name': 'TEST-DATA'},\n", - " {'value': 'tool-data', 'name': 'TOOL-DATA'},\n", - " {'value': 'planemo_command', 'name': 'PLANEMO_COMMAND'},\n", - " {'value': '.ipynb_checkpoints', 'name': '.IPYNB_CHECKPOINTS'},\n", - " {'value': '.git', 'name': '.GIT'}]" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "a_db = []\n", - "for d in directories:\n", - " dict_entry = dict(value=d,name=d.upper())\n", - " a_db.append(dict_entry)\n", - "a_db" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [], - "source": [ - "data_manager_json = dict(ariba_databases=a_db)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'ariba_databases': [{'value': 'database', 'name': 'DATABASE'},\n", - " {'value': 'data_manager_build_ariba_database',\n", - " 'name': 'DATA_MANAGER_BUILD_ARIBA_DATABASE'},\n", - " {'value': 'test-data', 'name': 'TEST-DATA'},\n", - " {'value': 'tool-data', 'name': 'TOOL-DATA'},\n", - " {'value': 'planemo_command', 'name': 'PLANEMO_COMMAND'},\n", - " {'value': '.ipynb_checkpoints', 'name': '.IPYNB_CHECKPOINTS'},\n", - " {'value': '.git', 'name': '.GIT'}]}" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "data_manager_json" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 2", - "language": "python", - "name": "python2" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}