Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::Utils::SeqDumper Class Reference

List of all members.


Class Summary

Synopsis

  $seq_dumper = Bio::EnsEMBL::Utils::SeqDumper-\>new();

  # don't dump snps or repeats
  $seq_dumper-\>disable_feature_type('repeat');
  $seq_dumper-\>disable_feature_type('variation');

  # dump EMBL format to STDOUT
  $seq_dumper-\>dump( $slice, 'EMBL' );

  # dump GENBANK format to a file
  $seq_dumper-\>dump( $slice, 'GENBANK', 'out.genbank' );

  # dump FASTA format to a file
  $seq_dumper-\>dump( $slice, 'FASTA', 'out.fasta' );

Description

A relatively simple and lite-weight flat file dumper for Ensembl slices.
The memory efficiency could be improved and this is currently not very
good for dumping very large sequences such as whole chromosomes.
 

Definition at line 32 of file SeqDumper.pm.

Available Methods

protected _date_string ()
protected void _dump_feature_table ()
public void attach_database ()
public void disable_feature_type ()
public void dump ()
public void dump_embl ()
public void dump_fasta ()
public void dump_genbank ()
public void enable_feature_type ()
public String features2location ()
public
Bio::EnsEMBL::DBSQL::DBAdaptor 
get_database ()
public void is_enabled ()
public
Bio::EnsEMBL::Utils::SeqDumper 
new ()
public print ()
public
Bio::EnsEMBL::DBSQL::DBAdaptor 
remove_database ()
public transcript_to_codon_start ()
public write ()
public write_embl_seq ()
public write_genbank_seq ()

Method Documentation

protected Bio::EnsEMBL::Utils::SeqDumper::_date_string ( )

Undocumented method

Code:
click to view
protected void Bio::EnsEMBL::Utils::SeqDumper::_dump_feature_table ( )
  Arg [1]    : Bio::EnsEMBL::Slice slice
  Example    : none
  Description: Helper method used to dump feature tables used in EMBL, FASTA,
               GENBANK.  Assumes formating of file handle has been setup
               already to use $FEAT and $VALUE values.
  Returntype : none
  Exceptions : none
  Caller     : internal
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::attach_database ( )
  Arg [1]    : string name
  Arg [2]    : Bio::EnsEMBL::DBSQL::DBAdaptor
  Example    : $seq_dumper->attach_database('estgene', $estgene_db);
  Description: Attaches a database to the seqdumper that can be used to 
               dump data which is external to the ensembl core database.
               Currently this is necessary to dump est genes and vega genes
  Returntype : none
  Exceptions : thrown if incorrect argument is supplied
  Caller     : general
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::disable_feature_type ( )
  Arg [1]    : string $type
  Example    : $seq_dumper->disable_feature_type('genes');
  Description: Disables the dumping of a specific type of feature
  Returntype : none
  Exceptions : warn if an invalid feature type is passed,
               thrown if no feature type is passed
  Caller     : general
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::dump ( )
  Arg [1]    : Bio::EnsEMBL::Slice slice
               The slice to dump
  Arg [1]    : string $format
               The name of the format to dump
  Arg [2]    : (optional) $outfile
               The name of the file to dump to. If no file is specified STDOUT
               is used
  Example    : $seq_dumper->dump($slice, 'EMBL');
  Description: Dumps a region of a genome specified by the slice argument into
               an outfile of the format $format
  Returntype : none
  Exceptions : thrown if slice or format args are not supplied
  Caller     : general
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::dump_embl ( )
  Arg [1]    : Bio::EnsEMBL::Slice
  Arg [2]    : IO::File $FH
  Arg [3]    : optional sequence string
  Example    : $seq_dumper->dump_embl($slice, $FH);
  Description: Dumps an EMBL flat file to an open file handle
  Returntype : none
  Exceptions : none
  Caller     : dump
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::dump_fasta ( )
  Arg [1]    : Bio::EnsEMBL::Slice
  Arg [2]    : IO::File $FH
  Example    : $seq_dumper->dump_fasta($slice, $FH);
  Description: Dumps an FASTA flat file to an open file handle
  Returntype : none
  Exceptions : none
  Caller     : dump
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::dump_genbank ( )
  Arg [1]    : Bio::EnsEMBL::Slice
  Arg [2]    : IO::File $FH
  Example    : $seq_dumper->dump_genbank($slice, $FH);
  Description: Dumps a GENBANK flat file to an open file handle
  Returntype : none
  Exceptions : none
  Caller     : dump
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::enable_feature_type ( )
  Arg [1]    : string $type
  Example    : $seq_dumper->enable_feature_type('similarity');
  Description: Enables the dumping of a specific type of feature
  Returntype : none
  Exceptions : warn if invalid feature type is passed,
               thrown if no feature type is passed
  Caller     : general
 
Code:
click to view
public String Bio::EnsEMBL::Utils::SeqDumper::features2location ( )
  Arg [1]    : listref of Bio::EnsEMBL::SeqFeatures
  Example    : $location = $self->features2location(\@features);
  Description: Constructs an EMBL location string from a list of features
  Returntype : string
  Exceptions : none
  Caller     : internal
 
Code:
click to view
public Bio::EnsEMBL::DBSQL::DBAdaptor Bio::EnsEMBL::Utils::SeqDumper::get_database ( )
  Arg [1]    : string $name
  Example    : $db = $seq_dumper->get_database('vega');
  Description: Retrieves a database that has been attached to the 
               seqdumper via the attach database call.
  Returntype : Bio::EnsEMBL::DBSQL::DBAdaptor
  Exceptions : thrown if incorrect argument is supplied
  Caller     : dump_feature_table
 
Code:
click to view
public void Bio::EnsEMBL::Utils::SeqDumper::is_enabled ( )
  Arg [1]    : string $type 
  Example    : do_something() if($seq_dumper->is_enabled('gene'));
  Description: checks if a specific feature type is enabled
  Returntype : none
  Exceptions : warning if invalid type is passed, 
               thrown if no type is passed 
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Utils::SeqDumper Bio::EnsEMBL::Utils::SeqDumper::new ( )
  Arg [1]    : none
  Example    : $seq_dumper = Bio::EnsEMBL::Utils::SeqDumper->new;
  Description: Creates a new SeqDumper 
  Returntype : Bio::EnsEMBL::Utils::SeqDumper
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Utils::SeqDumper::print ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::DBSQL::DBAdaptor Bio::EnsEMBL::Utils::SeqDumper::remove_database ( )
  Arg [1]    : string $name 
  Example    : $db = $seq_dumper->remove_database('estgene');
  Description: Removes a database that has been attached to the seqdumper
               via the attach database call.  The database that is removed
               is returned (or undef if it did not exist).
  Returntype : Bio::EnsEMBL::DBSQL::DBAdaptor
  Exceptions : thrown if incorrect argument is supplied
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Utils::SeqDumper::transcript_to_codon_start ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Utils::SeqDumper::write ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Utils::SeqDumper::write_embl_seq ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Utils::SeqDumper::write_genbank_seq ( )

Undocumented method

Code:
click to view

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