Skip to content

Commit

Permalink
Added number of cores in config.
Browse files Browse the repository at this point in the history
  • Loading branch information
grexor committed May 24, 2016
1 parent 1b828a0 commit 9c5cf7b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def start_cluster(comps, genome, region, cn, pth, sf):
print "%s.%s: saving sequences to pickle" % (comps, genome)
rnamotifs2.sequence.save(comps, genome)

num_worker_threads = 40
num_worker_threads = rnamotifs2.config.cores
q = Queue()
def worker():
while True:
Expand Down
7 changes: 6 additions & 1 deletion bin/rnamotifs2
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ import sys
import os
import shutil
import glob
import argparse

comps = sys.argv[1]
parser = argparse.ArgumentParser()
parser.add_argument('-comps', action="store", dest="comps", default=None)
args = parser.parse_args()

comps = args.comps
rnamotifs2.data.read_config(comps)
rnamotifs2.data.read(comps)

Expand Down
2 changes: 1 addition & 1 deletion cluster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def next_cluster(comps, genome, region, cn, pth=0.5, sf="r"):
draw(comps, genome, region, cn, steps=step)
return # stop tree construction

num_worker_threads = 40
num_worker_threads = rnamotifs2.config.cores
q = Queue()
def worker():
while True:
Expand Down
1 change: 1 addition & 0 deletions config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import rnamotifs2

cores = 20 # number of cores to use in parallel computation
perms = 0

0 comments on commit 9c5cf7b

Please sign in to comment.