[Bioperl-l] Re: Integrating caBIOperl with BIOperl
Ewan Birney
birney at ebi.ac.uk
Tue Oct 12 04:06:49 EDT 2004
On Mon, 11 Oct 2004, Jiang, Shan (NIH/NCI) wrote:
>
> Hi Ewan,
>
> I would like to introduce myself. I am a colleage of Gene Levinson at the
> National Cancer Institue in the US. I am the original developer of
> caBIOperl, which Gene presented at BOSC '04. I believe Gene talked to you
> quite extensively during the meeting as well. (Gene asked me to say hi!)
>
> Currently, I am undertaking the task of integrating caBIOperl with
> BIOperl.Gene indicated that you would be a great source to talk to. I am in
> the process of learning BIOperl before deciding how to proceed. So I would
> much appreciate your help in learning BIOperl as well as looking into
> possible ways of integrating caBIOperl with BIOperl.
>
Great - I'm cc'ing this message to the main bioperl list to check I give
you the best advice!
> Let me start asking some questions to start the ball rolling.
>
> 1. Has similar kinds of integration work been done before? If so is there a
> general recommended approach?
The recommendation is definitely to have an caBIOperl "bridge" to Bioperl
objects. The main ones you want to have are Bio::SeqI,
Bio::DB::RandomAccessI and Bio::AnnotationCollectionI and Bio::SeqFeatureI
The "I" means interface (a bit like Java)
In each case you would have wrapper classes that has-a caBIOPerl object
and is-a Bioperl object, for example, imagining the caBIOPerl sequence
object has methods "human_readable_name" and "sequence_as_string" (of
course, they might have something completely different...)
package Bio::caBIOBridge::Seq;
@ISA = qw( Bio::SeqI );
...
...
# Bio::SeqI isa Bio::PrimarySeqI, and needs to implement
# display_id. this should give back the human readable name
sub display_id {
my $obj = shift;
# the caBIOPerl method is "human_readable_name"
return $obj->{'_cabioperl_object'}->human_readable_name()
}
# Bio::SeqI needs to implement seq
sub seq {
return $obj->{'_cabioperl_object'}->sequence_as_string()
}
etc etc
This is, BTW, something I am planning to do with Ensembl as - make an
Ensembl-Bioperl bridge.
> 2. Do you have a repository where people can just "donate" their code into?
I would suggest that the caBIO-Bioperl bridge was its own cvs module and
donated into CPAN. You could run the cvs module at Bioperl.org or do it in
your own shop - entirely up to you.
> 3. caBIOperl has its own object model, if the end vision is to integrate
> this model with BIOperl, how should I proceed?
see above
> 4. Can I get access to the CVS repository?
>
You shouldn't need access to the bioperl cvs repository to come up with
some working code - if you want to have the caBio-Bioperl bridge
repository hosted at bioperl.org that's feasible, but probably building
some proof-of-concept classes first off would be great.
A great first step would be if someone could write a script like:
use Bio::caBIOBridge::DBAccess;
use Bio::SeqIO;
# default to well known caBio server
$db = Bio::caBIOBridge::DBAccess->new();
$ca_wrapped_seq = $db->get_Seq_by_id('some_id');
# $ca_wrapped_seq is Bio::SeqI object but is actually a thin wrapper over
# caBIO objects
# Bio::SeqIO is a Bioperl object writer that works with Bio::SeqI
# compliant objects
$seqout = Bio::SeqIO->new( -format => 'EMBL');
# Here we see the bridge in action!
$seqout->write_seq($ca_wrapped_seq);
> I am not sure how familiar you are with caBIOperl. So if you have any
> question, please do not hesistate to ask me.
>
> Regards,
> Shan Jiang
> (Contractor)
>
>
More information about the Bioperl-l
mailing list