BioMart::Formatter TSV
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
BioMart::Formatter::TSV
Package variables
No package variables defined.
Included modules
Readonly
Inherit
BioMart::FormatterI
Synopsis
The TSV Formatter returns tab separated tabular data
for a BioMart query's ResultTable
Description
When given a BioMart::ResultTable containing the results of
a BioMart::Query the TSV Formatter will return tabular output
with one line for each row of data in the ResultTable and tabs
separating the individual entries in each row. The getDisplayNames
and getFooterText can be used to return appropiately formatted
headers and footers respectively
Methods
_new
No description
Code
getDisplayNames
No description
Code
nextRow
No description
Code
processQuery
No description
Code
Methods description
None available.
Methods code
_newdescriptionprevnextTop
sub _new {
    my ($self) = @_;

    $self->SUPER::_new();
}
getDisplayNamesdescriptionprevnextTop
sub getDisplayNames {
    my $self = shift;
    my @displayNames = $self->getTextDisplayNames();

    # Enclose non-numeric values in double quotes & escape the quotes already in them
map { s/$FIELD_DELIMITER/\$FIELD_DELIMITER/g } @displayNames; # Create the final header string
return join($FIELD_DELIMITER, @displayNames) . $RECORD_DELIMITER; } 1;
}
nextRowdescriptionprevnextTop
sub nextRow {
    my $self = shift;

    my $rtable = $self->get('result_table');
    my $row = $rtable->nextRow;
    if (!$row){
        return;
    }
    # Escape delimiters in value-strings
foreach(@{$row}) { $_ = q{} unless defined ($_); $_ =~ s/$FIELD_DELIMITER/\$FIELD_DELIMITER/g; } # Create the final record-string
return join($FIELD_DELIMITER, @{$row}) . $RECORD_DELIMITER;
}
processQuerydescriptionprevnextTop
sub processQuery {
    my ($self, $query) = @_;

    $self->set('original_attributes',[@{$query->getAllAttributes()}]) 
	if ($query->getAllAttributes());
    $self->set('query',$query);
    return $query;
}
General documentation
AUTHORSTop
    *
CONTACTTop
This module is part of the BioMart project
http://www.biomart.org
Questions can be posted to the mart-dev mailing list: mart-dev@ebi.ac.uk