From dfcaf225f18831806b378034d9ef32483f5ee632 Mon Sep 17 00:00:00 2001 From: Alex Stuckey Date: Mon, 4 Nov 2024 14:32:31 +1300 Subject: [PATCH] simplify --- scripts/register_missing_combiner_analysis.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/register_missing_combiner_analysis.py b/scripts/register_missing_combiner_analysis.py index 234cf10b2..562c352f7 100644 --- a/scripts/register_missing_combiner_analysis.py +++ b/scripts/register_missing_combiner_analysis.py @@ -9,7 +9,7 @@ from hail.vds import read_vds -from cpg_utils.hail_batch import dataset_path, init_batch +from cpg_utils.hail_batch import config_retrieve, dataset_path, init_batch from metamist.apis import AnalysisApi from metamist.models import Analysis, AnalysisStatus @@ -26,7 +26,7 @@ def get_sg_ids(vds: str) -> list[str]: return read_vds(dataset_path(vds)).variant_data.s.collect() -def main(vds: str, dataset: str): +def main(vds: str): """Create and register a missing combiner analysis Args: @@ -42,12 +42,11 @@ def main(vds: str, dataset: str): sequencing_group_ids=get_sg_ids(vds), meta={}, ) - aapi.create_analysis(project=dataset, analysis=am) + aapi.create_analysis(project=config_retrieve(['workflow', 'dataset']), analysis=am) if __name__ == '__main__': parser = ArgumentParser() parser.add_argument('--vds', help='VDS to register analysis for.') - parser.add_argument('--dataset', help='Dataset to register analysis in.') args = parser.parse_args() - main(args.vds, args.dataset) + main(args.vds)