Module TabIO
source code
Bio.SeqIO support for the "tab" (simple tab separated) file
format.
You are expected to use this module via the Bio.SeqIO functions.
The "tab" format is an ad-hoc plain text file format where
each sequence is on one (long) line. Each line contains the
identifier/description, followed by a tab, followed by the sequence. For
example, consider the following short FASTA format file:
>ID123456 possible binding site?
CATCNAGATGACACTACGACTACGACTCAGACTAC >ID123457 random sequence
ACACTACGACTACGACTCAGACTACAAN
Apart from the descriptions, this can be represented in the simple two
column tab separated format as follows:
ID123456(tab)CATCNAGATGACACTACGACTACGACTCAGACTAC
ID123457(tab)ACACTACGACTACGACTCAGACTACAAN
When reading this file, "ID123456" or "ID123457"
will be taken as the record's .id and .name property. There is no other
information to record.
Similarly, when writing to this format, Biopython will ONLY record the
record's .id and .seq (and not the description or any other information)
as in the example above.
|
TabWriter
Class to write simple tab separated format files.
|
|
TabIterator(handle,
alphabet=SingleLetterAlphabet())
Iterates over tab separated lines (as SeqRecord objects). |
source code
|
|
|
__package__ = ' Bio.SeqIO '
|
TabIterator(handle,
alphabet=SingleLetterAlphabet())
| source code
|
Iterates over tab separated lines (as SeqRecord objects).
Each line of the file should contain one tab only, dividing the line
into an identifier and the full sequence.
handle - input file alphabet - optional alphabet
The first field is taken as the record's .id and .name (regardless of
any spaces within the text) and the second field is the sequence.
|