diff --git a/alhena_igo/cli.py b/alhena_igo/cli.py index 142bb8b..d906f21 100644 --- a/alhena_igo/cli.py +++ b/alhena_igo/cli.py @@ -98,7 +98,7 @@ def clean(info: Info, analysis: str): @cli.command() @click.option('--analysis_id', help="MONDRIAN-HMMCOPY or SCDNA-ANNOTATION analysis primary key", required=True) @click.option('--project', 'projects', multiple=True, default=["DLP"], help="Projects to load analysis into") -@click.option('--framework', type=click.Choice(['scp', 'mondrian']), help="Framework: scp or mondrian") +@click.option('--framework', type=click.Choice(['scp', 'mondrian', 'mondrian_nf']), help="Framework: scp, mondrian or mondrian_nf (nextflow)") @click.option('--version', help="Isabl app version to load", required=True) @pass_info def load(info: Info, analysis_id: str, projects: List[str], framework: str, version: str): @@ -106,10 +106,25 @@ def load(info: Info, analysis_id: str, projects: List[str], framework: str, vers if framework == 'scp': [alignment, hmmcopy, annotation] = alhena_igo.isabl.get_directories(analysis_id, framework, version) - data = load_qc_results(alignment, hmmcopy, annotation) + data = load_qc_results( + 'scp', + alignment_results_dir=alignment, + hmmcopy_results_dir=hmmcopy, + annotation_results_dir=annotation + ) elif framework == 'mondrian': [alignment, hmmcopy] = alhena_igo.isabl.get_directories(analysis_id, framework, version) - data = load_qc_results(alignment, hmmcopy) + data = load_qc_results( + 'mondrian', + alignment_results_dir=alignment, + hmmcopy_results_dir=hmmcopy + ) + elif framework == 'mondrian_nf': + [qc] = alhena_igo.isabl.get_directories(analysis_id, framework, version) + data = load_qc_results( + 'mondrian_nf', + qc_results_dir=qc + ) else: raise Exception(f"Unknown framework option '{framework}'") diff --git a/alhena_igo/isabl.py b/alhena_igo/isabl.py index 61cec4c..7f10e14 100644 --- a/alhena_igo/isabl.py +++ b/alhena_igo/isabl.py @@ -61,8 +61,8 @@ def get_analysis_filtered_by_assembly(experiment_sys_id, app_name, assembly): def get_directories(analysis_pk: str, framework: str, version: str): """ - Return QC results for Mondrian or SCP based off MONDRIAN-HMMCOPY or SCDNA-ANNOTATION - analysis primary key. + Return QC results for Mondrian (cromwell), Mondrain NF (nextflow) or SCP based off + MONDRIAN-HMMCOPY, MONDRIAN-NF-QC or SCDNA-ANNOTATION analysis primary key. """ if framework == 'mondrian': @@ -79,6 +79,17 @@ def get_directories(analysis_pk: str, framework: str, version: str): return [alignment.storage_url, hmmcopy[0].storage_url] + elif framework == 'mondrian_nf': + qc = ii.get_analyses( + pk=analysis_pk, + application__name='MONDRIAN-NF-QC', + status='SUCCEEDED', + ) + assert len(qc) == 1 + + # quick way to add support mondrian-nf using exisiting mondrian logic + return [qc[0].storage_url] + elif framework == 'scp': annotation = ii.get_analyses(pk=analysis_pk, application__name='SCDNA-ANNOTATION') assert len(annotation) == 1 @@ -139,6 +150,8 @@ def get_id(aliquot_id, framework, version): if framework == 'mondrian': app = 'MONDRIAN-HMMCOPY' + elif framework == 'mondrian-nf': + app = 'MONDRIAN-NF-QC' elif framework == 'scp': app = 'SCDNA-ANNOTATION' else: @@ -163,6 +176,8 @@ def get_ids_from_isabl(project_pk, framework, version): app = '' if framework == 'mondrian': app = 'MONDRIAN-HMMCOPY' + elif framework == 'mondrian-nf': + app = 'MONDRIAN-NF-QC' elif framework == 'scp': app = 'SCDNA-ANNOTATION' else: diff --git a/setup.py b/setup.py index 6ccfec3..84d76ea 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ version=version, install_requires=[ # Include dependencies here - "alhenaloader @ git+https://github.com/shahcompbio/alhenaloader.git@v1.0.6#egg=alhenaloader", + "alhenaloader @ git+https://github.com/shahcompbio/alhenaloader.git@v1.1.0#egg=alhenaloader", "isabl_cli @ git+https://github.com/papaemmelab/isabl_cli.git#egg=isabl_cli" ], entry_points="""