allpy
view allpy/fileio.py @ 736:c421263ef000
html viewer of blocks: now compatible with jquery-1.4.2
(jquery-1.4.2 is used in ubuntu maverick)
Methods
.mouseover( [eventData,] handler(eventObject) ) and
.mouseleave( [eventData,] handler(eventObject) )
were added in jquery-1.4.3, but
.bind( eventType, [eventData,] handler(eventObject) )
was in jquery-1.0.
Maybe viewer is compatible with jquery-1.0, but I have not tested
author | boris <bnagaev@gmail.com> |
---|---|
date | Fri, 08 Jul 2011 21:13:54 +0200 |
parents | 80043822a41e |
children | d16e8559b6dd |
line source
7 """This ugly helper is to avoid bad untimely import loops."""
12 """Automatical file IO."""
25 """Some helpers."""
34 """Append alignment to the file."""
38 )
41 """Read alignment from the file."""
47 """Fasta parser & writer."""
50 """Append one sequence to file."""
63 """Write sequences to file.
65 Sequences are given as list of tuples (string, name, description).
66 """
81 """Parser & writer for our own marked alignment file format.
83 Marked alignment file consists of a list of records, separated with one or
84 more empty lines. Each record consists of type name, header and optional
85 contents. Type name is a line, containing just one word, describing the
86 record type. Header is a sequence of lines, each in format `key: value`.
87 Content, if present, is separated from header with an empty line.
89 Type names and header key names are case-insensitive.
91 Known record types now are:
93 - `alignment` -- this must be the last record in file for now
94 - `sequence_markup`
95 - `alignment_markup`
97 Example::
99 sequence_markup
100 sequence_name: cyb5_mouse
101 sequence_description:
102 name: pdb_residue_number
103 type: SequencePDBResidueNumberMarkup
104 markup: -,12,121,122,123,124,13,14,15,-,-,16
106 alignment_markup
107 name: geometrical_core
108 type: AlignmentGeometricalCoreMarkup
109 markup: -,-,-,-,+,+,+,-,-,-,+,+,-,-,-,-
111 alignment
112 format: fasta
114 > cyb5_mouse
115 seqvencemouse
116 """
119 """Helper attribute for write_empty_line."""
122 """Write alignment to file."""
128 }
136 """Write a dictionary of markups as series of records."""
146 """Write record to file. Add new line before every but first record."""
154 """Add empty line every time except the first call."""
159 """Read alignment from file."""
165 """Found sequence markup record in file. Do something about it."""
173 return
177 """Found alignment markup record in file. Do something about it."""
182 """Found alignment record. It has been handled in read_payload."""
183 pass
186 """Read records and return them as a list of dicts."""
189 continue
193 """Read record headers and record payload."""
207 """Read record payload, if necessary."""
213 """Parser & writer for file formats supported by EMBOSS."""
216 """Write sequences to file."""
219 )
226 """EMBOSS does not permit : in file names. Fix sequences for that."""
231 """Read sequences from file."""
234 )
240 # vim: set et ts=4 sts=4 sw=4: