changeset 7:2f3d4c867e1d draft default tip

planemo upload for repository https://github.com/zipho/novo_sort commit 4db125fcd73327813d7bd511852bbe9ffc68a25c
author sanbi-uwc
date Mon, 09 Jan 2017 08:19:31 -0500
parents e35fbd921b6b
children
files novo_sort.py novo_sort.xml test-data/input1.bam test-data/output1.bam
diffstat 4 files changed, 20 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/novo_sort.py	Fri Apr 01 10:26:19 2016 -0400
+++ b/novo_sort.py	Mon Jan 09 08:19:31 2017 -0500
@@ -7,6 +7,7 @@
 import logging
 log = logging.getLogger( __name__ )
 
+
 def novo_sort( bam_filename, output_filename ):
     cmdline_str = "novosort -c 8 -m 8G -s -f {} -o {}".format( bam_filename, output_filename )
     cmdline = newSplit(cmdline_str)
@@ -15,6 +16,7 @@
     except CalledProcessError:
         print("Error running the nova-sort", file=sys.stderr)
 
+
 def newSplit(value):
     lex = shlex.shlex(value)
     lex.quotes = '"'
@@ -22,12 +24,15 @@
     lex.commenters = ''
     return list(lex)
 
+
 def main():
     parser = argparse.ArgumentParser(description="Re-sorting aligned files by read position")
     parser.add_argument('output_filename')
     parser.add_argument('--bam_filename')
     args = parser.parse_args()
-   
+
     novo_sort(args.bam_filename, args.output_filename)
 
-if __name__ == "__main__": main()
+
+if __name__ == "__main__":
+    main()
--- a/novo_sort.xml	Fri Apr 01 10:26:19 2016 -0400
+++ b/novo_sort.xml	Mon Jan 09 08:19:31 2017 -0500
@@ -1,29 +1,32 @@
 <?xml version="1.0" encoding="utf-8" ?>
-<tool id="novo_sort" name="NOVO SORT" version="0.0.1">
+<tool id="novo_sort" name="NOVO SORT" version="0.0.2">
     <description>Tool to run the Novo Sort mapping tool</description>
     <requirements>
         <requirement type="package" version="1.2">samtools</requirement>
-        <requirement type="package" version="3.04.01">novocraft</requirement>
+        <requirement type="package" version="3.04.04">novoalign</requirement>
     </requirements>
-    <stdio>
-        <exit_code range=":-1" />
-        <exit_code range="1:" />
-    </stdio>
-    <command interpreter="python">
-        novo_sort.py '${out_file}' --bam_filename ${input1}
+    <command detect_errors="aggressive"><![CDATA[
+        python $__tool_directory__/novo_sort.py '${out_file}' --bam_filename '${input1}'
+    ]]>
     </command>
     <inputs>
-        <param name="input1" type="data" format="bam" label="Select first set of reads" help="Specify dataset with forward reads"/>
+        <param name="input1" type="data" format="bam" label="BAM file" help="a BAM file that requires sorting"/>
     </inputs>
     <outputs>
         <data format="bam" name="out_file" />
     </outputs>
-    <help>Help!</help>
+    <help><![CDATA[
+      Novosort is part of the `Novoalign`_ tool suite.
+
+      .. _Novoalign: http://www.novocraft.com/products/novoalign/
+    ]]></help>
     <citations>
         <citation></citation>
     </citations>
     <tests>
         <test>
+          <param name="input1" value="input1.bam" ftype="bam" />
+          <param name="out_file" value="output1.bam" ftype="bam" />
         </test>
     </tests>
 </tool>
Binary file test-data/input1.bam has changed
Binary file test-data/output1.bam has changed