comparison build_ucsc_custom_track_code.py @ 2:3d87079756e1 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/main/tools/ucsc_custom_track commit 68ba77da2a1f8d6cd04dd7dc6efc5edcefcfa0c9"
author devteam
date Mon, 28 Feb 2022 20:06:04 +0000
parents 618e56c3109b
children
comparison
equal deleted inserted replaced
1:760f588e8a26 2:3d87079756e1
1 # runs after the job (and after the default post-filter) 1 # runs after the job (and after the default post-filter)
2 2
3 # Older py compatibility 3 def validate_input(trans, error_map, param_values, page_param_map):
4 try:
5 set()
6 except:
7 from sets import Set as set
8
9 def validate_input( trans, error_map, param_values, page_param_map ):
10 dbkeys = set() 4 dbkeys = set()
11 tracks = param_values['tracks'] 5 tracks = param_values['tracks']
12 for track in tracks: 6 for track in tracks:
13 if track['input']: 7 if track['input']:
14 dbkeys.add( track['input'].dbkey ) 8 dbkeys.add(track['input'].dbkey)
15 if len( dbkeys ) > 1: 9 if len(dbkeys) > 1:
16 # FIXME: Should be able to assume error map structure is created 10 # FIXME: Should be able to assume error map structure is created
17 if 'tracks' not in error_map: 11 if 'tracks' not in error_map:
18 error_map['tracks'] = [ dict() for t in tracks ] 12 error_map['tracks'] = [dict() for t in tracks]
19 for i in range( len( tracks ) ): 13 for i in range(len(tracks)):
20 error_map['tracks'][i]['input'] = \ 14 error_map['tracks'][i]['input'] = \
21 "All datasets must belong to same genomic build" 15 "All datasets must belong to same genomic build"