BioMart::Formatter
MFASTA
Toolbar
Summary
BioMart::Formatter::MFASTA
Package variables
No package variables defined.
Inherit
Synopsis
The FASTA Formatter returns whitespace separated tabular data
for a BioMart query's ResultTable
Description
When given a BioMart::ResultTable containing the results of
a BioMart::Query the FASTA Formatter will return tabular output
with one line for each row of data in the ResultTable and single spaces
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 |
isSpecial | No description | Code |
nextRow | No description | Code |
processQuery | No description | Code |
Methods description
None available.
Methods code
sub _new
{ my ($self) = @_;
$self->SUPER::_new(); } |
sub getDisplayNames
{ my $self = shift;
return ''; } |
sub isSpecial
{ return 1;
}
1; } |
sub nextRow
{ my $self = shift;
my $rtable = $self->get('result_table');
my $row = $rtable->nextRow;
if (!$row){
return;
}
my $array_length = @{$row};
my $output;
until ($array_length == 0){
my $header_atts = join "|",@{$row}[1..5];
my $seq = @{$row}[0];
$seq =~ s/(\w{60})/$1\n/g;
$output .= ">" . $header_atts . "\n". $seq ."\n";
for (0..5){shift @{$row};}
$array_length = $array_length - 6 ;
}
if ($array_length == 0){
$output .= "##\n";
}
return $output;
} |
sub processQuery
{ my ($self, $query) = @_;
$self->set('original_attributes',[@{$query->getAllAttributes()}])
if ($query->getAllAttributes());
$self->set('query',$query);
return $query; } |
General documentation