List of all members.
Public Member Functions |
def | __init__ |
def | open |
def | close |
def | read |
def | write |
Public Attributes |
| separator |
| intypes |
| outtypes |
| filehandle |
Detailed Description
Generic Track class for text files (extension ".txt" or ".text").
Additional attributes:
.. attribute:: separator
character separating fields in the file (default "\t").
.. attribute:: intypes
Dictionary with keys field names and values functions that will be called on each item when reading the file.
.. attribute:: outtypes
Dictionary with keys field names and values functions that will be called on each item when writing the file.
When reading a file, lines beginning with "browser", "track" or "#" are skipped.
The *info* attribute will be filled with "key=value" pairs found on a "track" line at the top of the file.
The *open" method takes the argument *mode" which can be *read* (default), *write*, *append* or *overwrite*.
Path can be a url, or a gzipped file.
Member Function Documentation
def bbcflib::btrack::text::TextTrack::write |
( |
|
self, |
|
|
|
source, |
|
|
|
fields = None , |
|
|
|
mode = 'write' , |
|
|
|
chrom = None , |
|
|
|
kw | |
|
) |
| | |
Add data to the track. Effectively writes in the related file.
:param source: (FeatureStream) data to be added to the track.
:param fields: list of field names.
:param mode: (str) file opening mode - one of 'write','overwrite','append'. ['write']
:param chrom: (str) a chromosome name.
The documentation for this class was generated from the following file:
- /home/rougemon/Data/pipelines/libv2/bbcflib/bbcflib/btrack/text.py