Commit 20505da6 authored by Jan Hoeckesfeld's avatar Jan Hoeckesfeld
Browse files

fixed conda dependencies

parent 35ec954c
...@@ -12,9 +12,6 @@ dependencies: ...@@ -12,9 +12,6 @@ dependencies:
- openssl = 1.1.1h - openssl = 1.1.1h
- samtools = 1.11 - samtools = 1.11
- seaborn = 0.11.0 - seaborn = 0.11.0
- scipy = 1.5.2
- scikit-learn = 0.23.2
- numpy = 1.18.5
- pysam = 0.16.0.1 - pysam = 0.16.0.1
- mpmath = 1.1.0 - mpmath = 1.1.0
- matplotlib-venn = 0.11.5 - matplotlib-venn = 0.11.5
name: SciPyWorkbench
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- scikit-learn = 0.23.2
\ No newline at end of file
...@@ -462,12 +462,12 @@ rule createDistanceMatrixOverKmersOfV: ...@@ -462,12 +462,12 @@ rule createDistanceMatrixOverKmersOfV:
k = lambda wildcards: wildcards.kmer, k = lambda wildcards: wildcards.kmer,
hamming_distance_cutoff = 5, hamming_distance_cutoff = 5,
#cluster execution #cluster execution
cpus = '2', cpus = '4',
mem = '4G', mem = '8G',
gpus = '0', gpus = '0',
walltime = '00:15:00' walltime = '00:15:00'
conda: conda:
'../envs/biopythonworkbench.yaml' '../envs/scipyworkbench.yaml'
script: script:
'../scripts/calcDistanceMatrixVkmers.py' '../scripts/calcDistanceMatrixVkmers.py'
...@@ -2,8 +2,8 @@ import json ...@@ -2,8 +2,8 @@ import json
import numpy as np import numpy as np
import time import time
from scipy.sparse import coo_matrix, vstack, save_npz from scipy.sparse import coo_matrix, vstack, save_npz
from sklearn.metrics import pairwise_distances_chunked, pairwise_distances import sklearn.metrics
print("STARTED")
##############INPUT###################################### ##############INPUT######################################
cutoff = snakemake.params['hamming_distance_cutoff'] cutoff = snakemake.params['hamming_distance_cutoff']
kmers_file = snakemake.input['kmers'] kmers_file = snakemake.input['kmers']
...@@ -49,9 +49,9 @@ print(M.shape) ...@@ -49,9 +49,9 @@ print(M.shape)
cpus = -1 cpus = -1
# working_memory = 1024 # working_memory = 1024
# eg snakemake.params['mem'] = 1G # eg snakemake.params['mem'] = 1G
working_memory = int(mem) * 1000 - 500 # working_memory = int(mem) * 1000 - 1500
gen = pairwise_distances_chunked(kmers_int, reduce_func=reduce_func, metric="hamming", n_jobs=cpus, print("WORKING MEM: " + str(sklearn.get_config()['working_memory']))
working_memory=working_memory) gen = sklearn.metrics.pairwise_distances_chunked(kmers_int, reduce_func=reduce_func, metric="hamming", n_jobs=cpus)
N = next(gen) N = next(gen)
start = time.time() start = time.time()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment