Module Discussion:Bio::SeqIO::fasta

From BioPerl
Jump to: navigation, search

How do I discover that, for example, an object of this class supports the id method? --DanBolser 14:01, 24 April 2009 (UTC)

Maybe the following?

$foo->can('id'); # direct method test
$foo->isa('Bio::PrimarySeqI'); # if you want to check interface

The name id is fairly vague (what kind of ID is it?); Bio::PrimarySeqI indicates it should be just a synonym for display_id(), which is the common human-readable name for the sequence. Several interfaces do have more explicitly defined methods for IDs though; Bio::PrimarySeqI, for instance, also has primary_id(). --Chris Fields 21:23, 24 April 2009 (UTC) (just biding time until we can write these as mixins).

Personal tools
Namespaces
Variants
Actions
Main Links
documentation
community
development
Toolbox