annotate build_ucsc_custom_track_code.py @ 2:f1fd9e6e026e 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:05:39 +0000
parents 783448899c63
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
1 # runs after the job (and after the default post-filter)
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
2
2
f1fd9e6e026e "planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/main/tools/ucsc_custom_track commit 68ba77da2a1f8d6cd04dd7dc6efc5edcefcfa0c9"
devteam
parents: 0
diff changeset
3 def validate_input(trans, error_map, param_values, page_param_map):
0
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
4 dbkeys = set()
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
5 tracks = param_values['tracks']
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
6 for track in tracks:
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
7 if track['input']:
2
f1fd9e6e026e "planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/main/tools/ucsc_custom_track commit 68ba77da2a1f8d6cd04dd7dc6efc5edcefcfa0c9"
devteam
parents: 0
diff changeset
8 dbkeys.add(track['input'].dbkey)
f1fd9e6e026e "planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/main/tools/ucsc_custom_track commit 68ba77da2a1f8d6cd04dd7dc6efc5edcefcfa0c9"
devteam
parents: 0
diff changeset
9 if len(dbkeys) > 1:
0
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
10 # FIXME: Should be able to assume error map structure is created
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
11 if 'tracks' not in error_map:
2
f1fd9e6e026e "planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/main/tools/ucsc_custom_track commit 68ba77da2a1f8d6cd04dd7dc6efc5edcefcfa0c9"
devteam
parents: 0
diff changeset
12 error_map['tracks'] = [dict() for t in tracks]
f1fd9e6e026e "planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/main/tools/ucsc_custom_track commit 68ba77da2a1f8d6cd04dd7dc6efc5edcefcfa0c9"
devteam
parents: 0
diff changeset
13 for i in range(len(tracks)):
0
783448899c63 Imported from capsule None
devteam
parents:
diff changeset
14 error_map['tracks'][i]['input'] = \
2
f1fd9e6e026e "planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/main/tools/ucsc_custom_track commit 68ba77da2a1f8d6cd04dd7dc6efc5edcefcfa0c9"
devteam
parents: 0
diff changeset
15 "All datasets must belong to same genomic build"