Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OBITools3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OBITools
OBITools3
Commits
4802e32f
Commit
4802e32f
authored
Oct 17, 2018
by
Celine Mercier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cython: Sequence objects: repr() method now returns a Fasta or Fastq
formatted string
parent
b0277620
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
python/obitools3/dms/obiseq.pyx
python/obitools3/dms/obiseq.pyx
+11
-0
No files found.
python/obitools3/dms/obiseq.pyx
View file @
4802e32f
...
...
@@ -16,6 +16,10 @@ from .capi.obiview cimport NUC_SEQUENCE_COLUMN, \
from
.capi.obiutils
cimport
reverse_complement_sequence
from
obitools3.format.fasta
import
FastaFormat
from
obitools3.format.fastq
import
FastqFormat
from
cpython
cimport
array
import
array
from
copy
import
deepcopy
...
...
@@ -414,3 +418,10 @@ cdef class Nuc_Seq_Stored(Seq_Stored) :
def
__len__
(
self
):
return
len
(
self
.
_view
.
get_column
(
NUC_SEQUENCE_COLUMN
).
get_line
(
self
.
index
))
def
__repr__
(
self
):
if
self
.
quality
is
None
:
formatter
=
FastaFormat
()
else
:
formatter
=
FastqFormat
()
return
bytes2str
(
formatter
(
self
))
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