Skip to content

Commit

Permalink
Merge pull request #499 from fulcrumgenomics/fix_parallellism_on_osx
Browse files Browse the repository at this point in the history
fix parallelism for osx
  • Loading branch information
hermannromanek authored Aug 13, 2024
2 parents 7f71d13 + b89b496 commit a4af992
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 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,10 @@ def Sniffles2_Main(processes: list[parallel.SnifflesWorker]):

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

# needed for running on osx
if sys.platform == "darwin":
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 a4af992

Please sign in to comment.