diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-04-21 13:56:33 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-05-05 10:06:28 +0300 |
commit | 31def9a9df583dd27f8604302700ff48368c43f3 (patch) | |
tree | a78b64a008c19db875b54bae7d35251d654a3155 /gnu/packages/patches/grocsvs-dont-use-admiral.patch | |
parent | 0e680920b9e54d7c8a901b1c9cf02ce4468f44ed (diff) |
gnu: Add grocsvs.
* gnu/packages/bioinformatics.scm (grocsvs): New variable.
* gnu/packages/patches/grocsvs-dont-use-admiral.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/patches/grocsvs-dont-use-admiral.patch')
-rw-r--r-- | gnu/packages/patches/grocsvs-dont-use-admiral.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/gnu/packages/patches/grocsvs-dont-use-admiral.patch b/gnu/packages/patches/grocsvs-dont-use-admiral.patch new file mode 100644 index 0000000000..cb976e19b0 --- /dev/null +++ b/gnu/packages/patches/grocsvs-dont-use-admiral.patch @@ -0,0 +1,69 @@ +python-admiral doesn't have a license +https://github.com/nspies/admiral/issues/3 + +diff --git a/setup.py b/setup.py +index 692b6a0..568f381 100755 +--- a/setup.py ++++ b/setup.py +@@ -20,7 +20,7 @@ setup( + 'console_scripts' : ["grocsvs = grocsvs.main:main"] + }, + +- install_requires = ["admiral", "h5py", "networkx>=2.0", "pandas", "pybedtools", ++ install_requires = ["h5py", "networkx>=2.0", "pandas", "pybedtools", + "pyfaidx", "pysam>=0.10.0", "scipy", "ipython-cluster-helper", + "pygraphviz", "psutil"], + +diff --git a/src/grocsvs/jobmanagers.py b/src/grocsvs/jobmanagers.py +index 6da0b58..112d7ff 100755 +--- a/src/grocsvs/jobmanagers.py ++++ b/src/grocsvs/jobmanagers.py +@@ -41,34 +41,3 @@ class MultiprocessingCluster(Cluster): + pool = multiprocessing.Pool(processes=self.processes) + return pool.map_async(fn, args).get(999999) + +- +-class AdmiralCluster(Cluster): +- def map(self, fn, args): +- from admiral import jobmanagers, remote +- +- cluster_options = self.cluster_settings.cluster_options.copy() +- +- scheduler = cluster_options.pop("scheduler") +- +- jobmanager_class = jobmanagers.get_jobmanager(scheduler) +- jobmanager = jobmanager_class( +- batch_dir=self.batch_dir, log_dir=self.batch_dir) +- +- +- if not "mem" in cluster_options: +- cluster_options["mem"] = "16g" +- if not "time" in cluster_options: +- cluster_options["time"] = "12h" +- +- jobs = [] +- #for i, arg in enumerate(args): +- +- job_name = args[0].__class__.__name__ +- args = [[arg] for arg in args] +- job = remote.run_remote(fn, jobmanager, job_name, args=args, +- array=True, overwrite=True, **cluster_options) +- +- result = jobmanagers.wait_for_jobs([job], wait=5, progress=True) +- +- if not result: +- raise Exception("Some chunks failed to complete") +diff --git a/src/grocsvs/pipeline.py b/src/grocsvs/pipeline.py +index ab1bb2d..350976f 100755 +--- a/src/grocsvs/pipeline.py ++++ b/src/grocsvs/pipeline.py +@@ -8,8 +8,7 @@ from grocsvs import utilities + def make_jobmanager(jobmanager_settings, processes, batch_dir): + jobmanager_classes = {"IPCluster":jobmanagers.IPCluster, + "local": jobmanagers.LocalCluster, +- "multiprocessing": jobmanagers.MultiprocessingCluster, +- "admiral": jobmanagers.AdmiralCluster} ++ "multiprocessing": jobmanagers.MultiprocessingCluster} + + cls = jobmanager_classes[jobmanager_settings.cluster_type] + return cls(processes, jobmanager_settings, batch_dir) |