Skip to content

Commit 4c2445e

Browse files
authored
Merge branch 'master' into write_config_taxprofiler
2 parents 24d5787 + 594366b commit 4c2445e

File tree

254 files changed

+14542
-5769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+14542
-5769
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 66.0.2
2+
current_version = 67.0.8
33
commit = True
44
tag = True
55
tag_name = v{new_version}

cg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__title__ = "cg"
2-
__version__ = "66.0.2"
2+
__version__ = "67.0.8"

cg/apps/hermes/hermes_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def __init__(self, config: dict):
1818
self.process = Process(
1919
binary=config["hermes"]["binary_path"],
2020
)
21+
self.container_path: str = config["hermes"]["container_path"]
2122
self.container_mount_volume = config["hermes"]["container_mount_volume"]
2223

2324
def convert_deliverables(
@@ -33,7 +34,7 @@ def convert_deliverables(
3334
"run",
3435
"--bind",
3536
self.container_mount_volume,
36-
"/home/proj/stage/singularity_containers/hermes_latest.sif",
37+
self.container_path,
3738
"convert",
3839
"deliverables",
3940
"--workflow",

cg/apps/orderform/excel_orderform_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from cg.constants import DataDelivery
1313
from cg.constants.orderforms import Orderform
1414
from cg.exc import OrderFormError
15+
from cg.models.orders.constants import OrderType
1516
from cg.models.orders.excel_sample import ExcelSample
16-
from cg.models.orders.order import OrderType
1717

1818
LOG = logging.getLogger(__name__)
1919

cg/apps/orderform/json_orderform_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from cg.apps.orderform.orderform_parser import OrderformParser
22
from cg.constants import DataDelivery, Workflow
33
from cg.exc import OrderFormError
4+
from cg.models.orders.constants import OrderType
45
from cg.models.orders.json_sample import JsonSample
5-
from cg.models.orders.order import OrderType
66

77

88
class JsonOrderformParser(OrderformParser):

cg/apps/orderform/orderform_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from cg.apps.orderform.utils import ORDER_TYPES_WITH_CASES
88
from cg.constants import DataDelivery
99
from cg.exc import OrderFormError
10-
from cg.models.orders.order import OrderType
10+
from cg.models.orders.constants import OrderType
1111
from cg.models.orders.orderform_schema import OrderCase, Orderform, OrderPool
1212
from cg.models.orders.sample_base import OrderSample
1313
from cg.store.models import Customer

cg/cli/workflow/fluffy/base.py

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
ARGUMENT_CASE_ID = click.argument("case_id", required=True)
1515
OPTION_EXTERNAL_REF = click.option("-e", "--external-ref", is_flag=True)
16+
OPTION_USE_BWA_MEM = click.option("-b", "--use-bwa-mem", is_flag=True)
1617

1718
LOG = logging.getLogger(__name__)
1819

@@ -51,15 +52,27 @@ def create_samplesheet(context: CGConfig, case_id: str, dry_run: bool):
5152
@DRY_RUN
5253
@click.option("-c", "--config", help="Path to fluffy config in .json format")
5354
@OPTION_EXTERNAL_REF
55+
@OPTION_USE_BWA_MEM
5456
@click.pass_obj
55-
def run(context: CGConfig, case_id: str, dry_run: bool, config: str, external_ref: bool = False):
57+
def run(
58+
context: CGConfig,
59+
case_id: str,
60+
dry_run: bool,
61+
config: str,
62+
external_ref: bool,
63+
use_bwa_mem: bool,
64+
):
5665
"""
5766
Run Fluffy analysis
5867
"""
5968
analysis_api: FluffyAnalysisAPI = context.meta_apis["analysis_api"]
6069
analysis_api.status_db.verify_case_exists(case_internal_id=case_id)
6170
analysis_api.run_fluffy(
62-
case_id=case_id, workflow_config=config, dry_run=dry_run, external_ref=external_ref
71+
case_id=case_id,
72+
workflow_config=config,
73+
dry_run=dry_run,
74+
external_ref=external_ref,
75+
use_bwa_mem=use_bwa_mem,
6376
)
6477
if dry_run:
6578
return
@@ -78,12 +91,14 @@ def run(context: CGConfig, case_id: str, dry_run: bool, config: str, external_re
7891
@DRY_RUN
7992
@click.option("-c", "--config", help="Path to fluffy config in .json format")
8093
@OPTION_EXTERNAL_REF
94+
@OPTION_USE_BWA_MEM
8195
@click.pass_context
8296
def start(
8397
context: click.Context,
8498
case_id: str,
8599
dry_run: bool,
86-
external_ref: bool = False,
100+
external_ref: bool,
101+
use_bwa_mem: bool,
87102
config: str = None,
88103
):
89104
"""
@@ -96,7 +111,14 @@ def start(
96111
analysis_api.prepare_fastq_files(case_id=case_id, dry_run=dry_run)
97112
context.invoke(link, case_id=case_id, dry_run=dry_run)
98113
context.invoke(create_samplesheet, case_id=case_id, dry_run=dry_run)
99-
context.invoke(run, case_id=case_id, config=config, dry_run=dry_run, external_ref=external_ref)
114+
context.invoke(
115+
run,
116+
case_id=case_id,
117+
config=config,
118+
dry_run=dry_run,
119+
external_ref=external_ref,
120+
use_bwa_mem=use_bwa_mem,
121+
)
100122

101123

102124
@fluffy.command("start-available")

cg/constants/orderforms.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
from enum import StrEnum
22

33
from cg.constants import ANALYSIS_SOURCES, METAGENOME_SOURCES
4-
from cg.models.orders.order import OrderType
54

65
SEX_MAP = {"male": "M", "female": "F", "unknown": "unknown"}
76
REV_SEX_MAP = {value: key for key, value in SEX_MAP.items()}
8-
CONTAINER_TYPES = ["Tube", "96 well plate"]
97
SOURCE_TYPES = set().union(METAGENOME_SOURCES, ANALYSIS_SOURCES)
108

11-
CASE_PROJECT_TYPES = [
12-
OrderType.MIP_DNA,
13-
OrderType.BALSAMIC,
14-
OrderType.MIP_RNA,
15-
]
16-
179

1810
class Orderform(StrEnum):
1911
BALSAMIC: str = "1508"
@@ -79,4 +71,5 @@ def get_current_orderform_version(order_form: str) -> str:
7971
"LaboratorieMedicinskt Centrum Gotland": "621 84 Visby",
8072
"Unilabs Eskilstuna Laboratorium": "631 88 Eskilstuna",
8173
"Norrland University Hospital": "901 85 Umeå",
74+
"Länssjukhuset Sundsvall": "856 43 Sundsvall",
8275
}

cg/constants/scout.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class ScoutUploadKey(StrEnum):
106106

107107
RAREDISEASE_SAMPLE_TAGS: dict[str, set[str]] = dict(
108108
alignment_file={AlignmentFileTag.CRAM},
109+
d4_file={"d4"},
109110
vcf2cytosure={"vcf2cytosure"},
110111
mt_bam={"bam-mt"},
111112
eklipse_path={"eklipse-png"},

cg/exc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ class OrderError(CgError):
174174
"""
175175

176176

177+
class OrderSubmissionError(CgError):
178+
"""
179+
Exception related to order submission.
180+
"""
181+
182+
177183
class OrderFormError(CgError):
178184
"""
179185
Exception related to the order form.

0 commit comments

Comments
 (0)