9 arvados.job_setup.one_task_per_input_stream(if_sequence=0, and_end_task=True)
11 this_job = arvados.current_job()
12 this_task = arvados.current_task()
13 in_dir = os.path.join(this_task.tmpdir, 'input')
14 arvados.util.run_command(['rm', '-rf', in_dir], stderr=sys.stderr)
15 in_dir = arvados.util.stream_extract(
16 stream = arvados.StreamReader(this_task['parameters']['input']),
19 ref_dir = arvados.util.collection_extract(
20 collection = this_job['script_parameters']['reference'],
24 out_dir = os.path.join(arvados.current_task().tmpdir, 'out')
25 arvados.util.run_command(['rm', '-rf', out_dir], stderr=sys.stderr)
28 pyrtg.run_rtg('map', out_dir,
33 '--sam-rg', '@RG\\tID:NA\\tSM:NA\\tPL:ILLUMINA'])
36 out = arvados.CollectionWriter()
37 out.write_directory_tree(out_dir, this_task['parameters']['input'][0], 0)
38 this_task.set_output(out.finish())