def _create_validate_config(vrn_file, rm_file, rm_interval_file, rm_genome, base_dir, data): """Create a bcbio.variation configuration input for validation. """ if rm_genome: rm_genome = alignment.get_genome_ref(rm_genome, None, data["dirs"]["galaxy"])[-1] if rm_genome != data["sam_ref"]: eval_genome = data["sam_ref"] else: eval_genome = None else: eval_genome = None rm_genome = data["sam_ref"] ref_call = {"file": rm_file, "name": "ref", "type": "grading-ref", "preclean": True, "prep": True, "remove-refcalls": True} if rm_interval_file: ref_call["intervals"] = rm_interval_file eval_call = {"file": vrn_file, "name": "eval", "remove-refcalls": True} if eval_genome: eval_call["ref"] = eval_genome eval_call["preclean"] = True eval_call["prep"] = True exp = {"sample": data["name"][-1], "ref": rm_genome, "approach": "grade", "calls": [ref_call, eval_call]} if data.get("callable_bam"): exp["align"] = data["callable_bam"] intervals = ensemble.get_analysis_intervals(data) if intervals: exp["intervals"] = os.path.abspath(intervals) return {"dir": {"base": base_dir, "out": "work", "prep": "work/prep"}, "experiments": [exp]}
def _create_validate_config(vrn_file, rm_file, rm_interval_file, rm_genome, base_dir, data): """Create a bcbio.variation configuration input for validation. """ if rm_genome: rm_genome = alignment.get_genome_ref(rm_genome, None, data["dirs"]["galaxy"])[-1] if rm_genome != data["sam_ref"]: eval_genome = data["sam_ref"] else: eval_genome = None else: eval_genome = None rm_genome = data["sam_ref"] ref_call = { "file": rm_file, "name": "ref", "type": "grading-ref", "preclean": True, "prep": True, "remove-refcalls": True } if rm_interval_file: ref_call["intervals"] = rm_interval_file eval_call = {"file": vrn_file, "name": "eval", "remove-refcalls": True} if eval_genome: eval_call["ref"] = eval_genome eval_call["preclean"] = True eval_call["prep"] = True exp = { "sample": data["name"][-1], "ref": rm_genome, "approach": "grade", "calls": [ref_call, eval_call] } if data.get("callable_bam"): exp["align"] = data["callable_bam"] intervals = ensemble.get_analysis_intervals(data) if intervals: exp["intervals"] = os.path.abspath(intervals) return { "dir": { "base": base_dir, "out": "work", "prep": "work/prep" }, "experiments": [exp] }