Skip to content

Commit

Permalink
final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-parker committed Feb 27, 2025
1 parent b9783e7 commit 8b13c87
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions ingest/Snakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import yaml
import os
from pathlib import Path
from enum import Enum


class SegmentDetectionMethod(Enum):
Expand Down Expand Up @@ -52,17 +53,20 @@ if SEGMENTED:
segment_identification.get("method")
)
except:
raise ValueError("Segmented sequences require segment_identification and method")
if segment_detection_method == SegmentDetectionMethod.ALIGN:
dataset_server_map[segment] = segment_identification.get(
"nextclade_dataset_server_map", {}
).get(segment, segment_identification.get("nextclade_dataset_server"))
dataset_name_map[segment] = segment_identification.get(
"nextclade_dataset_name_map", {}
).get(
segment,
segment_identification.get("nextclade_dataset_name") + "/" + segment,
raise ValueError(
"Segmented sequences require segment_identification and method"
)
if segment_detection_method == SegmentDetectionMethod.ALIGN:
for segment in config["nucleotide_sequences"]:
dataset_server_map[segment] = segment_identification.get(
"nextclade_dataset_server_map", {}
).get(segment, segment_identification.get("nextclade_dataset_server"))
dataset_name_map[segment] = segment_identification.get(
"nextclade_dataset_name_map", {}
).get(
segment,
segment_identification.get("nextclade_dataset_name") + "/" + segment,
)

if os.uname().sysname == "Darwin":
# Don't use conda-forge unzip on macOS
Expand Down Expand Up @@ -264,7 +268,7 @@ if SEGMENTED and segment_detection_method == SegmentDetectionMethod.ALIGN:
"""


if not ALIGN:
if SEGMENTED and segment_detection_method == SegmentDetectionMethod.MINIMIZER:

rule download_minimizer:
output:
Expand Down

0 comments on commit 8b13c87

Please sign in to comment.