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

fixed conda dependencies

parent 35ec954c
......@@ -12,9 +12,6 @@ dependencies:
- openssl = 1.1.1h
- samtools = 1.11
- seaborn = 0.11.0
- scipy = 1.5.2
- scikit-learn = 0.23.2
- numpy = 1.18.5
- pysam = 0.16.0.1
- mpmath = 1.1.0
- 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:
k = lambda wildcards: wildcards.kmer,
hamming_distance_cutoff = 5,
#cluster execution
cpus = '2',
mem = '4G',
cpus = '4',
mem = '8G',
gpus = '0',
walltime = '00:15:00'
conda:
'../envs/biopythonworkbench.yaml'
'../envs/scipyworkbench.yaml'
script:
'../scripts/calcDistanceMatrixVkmers.py'
......@@ -2,8 +2,8 @@ import json
import numpy as np
import time
from scipy.sparse import coo_matrix, vstack, save_npz
from sklearn.metrics import pairwise_distances_chunked, pairwise_distances
import sklearn.metrics
print("STARTED")
##############INPUT######################################
cutoff = snakemake.params['hamming_distance_cutoff']
kmers_file = snakemake.input['kmers']
......@@ -49,9 +49,9 @@ print(M.shape)
cpus = -1
# working_memory = 1024
# eg snakemake.params['mem'] = 1G
working_memory = int(mem) * 1000 - 500
gen = pairwise_distances_chunked(kmers_int, reduce_func=reduce_func, metric="hamming", n_jobs=cpus,
working_memory=working_memory)
# working_memory = int(mem) * 1000 - 1500
print("WORKING MEM: " + str(sklearn.get_config()['working_memory']))
gen = sklearn.metrics.pairwise_distances_chunked(kmers_int, reduce_func=reduce_func, metric="hamming", n_jobs=cpus)
N = next(gen)
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