changeset 3:5aac9b9d6f2a draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/cufflinks/cuffcompare commit 82ee6fc860c52c531b7a57bbb346ab1a67a434a5
author devteam
date Sun, 19 Feb 2017 12:11:14 -0500
parents a5674ddf2ad7
children 806c27c97df7
files cuff_macros.xml cuffcompare_wrapper.py cuffcompare_wrapper.xml tool_dependencies.xml
diffstat 4 files changed, 25 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/cuff_macros.xml	Tue Feb 07 18:37:50 2017 -0500
+++ b/cuff_macros.xml	Sun Feb 19 12:11:14 2017 -0500
@@ -8,14 +8,6 @@
     </requirements>
   </xml>
 
-  <xml name="stdio">
-    <stdio>
-        <exit_code range="1:" />
-        <exit_code range=":-1" />
-        <regex match="Error" />
-        <regex match="Exception" />
-    </stdio>
-  </xml>
   <xml name="condition_inputs">
     <!-- DEFAULT : use BAM/SAM files -->
     <conditional name="in_type">
--- a/cuffcompare_wrapper.py	Tue Feb 07 18:37:50 2017 -0500
+++ b/cuffcompare_wrapper.py	Sun Feb 19 12:11:14 2017 -0500
@@ -38,23 +38,6 @@
 
     (options, args) = parser.parse_args()
 
-    # output version # of tool
-    try:
-        with tempfile.NamedTemporaryFile() as tmp_stdout:
-            returncode = subprocess.call(args='cuffcompare 2>&1', stdout=tmp_stdout, shell=True)
-            stdout = None
-            with open(tmp_stdout.name) as tmp_stdout2:
-                for line in tmp_stdout2:
-                    if line.lower().find('cuffcompare v') >= 0:
-                        stdout = line.strip()
-                        break
-        if stdout:
-            sys.stdout.write('%s\n' % stdout)
-        else:
-            raise Exception
-    except:
-        sys.stdout.write('Could not determine Cuffcompare version\n')
-
     # Set/link to sequence file.
     if options.use_seq_data:
         if options.ref_file:
--- a/cuffcompare_wrapper.xml	Tue Feb 07 18:37:50 2017 -0500
+++ b/cuffcompare_wrapper.xml	Sun Feb 19 12:11:14 2017 -0500
@@ -1,12 +1,11 @@
-<tool id="cuffcompare" name="Cuffcompare" version="2.2.1.0">
+<tool id="cuffcompare" name="Cuffcompare" version="@VERSION@.1">
     <description>compare assembled transcripts to a reference annotation and track Cufflinks transcripts across multiple experiments</description>
     <macros>
       <import>cuff_macros.xml</import>
     </macros>
     <expand macro="requirements" />
-    <expand macro="stdio" />
     <version_command>cuffcompare 2>&amp;1 | head -n 1</version_command>
-    <command>
+    <command detect_errors="aggressive"><![CDATA[
         python '$__tool_directory__/cuffcompare_wrapper.py'
             ## Use annotation reference?
             #if $annotation.use_ref_annotation == "Yes":
@@ -19,7 +18,7 @@
                 #end if
 
             #end if
-            
+
             ## Use sequence data?
             #if $seq_data.use_seq_data == "Yes":
             -s
@@ -29,7 +28,7 @@
                     --index '${seq_data.seq_source.index.fields.path}'
                 #end if
             #end if
-            
+
             $discard_single_exon
 
             -e $max_dist_exon
@@ -37,13 +36,13 @@
 
             #if $discard_intron_redundant_transfrags:
                 -F
-            #end if 
+            #end if
 
             ## Outputs.
             --combined-transcripts '${transcripts_combined}'
 
             @CUFFLINKS_GTF_INPUTS@
-    </command>
+    ]]></command>
     <inputs>
         <expand macro="cufflinks_gtf_inputs" />
         <conditional name="annotation">
@@ -60,7 +59,7 @@
             </when>
         </conditional>
         <conditional name="seq_data">
-            <param name="use_seq_data" type="select" label="Use Sequence Data" 
+            <param name="use_seq_data" type="select" label="Use Sequence Data"
                 help="Use sequence data for some optional classification functions, including the addition of the p_id attribute required by Cuffdiff.">
                 <option value="Yes">Yes</option>
                 <option value="No">No</option>
@@ -91,29 +90,29 @@
                 <option value="-M">Discard single-exon transfrags and reference transcripts</option>
                 <option value="-N">Discard single-exon reference transcripts</option>
         </param>
-        <param type="integer" name="max_dist_exon" value="100" label="Max. Distance for assessing exon accuracy" 
+        <param type="integer" name="max_dist_exon" value="100" label="Max. Distance for assessing exon accuracy"
             help="max. distance (range) allowed from free ends of terminal exons of reference transcripts when assessing exon accuracy. Default: 100" />
-        <param type="integer" name="max_dist_group" value="100" label="Max.Distance for transcript grouping" 
+        <param type="integer" name="max_dist_group" value="100" label="Max.Distance for transcript grouping"
             help="max. distance (range) for grouping transcript start sites. Default: 100" />
-        <param type="boolean" name="discard_intron_redundant_transfrags" label="discard intron-redundant transfrags sharing 5'" 
+        <param type="boolean" name="discard_intron_redundant_transfrags" label="discard intron-redundant transfrags sharing 5'"
             help="Discard intron-redundant transfrags if they share the 5' end (if they differ only at the 3' end)" />
     </inputs>
 
     <outputs>
-        <data format="txt" name="transcripts_accuracy" label="${tool.name} on ${on_string}: transcript accuracy" 
+        <data format="txt" name="transcripts_accuracy" label="${tool.name} on ${on_string}: transcript accuracy"
             from_work_dir="cc_output.stats" />
         <data format="tabular" name="input1_tmap" label="${tool.name} on ${on_string}: data ${inputs[0].hid} tmap file"
             from_work_dir="cc_output.input1.tmap" />
-        <data format="tabular" name="input1_refmap" 
-              label="${tool.name} on ${on_string}: data ${inputs[0].hid} refmap file" 
+        <data format="tabular" name="input1_refmap"
+              label="${tool.name} on ${on_string}: data ${inputs[0].hid} refmap file"
               from_work_dir="cc_output.input1.refmap">
             <filter>annotation['use_ref_annotation'] == 'Yes'</filter>
         </data>
         <data format="tabular" name="input2_tmap" label="${tool.name} on ${on_string}: data ${inputs[1].hid} tmap file" from_work_dir="cc_output.input2.tmap">
             <filter>@HAS_MULTIPLE_INPUTS@</filter>
         </data>
-        <data format="tabular" name="input2_refmap" 
-              label="${tool.name} on ${on_string}: data ${inputs[1].hid} refmap file" 
+        <data format="tabular" name="input2_refmap"
+              label="${tool.name} on ${on_string}: data ${inputs[1].hid} refmap file"
               from_work_dir="cc_output.input2.refmap">
             <filter>annotation['use_ref_annotation'] == 'Yes' and @HAS_MULTIPLE_INPUTS@</filter>
         </data>
@@ -124,7 +123,7 @@
     </outputs>
 
     <tests>
-        <!-- 
+        <!--
             cuffcompare -r cuffcompare_in3.gtf -R cuffcompare_in1.gtf cuffcompare_in2.gtf
         -->
         <test>
@@ -173,7 +172,7 @@
 
 Cuffcompare takes Cufflinks' GTF output as input, and optionally can take a "reference" annotation (such as from Ensembl_)
 
-.. _Ensembl: http://www.ensembl.org 
+.. _Ensembl: http://www.ensembl.org
 
 ------
 
@@ -187,7 +186,7 @@
 
 Transcripts Combined File:
 
-Cuffcompare reports a GTF file containing the "union" of all transfrags in each sample. If a transfrag is present in both samples, it is thus reported once in the combined gtf. 
+Cuffcompare reports a GTF file containing the "union" of all transfrags in each sample. If a transfrag is present in both samples, it is thus reported once in the combined gtf.
 
 Transcripts Tracking File:
 
@@ -209,7 +208,7 @@
   3               Reference gene id         Tcea             The gene_name attribute of the reference GTF record for this transcript, or '-' if no reference transcript overlaps this Cufflinks transcript
   4               Reference transcript id   uc007afj.1       The transcript_id attribute of the reference GTF record for this transcript, or '-' if no reference transcript overlaps this Cufflinks transcript
   5               Class code                c                The type of match between the Cufflinks transcripts in column 6 and the reference transcript. See class codes
-  
+
 Each of the columns after the fifth have the following format:
   qJ:gene_id|transcript_id|FMI|FPKM|conf_lo|conf_hi
 
@@ -222,18 +221,18 @@
   Priority         Code           Description
   ---------------------------------
   1                 =               Match
-  2                 c               Contained        
-  3                 j               New isoform        
-  4                 e               A single exon transcript overlapping a reference exon and at least 10 bp of a reference intron, indicating a possible pre-mRNA fragment.        
+  2                 c               Contained
+  3                 j               New isoform
+  4                 e               A single exon transcript overlapping a reference exon and at least 10 bp of a reference intron, indicating a possible pre-mRNA fragment.
   5                 i               A single exon transcript falling entirely with a reference intron
   6                 o               Generic exonic overlap with a reference transcript
-  7                 p               Possible polymerase run-on fragment  
-  8                 r               Repeat. Currently determined by looking at the soft-masked reference sequence and applied to transcripts where at least 50% of the bases are lower case  
+  7                 p               Possible polymerase run-on fragment
+  8                 r               Repeat. Currently determined by looking at the soft-masked reference sequence and applied to transcripts where at least 50% of the bases are lower case
   9                 u               Unknown, intergenic transcript
   10                x               Exonic overlap with reference on the opposite strand
   11                s               An intron of the transfrag overlaps a reference intron on the opposite strand (likely due to read mapping errors)
   12                .               (.tracking file only, indicates multiple classifications)
-    
+
 -------
 
 **Settings**
--- a/tool_dependencies.xml	Tue Feb 07 18:37:50 2017 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="cufflinks" version="2.2.1">
-        <repository changeset_revision="87f239da61af" name="package_cufflinks_2_2_1" owner="devteam" toolshed="https://testtoolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>