changeset 0:1a37f742e7d7 draft

"planemo upload for repository https://github.com/nanoporetech/ont_fast5_api/ commit a5d038871ff0e1b133039b59183dee795449b383"
author iuc
date Fri, 12 Jun 2020 15:07:40 -0400
parents
children 68fc6a9c05df
files macros.xml multi_to_single_fast5.xml test-data/list.txt test-data/multi.fast5.tar test-data/single.fast5.tar
diffstat 5 files changed, 151 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Fri Jun 12 15:07:40 2020 -0400
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<macros>
+    <token name="@TOOL_VERSION@">3.1.3</token>
+    <token name="@TOOL_NAME@">ont_fast5_api:</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">ont-fast5-api</requirement>
+            <requirement type="package" version="1.10.5">hdf5</requirement>
+        </requirements>
+    </xml>
+
+    <!-- command -->
+    <token name="@BATCHSIZE@"><![CDATA[
+--batch_size $batch_size
+    ]]></token>
+    <token name="@COMPRESSION@"><![CDATA[
+#if $compression != 'none'
+    --compression '$compression'
+#end if
+    ]]></token>
+    <token name="@INITIALIZE@"><![CDATA[
+mkdir -p './data' &&
+tar -xf '$input_path' -C './data' &&
+    ]]></token>
+    <token name="@INPUTPATH@"><![CDATA[
+--input_path './data'
+    ]]></token>
+    <token name="@SAVEPATH@"><![CDATA[
+--save_path './results'
+    ]]></token>
+    <token name="@TARBALL@"><![CDATA[
+&& find './results' -type f -name '*.fast5' | tar --transform 's/.*\///g' -cvf './results.fast5.tar' --files-from=/dev/stdin
+    ]]></token>
+    <token name="@THREADS@"><![CDATA[
+--threads \${GALAXY_SLOTS:-4}
+    ]]></token>
+
+    <!-- input -->
+    <xml name="input" token_argument="--input_path" token_label="multi">
+        <param argument="@ARGUMENT@" type="data" format="fast5.tar" label="Select @LABEL@ read input file"/>
+    </xml>
+    <xml name="batch_size">
+        <param argument="--batch_size" type="integer" value="4000" min="1" label="Set batch size" help="Number of single reads to include in each multi read file"/>
+    </xml>
+    <xml name="compression">
+        <param argument="compression" type="select" label="Select output compression type">
+            <yield/>
+            <option value="vbz_legacy_v0">VBZ legacy v0</option>
+            <option value="gzip">GZIP</option>
+        </param>
+    </xml>
+
+    <!-- output -->
+    <xml name="output">
+        <data name="out_results" format="fast5.tar" from_work_dir="results.fast5.tar" label="${tool.name} on ${on_string}: Results"/>
+    </xml>
+
+   <!-- help -->
+    <token name="@WID@"><![CDATA[
+*ont_fast5_api* is a simple interface to HDF5 files of the Oxford Nanopore FAST5 file format.
+
+- concrete implementation of the FAST5 file schema using the generic h5py library
+- plain-english-named methods to interact with and reflect the FAST5 file schema
+- tools to convert between multi_read and single_read formats
+- tools to compress/decompress raw data in files
+    ]]></token>
+    <token name="@REFERENCES@"><![CDATA[
+More information are available on `github <https://github.com/nanoporetech/ont_fast5_api>`_.
+    ]]></token>
+
+    <xml name="citations">
+        <citations>
+            <citation type="bibtex">
+                @online{ont_fast5_api,
+                author = {Oxford Nanopore Technologies },
+                title = {ont_fast5_api},
+                year = 2020,
+                url = {https://github.com/nanoporetech/ont_fast5_api},
+                urldate = {2020-06-01}
+            }</citation>
+        </citations>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multi_to_single_fast5.xml	Fri Jun 12 15:07:40 2020 -0400
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<tool id="ont_fast5_api_multi_to_single_fast5" name="@TOOL_NAME@ Multi to single" version="@TOOL_VERSION@+galaxy0" profile="18.01">
+    <description>read file(s)</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/>
+    <version_command><![CDATA[multi_to_single_fast5 -v]]></version_command>
+    <command detect_errors="exit_code"><![CDATA[
+## initialize
+@INITIALIZE@
+
+## run
+multi_to_single_fast5
+## required
+@INPUTPATH@
+@SAVEPATH@
+## optional
+@THREADS@
+
+## create tarball
+@TARBALL@
+    ]]></command>
+    <inputs>
+        <expand macro="input"/>
+    </inputs>
+    <outputs>
+        <expand macro="output"/>
+    </outputs>
+    <tests>
+        <!-- #1 default -->
+        <test expect_num_outputs="1">
+            <param name="input_path" value="multi.fast5.tar"/>
+            <output name="out_results">
+                <assert_contents>
+                    <has_size value="71680"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+.. class:: infomark
+
+**What it does**
+
+@WID@
+
+*multi_to_single_fast5* converts multi read FAST5 file(s) into single read FAST5 files.
+
+**Input**
+
+Multi read file(s) in FAST5 format that are stored in a flat TAR.
+
+**Output**
+
+Single read FAST5 files that are stored in a flat TAR.
+
+.. class:: infomark
+
+**References**
+
+@REFERENCES@
+    ]]></help>
+    <expand macro="citations"/>
+</tool>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/list.txt	Fri Jun 12 15:07:40 2020 -0400
@@ -0,0 +1,3 @@
+fe849dd3-63bc-4044-8910-14e1686273bb
+fe85b517-62ee-4a33-8767-41cab5d5ab39
+fe8a3026-d1f4-46b3-8daa-e610f27acde1
Binary file test-data/multi.fast5.tar has changed
Binary file test-data/single.fast5.tar has changed