[Bioperl-l] Bio::SeqIO can't guess the format of data from a pipe

Chris Fields cjfields at illinois.edu
Mon Aug 29 01:10:27 UTC 2011


On Aug 28, 2011, at 5:35 PM, Florent Angly wrote:

> Hi,
> 
> I implemented the format() getter method in Bio::SeqIO as discussed, essentially following the way proposed by Hilmar. The variant() method is not needed since Bio::SeqIO::fastq already has a get/set method for that.

Right, but the method could be used by other modules if it were moved to Bio::SeqIO. for instance.

> I noticed that there are plenty more Bio*IO modules that could benefit from having a format() method, e.g.:
>    Bio::AlignIO
>    Bio::ClusterIO
>    Bio::FeatureIO
>    Bio::MapIO
>    Bio::OntologyIO
>    Bio::SearchIO
>    Bio::TreeIO
>    Bio::Assembly::IO *
> The code could be copy-pasted for each of them but it is not very graceful. Is there a way we could have all these IO modules share the same format() method?

Move the method to Bio::Root::IO, the common base class for all of the above.

> * Note how the IO class for Bio::Assembly is called Bio::Assembly::IO, and not Bio::AssemblyIO like for other classes. This may be something to change in the future for consistency.
> 
> Florent

That's possible; one could take advantage of that for redesign/API issues if it were needed.

chris



More information about the Bioperl-l mailing list