Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OBITools
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
26
Issues
26
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools
Commits
13f34fa8
Commit
13f34fa8
authored
Feb 11, 2014
by
Eric Coissac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch to fit the version 0.20 of cython
parent
efbcd978
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
_obitools.pyx
src/obitools/_obitools.pyx
+17
-17
_fastq.pyx
src/obitools/fastq/_fastq.pyx
+1
-1
No files found.
src/obitools/_obitools.pyx
View file @
13f34fa8
...
...
@@ -81,7 +81,7 @@ cdef class BioSequence(object):
self._seq=seq
self._info = dict(info)
if rawinfo is not None:
self.__rawinfo=' ' + rawinfo
self.__rawinfo=
b
' ' + rawinfo
else:
self.__rawinfo=None
self._rawparser=rawparser
...
...
@@ -221,7 +221,7 @@ cdef class BioSequence(object):
m = p.search(self.__rawinfo)
if m is not None:
v=m.group(1)
self.__rawinfo=' ' + self.__rawinfo[0:m.start(0)]+self.__rawinfo[m.end(0):]
self.__rawinfo=
b
' ' + self.__rawinfo[0:m.start(0)]+self.__rawinfo[m.end(0):]
try:
v = eval(v)
except:
...
...
@@ -301,7 +301,7 @@ cdef class BioSequence(object):
m = p.search(self.__rawinfo)
if m is not None:
v=m.group(1)
self.__rawinfo=' ' + self.__rawinfo[0:m.start(0)]+self.__rawinfo[m.end(0):]
self.__rawinfo=
b
' ' + self.__rawinfo[0:m.start(0)]+self.__rawinfo[m.end(0):]
try:
v = eval(v)
except:
...
...
@@ -640,7 +640,7 @@ cdef class SubSequence(WrappedBioSequence):
return len(self._xrange)
cpdef bytes getStr(self):
return ''.join([x for x in self])
return
b
''.join([x for x in self])
def __iter__(self):
return (self.wrapped.getSymbolAt(x) for x in self._xrange)
...
...
@@ -651,11 +651,11 @@ cdef class SubSequence(WrappedBioSequence):
id = property(getId,setId, None)
cdef dict _comp={
'a': 't', 'c': 'g', 'g': 'c', 't':
'a',
'r': 'y', 'y': 'r', 'k': 'm', 'm':
'k',
's': 's', 'w': 'w', 'b': 'v', 'd':
'h',
'h': 'd', 'v': 'b', 'n': 'n', 'u':
'a',
'-':
'-'}
cdef dict _comp={
b'a': b't', b'c': b'g', b'g': b'c', b't': b
'a',
b'r': b'y', b'y': b'r', b'k': b'm', b'm': b
'k',
b's': b's', b'w': b'w', b'b': b'v', b'd': b
'h',
b'h': b'd', b'v': b'b', b'n': b'n', b'u': b
'a',
b'-': b
'-'}
cdef class DNAComplementSequence(WrappedBioSequence):
...
...
@@ -693,7 +693,7 @@ cdef class DNAComplementSequence(WrappedBioSequence):
return len(self._wrapped)
cpdef bytes getStr(self):
return ''.join([x for x in self])
return
b
''.join([x for x in self])
def __iter__(self):
return (self.getSymbolAt(x) for x in xrange(len(self)))
...
...
@@ -714,16 +714,16 @@ cdef class DNAComplementSequence(WrappedBioSequence):
id = property(getId,setId, None)
cdef set _iupac=set([
'r', 'y', 'k',
'm',
's', 'w', 'b',
'd',
'h', 'v',
'n',
'R', 'Y', 'K',
'M',
'S', 'W', 'B',
'D',
'H', 'V',
'N'])
cdef set _iupac=set([
b'r', b'y', b'k', b
'm',
b's', b'w', b'b', b
'd',
b'h', b'v', b
'n',
b'R', b'Y', b'K', b
'M',
b'S', b'W', b'B', b
'D',
b'H', b'V', b
'N'])
#cdef char *_iupac=b"acgtrykmswbdhvnu-"
cdef set _nuc = set([
'a', 'c', 'g', 't','u','A', 'C', 'G', 'T','U',
'-'])
cdef set _nuc = set([
b'a', b'c', b'g', b't',b'u',b'A', b'C', b'G', b'T',b'U',b
'-'])
#cdef char *_nuc=b"acgt-"
...
...
src/obitools/fastq/_fastq.pyx
View file @
13f34fa8
...
...
@@ -214,7 +214,7 @@ cpdef bytes formatFastq(object data, bint gbmode=False, bint upper=False):
id = sequence.id
if gbmode:
if b'gi' in sequence:
id = b
"gi|%s|%s" % (sequence[b'gi'],id
)
id = b
ytes(b"gi|%s|%s" % (sequence[b'gi'],id)
)
else:
id = b"lcl|%s|" % (id)
if hasattr(sequence, b"quality"):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment