changeset 5:fc1637bbe838 draft

planemo upload for repository https://github.com/peterjc/pico_galaxy/tools/samtools_bam2fq commit 7f6d8f6126b7664cccfb987dbec826cf99c7c19a
author peterjc
date Wed, 13 May 2015 10:22:02 -0400
parents 8ac1057b1a7d
children 74861ead58ee
files test-data/sam_spec_padded.bam2fq.fastq test-data/sam_spec_padded.bam2fq_no_suf.fastq test-data/sam_spec_padded.bam2fq_pairs.fastq test-data/sam_spec_padded.bam2fq_singles.fastq tools/samtools_bam2fq/README.rst tools/samtools_bam2fq/samtools_bam2fq.xml tools/samtools_bam2fq/tool_dependencies.xml
diffstat 7 files changed, 90 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/test-data/sam_spec_padded.bam2fq.fastq	Tue Nov 04 07:13:44 2014 -0500
+++ b/test-data/sam_spec_padded.bam2fq.fastq	Wed May 13 10:22:02 2015 -0400
@@ -1,12 +1,24 @@
->ref
+@ref
 AGCATGTTAGATAAGATAGCTGTGCTAGTAGGCAGTCAGCGCCAT
->r001/1
++
+"""""""""""""""""""""""""""""""""""""""""""""
+@r001/1
 TTAGATAAAGGATACTG
->r002
++
+"""""""""""""""""
+@r002
 AAAAGATAAGGATA
->r003
++
+""""""""""""""
+@r003
 AGCTAA
->r004
++
+""""""
+@r004
 ATAGCTTCAGC
->r001/2
++
+"""""""""""
+@r001/2
 ATGCCGCTG
++
+"""""""""
--- a/test-data/sam_spec_padded.bam2fq_no_suf.fastq	Tue Nov 04 07:13:44 2014 -0500
+++ b/test-data/sam_spec_padded.bam2fq_no_suf.fastq	Wed May 13 10:22:02 2015 -0400
@@ -1,12 +1,24 @@
->ref
+@ref
 AGCATGTTAGATAAGATAGCTGTGCTAGTAGGCAGTCAGCGCCAT
->r001
++
+"""""""""""""""""""""""""""""""""""""""""""""
+@r001
 TTAGATAAAGGATACTG
->r002
++
+"""""""""""""""""
+@r002
 AAAAGATAAGGATA
->r003
++
+""""""""""""""
+@r003
 AGCTAA
->r004
++
+""""""
+@r004
 ATAGCTTCAGC
->r001
++
+"""""""""""
+@r001
 ATGCCGCTG
++
+"""""""""
--- a/test-data/sam_spec_padded.bam2fq_pairs.fastq	Tue Nov 04 07:13:44 2014 -0500
+++ b/test-data/sam_spec_padded.bam2fq_pairs.fastq	Wed May 13 10:22:02 2015 -0400
@@ -1,4 +1,8 @@
->r001/1
+@r001/1
 TTAGATAAAGGATACTG
->r001/2
++
+"""""""""""""""""
+@r001/2
 ATGCCGCTG
++
+"""""""""
--- a/test-data/sam_spec_padded.bam2fq_singles.fastq	Tue Nov 04 07:13:44 2014 -0500
+++ b/test-data/sam_spec_padded.bam2fq_singles.fastq	Wed May 13 10:22:02 2015 -0400
@@ -1,8 +1,16 @@
->r002
+@r002
 AAAAGATAAGGATA
->r003
++
+""""""""""""""
+@r003
 AGCTAA
->r004
++
+""""""
+@r004
 ATAGCTTCAGC
->ref
++
+"""""""""""
+@ref
 AGCATGTTAGATAAGATAGCTGTGCTAGTAGGCAGTCAGCGCCAT
++
+"""""""""""""""""""""""""""""""""""""""""""""
--- a/tools/samtools_bam2fq/README.rst	Tue Nov 04 07:13:44 2014 -0500
+++ b/tools/samtools_bam2fq/README.rst	Wed May 13 10:22:02 2015 -0400
@@ -1,7 +1,7 @@
 Galaxy wrapper for samtools bam2fq
 ====================================
 
-This wrapper is copyright 2014 by Peter Cock, The James Hutton Institute
+This wrapper is copyright 2014-2015 by Peter Cock, The James Hutton Institute
 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved.
 See the licence text below.
 
@@ -10,6 +10,10 @@
 This wrapper is available from the Galaxy Tool Shed at:
 http://toolshed.g2.bx.psu.edu/view/peterjc/samtools_bam2fq
 
+WARNING: ``samtools bam2fq`` actually produces a mixture of FASTA and FASTQ
+depending on if your SAM/BAM input reads have QUAL scores. This is a problem
+for Galaxy's more rigid datatypes. https://github.com/samtools/samtools/issues/313
+
 
 Automated Installation
 ======================
@@ -21,7 +25,7 @@
 Manual Installation
 ===================
 
-This expects samtools to be on the $PATH, and was tested using v0.1.19.
+This expects samtools to be on the ``$PATH``, and was tested using v0.1.19.
 
 To install the wrapper copy or move the following files under the Galaxy tools
 folder, e.g. in a ``tools/samtools_bam2fq`` folder:
@@ -50,6 +54,9 @@
 ------- ----------------------------------------------------------------------
 v0.0.1  - Initial public release, tested with samtools v1.1.
 v0.0.2  - Defaults to pair-aware mode which requires pre-sorting by read name.
+v0.0.3  - Faster not to compress intermediate BAM file when sorting.
+v0.0.4  - Reorder XML elements (internal change only).
+        - lanemo for Tool Shed upload (``.shed.yml``, internal change only).
 ======= ======================================================================
 
 
@@ -59,24 +66,33 @@
 Development is on this GitHub repository:
 https://github.com/peterjc/pico_galaxy/tree/master/tools/samtools_bam2fq
 
-For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball use
-the following command from the Galaxy root folder::
+For pushing a release to the test or main "Galaxy Tool Shed", use the following
+Planemo commands (which requires you have set your Tool Shed access details in
+``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
 
-    $ tar -czf samtools_bam2fq.tar.gz tools/samtools_bam2fq/README.rst tools/samtools_bam2fq/samtools_bam2fq.xml tools/samtools_bam2fq/tool_dependencies.xml test-data/sam_spec_padded.bam test-data/sam_spec_padded.sam test-data/sam_spec_padded.depad.bam test-data/sam_spec_padded.bam2fq.fastq test-data/sam_spec_padded.bam2fq_no_suf.fastq test-data/sam_spec_padded.bam2fq_singles.fastq test-data/sam_spec_padded.bam2fq_pairs.fastq
+    $ planemo shed_upload --shed_target testtoolshed --check_diff ~/repositories/pico_galaxy/tools/samtools_bam2fq/
+    ...
 
-Check this worked::
+or::
 
-    $ tar -tzf samtools_bam2fq.tar.gz
-    tools/samtools_bam2fq/README.rst
-    tools/samtools_bam2fq/samtools_bam2fq.xml
-    tools/samtools_bam2fq/tool_dependencies.xml
+    $ planemo shed_upload --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/samtools_bam2fq/
+    ...
+
+To just build and check the tar ball, use::
+
+    $ planemo shed_upload --tar_only  ~/repositories/pico_galaxy/tools/samtools_bam2fq/
+    ...
+    $ tar -tzf shed_upload.tar.gz 
     test-data/sam_spec_padded.bam
-    test-data/sam_spec_padded.sam
-    test-data/sam_spec_padded.depad.bam
     test-data/sam_spec_padded.bam2fq.fastq
     test-data/sam_spec_padded.bam2fq_no_suf.fastq
     test-data/sam_spec_padded.bam2fq_singles.fastq
     test-data/sam_spec_padded.bam2fq_pairs.fastq
+    test-data/sam_spec_padded.depad.bam
+    test-data/sam_spec_padded.sam
+    tools/samtools_bam2fq/README.rst
+    tools/samtools_bam2fq/samtools_bam2fq.xml
+    tools/samtools_bam2fq/tool_dependencies.xml
 
 
 Licence (MIT)
--- a/tools/samtools_bam2fq/samtools_bam2fq.xml	Tue Nov 04 07:13:44 2014 -0500
+++ b/tools/samtools_bam2fq/samtools_bam2fq.xml	Wed May 13 10:22:02 2015 -0400
@@ -1,9 +1,14 @@
-<tool id="samtools_bam2fq" name="Convert BAM to FASTQ" version="0.0.2">
+<tool id="samtools_bam2fq" name="Convert BAM to FASTQ" version="0.0.4">
     <description>samtools bam2fq</description>
     <requirements>
         <requirement type="binary">samtools</requirement>
         <requirement type="package" version="1.1">samtools</requirement>
     </requirements>
+    <stdio>
+        <!-- Assume anything other than zero is an error -->
+        <exit_code range="1:" />
+        <exit_code range=":-1" />
+    </stdio>
     <version_command>samtools 2&gt;&amp;1 | grep -i "Version:"</version_command>
     <command>
         #if $action_mode.mode == "pairs":
@@ -11,7 +16,7 @@
             ## Galaxy has a tendancy to automatically apply co-ordindate sorting,
             ## so just do this every time. If it was name sorted, pay an IO overhead.
             ## Note requiring -T is samtools issue 295
-            samtools sort -n -O bam -T TEMP_SORT "$input_bam" | samtools bam2fq -s "$singletons_fastq" - &gt; "$pairs_fastq"
+            samtools sort -l 0 -n -O bam -T TEMP_SORT "$input_bam" | samtools bam2fq -s "$singletons_fastq" - &gt; "$pairs_fastq"
         #else
             ## Naive conversion using order in the input file
             samtools bam2fq $suffices $orig_qual "$input_bam" &gt; "$out_fastq"
@@ -43,11 +48,6 @@
             <filter>(action_mode['mode'] == 'naive')</filter>
         </data>
     </outputs>
-    <stdio>
-        <!-- Assume anything other than zero is an error -->
-        <exit_code range="1:" />
-        <exit_code range=":-1" />
-    </stdio>
     <tests>
         <test>
             <param name="input_bam" value="sam_spec_padded.bam" ftype="bam" />
--- a/tools/samtools_bam2fq/tool_dependencies.xml	Tue Nov 04 07:13:44 2014 -0500
+++ b/tools/samtools_bam2fq/tool_dependencies.xml	Wed May 13 10:22:02 2015 -0400
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
     <package name="samtools" version="1.1">
-        <repository changeset_revision="c01b111a243b" name="package_samtools_1_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="a287b1a43696" name="package_samtools_1_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>