Author: ruschein
Date: 2011-03-24 10:59:30 -0700 (Thu, 24 Mar 2011)
New Revision: 24574

Modified:
   csplugins/trunk/ucsd/ruschein/ctrt/ctrt
Log:
Improved help, code documentation and command-line argument processing.

Modified: csplugins/trunk/ucsd/ruschein/ctrt/ctrt
===================================================================
--- csplugins/trunk/ucsd/ruschein/ctrt/ctrt     2011-03-24 17:26:17 UTC (rev 
24573)
+++ csplugins/trunk/ucsd/ruschein/ctrt/ctrt     2011-03-24 17:59:30 UTC (rev 
24574)
@@ -17,7 +17,9 @@
 
 
 def PrintUsage():
-    print "usage: ctrt [--verbose] maven_project_directory"
+    print "usage: ctrt [--help | -h] [--verbose | -v] [--loop-count=count | 
-lcount]maven_project_directory"
+    print "       The loop count must be at least 20 for reasons having to do 
with the statistics that are"
+    print "       being generated."
     exit(-1)
 
 
@@ -154,6 +156,7 @@
 
 # Returns (significance,median(dataset1),median(dataset2)).  The difference in 
the medians is
 # significant is "significance" <= 0.05.
+# Note: This implementatn is based on http://en.wikipedia.org/wiki/Mann-whitney
 def MannWhitneyUTest(dataset1, dataset2):
     if len(dataset1) < 20:
         raise ValueError("dataset1 must contain at least 20 values!")
@@ -233,6 +236,9 @@
         elif opt in ("-l", "--loop-count"):
             try:
                 loop_count = int(arg)
+                if loop_count < 20:
+                    print "ctrt: Error: loop count argument must be at least 
20!"
+                    PrintUsage()
             except exceptions.ValueError:
                 print "ctrt: " + arg + " is not a valid loop count!"
                 PrintUsage()

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to