Changeset 1630:311ee61dc989
- Timestamp:
- 11/13/08 14:56:33
(2 months ago)
- Author:
- Greg Von Kuster <greg@bx.psu.edu>
- branch:
- default
- Message:
Add a new <data_type_translation> tag set to data_source tools that enable the translation of an unsupported data type to a supported one in Galaxy ( currently only used in UCSC ). Also some tweaks to the jobs reports.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1592 |
r1630 |
|
| 243 | 243 | trans_list.append( req_param.get( "galaxy_name" ) ) |
|---|
| 244 | 244 | trans_list.append( req_param.get( "missing" ) ) |
|---|
| | 245 | if req_param.get( "galaxy_name" ) == "data_type": |
|---|
| | 246 | # The req_param tag for data_type is special in that it can contain another tag set like |
|---|
| | 247 | # <data_type_translation> |
|---|
| | 248 | # <format galaxy_format="tabular" remote_format="selectedFields" /> |
|---|
| | 249 | # </data_type_translation> |
|---|
| | 250 | format_trans = req_param.find( "data_type_translation" ) |
|---|
| | 251 | if format_trans is not None: |
|---|
| | 252 | format_trans_dict = {} |
|---|
| | 253 | for format in format_trans.findall( "format" ): |
|---|
| | 254 | remote_format = format.get( "remote_format" ) |
|---|
| | 255 | galaxy_format = format.get( "galaxy_format" ) |
|---|
| | 256 | format_trans_dict[ remote_format ] = galaxy_format |
|---|
| | 257 | trans_list.append( format_trans_dict ) |
|---|
| 245 | 258 | self.param_trans_dict[ remote_name ] = trans_list |
|---|
| 246 | 259 | # Command line (template). Optional for tools that do not invoke a local program |
|---|
| r1575 |
r1630 |
|
| 156 | 156 | if key in tool.param_trans_dict: |
|---|
| 157 | 157 | new_key = tool.param_trans_dict[ key ][0] |
|---|
| 158 | | if not value: |
|---|
| | 158 | if new_key == 'data_type': |
|---|
| | 159 | try: |
|---|
| | 160 | # The Galaxy "data_type entry is special in that it can include the ability |
|---|
| | 161 | # to translate the format to a Galaxy supported format. In the dict, this entry |
|---|
| | 162 | # looks something like: {'hgta_outputType': ['data_type', 'bed', {'selectedFields': 'tabular'}] } |
|---|
| | 163 | format_trans_dict = tool.param_trans_dict[ key ][2] |
|---|
| | 164 | if value in format_trans_dict: |
|---|
| | 165 | new_value = format_trans_dict[ value ] |
|---|
| | 166 | except: |
|---|
| | 167 | pass |
|---|
| | 168 | if not value and not new_value: |
|---|
| 159 | 169 | new_value = tool.param_trans_dict[ key ][1] |
|---|
| 160 | 170 | if key not in self.NEVER_SANITIZE and sanitize: |
|---|
| r1619 |
r1630 |
|
| 92 | 92 | q = sa.select( ( sa.func.date( galaxy.model.Job.table.c.create_time ).label( 'date' ), |
|---|
| 93 | 93 | sa.func.count( galaxy.model.Job.table.c.id ).label( 'total_jobs' ) ), |
|---|
| 94 | | whereclause = sa.and_( sa.or_( galaxy.model.Job.table.c.state == 'error', |
|---|
| 95 | | galaxy.model.Job.table.c.state == 'deleted' ), |
|---|
| | 94 | whereclause = sa.and_( galaxy.model.Job.table.c.state == 'error', |
|---|
| 96 | 95 | galaxy.model.Job.table.c.create_time >= start_date, |
|---|
| 97 | 96 | galaxy.model.Job.table.c.create_time < end_date ), |
|---|
| … | … | |
| 135 | 134 | ( galaxy.model.User.table.c.email ).label( 'user_email' ), |
|---|
| 136 | 135 | galaxy.model.GalaxySession.table.c.remote_addr ), |
|---|
| 137 | | whereclause = sa.and_( sa.or_( galaxy.model.Job.table.c.state == 'error', |
|---|
| 138 | | galaxy.model.Job.table.c.state == 'deleted' ), |
|---|
| | 136 | whereclause = sa.and_( galaxy.model.Job.table.c.state == 'error', |
|---|
| 139 | 137 | galaxy.model.Job.table.c.create_time >= start_date, |
|---|
| 140 | 138 | galaxy.model.Job.table.c.create_time < end_date ), |
|---|
| … | … | |
| 306 | 304 | q = sa.select( ( sa.func.date_trunc( 'month', sa.func.date( galaxy.model.Job.table.c.create_time ) ).label( 'date' ), |
|---|
| 307 | 305 | sa.func.count( galaxy.model.Job.table.c.id ).label( 'total_jobs' ) ), |
|---|
| 308 | | whereclause = sa.or_( galaxy.model.Job.table.c.state == 'error', |
|---|
| 309 | | galaxy.model.Job.table.c.state == 'deleted' ), |
|---|
| | 306 | whereclause = galaxy.model.Job.table.c.state == 'error', |
|---|
| 310 | 307 | from_obj = [ galaxy.model.Job.table ], |
|---|
| 311 | 308 | group_by = [ sa.func.date_trunc( 'month', sa.func.date( galaxy.model.Job.table.c.create_time ) ) ], |
|---|
| r1619 |
r1630 |
|
| 3 | 3 | <%def name="main_body()"> |
|---|
| 4 | 4 | <div class="reportBody"> |
|---|
| 5 | | <h3 align="center">Jobs In Error Per Month ( includes jobs deleted before finishing )</h3> |
|---|
| | 5 | <h3 align="center">Jobs In Error Per Month</h3> |
|---|
| 6 | 6 | <h4 align="center">Click Month to view the number of jobs in error for each day of that month</h4> |
|---|
| 7 | 7 | %if msg: |
|---|
| … | … | |
| 12 | 12 | <table align="center" width="60%" class="colored"> |
|---|
| 13 | 13 | %if len( jobs ) == 0: |
|---|
| 14 | | <tr><td colspan="2">There are no jobs in the deleted or error state</td></tr> |
|---|
| | 14 | <tr><td colspan="2">There are no jobs in the error state</td></tr> |
|---|
| 15 | 15 | %else: |
|---|
| 16 | 16 | <tr class="header"> |
|---|
| r1619 |
r1630 |
|
| 11 | 11 | <table align="center" width="60%" class="colored"> |
|---|
| 12 | 12 | %if len( jobs ) == 0: |
|---|
| 13 | | <tr><td colspan="5">There are no jobs in the deleted or error state for ${day_label}, ${month_label} ${day_of_month}, ${year_label}</td></tr> |
|---|
| | 13 | <tr><td colspan="5">There are no jobs in the error state for ${day_label}, ${month_label} ${day_of_month}, ${year_label}</td></tr> |
|---|
| 14 | 14 | %else: |
|---|
| 15 | 15 | %for job in jobs: |
|---|
| … | … | |
| 18 | 18 | if state == 'error': |
|---|
| 19 | 19 | rowdef = '<tr class="headererror">' |
|---|
| 20 | | elif state == 'deleted': |
|---|
| 21 | | rowdef = '<tr class="headerdeleted">' |
|---|
| 22 | 20 | else: |
|---|
| 23 | 21 | rowdef = '<tr class="headerunknown">' |
|---|
| r1607 |
r1630 |
|
| 3 | 3 | <%def name="main_body()"> |
|---|
| 4 | 4 | <div class="reportBody"> |
|---|
| 5 | | <h3 align="center">Jobs in Error for ${month_label} ${year_label} ( includes jobs deleted before finishing )</h3> |
|---|
| | 5 | <h3 align="center">Jobs in Error for ${month_label} ${year_label}</h3> |
|---|
| 6 | 6 | <h4 align="center">Click Jobs in Error to view jobs in error for that day</h4> |
|---|
| 7 | 7 | %if msg: |
|---|
| … | … | |
| 12 | 12 | <table align="center" width="60%" class="colored"> |
|---|
| 13 | 13 | %if len( jobs ) == 0: |
|---|
| 14 | | <tr><td colspan="3">There are no jobs in error for ${month_label} ${year_label}</td></tr> |
|---|
| | 14 | <tr><td colspan="3">There are no jobs in the error state for ${month_label} ${year_label}</td></tr> |
|---|
| 15 | 15 | %else: |
|---|
| 16 | 16 | <tr class="header"> |
|---|
| r1575 |
r1630 |
|
| 22 | 22 | <request_param galaxy_name="table" remote_name="hgta_track" missing="unknown table" /> |
|---|
| 23 | 23 | <request_param galaxy_name="description" remote_name="hgta_regionType" missing="no description" /> |
|---|
| 24 | | <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="bed" /> |
|---|
| | 24 | <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="bed" > |
|---|
| | 25 | <data_type_translation> |
|---|
| | 26 | <format galaxy_format="tabular" remote_format="selectedFields" /> |
|---|
| | 27 | </data_type_translation> |
|---|
| | 28 | </request_param> |
|---|
| 25 | 29 | </request_param_translation> |
|---|
| 26 | 30 | <uihints minwidth="800"/> |
|---|
| r1575 |
r1630 |
|
| 22 | 22 | <request_param galaxy_name="table" remote_name="hgta_track" missing="" /> |
|---|
| 23 | 23 | <request_param galaxy_name="description" remote_name="hgta_regionType" missing="" /> |
|---|
| 24 | | <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="bed" /> |
|---|
| | 24 | <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="bed" > |
|---|
| | 25 | <data_type_translation> |
|---|
| | 26 | <format galaxy_format="tabular" remote_format="selectedFields" /> |
|---|
| | 27 | </data_type_translation> |
|---|
| | 28 | </request_param> |
|---|
| 25 | 29 | </request_param_translation> |
|---|
| 26 | 30 | <uihints minwidth="800"/> |
|---|
| r1575 |
r1630 |
|
| 22 | 22 | <request_param galaxy_name="table" remote_name="hgta_track" missing="" /> |
|---|
| 23 | 23 | <request_param galaxy_name="description" remote_name="hgta_regionType" missing="" /> |
|---|
| 24 | | <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="bed" /> |
|---|
| | 24 | <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="bed" > |
|---|
| | 25 | <data_type_translation> |
|---|
| | 26 | <format galaxy_format="tabular" remote_format="selectedFields" /> |
|---|
| | 27 | </data_type_translation> |
|---|
| | 28 | </request_param> |
|---|
| 25 | 29 | </request_param_translation> |
|---|
| 26 | 30 | <uihints minwidth="800"/> |
|---|