GMOD

GBrowse (DasI) Presentation

This Wiki page is an edited version of Scott’s presentation.

Contents

Create the database
$ perl Makefile.PL
$ make
$ sudo make install
$ make load_schema
$ make prepdb             # now with Xenopus!
$ make ontologies        # load rel, SO, featureprop
Problem 1 - Loading Data

Create some GFF3 from the specifications:

fake_chromosome example chromosome 1  15017 .  .  . ID=fake_chromosome;Name=fake_chromosome
fake_chromosome example gene   13691  14720 .  +  . ID=xfile;Name=xfile;Alias=mulder,scully;Note=A test gene for GMOD meeting
fake_chromosome example mRNA   13691  14720 .  +  . ID=xfile_mRNA;Parent=xfile
fake_chromosome example exon   13691  13767 .  +  . Parent=xfile_mRNA
fake_chromosome example exon   14687  14720 .  +  . Parent=xfile_mRNA
fake_chromosome example gene   12648  13136 .  +  . ID=x-men

Gene inserted as GFF3 using a standard bulk loader:

$ gmod_bulk_load_gff3.pl -g sample.gff3

…lots of output…

Adaptor Components
Use Bio::DB::Das::Chado
use Bio::DB::Das::Chado;
 
my $chado = Bio::DB::Das::Chado->new(
      -dsn => "dbi:Pg:dbname=test",
      -user=> "scott",
      -pass=> "" ) || die "no new chado";
 
my $gene_name = 'xfile';
 
my ($gene_fo) = $chado->get_features_by_name($gene_name);
Problem 2 - Use Some Accessors
print "symbol: "      .  $gene_fo->display_name."\n";
print "synonyms: "  .  join(', ',$gene_fo->synonyms)."\n";
print "description: " . $gene_fo->notes."\n";
print "type: "        .     $gene_fo->type."\n";
 
my ($mRNA) = $gene_fo->sub_SeqFeature();
my @exons  = $mRNA->sub_SeqFeature();
 
for my $exon (@exons) {
    next unless ($exon->type->method eq 'exon');
    $exon_count++;
    print "exon$exon_count start: " . $exon->start."\n";
    print "exon$exon_count end: "  . $exon->end.  "\n";
    $cds_seq .= $exon->seq->seq; # the first seq call returns a Bio::Seq object, the second gets the DNA string from Bio::Seq
}
Bulk Output
 my $gene_name = 'x-*';
 
 my @genes = $chado->get_features_by_name(
                 -name => $gene_name,
                 -class=> 'gene' );
 
 for my $gene (@genes) {
     print join("\t",
                $gene->feature_id,
                $gene->display_name,
                $gene->organism),"\n";
 }

Or see your report in GBrowse

Advantages
Conclusion

Categories:

Documentation

Community

Tools