Skip to content

Commit

Permalink
[temp] rolling back mode finding
Browse files Browse the repository at this point in the history
  • Loading branch information
shahab-sarmashghi authored Nov 23, 2022
1 parent e8b8b44 commit 6f9d162
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions skmer/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from subprocess import call, check_output, STDOUT
import multiprocessing as mp

__version__ = 'skmer 4.0.0'
__version__ = 'skmer 3.3.0'

# Hard-coded param
coverage_threshold = 5
Expand Down Expand Up @@ -104,16 +104,7 @@ def estimate_cov(sequence, lib, k, e, nth):
f.write('coverage\t{0}\n'.format(cov) + 'genome_length\t{0}\n'.format(g_len) +
'error_rate\t{0}\n'.format(eps) + 'read_length\t{0}\n'.format(l))
return sample, cov, g_len, eps, l

hist = np.array(count[1:])
seq_diff = np.diff(hist)
increase_mask = seq_diff > 0
if increase_mask.any():
local_min = np.where(increase_mask > 0)[0][0]
ind = np.where(seq_diff[local_min:] < 0)[0][0] + local_min + 1
else:
ind = 1

ind = min(count.index(max(count[2:])), len(count) - 2)
if e is not None:
eps = e
p0 = np.exp(-k * eps)
Expand Down

0 comments on commit 6f9d162

Please sign in to comment.