# HG changeset patch # User peterjc # Date 1431526922 14400 # Node ID fc1637bbe83800ee25cad3c393fae76c00b730af # Parent 8ac1057b1a7d6fe90826d78849595b1ce307d100 planemo upload for repository https://github.com/peterjc/pico_galaxy/tools/samtools_bam2fq commit 7f6d8f6126b7664cccfb987dbec826cf99c7c19a diff -r 8ac1057b1a7d -r fc1637bbe838 test-data/sam_spec_padded.bam2fq.fastq --- 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 ++ +""""""""" diff -r 8ac1057b1a7d -r fc1637bbe838 test-data/sam_spec_padded.bam2fq_no_suf.fastq --- 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 ++ +""""""""" diff -r 8ac1057b1a7d -r fc1637bbe838 test-data/sam_spec_padded.bam2fq_pairs.fastq --- 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 ++ +""""""""" diff -r 8ac1057b1a7d -r fc1637bbe838 test-data/sam_spec_padded.bam2fq_singles.fastq --- 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 ++ +""""""""""""""""""""""""""""""""""""""""""""" diff -r 8ac1057b1a7d -r fc1637bbe838 tools/samtools_bam2fq/README.rst --- 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) diff -r 8ac1057b1a7d -r fc1637bbe838 tools/samtools_bam2fq/samtools_bam2fq.xml --- 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 @@ - + samtools bam2fq samtools samtools + + + + + samtools 2>&1 | grep -i "Version:" #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" - > "$pairs_fastq" + samtools sort -l 0 -n -O bam -T TEMP_SORT "$input_bam" | samtools bam2fq -s "$singletons_fastq" - > "$pairs_fastq" #else ## Naive conversion using order in the input file samtools bam2fq $suffices $orig_qual "$input_bam" > "$out_fastq" @@ -43,11 +48,6 @@ (action_mode['mode'] == 'naive') - - - - - diff -r 8ac1057b1a7d -r fc1637bbe838 tools/samtools_bam2fq/tool_dependencies.xml --- 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 @@ - +