input_file = list(arvados.CollectionReader(this_task_input).all_files())[0]
-# pick "before" and "after" vcf filenames
+# choose vcf temporary file names
vcf_in = os.path.join(arvados.current_task().tmpdir,
os.path.basename(input_file.name()))
vcf_out = re.sub('(.*)\\.vcf', '\\1-filtered.vcf', vcf_in)
-# fetch the "before" data
+# fetch the unfiltered data
vcf_in_file = open(vcf_in, 'w')
for buf in input_file.readall():
vcf_in_file.write(buf)
'-R', os.path.join(bundle_path, 'human_g1k_v37.fasta')],
cwd=arvados.current_task().tmpdir)
+# store the filtered data
with open(vcf_out, 'rb') as f:
out = arvados.CollectionWriter()
while True:
break
out.write(buf)
out.set_current_file_name(os.path.basename(vcf_out))
+
this_task.set_output(out.finish())