Bio::EnsEMBL::MetaData::MetaDataDumper Class Reference
Inheritance diagram for Bio::EnsEMBL::MetaData::MetaDataDumper:

List of all members.


Class Summary

Synopsis

# usage of concrete implementations
my $dumper = Bio::EnsEMBL::MetaData::MetaDataDumper::MyDumper->new();

# sequential dumping to multiple files in parallel
my $opts = {
  division => ['EnsemblFungi','EnsemblProtists'];
  file => 'MyFile.txt'
};
# set to dump to common "all" file as well as division
$dump_all = 1;
# open files
$dumper->start($opts->{division}, $dumper->{file}, $dump_all);
for my $md (@metadata) {
  $dumper->write_metadata($md, $dump_all); # dump to divisions and 
}
# close files
$dumper->end($opts->{division}, $dumper->{file}, $dump_all);

# dumping in one go (can be expensive to render)
$dumper->dump_metadata(\@metadata, "my_file.txt", ['EnsemblMetazoa'], $dump_all);

Description

Base class for rendering details from an instance of Bio::EnsEMBL::MetaData::GenomeInfo. 
Designed for dumping to multiple per-division files in parallel including a common "all" 
file, (using start, write_metadata and end) or for one-off use (using dump_metadata).

See-also

Bio::EnsEMBL::MetaData::MetaDataDumper::JsonMetaDataDumper Bio::EnsEMBL::MetaData::MetaDataDumper::TextMetaDataDumper Bio::EnsEMBL::MetaData::MetaDataDumper::TT2MetaDataDumper Bio::EnsEMBL::MetaData::MetaDataDumper::XMLMetaDataDumper Bio::EnsEMBL::MetaData::MetaDataDumper::UniProtReportDumper

Definition at line 49 of file MetaDataDumper.pm.

Available Methods

protected void _write_metadata_to_file ()
public void dump_metadata ()
public void end ()
public logger ()
public Hashref metadata_to_hash ()
public new ()
public void start ()
public void write_metadata ()
public String yesno ()

Method Documentation

protected void Bio::EnsEMBL::MetaData::MetaDataDumper::_write_metadata_to_file ( )
  Arg        : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo
  Arg        : File handle to write to
  Description: Stub for writing to a file - implement in subclasses
  Returntype : none
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::MetaData::MetaDataDumper::JsonMetaDataDumper, Bio::EnsEMBL::MetaData::MetaDataDumper::TextMetaDataDumper, Bio::EnsEMBL::MetaData::MetaDataDumper::UniProtReportDumper, and Bio::EnsEMBL::MetaData::MetaDataDumper::XMLMetaDataDumper.

public void Bio::EnsEMBL::MetaData::MetaDataDumper::dump_metadata ( )
  Description: Write supplied metadata to file
  Arg        : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo
  Arg        : File to write to
  Arg        : Arrayref of divisions
  Arg        : Whether to dump to "all" file
  Returntype : none
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public void Bio::EnsEMBL::MetaData::MetaDataDumper::end ( )
  Description: Stop writing to output file(s) and close handles
  Returntype : none
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::MetaData::MetaDataDumper::JsonMetaDataDumper, and Bio::EnsEMBL::MetaData::MetaDataDumper::XMLMetaDataDumper.

public Bio::EnsEMBL::MetaData::MetaDataDumper::logger ( )

Undocumented method

Code:
click to view
public Hashref Bio::EnsEMBL::MetaData::MetaDataDumper::metadata_to_hash ( )
  Description: Turn metadata into hash
  Arg        : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo
  Returntype : Hashref
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view
public Bio::EnsEMBL::MetaData::MetaDataDumper::new ( )

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::MetaData::MetaDataDumper::JsonMetaDataDumper, Bio::EnsEMBL::MetaData::MetaDataDumper::TextMetaDataDumper, Bio::EnsEMBL::MetaData::MetaDataDumper::TT2MetaDataDumper, Bio::EnsEMBL::MetaData::MetaDataDumper::UniProtReportDumper, and Bio::EnsEMBL::MetaData::MetaDataDumper::XMLMetaDataDumper.

public void Bio::EnsEMBL::MetaData::MetaDataDumper::start ( )
  Description: Start writing to output file(s)
  Arg        : Arrayref of strings representing divisions to dump
  Arg        : Basename of file to write to
  Arg        : Whether to dump to "all" file
  Returntype : none
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::MetaData::MetaDataDumper::JsonMetaDataDumper, Bio::EnsEMBL::MetaData::MetaDataDumper::TextMetaDataDumper, Bio::EnsEMBL::MetaData::MetaDataDumper::UniProtReportDumper, and Bio::EnsEMBL::MetaData::MetaDataDumper::XMLMetaDataDumper.

public void Bio::EnsEMBL::MetaData::MetaDataDumper::write_metadata ( )
  Arg        : Arrayref of Bio::EnsEMBL::MetaData::GenomeInfo
  Arg        : Division to write to
  Description: Write metadata to division files
  Returntype : none
  Exceptions : none
  Caller     : general
  Status     : Stable
 
Code:
click to view
public String Bio::EnsEMBL::MetaData::MetaDataDumper::yesno ( )
  Description: Turn defined/integer into Y/N
  Arg        : Integer 1/0
  Returntype : String
  Exceptions : none
  Caller     : internal
  Status     : Stable
 
Code:
click to view

The documentation for this class was generated from the following file: