changeset 14:d10befb0867a

Add library_norm_method and dispersion_method params to cuffdiff tool.
author Jim Johnson <jj@umn.edu>
date Wed, 17 Jul 2013 08:25:52 -0500
parents 4597c429b6fb
children 2d7eee38ab5b
files cuffdiff_wrapper.py cuffdiff_wrapper.xml
diffstat 2 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/cuffdiff_wrapper.py	Wed Jul 17 07:58:39 2013 -0500
+++ b/cuffdiff_wrapper.py	Wed Jul 17 08:25:52 2013 -0500
@@ -62,6 +62,8 @@
     parser.add_option( '-c', '--min-alignment-count', dest='min_alignment_count', help='The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples. If no testing is performed, changes in the locus are deemed not signficant, and the locus\' observed changes don\'t contribute to correction for multiple testing. The default is 1,000 fragment alignments (up to 2,000 paired reads).' )
     parser.add_option( '--FDR', dest='FDR', help='The allowed false discovery rate. The default is 0.05.' )
     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')
+    parser.add_option( '--library-norm-method', dest='library_norm_method' )
+    parser.add_option( '--dispersion-method', dest='dispersion_method' )
 
     # Advanced Options:	
     parser.add_option( '--num-importance-samples', dest='num_importance_samples', help='Sets the number of importance samples generated for each locus during abundance estimation. Default: 1000' )
@@ -137,7 +139,6 @@
     if not os.path.exists( cuffdatadir ):
         os.makedirs( cuffdatadir )
     
-    
     # If doing bias correction, set/link to sequence file.
     if options.do_bias_correction:
         if options.ref_file != 'None':
@@ -162,6 +163,10 @@
     cmd = "cuffdiff --no-update-check -q"
     
     # Add options.
+    if options.library_norm_method:
+        cmd += ( " --library-norm-method %s" % options.library_norm_method )
+    if options.dispersion_method:
+        cmd += ( " --dispersion-method %s" % options.dispersion_method )
     if options.inner_dist_std_dev:
         cmd += ( " -s %i" % int ( options.inner_dist_std_dev ) )
     if options.num_threads:
@@ -188,7 +193,7 @@
     if options.groups:
         cmd += " --labels "
         for label in options.labels:
-            cmd += label + ","
+            cmd += '"%s",' % label
         cmd = cmd[:-1]
 
         cmd += " " + options.inputA + " "
--- a/cuffdiff_wrapper.xml	Wed Jul 17 07:58:39 2013 -0500
+++ b/cuffdiff_wrapper.xml	Wed Jul 17 08:25:52 2013 -0500
@@ -10,6 +10,8 @@
             --FDR=$fdr
             --num-threads="4"
             --min-alignment-count=$min_alignment_count
+            --library-norm-method=$library_norm_method
+            --dispersion-method=$dispersion_method
 
             #if 'cuffdata' in $sel_outputs or not $output_sel:
                 --cuffdatadir=$cuffdata.extra_files_path
@@ -134,6 +136,18 @@
             </when>
         </conditional>
 
+        <param name="library_norm_method" type="select" label="Library normalization method">
+            <option value="geometric" selected="True">geometric</option>
+            <option value="classic-fpkm">classic-fpkm</option>
+            <option value="quartile">quartile</option>
+        </param>
+
+        <param name="dispersion_method" type="select" label="Dispersion estimation method" help="If using only one sample per condition, you must use 'blind.'">
+            <option value="pooled" selected="True">pooled</option>
+            <option value="per-condition">per-condition</option>
+            <option value="blind">blind</option>
+        </param>
+
         <param name="fdr" type="float" value="0.05" label="False Discovery Rate" help="The allowed false discovery rate."/>
 
         <param name="min_alignment_count" type="integer" value="10" label="Min Alignment Count" help="The minimum number of alignments in a locus for needed to conduct significance testing on changes in that locus observed between samples."/>