Skip to content

Commit

Permalink
Renamed functions to avoid using the digit two as a pun for (convert)…
Browse files Browse the repository at this point in the history
… to.

Removed the "contents" argument for the helper functions (now filename or handle only)

Use Bio.SwissProt to support reading "swiss" format.
  • Loading branch information
peterc committed Nov 13, 2006
1 parent 3779f26 commit 80276dd
Show file tree
Hide file tree
Showing 2 changed files with 286 additions and 85 deletions.
27 changes: 27 additions & 0 deletions Bio/SeqIO/SwissIO.py
@@ -0,0 +1,27 @@
# Copyright 2006 by Peter Cock. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.

from Bio.SwissProt import SProt

#This is a normal function!
def SwissIterator(handle) :
"""Breaks up a Swiss-Prot/UniProt file into SeqRecord objects
Every section from the ID line to the terminating // becomes
a single SeqRecord with associated annotation and features.
This parser is for the flat file "swiss" format as used by:
* Swiss-Prot aka SwissProt
* TrEMBL
* UniProtKB aka UniProt Knowledgebase
It does NOT read their new XML file format.
http://www.expasy.org/sprot/
For consistency with BioPerl and EMBOSS we call this the "swiss"
format.
"""
return SProt.Iterator(handle, SProt.SequenceParser())

0 comments on commit 80276dd

Please sign in to comment.