Changeset 642:e165d938d983
- Timestamp:
- 10/03/07 10:17:41 (1 year ago)
- Files:
-
- run_functional_tests.sh (modified) (2 diffs)
- test-data/sc_3D_cds_add_1.bed (deleted)
- test-data/sc_3D_cds_add_mycds.bed (deleted)
- test-data/sc_3D_cds_compute1.bed (deleted)
- test-data/sc_3D_cds_compute2.bed (deleted)
- test-data/sc_3D_cds_concat.bed (deleted)
- test-data/sc_3D_cds_createInterval.bed (deleted)
- test-data/sc_3D_cds_cut.bed (deleted)
- test-data/sc_3D_cds_paste.bed (deleted)
- test-data/sc_3E_compare.bed (deleted)
- test/functional/__init__.py (modified) (4 diffs)
- test/functional/test_3A_GetData.py (deleted)
- test/functional/test_3B_GetEncodeData.py (deleted)
- test/functional/test_3D_Edit_Modify.py (deleted)
- test/functional/test_3E_Filter.py (deleted)
- test/functional/test_basic.py (deleted)
- test/functional/test_components.py (added)
- test/functional/test_datasource_tools.py (deleted)
- test/functional/test_get_data.py (added)
- test/functional/test_history.py (deleted)
- test/functional/test_toolbox.py (modified) (1 diff)
- tools/data_source/upload.xml (modified) (4 diffs)
- tools/filters/grep.xml (modified) (1 diff)
- tools/filters/joiner.xml (modified) (1 diff)
- tools/filters/sorter.xml (modified) (1 diff)
- tools/stats/aggregate_scores_in_intervals.xml (modified) (1 diff)
- tools/stats/filtering.xml (modified) (1 diff)
- tools/stats/grouping.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
run_functional_tests.sh
r423 r642 1 1 #!/bin/sh 2 2 3 # A good place to look for nose info: http://somethingaboutorange.com/mrl/projects/nose/ 4 3 5 rm -f run_functional_tests.log 4 echo "'run_functional_tests.sh help' for help"6 echo "'run_functional_tests.sh help' for help" 5 7 6 8 if [ ! $1 ]; then … … 14 16 ./nosetests.sh -v -w test functional.test_toolbox:GeneratedToolTestCase_$2 --with-nosehtml --html-report-file run_functional_tests.html 15 17 elif [ $1 = '-list' ]; then 16 python tool_list.py18 python tool_list.py 17 19 echo "===========================================================================================================================================" 18 echo "'run_functional_tests.sh help' for help"20 echo "'run_functional_tests.sh help' for help" 19 21 echo "'run_functional_tests.sh -id bbb' for testing one tool with id 'bbb'" 20 22 else test/functional/__init__.py
r489 r642 10 10 import twill, unittest, time 11 11 import os, os.path, subprocess, sys, threading 12 import httplib 12 13 from galaxy.web.framework.servers import threadpool_server 13 14 import galaxy.app 14 15 from galaxy.app import UniverseApplication 15 16 from galaxy.web import buildapp 17 import test_toolbox 18 from galaxy import tools 16 19 17 20 log = logging.getLogger( __name__ ) … … 22 25 default_galaxy_test_host = "localhost" 23 26 default_galaxy_test_port = "9999" 24 25 27 galaxy_test_file_dir = "test-data" 26 27 28 server = None 28 29 app = None … … 38 39 39 40 if start_server: 40 41 41 if 'GALAXY_TEST_DBPATH' in os.environ: 42 42 db_path = os.environ['GALAXY_TEST_DBPATH'] … … 67 67 log.info( "Embedded Universe application started" ) 68 68 69 webapp = buildapp.app_factory( dict(), 70 use_translogger = False, 71 app=app ) 69 webapp = buildapp.app_factory( dict(), use_translogger = False, app=app ) 70 server = threadpool_server.serve( webapp, dict(), host=galaxy_test_host, port=galaxy_test_port, start_loop=False ) 72 71 73 server = threadpool_server.serve( webapp, dict(),74 host=galaxy_test_host,75 port=galaxy_test_port,76 start_loop=False )77 78 72 atexit.register( teardown ) 79 80 import threading81 73 t = threading.Thread( target=server.serve_forever ) 82 74 t.start() 83 84 75 time.sleep( 2 ) 85 86 76 log.info( "Embedded web server started" ) 87 77 88 78 if app: 89 79 # TODO: provisions for loading toolbox from file when using external server 90 import test_toolbox91 80 test_toolbox.toolbox = app.toolbox 92 81 else: 93 from galaxy import tools94 import test_toolbox95 82 test_toolbox.toolbox = tools.ToolBox( 'tool_conf.xml', 'tools' ) 96 83 97 84 # Test if the server is up 98 import httplib99 85 conn = httplib.HTTPConnection( galaxy_test_host, galaxy_test_port ) 100 86 conn.request( "GET", "/" ) test/functional/test_toolbox.py
r587 r642 68 68 Dynamically generate a `ToolTestCase` for `testdef` 69 69 """ 70 n = " GeneratedToolTestCase_" + testdef.tool.id.replace( ' ', '_' )70 n = "TestForTool_" + testdef.tool.id.replace( ' ', '_' ) 71 71 s = ( ToolTestCase, ) 72 72 def test_tool( self ): tools/data_source/upload.xml
r625 r642 2 2 3 3 <tool name="Upload File" id="upload1"> 4 <description>5 from your computer6 </description>7 <action module="galaxy.tools.actions.upload" class="UploadToolAction"/>8 <inputs>9 <param name="file_data" type="file" size="30" label="File"/>10 <param name="url_paste" type="text" area="true" size="5x35" label="URL/Text" help="Here you may specify a list of URLs (one per line) or paste the contents of a file."/>11 <param name="space_to_tab" type="select" display="checkboxes" multiple="True" label="Convert spaces to tabs" help="Use this option if you are entering intervals by hand.">12 <option value="Yes">Yes</option>13 </param>14 <param type="select" name="file_type" label="File Format" dynamic_options="get_formats()" help="Which format? See help below" />15 <param label="Genome" name="dbkey" type="genomebuild" dynamic_options=""/>16 </inputs>4 <description> 5 from your computer 6 </description> 7 <action module="galaxy.tools.actions.upload" class="UploadToolAction"/> 8 <inputs> 9 <param name="file_data" type="file" size="30" label="File"/> 10 <param name="url_paste" type="text" area="true" size="5x35" label="URL/Text" help="Here you may specify a list of URLs (one per line) or paste the contents of a file."/> 11 <param name="space_to_tab" type="select" display="checkboxes" multiple="True" label="Convert spaces to tabs" help="Use this option if you are entering intervals by hand."> 12 <option value="Yes">Yes</option> 13 </param> 14 <param type="select" name="file_type" label="File Format" dynamic_options="get_formats()" help="Which format? See help below" /> 15 <param label="Genome" name="dbkey" type="genomebuild" dynamic_options=""/> 16 </inputs> 17 17 <help> 18 18 **Auto-detect** … … 47 47 chr22 2000 6000 cloneB 900 - 2000 6000 0 2 433,399, 0,3601 48 48 49 Original description of the BED format can be found here_.50 51 .. _here: http://genome.ucsc.edu/goldenPath/help/customTrack.html#BED52 53 49 ----- 54 50 … … 64 60 - END - The ending position of the feature in the chromosome or contig. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99. 65 61 - STRAND - Defines the strand - either '+' or '-'. 62 66 63 - Example:: 67 64 … … 99 96 **Gff3** 100 97 101 The proposedGFF3 format addresses the most common extensions to GFF, while preserving backward compatibility with previous formats.98 The GFF3 format addresses the most common extensions to GFF, while preserving backward compatibility with previous formats. 102 99 103 100 ----- tools/filters/grep.xml
r622 r642 14 14 </outputs> 15 15 <tests> 16 <test> 17 <param name="input" value="1.bed"/> 18 <param name="invert" value="false"/> 19 <param name="pattern" value="^chr[0-9]*"/> 20 <output name="out_file1" file="fs-grep.dat"/> 21 </test> 16 <test> 17 <param name="input" value="1.bed"/> 18 <param name="invert" value="false"/> 19 <param name="pattern" value="^chr[0-9]*"/> 20 <output name="out_file1" file="fs-grep.dat"/> 21 </test> 22 <test> 23 <param name="input" value="7.bed"/> 24 <param name="invert" value="false"/> 25 <param name="pattern" value="AY143171"/> 26 <output name="out_file1" file="sc_3E_select.bed"/> 27 </test> 22 28 </tests> 23 29 <help> tools/filters/joiner.xml
r303 r642 23 23 <param name="field2" value="2"/> 24 24 <output name="out_file1" file="fs-joiner.dat"/> 25 </test> 26 <test> 27 <param name="input1" value="7.bed"/> 28 <param name="input2" value="8.bed"/> 29 <param name="field1" value="4"/> 30 <param name="field2" value="1"/> 31 <output name="out_file1" file="sc_3E_join.bed"/> 25 32 </test> 26 33 </tests> tools/filters/sorter.xml
r602 r642 25 25 <output name="out_file1" file="fs-sort.dat"/> 26 26 </test> 27 <test> 28 <param name="input" value="7.bed"/> 29 <param name="column" value="1"/> 30 <param name="order" value="ASC"/> 31 <param name="style" value="alpha"/> 32 <output name="out_file1" file="sc_3E_sort.bed"/> 33 </test> 27 34 </tests> 28 35 <help> tools/stats/aggregate_scores_in_intervals.xml
r259 r642 1 1 <tool id="aggregate_scores_in_intervals1" description="from the table browser (equivalent to wiggle format)." name="Aggregate datapoints"> 2 <description>Appends the average, min, max, sum, and count of datapoints per interval</description> 3 <command interpreter="python2.4">aggregate_scores_in_intervals.py $input2 $input1 $input1_chromCol $input1_startCol $input1_endCol $out_file1</command> 4 <inputs> 5 <page> 6 <param format="wig" name="input2" type="data" label="Datapoints from table browser"/> 7 <param format="interval" name="input1" type="data" label="Interval file"/> 8 </page> 9 </inputs> 10 <outputs> 11 <data format="interval" name="out_file1" metadata_source="input2"/> 12 </outputs> 13 <tests> 14 <test> 15 <param name="input1" value="aggregate_binned_scores_in_intervals.bed" /> 16 <param name="datasets" value="aggregate_binned_scores_in_intervals.wig" /> 17 <output name="out_file1" file="aggregate_binned_scores_in_intervals.out" /> 18 </test> 19 </tests> 20 <help> 2 <description>Appends the average, min, max, sum, and count of datapoints per interval</description> 3 <command interpreter="python2.4">aggregate_scores_in_intervals.py $input2 $input1 $input1_chromCol $input1_startCol $input1_endCol $out_file1</command> 4 <inputs> 5 <page> 6 <param format="wig" name="input2" type="data" label="Datapoints from table browser"/> 7 <param format="interval" name="input1" type="data" label="Interval file"/> 8 </page> 9 </inputs> 10 <outputs> 11 <data format="interval" name="out_file1" metadata_source="input2"/> 12 </outputs> 13 <!-- TODO: This tool is currently not being used, uncomment and correct the tests if it ever is... 14 <tests> 15 <test> 16 <param name="input1" value="aggregate_binned_scores_in_intervals.bed" /> 17 <param name="datasets" value="aggregate_binned_scores_in_intervals.wig" /> 18 <output name="out_file1" file="aggregate_binned_scores_in_intervals.out" /> 19 </test> 20 </tests> --> 21 <help> 21 22 22 23 .. class:: warningmark tools/stats/filtering.xml
r422 r642 16 16 <param name="cond" value="c1=='chr22'"/> 17 17 <output name="out_file1" file="fs-filter.dat"/> 18 </test> 19 <test> 20 <param name="input" value="7.bed"/> 21 <param name="cond" value="c1=='chr1' and c3-c2>=2000 and c6=='+'"/> 22 <output name="out_file1" file="sc_3E_filter.bed"/> 18 23 </test> 19 24 </tests> tools/stats/grouping.py
r606 r642 55 55 float( elems[col] ) 56 56 except: 57 stop_err( "Operation '%s' cannot be performed on non-numeric column %d containing value %s." %( ops[k], col+1, elems[col] ))57 stop_err( "Operation '%s' cannot be performed on non-numeric column %d containing value '%s'." %( ops[k], col+1, elems[col] )) 58 58 59 59 tmpfile = tempfile.NamedTemporaryFile()