From: Tom Clegg Date: Tue, 16 Jul 2013 23:18:30 +0000 (+0000) Subject: comments X-Git-Tag: 1.1.0~3083 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/2e1aee4ba3a9a86069132447d9a1cee5b9f54981?ds=sidebyside comments --- diff --git a/crunch_scripts/GATK2-VariantFiltration b/crunch_scripts/GATK2-VariantFiltration index 75af6121d3..392e14be1b 100755 --- a/crunch_scripts/GATK2-VariantFiltration +++ b/crunch_scripts/GATK2-VariantFiltration @@ -19,12 +19,12 @@ this_task_input = this_task['parameters']['input'] 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) @@ -48,6 +48,7 @@ stdoutdata, stderrdata = arvados.util.run_command( '-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: @@ -56,4 +57,5 @@ with open(vcf_out, 'rb') as f: break out.write(buf) out.set_current_file_name(os.path.basename(vcf_out)) + this_task.set_output(out.finish())