Skip to content

Commit

Permalink
moved resources to package folder
Browse files Browse the repository at this point in the history
  • Loading branch information
emilhaegglund committed Oct 11, 2016
1 parent 115f255 commit 7515e88
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions abruijn/polish.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
class PolishException(Exception):
pass

def get_root():
return os.path.dirname(__file__)


def check_binaries():
if not which(POLISH_BIN):
Expand All @@ -42,10 +45,12 @@ def check_binaries():

def polish(bubbles, num_proc, err_mode, work_dir, iter_id):
logger.info("Correcting bubbles")

_ROOT = get_root()

subs_matrix = os.path.join(os.environ["ABRUIJN_RES"],
subs_matrix = os.path.join(_ROOT, 'resource',
config.vals["err_modes"][err_mode]["subs_matrix"])
hopo_matrix = os.path.join(os.environ["ABRUIJN_RES"],
hopo_matrix = os.path.join(_ROOT, 'resource',
config.vals["err_modes"][err_mode]["hopo_matrix"])

bubbles_file = os.path.join(work_dir, "bubbles_{0}.fasta".format(iter_id))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
author='Mikhail Kolmogorov',
author_email = '',
license='BSD-3-Clause',
packages=find_packages(),
packages=['abruijn'],
package_data={'abruijn': ['resource/*.mat']},
scripts = ['bin/abruijn-assemble', 'bin/abruijn-polish', 'scripts/abruijn'],
data_files=['resource/nano_homopolymers.mat', 'resource/nano_substitutions.mat', 'resource/p6c4_homopolymers.mat',
'resource/p6c4_substitutions.mat', 'resource/pacbio_homopolymers.mat', 'resource/pacbio_substitutions.mat']
#data_files=['resource/nano_homopolymers.mat', 'resource/nano_substitutions.mat', 'resource/p6c4_homopolymers.mat',
# 'resource/p6c4_substitutions.mat', 'resource/pacbio_homopolymers.mat', 'resource/pacbio_substitutions.mat']
)

0 comments on commit 7515e88

Please sign in to comment.