Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for python 3 #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
master_doc = 'index'

# General information about the project.
project = u'poretools'
copyright = u'2014'
project = 'poretools'
copyright = '2014'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -185,7 +185,7 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'poretools.tex', u'poretools Documentation', u'Nick Loman and Aaron Quinlan', 'manual'),
('index', 'poretools.tex', 'poretools Documentation', 'Nick Loman and Aaron Quinlan', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -217,7 +217,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'gemini', u'poretools Documentation', [u'Nick Loman and Aaron Quinlan'], 1)
('index', 'gemini', 'poretools Documentation', ['Nick Loman and Aaron Quinlan'], 1)
]


Expand Down
144 changes: 72 additions & 72 deletions poretools/Event.py
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
class Event(object):
"""
Very basic class to represent a nanopore
translocation event for a single pore
based upon data in the Events table of
a Oxford Nanopore FAST5 (HDF5) file
"""
def __init__(self, row):
self.row = row
try:
self.mean = row['mean']
except Exception:
self.mean = ""
try:
self.start = row['start']
except Exception:
self.start = ""
try:
self.stdv = row['stdv']
except Exception:
self.stdv = ""
try:
self.length = row['length']
except Exception:
self.length = ""
try:
self.model_state = row['model_state']
except Exception:
self.model_state = ""
try:
self.model_level = row['model_level']
except Exception:
self.model_level = ""
try:
self.move = row['move']
except Exception:
self.move = ""
try:
self.p_model_state = row['p_model_state']
except Exception:
self.p_model_state = ""
try:
self.mp_state = row['mp_state']
except Exception:
self.mp_state = ""
try:
self.p_mp_state = row['p_mp_state']
except Exception:
self.p_mp_state = ""
try:
self.p_A = row['p_A']
except Exception:
self.p_A = ""
try:
self.p_C = row['p_C']
except Exception:
self.p_C = ""
try:
self.p_G = row['p_G']
except Exception:
self.p_G = ""
try:
self.p_T = row['p_T']
except Exception:
self.p_T = ""
"""
Very basic class to represent a nanopore
translocation event for a single pore
based upon data in the Events table of
a Oxford Nanopore FAST5 (HDF5) file
"""
def __init__(self, row):
self.row = row
try:
self.mean = row['mean']
except Exception:
self.mean = ""
try:
self.start = row['start']
except Exception:
self.start = ""
try:
self.stdv = row['stdv']
except Exception:
self.stdv = ""
try:
self.length = row['length']
except Exception:
self.length = ""
try:
self.model_state = row['model_state']
except Exception:
self.model_state = ""
try:
self.model_level = row['model_level']
except Exception:
self.model_level = ""
try:
self.move = row['move']
except Exception:
self.move = ""
try:
self.p_model_state = row['p_model_state']
except Exception:
self.p_model_state = ""
try:
self.mp_state = row['mp_state']
except Exception:
self.mp_state = ""
try:
self.p_mp_state = row['p_mp_state']
except Exception:
self.p_mp_state = ""
try:
self.p_A = row['p_A']
except Exception:
self.p_A = ""
try:
self.p_C = row['p_C']
except Exception:
self.p_C = ""
try:
self.p_G = row['p_G']
except Exception:
self.p_G = ""
try:
self.p_T = row['p_T']
except Exception:
self.p_T = ""

def __repr__(self):
return '\t'.join([str(s) for s in [self.mean, self.start, self.stdv,
self.length, self.model_state,
self.model_level, self.move,
self.p_model_state,
self.mp_state, self.p_mp_state,
self.p_A, self.p_C,
self.p_G, self.p_T]])
def __repr__(self):
return '\t'.join([str(s) for s in [self.mean, self.start, self.stdv,
self.length, self.model_state,
self.model_level, self.move,
self.p_model_state,
self.mp_state, self.p_mp_state,
self.p_A, self.p_C,
self.p_G, self.p_T]])