diff --git a/beagle/__init__.py b/beagle/__init__.py index cd044473b..baf754747 100644 --- a/beagle/__init__.py +++ b/beagle/__init__.py @@ -1 +1 @@ -__version__ = "1.91.3" +__version__ = "1.91.4" diff --git a/runner/operator/access/v2_1_0/qc/access_nucleo_qc.py b/runner/operator/access/v2_1_0/qc/access_nucleo_qc.py index 170251982..2cf810b5a 100644 --- a/runner/operator/access/v2_1_0/qc/access_nucleo_qc.py +++ b/runner/operator/access/v2_1_0/qc/access_nucleo_qc.py @@ -89,6 +89,7 @@ def get_nucleo_outputs(self): .order_by("-created_date") .first() .operator_run.runs.all() + .filter(status=RunStatus.COMPLETED) ) if not len(most_recent_runs_for_request): raise Exception("No matching Access V2 Nucleo runs found for request {}".format(self.request_id)) diff --git a/runner/operator/access/v2_1_0/snps_and_indels/snps_and_indels.py b/runner/operator/access/v2_1_0/snps_and_indels/snps_and_indels.py index fa8fe4dd4..e6fcc7943 100755 --- a/runner/operator/access/v2_1_0/snps_and_indels/snps_and_indels.py +++ b/runner/operator/access/v2_1_0/snps_and_indels/snps_and_indels.py @@ -651,10 +651,6 @@ def get_request_id_runs(self, app): :param request_id: str - IGO request ID :return: List[str] - List of most recent runs from given request ID """ - # if not request_id: - # request_id_runs = Run.objects.filter(pk__in=self.run_ids) - # self.request_id = most_recent_runs_for_request[0].tags["igoRequestId"] - # else: most_recent_runs_for_request = ( Run.objects.filter( tags__igoRequestId=self.request_id, @@ -665,6 +661,7 @@ def get_request_id_runs(self, app): .order_by("-created_date") .first() .operator_run.runs.all() + .filter(status=RunStatus.COMPLETED) ) if not len(most_recent_runs_for_request): raise Exception("No matching Nucleo runs found for request {}".format(self.request_id)) @@ -706,17 +703,19 @@ def construct_sample_inputs(self, sample_info): .replace("-simplex.bam", "-CURATED-SIMPLEX") ] - matched_normal = [_create_cwl_bam_object(sample_info["matched_normal_unfiltered"][0].path)] - matched_normal_id = [ - sample_info["matched_normal_unfiltered"][0].file_name.replace(UNCOLLAPSED_BAM_STEM, "") - ] + genotyping_bams_ids = tumor_duplex_id + tumor_simplex_id + normal_duplex_id + normal_simplex_id - genotyping_bams = ( - normal_bam_duplex + normal_bam_simplex + tumor_bam_duplex + tumor_bam_simplex + matched_normal - ) - genotyping_bams_ids = ( - tumor_duplex_id + tumor_simplex_id + normal_duplex_id + normal_simplex_id + matched_normal_id - ) + genotyping_bams = normal_bam_duplex + normal_bam_simplex + tumor_bam_duplex + tumor_bam_simplex + + if sample_info["matched_normal_unfiltered"][0] == None: + matched_normal_id = [""] + else: + matched_normal = [_create_cwl_bam_object(sample_info["matched_normal_unfiltered"][0].path)] + matched_normal_id = [ + sample_info["matched_normal_unfiltered"][0].file_name.replace(UNCOLLAPSED_BAM_STEM, "") + ] + genotyping_bams_ids += matched_normal_id + genotyping_bams += matched_normal for key, files in sample_info.items(): for f in files: