# HG changeset patch # User peterjc # Date 1392586248 18000 # Node ID 7fcabeeca5dfe2e36e8925767ba3b056b83ec258 # Parent a6a56440567c56de7610490d60ed982ff56bac3f Uploaded v0.0.2 preview 5, fixes for MIRA 4.0 (final), more verbose error if $MIRA4 path wrong diff -r a6a56440567c -r 7fcabeeca5df test-data/empty_file.dat diff -r a6a56440567c -r 7fcabeeca5df tools/mira4/README.rst --- a/tools/mira4/README.rst Mon Feb 03 06:25:35 2014 -0500 +++ b/tools/mira4/README.rst Sun Feb 16 16:30:48 2014 -0500 @@ -1,7 +1,7 @@ Galaxy wrapper for the MIRA assembly program (v4.0) =================================================== -This tool is copyright 2011-2013 by Peter Cock, The James Hutton Institute +This tool is copyright 2011-2014 by Peter Cock, The James Hutton Institute (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. See the licence text below (MIT licence). @@ -98,7 +98,7 @@ For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball use the following command from the Galaxy root folder:: - $ tar -czf mira4_wrapper.tar.gz tools/mira4/README.rst tools/mira4/mira4_de_novo.xml tools/mira4/mira4_mapping.xml tools/mira4/mira4_bait.xml tools/mira4/mira4.py tools/mira4/mira4_make_bam.py tools/mira4/mira4_validator.py tools/mira4/mira4_bait.py tools/mira4/tool_dependencies.xml test-data/tvc_mini.fastq test-data/tvc_contigs.fasta test-data/tvc_map_ref_strain.fasta test-data/tvc_map_same_strain.fasta test-data/tvc_bait.fasta test-data/tvc_mini_bait_pos.fastq test-data/tvc_mini_bait_strict.fastq test-data/tvc_mini_bait_neg.fastq + $ tar -czf mira4_wrapper.tar.gz tools/mira4/README.rst tools/mira4/mira4_de_novo.xml tools/mira4/mira4_mapping.xml tools/mira4/mira4_bait.xml tools/mira4/mira4.py tools/mira4/mira4_make_bam.py tools/mira4/mira4_validator.py tools/mira4/mira4_bait.py tools/mira4/tool_dependencies.xml test-data/tvc_mini.fastq test-data/tvc_contigs.fasta test-data/tvc_map_ref_strain.fasta test-data/tvc_map_same_strain.fasta test-data/tvc_bait.fasta test-data/tvc_mini_bait_pos.fastq test-data/tvc_mini_bait_strict.fastq test-data/tvc_mini_bait_neg.fastq test-data/empty_file.dat Check this worked:: @@ -120,6 +120,7 @@ test-data/tvc_mini_bait_pos.fastq test-data/tvc_mini_bait_strict.fastq test-data/tvc_mini_bait_neg.fastq + test-data/empty_file.dat diff -r a6a56440567c -r 7fcabeeca5df tools/mira4/mira4.py --- a/tools/mira4/mira4.py Mon Feb 03 06:25:35 2014 -0500 +++ b/tools/mira4/mira4.py Sun Feb 16 16:30:48 2014 -0500 @@ -40,10 +40,12 @@ stop_err("Environment variable $MIRA4 not set") mira_binary = os.path.join(mira_path, "mira") if not os.path.isfile(mira_binary): - stop_err("Missing mira under $MIRA4, %r" % mira_binary) + stop_err("Missing mira under $MIRA4, %r\nFolder contained: %s" + % (mira_binary, ", ".join(os.listdir(mira_path)))) mira_convert = os.path.join(mira_path, "miraconvert") if not os.path.isfile(mira_convert): - stop_err("Missing miraconvert under $MIRA4, %r" % mira_convert) + stop_err("Missing miraconvert under $MIRA4, %r\nFolder contained: %s" + % (mira_convert, ", ".join(os.listdir(mira_path)))) mira_ver = get_version(mira_binary) if not mira_ver.strip().startswith("4.0"): diff -r a6a56440567c -r 7fcabeeca5df tools/mira4/mira4_bait.py --- a/tools/mira4/mira4_bait.py Mon Feb 03 06:25:35 2014 -0500 +++ b/tools/mira4/mira4_bait.py Sun Feb 16 16:30:48 2014 -0500 @@ -43,7 +43,8 @@ stop_err("Environment variable $MIRA4 not set") mira_binary = os.path.join(mira_path, "mirabait") if not os.path.isfile(mira_binary): - stop_err("Missing mirabait under $MIRA4, %r" % mira_binary) + stop_err("Missing mirabait under $MIRA4, %r\nFolder contained: %s" + % (mira_binary, ", ".join(os.listdir(mira_path)))) mira_ver = get_version(mira_binary) if not mira_ver.strip().startswith("4.0"): stop_err("This wrapper is for MIRA V4.0, not:\n%s" % mira_ver) diff -r a6a56440567c -r 7fcabeeca5df tools/mira4/mira4_de_novo.xml --- a/tools/mira4/mira4_de_novo.xml Mon Feb 03 06:25:35 2014 -0500 +++ b/tools/mira4/mira4_de_novo.xml Sun Feb 16 16:30:48 2014 -0500 @@ -79,9 +79,11 @@ project = MIRA job = denovo,${job_type},${job_quality} -parameters = -GE:not=1 -NW:cmrnl -DI:trt=/tmp +parameters = -NW:cmrnl=no -DI:trt=/tmp ## -GE:not is short for -GENERAL:number_of_threads and using one (1) ## can be useful for repeatability of assemblies and bug hunting. +## This is overriden by the command line -t switch which is easier +## to set from within Galaxy. ## ## -NW:cmrnl is short for -NAG_AND_WARN:check_maxreadnamelength ## and without this MIRA aborts with read names over 40 characters @@ -99,16 +101,19 @@ technology = ${rg.technology} ##Record the segment placement (if any) #if str($rg.segments.type) == "paired" -segmentplacement = ${rg.segments.placement} -segmentnaming = ${rg.segments.naming} +segment_placement = ${rg.segments.placement} +segment_naming = ${rg.segments.naming} #if str($rg.segments.min_size) != "" or str($rg.segments.max_size) != "" ##If our min/max validation failed I trust MIRA to give an error message... -templatesize = $rg.segments.min_size $rg.segments.max_size +template_size = $rg.segments.min_size $rg.segments.max_size #end if #end if -#if str($rg.segments.type) == "none" -segmentplacement = ? -#end if +##if str($rg.segments.type) == "none" +##MIRA4 manual says use segment_placement = unknown or ? for unpaired data +##but this stopped working in MIRA 4.0 RC5 and 4.0 (final). See: +##http://www.freelists.org/post/mira_talk/Unpaired-reads-and-segment-placement--or-unknown +##segment_placement = ? +##end if ##MIRA will accept multiple filenames on one data line, or multiple data lines #for $f in $rg.filenames ##Must now map Galaxy datatypes to MIRA file types... @@ -130,6 +135,9 @@ + + + - --> diff -r a6a56440567c -r 7fcabeeca5df tools/mira4/mira4_mapping.xml --- a/tools/mira4/mira4_mapping.xml Mon Feb 03 06:25:35 2014 -0500 +++ b/tools/mira4/mira4_mapping.xml Sun Feb 16 16:30:48 2014 -0500 @@ -80,9 +80,11 @@ project = MIRA job = mapping,${job_type},${job_quality} -parameters = -GE:not=1 -NW:cmrnl -DI:trt=/tmp +parameters = -NW:cmrnl=no -DI:trt=/tmp ## -GE:not is short for -GENERAL:number_of_threads and using one (1) ## can be useful for repeatability of assemblies and bug hunting. +## This is overriden by the command line -t switch which is easier +## to set from within Galaxy. ## ## -NW:cmrnl is short for -NAG_AND_WARN:check_maxreadnamelength ## and without this MIRA aborts with read names over 40 characters @@ -128,12 +130,15 @@ #end if ##Record the segment placement (if any) #if str($rg.segments.type) == "paired" -segmentplacement = ${rg.segments.placement} -segmentnaming = ${rg.segments.naming} +segment_placement = ${rg.segments.placement} +segment_naming = ${rg.segments.naming} #end if -#if str($rg.segments.type) == "none" -segmentplacement = ? -#end if +##if str($rg.segments.type) == "none" +##MIRA4 manual says use segment_placement = unknown or ? for unpaired data +##but this stopped working in MIRA 4.0 RC5 and 4.0 (final). See: +##http://www.freelists.org/post/mira_talk/Unpaired-reads-and-segment-placement--or-unknown +##segment_placement = ? +##end if ##MIRA will accept multiple filenames on one data line, or multiple data lines #for $f in $rg.filenames ##Must now map Galaxy datatypes to MIRA file types...