From 4f404f09ebf837536da6c6295cc488e3fd670562 Mon Sep 17 00:00:00 2001 From: Eva Caceres Date: Mon, 11 Dec 2023 15:06:32 +0100 Subject: [PATCH 1/4] rnafusion delivery tags as constants --- cg/constants/delivery.py | 45 ++++++++++++++++---------------- cg/constants/housekeeper_tags.py | 19 ++++++++++++++ 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/cg/constants/delivery.py b/cg/constants/delivery.py index 21e898a1cc..b3e7defa55 100644 --- a/cg/constants/delivery.py +++ b/cg/constants/delivery.py @@ -1,6 +1,7 @@ """Constants for delivery.""" from cg.constants.constants import Pipeline +from cg.constants.housekeeper_tags import AlignmentFileTag ONLY_ONE_CASE_PER_TICKET: list[Pipeline] = [ Pipeline.FASTQ, @@ -37,8 +38,8 @@ ] BALSAMIC_ANALYSIS_SAMPLE_TAGS: list[set[str]] = [ - {"cram"}, - {"cram-index"}, + {AlignmentFileTag.CRAM}, + {AlignmentFileTag.CRAM_INDEX}, ] BALSAMIC_QC_ANALYSIS_CASE_TAGS: list[set[str]] = [ @@ -95,10 +96,10 @@ ] MIP_DNA_ANALYSIS_SAMPLE_TAGS: list[set[str]] = [ - {"bam"}, - {"bam-index"}, - {"cram"}, - {"cram-index"}, + {AlignmentFileTag.BAM}, + {AlignmentFileTag.BAM_BAI}, + {AlignmentFileTag.CRAM}, + {AlignmentFileTag.CRAM_INDEX}, ] MIP_RNA_ANALYSIS_CASE_TAGS: list[set[str]] = [ @@ -116,8 +117,8 @@ MIP_RNA_ANALYSIS_SAMPLE_TAGS: list[set[str]] = [ {"fusion", "star-fusion"}, {"fusion", "arriba"}, - {"cram"}, - {"cram-index"}, + {AlignmentFileTag.CRAM}, + {AlignmentFileTag.CRAM_INDEX}, {"fusion", "vcf"}, {"fusion", "vcf-index"}, {"salmon-quant"}, @@ -150,23 +151,23 @@ ] RNAFUSION_ANALYSIS_CASE_TAGS: list[set[str]] = [ - {"fusion", "arriba"}, - {"fusion", "star-fusion"}, - {"fusion", "fusioncatcher"}, - {"fusioncatcher-summary"}, - {"fusioninspector"}, - {"fusionreport", "research"}, - {"fusioninspector-html", "research"}, - {"arriba-visualisation", "research"}, - {"multiqc-html", "rna"}, - {"delivery-report"}, - {"vcf-fusion"}, - {"gene-counts"}, + {AnalysisTag.FUSION, AnalysisTag.ARRIBA}, + {AnalysisTag.FUSION, AnalysisTag.STARFUSION}, + {AnalysisTag.FUSION, AnalysisTag.FUSIONCATCHER}, + {AnalysisTag.FUSIONCATCHER_SUMMARY}, + {AnalysisTag.FUSIONINSPECTOR}, + {AnalysisTag.FUSIONREPORT, AnalysisTag.RESEARCH}, + {AnalysisTag.FUSIONINSPECTOR_HTML, AnalysisTag.RESEARCH}, + {AnalysisTag.ARRIBA_VISUALIZATION, AnalysisTag.RESEARCH}, + {AnalysisTag.MULTIQC_HTML, AnalysisTag.RNA}, + {HK_DELIVERY_REPORT_TAG}, + {AnalysisTag.VCF_FUSION}, + {AnalysisTag.GENE_COUNTS}, ] RNAFUSION_ANALYSIS_SAMPLE_TAGS: list[set[str]] = [ - {"cram"}, - {"cram-index"}, + {AlignmentFileTag.CRAM}, + {AlignmentFileTag.CRAM_INDEX}, ] diff --git a/cg/constants/housekeeper_tags.py b/cg/constants/housekeeper_tags.py index 104420ecf5..bf31818de3 100644 --- a/cg/constants/housekeeper_tags.py +++ b/cg/constants/housekeeper_tags.py @@ -52,6 +52,25 @@ class SequencingFileTag(StrEnum): HK_DELIVERY_REPORT_TAG = "delivery-report" +class AnalysisTag(StrEnum): + """Tags for analysis files.""" + + MULTIQC_HTML: str = "multiqc-html" + FUSION: str = "fusion" + ARRIBA: str = "arriba" + STARFUSION: str = "star-fusion" + FUSIONCATCHER: str = "fusioncatcher" + FUSIONCATCHER_SUMMARY: str = "fusioncatcher-summary" + FUSIONINSPECTOR: str = "fusioninspector" + FUSIONREPORT: str = "fusionreport" + RESEARCH: str = "research" + FUSIONINSPECTOR_HTML: str = "fusioninspector-html" + ARRIBA_VISUALIZATION: str = "arriba-visualisation" + RNA: str = "rna" + VCF_FUSION: str = "vcf-fusion" + GENE_COUNTS: str = "gene-counts" + + class HkMipAnalysisTag: CONFIG: list[str] = ["mip-config"] QC_METRICS: list[str] = ["qc-metrics", "deliverable"] From d4479a03d5a3f1d6df31a49d5349b2d04c45bbc9 Mon Sep 17 00:00:00 2001 From: Eva Caceres Date: Mon, 11 Dec 2023 15:13:32 +0100 Subject: [PATCH 2/4] add missing import --- cg/constants/delivery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cg/constants/delivery.py b/cg/constants/delivery.py index b3e7defa55..4b018b0c05 100644 --- a/cg/constants/delivery.py +++ b/cg/constants/delivery.py @@ -1,7 +1,7 @@ """Constants for delivery.""" from cg.constants.constants import Pipeline -from cg.constants.housekeeper_tags import AlignmentFileTag +from cg.constants.housekeeper_tags import AlignmentFileTag, AnalysisTag, HK_DELIVERY_REPORT_TAG ONLY_ONE_CASE_PER_TICKET: list[Pipeline] = [ Pipeline.FASTQ, From 9d8139b0e3b9d9effc00103d341065c39c013a8c Mon Sep 17 00:00:00 2001 From: Eva Caceres Date: Mon, 11 Dec 2023 15:15:31 +0100 Subject: [PATCH 3/4] sort items --- cg/constants/housekeeper_tags.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cg/constants/housekeeper_tags.py b/cg/constants/housekeeper_tags.py index bf31818de3..aeb1591102 100644 --- a/cg/constants/housekeeper_tags.py +++ b/cg/constants/housekeeper_tags.py @@ -55,20 +55,20 @@ class SequencingFileTag(StrEnum): class AnalysisTag(StrEnum): """Tags for analysis files.""" - MULTIQC_HTML: str = "multiqc-html" - FUSION: str = "fusion" ARRIBA: str = "arriba" - STARFUSION: str = "star-fusion" + ARRIBA_VISUALIZATION: str = "arriba-visualisation" + FUSION: str = "fusion" FUSIONCATCHER: str = "fusioncatcher" FUSIONCATCHER_SUMMARY: str = "fusioncatcher-summary" FUSIONINSPECTOR: str = "fusioninspector" + FUSIONINSPECTOR_HTML: str = "fusioninspector-html" FUSIONREPORT: str = "fusionreport" + GENE_COUNTS: str = "gene-counts" + MULTIQC_HTML: str = "multiqc-html" RESEARCH: str = "research" - FUSIONINSPECTOR_HTML: str = "fusioninspector-html" - ARRIBA_VISUALIZATION: str = "arriba-visualisation" RNA: str = "rna" + STARFUSION: str = "star-fusion" VCF_FUSION: str = "vcf-fusion" - GENE_COUNTS: str = "gene-counts" class HkMipAnalysisTag: From 8ef93d880fb900068b6b17dd0b04e7309fe0d01b Mon Sep 17 00:00:00 2001 From: Eva Caceres Date: Wed, 13 Dec 2023 08:30:04 +0100 Subject: [PATCH 4/4] reviews --- cg/constants/delivery.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cg/constants/delivery.py b/cg/constants/delivery.py index 4b018b0c05..c0ca4bd7cd 100644 --- a/cg/constants/delivery.py +++ b/cg/constants/delivery.py @@ -115,12 +115,12 @@ ] MIP_RNA_ANALYSIS_SAMPLE_TAGS: list[set[str]] = [ - {"fusion", "star-fusion"}, - {"fusion", "arriba"}, + {AnalysisTag.FUSION, AnalysisTag.STARFUSION}, + {AnalysisTag.FUSION, AnalysisTag.ARRIBA}, {AlignmentFileTag.CRAM}, {AlignmentFileTag.CRAM_INDEX}, - {"fusion", "vcf"}, - {"fusion", "vcf-index"}, + {AnalysisTag.FUSION, "vcf"}, + {AnalysisTag.FUSION, "vcf-index"}, {"salmon-quant"}, ]