Question: setting GBrowse database and query GFF3
2
gravatar for firoz.imtech
4.9 years ago by
firoz.imtech50
United States
firoz.imtech50 wrote:

(1) I have uploaded the genome fasta and GFF annotation in the mysql data using following command of Bio::DB::SeqFeature::Store database

./bp_seqfeature_load.pl -c -d WS240 -u xxx -p xxx c_elegans.PRJNA13758.WS240.genomic.fa c_elegans.PRJNA13758.WS240.annotations.gff3 

 

(2) Following tables are inserted into my database WS240

+-----------------+
| Tables_in_WS240 |
+-----------------+
| attribute       |
| attributelist   |
| feature         |
| locationlist    |
| meta            |
| name            |
| parent2child    |
| sequence        |
| typelist        |
+-----------------+

 

(3) Now I want to make query in the mysql to extract the sequence and its feature using following commands:

#!/usr/bin/perl
    use strict;


use Bio::DB::GFF;

my $db  = Bio::DB::GFF->new(-dsn   => 'dbi:mysql:database=WS240',
                             -user => 'XXX',
                             -pass => 'XXX',
                             -aggregators => 'gene_model{coding_exon,5_UTR,3_UTR/CDS}');

    my $gene_stream = $db->get_seq_stream('gene_model:curated');

    while (my $gene = $gene_stream->next_seq) {
        print $gene->name,"\n";
        for my $part ($gene->get_SeqFeatures) {
            print "\t",join("\t",$part->method,$part->start,$part->end),"\n";
        }
        print "\n";
}

 

(4) I am getting following error:

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Couldn't execute query SELECT  fref,fstart,fstop,fsource,fmethod,fscore,fstrand,fphase,gclass,gname,ftarget_start,ftarget_stop,fdata.fid,fdata.gid
 FROM fdata,ftype,fgroup
 WHERE   fgroup.gid = fdata.gid
  AND ftype.ftypeid = fdata.ftypeid
 AND  ((fmethod = ? AND fsource = ?) OR (fmethod = ? AND fsource = ?) OR (fmethod = ? AND fsource = ?) OR (fmethod = ? AND fsource = ?))
 ORDER BY fgroup.gname:
 Table 'WS240.fdata' doesn't exist

STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/share/perl/5.10.0/Bio/Root/Root.pm:368
STACK: Bio::DB::GFF::Adaptor::dbi::caching_handle::do_query /usr/local/share/perl/5.10.0/Bio/DB/GFF/Adaptor/dbi/caching_handle.pm:123
STACK: Bio::DB::GFF::Adaptor::dbi::range_query /usr/local/share/perl/5.10.0/Bio/DB/GFF/Adaptor/dbi.pm:627
STACK: Bio::DB::GFF::Adaptor::dbi::get_features_iterator /usr/local/share/perl/5.10.0/Bio/DB/GFF/Adaptor/dbi.pm:1008
STACK: Bio::DB::GFF::_features /usr/local/share/perl/5.10.0/Bio/DB/GFF.pm:3476
STACK: Bio::DB::GFF::features /usr/local/share/perl/5.10.0/Bio/DB/GFF.pm:1091
STACK: Bio::DB::GFF::get_seq_stream /usr/local/share/perl/5.10.0/Bio/DB/GFF.pm:1132
STACK: ./aa.pl:12

(5) Could you kindly suggest me what is wrong with the script (3), what is the best approach to make query with mysql. I also used the  bp_bulk_load_gff.pl (Bio::DB::GFF) to upload the GFF file into mysql but not working well.

Thanks

Firoz

 

 

ADD COMMENTlink modified 4.9 years ago by Michael Dondrup46k • written 4.9 years ago by firoz.imtech50
1
gravatar for Michael Dondrup
4.9 years ago by
Bergen, Norway
Michael Dondrup46k wrote:

See this thread and the answer by Timothy Parnell: http://generic-model-organism-system-database.450254.n5.nabble.com/Getting-gbrowse-syn-to-work-with-MySQL-td5519255.html

You should use bp_bulk_load_gff.pl with Bio::DB::GFF and bp_seqfeature_load.pl with Bio::DB::SeqFeature::Store. However your script uses Bio::DB::GFF with bp_seqfeature_load.pl. You need to change one of them to conform.

ADD COMMENTlink modified 4.9 years ago • written 4.9 years ago by Michael Dondrup46k
1

Just to add a bit here, Bio::DB::GFF isn't really supported anymore and it doesn't support all the features of GFF3.  I highly suggest using Bio::DB::SeqFeature::Store.

ADD REPLYlink written 4.9 years ago by Chris Fields2.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 818 users visited in the last hour