2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: Apache-2.0
12 arvados.job_setup.one_task_per_input_stream(if_sequence=0, and_end_task=True)
14 this_job = arvados.current_job()
15 this_task = arvados.current_task()
16 in_dir = os.path.join(this_task.tmpdir, 'input')
17 arvados.util.run_command(['rm', '-rf', in_dir], stderr=sys.stderr)
18 in_dir = arvados.util.stream_extract(
19 stream = arvados.StreamReader(this_task['parameters']['input']),
22 ref_dir = arvados.util.collection_extract(
23 collection = this_job['script_parameters']['reference'],
27 out_dir = os.path.join(arvados.current_task().tmpdir, 'out')
28 arvados.util.run_command(['rm', '-rf', out_dir], stderr=sys.stderr)
31 pyrtg.run_rtg('map', out_dir,
36 '--sam-rg', '@RG\\tID:NA\\tSM:NA\\tPL:ILLUMINA'])
39 out = arvados.CollectionWriter()
40 out.write_directory_tree(out_dir, this_task['parameters']['input'][0], 0)
41 this_task.set_output(out.finish())