details: http://www.bx.psu.edu/hg/galaxy/rev/a5ccb2ba4c74 changeset: 3715:a5ccb2ba4c74 user: jeremy goecks <jeremy.goecks@emory.edu> date: Wed Apr 28 16:06:58 2010 -0400 description: Another rev on cuffcompare wrapper. diffstat: tools/ngs_rna/cuffcompare_wrapper.py | 16 +++++++++++----- tools/ngs_rna/cuffcompare_wrapper.xml | 24 +++++++++++++++++++----- 2 files changed, 30 insertions(+), 10 deletions(-) diffs (83 lines): diff -r b70d9444f29f -r a5ccb2ba4c74 tools/ngs_rna/cuffcompare_wrapper.py --- a/tools/ngs_rna/cuffcompare_wrapper.py Wed Apr 28 14:54:55 2010 -0400 +++ b/tools/ngs_rna/cuffcompare_wrapper.py Wed Apr 28 16:06:58 2010 -0400 @@ -13,6 +13,8 @@ parser.add_option( '-R', action="store_true", dest='ignore_nonoverlap', help='If -r was specified, this option causes cuffcompare to ignore reference transcripts that are not overlapped by any transcript in one of cuff1.gtf,...,cuffN.gtf. Useful for ignoring annotated transcripts that are not present in your RNA-Seq samples and thus adjusting the "sensitivity" calculation in the accuracy report written in the transcripts accuracy file' ) # Wrapper / Galaxy options. + parser.add_option( '-1', dest='input1') + parser.add_option( '-2', dest='input2') parser.add_option( '-A', '--transcripts-accuracy-output', dest='transcripts_accuracy_output_file', help='' ) parser.add_option( '-B', '--transcripts-combined-output', dest='transcripts_combined_output_file', help='' ) parser.add_option( '-C', '--transcripts-tracking-output', dest='transcripts_tracking_output_file', help='' ) @@ -37,9 +39,10 @@ print cmd # Add input files. - if type(args) is list: - args = " ".join(args) - cmd += " " + args + cmd += " %s" % options.input1 + two_inputs = ( options.input2 != None) + if two_inputs: + cmd += " %s" % options.input2 # Run command. try: @@ -76,8 +79,11 @@ try: try: shutil.copyfile( tmp_output_dir + "/cc_output", options.transcripts_accuracy_output_file ) - shutil.copyfile( tmp_output_dir + "/cc_output.combined.gtf", options.transcripts_combined_output_file ) - shutil.copyfile( tmp_output_dir + "/cc_output.tracking", options.transcripts_tracking_output_file ) + if two_inputs: + shutil.copyfile( tmp_output_dir + "/cc_output.combined.gtf", options.transcripts_combined_output_file ) + shutil.copyfile( tmp_output_dir + "/cc_output.tracking", options.transcripts_tracking_output_file ) + + # TODO: also copy *.tmap, *.refmap to outputs? except Exception, e: stop_err( 'Error in cuffcompare:\n' + str( e ) ) finally: diff -r b70d9444f29f -r a5ccb2ba4c74 tools/ngs_rna/cuffcompare_wrapper.xml --- a/tools/ngs_rna/cuffcompare_wrapper.xml Wed Apr 28 14:54:55 2010 -0400 +++ b/tools/ngs_rna/cuffcompare_wrapper.xml Wed Apr 28 16:06:58 2010 -0400 @@ -3,20 +3,34 @@ <command interpreter="python"> cuffcompare_wrapper.py --transcripts-accuracy-output=$transcripts_accuracy - --transcripts-combined-output=$transcripts_combined - --transcripts-tracking-output=$transcripts_tracking + #if $second_gtf.use_second_gtf == "Yes": + --transcripts-combined-output=$transcripts_combined + --transcripts-tracking-output=$transcripts_tracking + #end if #if $annotation.use_ref_annotation == "Yes": -r $annotation.reference_annotation #if $annotation.ignore_nonoverlapping_reference: -R #end if #end if - $input1 - $input2 + -1 $input1 + #if $second_gtf.use_second_gtf == "Yes": + -2 $second_gtf.input2 + #end if </command> <inputs> <param format="gtf" name="input1" type="data" label="GTF file produced by Cufflinks" help=""/> - <param format="gtf" name="input2" type="data" label="GTF file produced by Cufflinks" help=""/> + <conditional name="second_gtf"> + <param name="use_second_gtf" type="select" label="Use Another GTF file producted by Cufflinks?"> + <option value="No">No</option> + <option value="Yes">Yes</option> + </param> + <when value="Yes"> + <param format="gtf" name="input2" type="data" label="GTF file produced by Cufflinks" help=""/> + </when> + <when value="No"> + </when> + </conditional> <conditional name="annotation"> <param name="use_ref_annotation" type="select" label="Use Reference Annotation"> <option value="No">No</option>