Skip to content

Commit

Permalink
fix parallelism for osx
Browse files Browse the repository at this point in the history
  • Loading branch information
yfarjoun committed Jul 19, 2024
1 parent 7f71d13 commit 02a5938
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sniffles/sniffles
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#
import logging
import logging.config
import multiprocessing
from typing import Optional

from sniffles.utils.resmon import ResourceMonitor
Expand Down Expand Up @@ -70,6 +71,8 @@ def Sniffles2_Main(processes: list[parallel.SnifflesWorker]):

input_ext = [f.split(".")[-1].lower() for f in config.input]

# needed for running on osx
multiprocessing.set_start_method("fork")
if len(set(input_ext)) > 1:
util.fatal_error_main(f"Please specify either: A single .bam/.cram file - OR - one or more .snf files - OR - a single .tsv file containing a list of .snf files and optional sample ids as input. (supplied were: {list(set(input_ext))})")

Expand Down

0 comments on commit 02a5938

Please sign in to comment.