Skip to content

Commit

Permalink
updating for organizing obj_model extra_attributes into bio, chem, an…
Browse files Browse the repository at this point in the history
…d math modules
  • Loading branch information
jonrkarr committed Dec 19, 2018
1 parent 94537f8 commit 0ef6231
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions wc_rules/attributes.py
@@ -1,4 +1,5 @@
from obj_model import core, extra_attributes
from obj_model import core
from obj_model import bio

# scalar attributes
class IdAttribute(core.StringAttribute):
Expand Down Expand Up @@ -41,6 +42,6 @@ class OneToManyAttribute(core.OneToManyAttribute):pass
class ManyToManyAttribute(core.ManyToManyAttribute):pass

# extra_attributes
class BioSeqAttribute(extra_attributes.BioSeqAttribute):
class BioSeqAttribute(bio.BioSeqAttribute):
def __init__(self):
super().__init__(default=None)
5 changes: 3 additions & 2 deletions wc_rules/seq.py
Expand Up @@ -6,15 +6,16 @@
"""
from . import rete_nodes as rn
from . import chem, utils
from obj_model import core,extra_attributes
from obj_model import core
import Bio.Seq
import Bio.Alphabet
import obj_model.bio


class SequenceMolecule(chem.Molecule):
""" Generic SequenceMolecule (template for DNA, RNA, protein sequence objects) """

sequence = extra_attributes.BioSeqAttribute()
sequence = obj_model.bio.BioSeqAttribute()
alphabet_dict = { 'strict': None, 'permissive': None }
use_permissive_alphabet = True
alphabet = None
Expand Down

0 comments on commit 0ef6231

Please sign in to comment.