# HG changeset patch
# User jowong
# Date 1542123978 18000
# Node ID 7412632c7b0e2a50a06bc0d9384c1b0d29b72596
planemo upload
diff -r 000000000000 -r 7412632c7b0e Galaxy-Workflow-spotyping_workflow.ga
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Galaxy-Workflow-spotyping_workflow.ga Tue Nov 13 10:46:18 2018 -0500
@@ -0,0 +1,1 @@
+{"uuid": "02ea1932-1245-4a6a-bed5-c2c87c1d0a0f", "tags": [], "format-version": "0.1", "name": "spotyping workflow", "steps": {"0": {"tool_id": null, "tool_version": null, "outputs": [], "workflow_outputs": [], "input_connections": {}, "tool_state": "{\"collection_type\": \"list:paired\"}", "id": 0, "uuid": "40c4132d-fefa-4e08-bf05-ae132a041e04", "errors": null, "name": "Input dataset collection", "label": null, "inputs": [], "position": {"top": 200, "left": 445.5}, "annotation": "", "content_id": null, "type": "data_collection_input"}, "1": {"tool_id": "testtoolshed.g2.bx.psu.edu/repos/jowong/spotyping/spotyping/1.0.4", "tool_version": "1.0.4", "outputs": [{"type": "txt", "name": "spotyping_results"}, {"type": "txt", "name": "spotyping_log"}, {"type": "excel.xls", "name": "sitvit_database_query"}], "workflow_outputs": [], "input_connections": {"data_input|input1": {"output_name": "output", "id": 0}}, "tool_state": "{\"__page__\": null, \"__rerun_remap_job_id__\": null, \"data_input\": \"{\\\"data_selector\\\": \\\"paired\\\", \\\"input1\\\": {\\\"values\\\": [{\\\"src\\\": \\\"hdca\\\", \\\"id\\\": 98}]}, \\\"__current_case__\\\": 0}\", \"advanced\": \"{\\\"min_relax\\\": \\\"6\\\", \\\"swift\\\": \\\"true\\\", \\\"seq\\\": \\\"false\\\", \\\"min\\\": \\\"5\\\"}\"}", "id": 1, "tool_shed_repository": {"owner": "jowong", "changeset_revision": "74c96eb05783", "name": "spotyping", "tool_shed": "testtoolshed.g2.bx.psu.edu"}, "uuid": "b77e24c0-e22c-4f0f-8746-00b611875fe1", "errors": null, "name": "Spoligotype Prediction", "post_job_actions": {"HideDatasetActionspotyping_log": {"output_name": "spotyping_log", "action_type": "HideDatasetAction", "action_arguments": {}}, "HideDatasetActionsitvit_database_query": {"output_name": "sitvit_database_query", "action_type": "HideDatasetAction", "action_arguments": {}}, "HideDatasetActionspotyping_results": {"output_name": "spotyping_results", "action_type": "HideDatasetAction", "action_arguments": {}}}, "label": null, "inputs": [], "position": {"top": 216, "left": 764}, "annotation": "", "content_id": "testtoolshed.g2.bx.psu.edu/repos/jowong/spotyping/spotyping/1.0.4", "type": "tool"}, "2": {"tool_id": "spotyping_postprocess", "tool_version": "1.0.0", "outputs": [{"type": "txt", "name": "output"}], "workflow_outputs": [{"output_name": "output", "uuid": "a8c15a67-ca48-4143-82ab-5b6afd8976aa", "label": null}], "input_connections": {"paths": {"output_name": "spotyping_results", "id": 1}}, "tool_state": "{\"paths\": \"{\\\"__class__\\\": \\\"RuntimeValue\\\"}\", \"__rerun_remap_job_id__\": null, \"__page__\": null}", "id": 2, "uuid": "35b3cc55-573e-44fb-a1ae-b76852690bbd", "errors": null, "name": "Spotyping Postprocess", "post_job_actions": {}, "label": null, "inputs": [{"name": "paths", "description": "runtime parameter for tool Spotyping Postprocess"}], "position": {"top": 268, "left": 1082}, "annotation": "", "content_id": "spotyping_postprocess", "type": "tool"}}, "annotation": "", "a_galaxy_workflow": "true"}
\ No newline at end of file
diff -r 000000000000 -r 7412632c7b0e spotyping.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spotyping.xml Tue Nov 13 10:46:18 2018 -0500
@@ -0,0 +1,111 @@
+
+ fast and accurate in silico Mycobacterium spoligotyping from sequence reads
+
+ spotyping
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@misc{githubSpoTyping,
+ author = {Xia, Eryu},
+ year = {2016},
+ title = {SpoTyping},
+ publisher = {GitHub},
+ journal = {GitHub repository},
+ url = {https://github.com/xiaeryu/SpoTyping},
+}
+ 10.1186/s13073-016-0270-7
+
+
diff -r 000000000000 -r 7412632c7b0e spotyping_postprocess.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spotyping_postprocess.py Tue Nov 13 10:46:18 2018 -0500
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import sys
+import argparse as ap
+import re
+parser = ap.ArgumentParser(prog='spotyping_postprocess', conflict_handler='resolve',
+ description="Postprocess galaxy spotyping output")
+
+input = parser.add_argument_group('Input', '')
+input.add_argument('-s', '--sample', nargs='+', required=True, help="Sample names")
+input.add_argument('-f', '--file', nargs='+', required=True, help="File of spotyping in galaxy convention")
+if len(sys.argv) == 0:
+ parser.print_usage()
+ sys.exit(1)
+
+args = parser.parse_args()
+
+
+sample_dict={}
+
+
+with open('spotyping_postprocess_output.txt', 'w') as output:
+ index = 0
+ for path in args.file:
+ with open(path) as f:
+ for line in f:
+ #sample_dict[re.sub(".*/","",line.rstrip())] = args.sample[path_index]
+ sample = re.sub('(_1.fastq(.gz)*|_2.fastq(.gz)*|.fastq(.gz)*)', '', args.sample[index].rstrip().lstrip())
+ output.write(re.sub(".*.dat", sample, line))
+ index += 1
+
diff -r 000000000000 -r 7412632c7b0e spotyping_postprocess.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/spotyping_postprocess.xml Tue Nov 13 10:46:18 2018 -0500
@@ -0,0 +1,17 @@
+
+ Postprocess spotyping galaxy output
+
+
+
+
+
+
+
+
+This tool processes the spotyping galaxy output such that it is in line with the command line
+
+
+
+