[Bioperl-l] Re: Test writing

Hilmar Lapp hlapp at gmx.net
Wed Dec 28 12:39:15 EST 2005


On Dec 28, 2005, at 4:27 AM, Gabriel Valiente wrote:

> Regarding the test file for Bio::Tree::Draw::Cladogram, I just don't 
> know what to include in the test. The only thing this module does is 
> to produce a EPS file, and the only thing that comes to my mind is to 
> test equality of a precomputed EPS file and one produced on the fly 
> for the same input tree. Any suggestions are welcome.

If you can't read that file back in then yes I suppose all you can do 
is test for equality with a precomputed file. If the EPS is essentially 
an image though (as opposed to a vector graphics) then note the 
troubles that Lincoln had to go through for testing Bio::Graphics 
output because many systems (depending primarily on GD library version 
I guess) lead to correct but binary-wise slightly different image 
files. If you're in a similar situation then be prepared for asking 
people who see the test fail on their platform to send to you the file 
that's produced on their system so that you can adjust the test.

>
> By the way, can anybody briefly explain why is it necessary to include 
> prefixes like
>
> my $common = $t1->Bio::Tree::Compatible::common_labels($t2);

I don't know why you would want to do that if $t1 is already a 
Bio::Tree::Compatible instance (or the module name as a string will do 
fine too).

	-hilmar

>
> in t/Compatible.t, which already uses Bio::Tree::Compatible, instead 
> of just
>
> my $common = $t1->common_labels($t2);
>
> ???
>
> Thanks,
>
> Gabriel Valiente
>
>> This message is for module authors and for anyone looking for 
>> something to do for BioPerl.
>>
>> I've modified the 'maintenance/modules.pl --untested' code so that it 
>> reads in all test files, extracts 'use'd or 'required' Bio classes, 
>> now *recursively* marks all super classes and 'use'd classes as 
>> tested. In addition, I manually ignore all Bio::Search and 
>> Bio::SearchIO classes. That is because although there are extensive 
>> tests for modules in these name spaces, new classes are instantiated 
>> based on attributes to the constructor. This might be true to other 
>> classes, too. If this is the case, I can see two possible actions:
>>
>> 1. Add them to the list of ignored class names at the end of function 
>> 'untested' in the script.
>>
>> 2. If the classes are never called directly, rename them to start 
>> with lower case letter which by convention means that they are 
>> "component classes" like Bio::SeqIO::genbank.
>>
>>
>> All other classes should have tests written for them or - ultimately 
>> - removed from the repository.
>>
>> The aim of this exercise is to come up with a first pass list of 
>> BioPerl classes that do not have any tests written for them and get 
>> them written. The next pass will be to find untested methods within 
>> classes.
>>
>>
>> When writing tests, please follow conventions in existing files and 
>> remember to test all public methods. If you do not have a cvs login, 
>> post the new tests to bugzilla.bioperl.org, not to the list. We are 
>> more than happy to give cvs access to anyone committing more than a 
>> couple new tests.
>>
>>       -Heikki
>>
>>
>> List of BioPerl classes needing tests:
>>
>> Bio::Align::Utilities
>> Bio::Annotation::AnnotationFactory
>> Bio::Annotation::Target
>> Bio::DB::Ace
>> Bio::DB::Expression
>> Bio::DB::Fasta::Stream
>> Bio::DB::Flat::BDB
>> Bio::DB::Flat::BinarySearch
>> Bio::DB::GFF::ID_Iterator
>> Bio::DB::Universal
>> Bio::DB::XEMBLService
>> Bio::Expression::Contact
>> Bio::Expression::DataSet
>> Bio::Expression::FeatureGroup
>> Bio::Expression::FeatureGroup::FeatureGroupMas50
>> Bio::Expression::FeatureSet::FeatureSetMas50
>> Bio::Expression::Platform
>> Bio::Expression::Sample
>> Bio::FeatureIO
>> Bio::Graphics::FeatureFile::Iterator
>> Bio::Graphics::Glyph
>> Bio::Graphics::Util
>> Bio::Index::Fastq
>> Bio::Index::Hmmer
>> Bio::LiveSeq::IO::SRS
>> Bio::Location::AvWithinCoordPolicy
>> Bio::Location::NarrowestCoordPolicy
>> Bio::Map::Clone
>> Bio::Map::Contig
>> Bio::Map::FPCMarker
>> Bio::Map::OrderedPositionWithDistance
>> Bio::Map::Physical
>> Bio::Matrix::PSM::Psm
>> Bio::Matrix::PSM::PsmHeader
>> Bio::Matrix::Scoring
>> Bio::Ontology::InterProTerm
>> Bio::Ontology::Path
>> Bio::Ontology::SimpleGOEngine
>> Bio::OntologyIO::Handlers::InterProHandler
>> Bio::OntologyIO::Handlers::InterPro_BioSQL_Handler
>> Bio::OntologyIO::InterProParser
>> Bio::PrimarySeq::Fasta
>> Bio::Root::Err
>> Bio::Root::Global
>> Bio::Root::IOManager
>> Bio::Root::Utilities
>> Bio::Root::Vector
>> Bio::Root::Xref
>> Bio::SeqFeature::Gene::Promoter
>> Bio::SeqFeature::PositionProxy
>> Bio::SeqFeature::Tools::FeatureNamer
>> Bio::SeqFeature::Tools::IDHandler
>> Bio::SeqFeature::Tools::TypeMapper
>> Bio::SeqIO::FTHelper
>> Bio::Structure::SecStr::DSSP::Res
>> Bio::Structure::SecStr::STRIDE::Res
>> Bio::Taxonomy
>> Bio::Taxonomy::Taxon
>> Bio::Taxonomy::Tree
>> Bio::Tools::AlignFactory
>> Bio::Tools::Blast::HSP
>> Bio::Tools::Blast::HTML
>> Bio::Tools::Blast::Sbjct
>> Bio::Tools::Blat
>> Bio::Tools::Coil
>> Bio::Tools::ESTScan
>> Bio::Tools::Eponine
>> Bio::Tools::Fgenesh
>> Bio::Tools::Gel
>> Bio::Tools::Grail
>> Bio::Tools::HMM
>> Bio::Tools::Hmmpfam
>> Bio::Tools::Primer::Feature
>> Bio::Tools::Primer::Pair
>> Bio::Tools::Prints
>> Bio::Tools::Profile
>> Bio::Tools::PrositeScan
>> Bio::Tools::Run::GenericParameters
>> Bio::Tools::Seg
>> Bio::Tools::Signalp
>> Bio::Tools::Tmhmm
>> Bio::Tools::WWW
>> Bio::Tools::WebBlat
>> Bio::Tree::Compatible
>> Bio::Tree::Draw::Cladogram
>> Bio::Tree::NodeNHX
>> FeatureStore  # in Bio::DB::GFF::Adaptor::berkeleydb.pm
>> interpro   # class defined in Bio::SeqIO::interpro, mistake?
>>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------




More information about the Bioperl-l mailing list