diff --git a/mutalyzer/util.py b/mutalyzer/util.py index c5810a9fe128c16ef52554435e02fa8fffc0a319..f69f966c77872a945216c31e92c276f36a4df587 100644 --- a/mutalyzer/util.py +++ b/mutalyzer/util.py @@ -29,11 +29,23 @@ import operator import sys import time +from Bio import Seq from Bio import SeqIO from Bio.SeqUtils import seq3 # NOTE: This is a temporary fix. -from extractor.describe import reverse_complement, palinsnoop, roll +from extractor.describe import palinsnoop, roll + + +def reverse_complement(sequence): + """ + Reverse complement of a sequence represented as unicode string. + + Unfortunately, BioPython's reverse_complement doesn't work on unicode + strings. We work almost exclusively with unicode strings, so this is a + convenience wrapper. + """ + return unicode(Seq.reverse_complement(str(sequence))) def is_utf8_alias(encoding): diff --git a/requirements.txt b/requirements.txt index 250f4ff139bdd182f2e46a2688709b7c91db59c7..793757e7f7a24e92334d67dec886b3e5e1e5c55a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,25 +3,25 @@ Flask==0.10.1 Jinja2==2.8 MySQL-python==1.2.5 PyYAML==3.11 -SQLAlchemy==1.0.9 -Sphinx==1.3.1 -Werkzeug==0.10.4 -alembic==0.8.3 +SQLAlchemy==1.0.12 +Sphinx==1.3.6 +Werkzeug==0.11.4 +alembic==0.8.4 backtranslate==0.0.5 biopython==1.66 chardet==2.3.0 cssselect==0.9.1 -description-extractor==2.2.1 +description-extractor==2.3.2 interval-binning==1.0.0 -lxml==3.4.4 +lxml==3.5.0 mock==1.3.0 -mockredispy==2.9.0.11 +mockredispy==2.9.0.12 pyparsing==2.0.5 -pytest==2.8.2 +pytest==2.9.0 pytz==2015.7 redis==2.10.5 -requests==2.8.1 -simplejson==3.8.1 +requests==2.9.1 +simplejson==3.8.2 sphinx-rtd-theme==0.1.9 spyne==2.12.11 suds==0.4