Repository 'cufflinks'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/cufflinks

Changeset 9:a1ea9af8d5f4 (2015-11-11)
Previous changeset 8:64698e16f4a6 (2015-04-09) Next changeset 10:83bec71c5c9f (2017-02-07)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/cufflinks/cufflinks commit a1517c9d22029095120643bbe2c8fa53754dd2b7
modified:
cuff_macros.xml
cufflinks_wrapper.py
b
diff -r 64698e16f4a6 -r a1ea9af8d5f4 cuff_macros.xml
--- a/cuff_macros.xml Thu Apr 09 12:52:41 2015 -0400
+++ b/cuff_macros.xml Wed Nov 11 12:34:49 2015 -0500
[
@@ -10,8 +10,8 @@
     <stdio>
         <exit_code range="1:" />
         <exit_code range=":-1" />
-        <regex match="Error:" />
-        <regex match="Exception:" />
+        <regex match="Error" />
+        <regex match="Exception" />
     </stdio>
   </xml>
   <xml name="condition_inputs">
@@ -88,4 +88,4 @@
             #end for
   </token>
   <token name="@HAS_MULTIPLE_INPUTS@">getattr(inputs, "__len__", [].__len__)() >= 2</token>
-</macros>
\ No newline at end of file
+</macros>
b
diff -r 64698e16f4a6 -r a1ea9af8d5f4 cufflinks_wrapper.py
--- a/cufflinks_wrapper.py Thu Apr 09 12:52:41 2015 -0400
+++ b/cufflinks_wrapper.py Wed Nov 11 12:34:49 2015 -0500
[
b'@@ -1,13 +1,18 @@\n #!/usr/bin/env python\n \n-import optparse, os, shutil, subprocess, sys, tempfile\n-from galaxy import eggs\n+import optparse\n+import os\n+import shutil\n+import subprocess\n+import sys\n+import tempfile\n from galaxy.datatypes.util.gff_util import parse_gff_attributes, gff_attributes_to_str\n \n+\n def stop_err( msg ):\n-    sys.stderr.write( "%s\\n" % msg )\n-    sys.exit()\n-    \n+    sys.exit( "%s\\n" % msg )\n+\n+\n def __main__():\n     #Parse Command Line\n     parser = optparse.OptionParser()\n@@ -19,28 +24,28 @@\n     parser.add_option( \'-G\', \'--GTF\', dest=\'GTF\', help=\'Tells Cufflinks to use the supplied reference annotation to estimate isoform expression. It will not assemble novel transcripts, and the program will ignore alignments not structurally compatible with any reference transcript.\' )\n     parser.add_option("--compatible-hits-norm", dest=\'compatible_hits_norm\', action="store_true", help=\'Count hits compatible with reference RNAs only\')\n     parser.add_option( \'-g\', \'--GTF-guide\', dest=\'GTFguide\', help=\'use reference transcript annotation to guide assembly\' )\n-    parser.add_option("--3-overhang-tolerance",dest=\'three_overhang_tolerance\', help=\'The number of bp allowed to overhang the 3prime end of a reference transcript when determining if an assembled transcript should be merged with it (ie, the assembled transcript is not novel). The default is 600 bp.\')\n-    parser.add_option("--intron-overhang-tolerance",dest=\'intron_overhang_tolerance\',help=\'The number of bp allowed to enter the intron of a reference transcript when determining if an assembled transcript should be merged with it (ie, the assembled transcript is not novel). The default is 50 bp.\')\n-    parser.add_option("--no-faux-reads", dest=\'no_faux_reads\',help=\'This option disables tiling of the reference transcripts with faux reads. Use this if you only want to use sequencing reads in assembly but do not want to output assembled transcripts that lay within reference transcripts. All reference transcripts in the input annotation will also be included in the output.\')\n+    parser.add_option("--3-overhang-tolerance", dest=\'three_overhang_tolerance\', help=\'The number of bp allowed to overhang the 3prime end of a reference transcript when determining if an assembled transcript should be merged with it (ie, the assembled transcript is not novel). The default is 600 bp.\')\n+    parser.add_option("--intron-overhang-tolerance", dest=\'intron_overhang_tolerance\', help=\'The number of bp allowed to enter the intron of a reference transcript when determining if an assembled transcript should be merged with it (ie, the assembled transcript is not novel). The default is 50 bp.\')\n+    parser.add_option("--no-faux-reads", dest=\'no_faux_reads\', help=\'This option disables tiling of the reference transcripts with faux reads. Use this if you only want to use sequencing reads in assembly but do not want to output assembled transcripts that lay within reference transcripts. All reference transcripts in the input annotation will also be included in the output.\')\n     parser.add_option( \'-u\', \'--multi-read-correct\', dest=\'multi_read_correct\', action="store_true", help=\'Tells Cufflinks to do an initial estimation procedure to more accurately weight reads mapping to multiple locations in the genome\')\n-    \n+\n     # Normalization options.\n-    parser.add_option( "--no-effective-length-correction", dest="no_effective_length_correction", action="store_true" ) \n-    parser.add_option( "--no-length-correction", dest="no_length_correction", action="store_true" ) \n+    parser.add_option( "--no-effective-length-correction", dest="no_effective_length_correction", action="store_true" )\n+    parser.add_option( "--no-length-correction", dest="no_length_correction", action="store_true" )\n \n     # Wrapper / Galaxy options.\n     parser.add_option( \'-A\', \'--assembled-isoforms-output\', dest=\'assembled_isoforms_output_file\', help=\'Assembled isoforms output file; formate is GTF.\' )\n \n-    # Advanced '..b'gth:\n-        cmd += ( " --max-bundle-length %i" % int ( options.max_bundle_length ) ) \n+        cmd += ( " --max-bundle-length %i" % int( options.max_bundle_length ) )\n     if options.max_bundle_frags:\n-        cmd += ( " --max-bundle-frags %i" % int ( options.max_bundle_frags ) )\n+        cmd += ( " --max-bundle-frags %i" % int( options.max_bundle_frags ) )\n     if options.min_intron_length:\n-        cmd += ( " --min-intron-length %i" % int ( options.min_intron_length ) )\n+        cmd += ( " --min-intron-length %i" % int( options.min_intron_length ) )\n     if options.trim_three_avgcov_thresh:\n-        cmd += ( " --trim-3-avgcov-thresh %i" % int ( options.trim_three_avgcov_thresh ) ) \n+        cmd += ( " --trim-3-avgcov-thresh %i" % int( options.trim_three_avgcov_thresh ) )\n     if options.trim_three_dropoff_frac:\n-        cmd += ( " --trim-3-dropoff-frac %f" % float ( options.trim_three_dropoff_frac ) ) \n+        cmd += ( " --trim-3-dropoff-frac %f" % float( options.trim_three_dropoff_frac ) )\n \n     if options.do_bias_correction:\n         cmd += ( " -b %s" % seq_path )\n@@ -157,13 +161,13 @@\n         cmd += ( " --no-effective-length-correction" )\n     if options.no_length_correction:\n         cmd += ( " --no-length-correction" )\n-        \n+\n     # Add input files.\n     cmd += " " + options.input\n-   \n+\n     # Debugging.\n     print cmd\n- \n+\n     #\n     # Run command and handle output.\n     #\n@@ -176,15 +180,15 @@\n         proc = subprocess.Popen( args=cmd, shell=True, stderr=tmp_stderr.fileno() )\n         returncode = proc.wait()\n         tmp_stderr.close()\n-        \n+\n         # Error checking.\n         if returncode != 0:\n-            raise Exception, "return code = %i" % returncode\n-        \n+            raise Exception("return code = %i" % returncode)\n+\n         #\n         # Handle output.\n-        # \n-        \n+        #\n+\n         # Read standard error to get total map/upper quartile mass.\n         total_map_mass = -1\n         tmp_stderr = open( tmp_name, \'r\' )\n@@ -193,21 +197,21 @@\n                 total_map_mass = float( line.split(":")[1].strip() )\n                 break\n         tmp_stderr.close()\n-        \n+\n         #\n         # If there\'s a global model provided, use model\'s total map mass\n         # to adjust FPKM + confidence intervals.\n         #\n-        if options.global_model_file:        \n+        if options.global_model_file:\n             # Global model is simply total map mass from original run.\n             global_model_file = open( options.global_model_file, \'r\' )\n             global_model_total_map_mass = float( global_model_file.readline() )\n             global_model_file.close()\n-        \n+\n             # Ratio of global model\'s total map mass to original run\'s map mass is\n             # factor used to adjust FPKM.\n             fpkm_map_mass_ratio = total_map_mass / global_model_total_map_mass\n-        \n+\n             # Update FPKM values in transcripts.gtf file.\n             transcripts_file = open( "transcripts.gtf", \'r\' )\n             tmp_transcripts = tempfile.NamedTemporaryFile( dir="." ).name\n@@ -223,11 +227,11 @@\n             transcripts_file.close()\n             new_transcripts_file.close()\n             shutil.copyfile( tmp_transcripts, "transcripts.gtf" )\n-            \n+\n         # TODO: update expression files as well.\n-                    \n+\n         # Set outputs. Transcript and gene expression handled by wrapper directives.\n-        shutil.copyfile( "transcripts.gtf" , options.assembled_isoforms_output_file )\n+        shutil.copyfile( "transcripts.gtf", options.assembled_isoforms_output_file )\n         if total_map_mass > -1:\n             f = open( "global_model.txt", \'w\' )\n             f.write( "%f\\n" % total_map_mass )\n@@ -245,7 +249,7 @@\n         except OverflowError:\n             pass\n         tmp_stderr.close()\n-        \n         stop_err( \'Error running cufflinks.\\n%s\\n%s\' % ( str( e ), stderr ) )\n \n-if __name__=="__main__": __main__()\n+if __name__ == "__main__":\n+    __main__()\n'