gatk-sv
gatk-sv copied to clipboard
New carrot updates requires updates to carrot_helper Template class and Test class
https://github.com/broadinstitute/gatk-sv/blob/ef29ea1374687bd62cfd18bd9e2905944256a4c8/carrot/carrot_helper.py#L699
The latest version of carrot provides the option for test and eval wdl dependencies. If running carrot_helper with the latest version of carrot the script will fail with "TypeError: __init__() got an unexpected keyword argument 'eval_wdl_dependencies'
"
Adding eval_wdl_dependencies and test_wdl_dependencies should resolve the issue
class Template(BaseModel):
"""
A carrot template is composed of WDL to be tested,
a WDL that evaluates the tested WDL's output, and
a set of inputs for both test and evaluation WDLs.
"""
pipeline_id: str
test_wdl: str
test_wdl_checksum: str
eval_wdl: str
eval_wdl_checksum: str
eval_wdl_dependencies: str
test_wdl_dependencies: str
results: List = field(default_factory=list)
test: str = None
Similar issue with Test class https://github.com/broadinstitute/gatk-sv/blob/ef29ea1374687bd62cfd18bd9e2905944256a4c8/carrot/carrot_helper.py#L721 Error:
File "/home/bshifaw/test_carrot/wdl_test/carrot_helper.py", line 469, in create_test
return Test(**response,
TypeError: __init__() got an unexpected keyword argument 'eval_option_defaults'
Fix:
class Test(BaseModel):
template_id: str
eval_input_defaults_checksum: str
test_input_defaults_checksum: str
template_path: str
eval_option_defaults: dict = field(default_factory=dict)
test_option_defaults: dict = field(default_factory=dict)
eval_input_defaults: dict = field(default_factory=dict)
test_input_defaults: dict = field(default_factory=dict)
Similar issue with Run class https://github.com/broadinstitute/gatk-sv/blob/ef29ea1374687bd62cfd18bd9e2905944256a4c8/carrot/carrot_helper.py#L730
File "/home/bshifaw/test_carrot/wdl_test/carrot_helper.py", line 565, in create_run
return Run(**response, run_dir=os.path.join(
TypeError: __init__() got an unexpected keyword argument 'eval_options'
Fix
class Run(BaseModel):
def __init__(self, name, test_id, test_cromwell_job_id,
eval_cromwell_job_id, status, finished_at,
test_input, eval_input, test_options, eval_options,, created_at, created_by,
errors=None, description=None, run_id=None, uuid=None,
results=None, run_dir=None):
super().__init__(run_id or uuid, name, description,
created_at, created_by)
self.test_id = test_id
self.test_cromwell_job_id = test_cromwell_job_id
self.eval_cromwell_job_id = eval_cromwell_job_id
self.status = status
self.finished_at = finished_at
self.test_input = test_input
self.eval_input = eval_input
self.test_options = test_options
self.eval_options = eval_options
self.results = results
self.run_dir = run_dir