The document discusses Modware, an object-oriented Perl interface for querying and updating the Chado database schema. It provides semantically sensible classes and methods that encapsulate Chado's business rules for easier and more efficient development. An example demonstrates storing a gene with exons in Chado using Modware and generating a web page to display the gene details.
UiPath Community: Communication Mining from Zero to Hero
An Object-oriented Perl Interface to the Chado Schema Using Modware
1. Modware: An Object-oriented Perl Interface to the Chado Schema Eric Just Senior Bioinformatics Scientist dictyBase: http://dictybase.org Northwestern University Generic Model Organism Database Project (GMOD)
2.
3.
4.
5.
6.
7.
8. A Simple Gene Example A gene is a region on a chromosome that encloses one or more transcript objects. An mRNA is a protein-coding transcript is composed of one or more exons which have coordinates on a chromosome. Chromosome 3
11. #!/usr/bin/perl use Modware::Feature; use CGI; my $id = CGI::param(‘primary_id'); my $count = 1; # Get all data from database my $feature = new Modware::Feature( -primary_id => $id ); my $chromosome = $feature->reference_feature()->name(); my $gene = $feature->gene()->name(); my @exons = $feature->bioperl()->exons(); my $sequence = $feature->sequence( -type => ’protein', -format => 'fasta' ); # print the report print CGI->header; print "<pre>"; print $id." is on chromosome $chromosome"; print " and is the gene $gene"; # print the number and position of each exon foreach my $exon (@exons) { print "Exon $count. start=".$exon->start(). " end=".$exon->end().""; $count++; } print $sequence; print "</pre>";
20. # USE CASE: Add a description, dbxref, and an exon my $transcript = new Modware::Feature( -primary_id => 'DDB0233595' ); $transcript->description( 'Gene model derived from AU12345' ); $transcript->add_external_id( -source => 'GenBank Accession Number', -id => 'AU12345' ); # call the bioperl method to retrieve bioperl representation of object # need this to view/edit exon structure $bioperl = $transcript->bioperl(); # here, we are manipulating a Bio::SeqFeature::Gene object # shift the last exon back a little bit (to lose stop codon) [$bioperl->exons()]->[2]->start( 281050 ); # create a new exon and add it to the feature my $exon = Bio::SeqFeature::Gene::Exon->new( -start => 280921, -end => 280959, -strand => -1 ); $exon->is_coding(1); $bioperl->add_exon($exon); # update writes everything to the database $transcript->update();