Skip to content

Commit

Permalink
various bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AvantiShri committed Apr 8, 2017
1 parent 68bfd26 commit fb9d150
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions simdna/synthetic/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from simdna import util
from collections import OrderedDict
import numpy as np
import re


class DefaultNameMixin(object):
Expand Down Expand Up @@ -81,6 +82,7 @@ def fromString(cls, string, whatClass=None):
``startPos=int(startPos)``
"""
if (whatClass is None):
from simdna.synthetic.embeddables import StringEmbeddable
whatClass = StringEmbeddable
# was printed out as pos-[startPos]_[what], but the
#[what] may contain underscores, hence the maxsplit
Expand Down Expand Up @@ -546,10 +548,10 @@ def action(inp, line_number):
sequences.append(inp[1])
embeddings.append(getEmbeddingsFromString(inp[2]))
labels.append([int(x) for x in inp[3:]])
fp.performActionOnEachLineOfFile(
fileHandle=fp.getFileHandle(simdata_file),
util.perform_action_on_each_line_of_file(
file_handle=util.get_file_handle(simdata_file),
action=action,
transformation=fp.defaultTabSeppd)
transformation=util.default_tab_seppd)
return util.enum(
ids=ids,
sequences=sequences,
Expand Down
2 changes: 1 addition & 1 deletion simdna/synthetic/embeddables.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import absolute_import, division, print_function
from simdna.synthetic.core import DefaultNameMixin

import re


class AbstractEmbeddable(object):
Expand Down

0 comments on commit fb9d150

Please sign in to comment.