Skip to content
Snippets Groups Projects
Commit 960cb6de authored by Bertrand Néron's avatar Bertrand Néron
Browse files

add docstrings

parent b47d896d
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,11 @@ class FastaParser(object): ...@@ -17,6 +17,11 @@ class FastaParser(object):
self._current_sequence = '' self._current_sequence = ''
def _parse_header(self, line): def _parse_header(self, line):
"""
parse the header line and _current_id|comment|sequence attributes
:param line: the line of header in fasta format
:type line: string
"""
header = line.split() header = line.split()
self._current_id = header[0] self._current_id = header[0]
self._current_comment = ' '.join(header[1:]) self._current_comment = ' '.join(header[1:])
...@@ -26,6 +31,13 @@ class FastaParser(object): ...@@ -26,6 +31,13 @@ class FastaParser(object):
return self return self
def next(self): def next(self):
"""
:return: at each call return a new :class:`Sequence` object
:raise: StopIteration
"""
"""
:return:
"""
for line in self._file: for line in self._file:
if line.startswith('>'): if line.startswith('>'):
# a new sequence begin # a new sequence begin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment