Skip to content

Commit

Permalink
StringIO,BytesIO compatibility fixed for py26/27 py3
Browse files Browse the repository at this point in the history
  • Loading branch information
necrolyte2 committed Aug 12, 2015
1 parent 21b1a2a commit d5b0e74
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bio_pieces/sns_matrix.py
@@ -1,12 +1,15 @@
import pandas as pd
import numpy as np
from StringIO import StringIO
try:
from io import StringIO as BytesIO
except ImportError:
from io import BytesIO


# Simple Nucleotide Substitution matrix
# Copy/pasted table from
# http://www.jalview.org/help/html/calculations/scorematrices.html#simplenucleotide
sns = StringIO('''
sns = BytesIO(u'''
,A,C,G,I,N,R,T,U,X,Y
A,10,-8,-8,1,1,1,-8,-8,1,-8
C,-8,10,-8,1,1,-8,-8,-8,1,1
Expand Down

0 comments on commit d5b0e74

Please sign in to comment.