[Bioperl-l] Gbrowse file uploads, bigwig and chromosome sizes files

Jim Hu jimhu at tamu.edu
Mon Apr 30 13:38:23 EDT 2012

I'm not sure how many of our issues are gbrowse-specific vs. more general bioperl issues, so I'm cross-posting to both lists.

We think we've traced our problems uploading wiggle files to our gbrowse to the failure to create the chromosome.size file.  

Short version: 
- what is supposed to be in the locationlist? Chromosomes only or just genes?
- why does the chromosome sizes try to get everything in the locationlist, whether or not it's a chromosome?

Long version:

Our E. coli MG1655 database was loaded several years ago with 

bp_seqfeature_load.pl -d gb_MG1655_jh -f -c NC_000913.gb.gff NC_000913.gb.fasta -u <user> -p <password>

The mysql database has 4,146 entries in the locationlist where the first one is for the chromosome and the others are named for genes.  When we ask Gbrowse to generate the chromosome sizes file, instead of doing what I expect (look up the reference feature names), it tries to get the size of every feature in the locationlist.  I can't actually find the fasta file I used.

When this happens, the eval in Bio::Graphics::Broser2::Dataloader dies because it does not seem to be passing allow_aliases to this subroutine in Bio::DB::Seqfeature::Store:: DBI::mysql

sub _name_sql {
  my $self = shift;
  my ($name,$allow_aliases,$join) = @_;
  my $name_table   = $self->_name_table;

  my $from  = "$name_table as n";
  my ($match,$string) = $self->_match_sql($name);

  my $where = "n.id=$join AND n.name $match";
  $where   .= " AND n.display_name>0" unless $allow_aliases;
  return ($from,$where,'',$string);

Here's the backtrace:

CHROMOSOME SIZES at /usr/local/share/perl/5.10.1/Bio/DB/SeqFeature/Store/DBI/mysql.pm line 942, referer:

Bio::DB::SeqFeature::Store::DBI::mysql::_name_sql('Bio::DB::SeqFeature::Store::DBI::mysql=HASH(0xb2bfed0)', 'b0001', undef, 'f.id') called at /usr/local/share/perl/5.10.1/Bio/DB/SeqFeature/Store/DBI/mysql.pm

Bio::DB::SeqFeature::Store::DBI::mysql::_features('Bio::DB::SeqFeature::Store::DBI::mysql=HASH(0xb2bfed0)', '-name', 'b0001', '-class', undef, '-aliases', undef,

Bio::DB::SeqFeature::Store::get_features_by_name('Bio::DB::SeqFeature::Store::DBI::mysql=HASH(0xb2bfed0)', '-name', 'b0001') called at /usr/local/share/perl/5.10.1/Bio/DB/SeqFeature/Store.pm line

Bio::DB::SeqFeature::Store::segment('Bio::DB::SeqFeature::Store::DBI::mysql=HASH(0xb2bfed0)', 'b0001') called at /usr/local/lib/perl/5.10.1/Bio/Graphics/Browser2/DataLoader.pm line 171,

eval {...} called at /usr/local/lib/perl/5.10.1/Bio/Graphics/Browser2/DataLoader.pm line 169,

Bio::Graphics::Browser2::DataLoader::generate_chrom_sizes('Bio::Graphics::Browser2::DataLoader=HASH(0xb2bfbd0)', '/var/tmp/gbrowse2/chrom_sizes/MG1655.sizes') called at /usr/local/lib/perl/5.10.1/Bio/Graphics/Browser2/DataLoader.pm line 143,

Bio::Graphics::Browser2::DataLoader::chrom_sizes('Bio::Graphics::Browser2::DataLoader=HASH(0xb2bfbd0)') called at /usr/local/lib/perl/5.10.1/Bio/Graphics/Browser2/Action.pm line 1117, referer:

Bio::Graphics::Browser2::Action::ACTION_chrom_sizes('Bio::Graphics::Browser2::Action=REF(0xa993ea0)', 'CGI=HASH(0xaf57450)') called at /usr/local/lib/perl/5.10.1/Bio/Graphics/Browser2/Render.pm line 427,

Bio::Graphics::Browser2::Render::asynchronous_event('Bio::Graphics::Browser2::Render::HTML=HASH(0xaf590d8)') called at /usr/local/lib/perl/5.10.1/Bio/Graphics/Browser2/Render.pm line 356, referer:

Bio::Graphics::Browser2::Render::run_asynchronous_event('Bio::Graphics::Browser2::Render::HTML=HASH(0xaf590d8)') called at /usr/local/lib/perl/5.10.1/Bio/Graphics/Browser2/Render.pm line 274, referer:

Bio::Graphics::Browser2::Render::run('Bio::Graphics::Browser2::Render::HTML=HASH(0xaf590d8)') called at /usr/lib/cgi-bin/gb2/gbrowse line 50, referer:

Jim Hu
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128

More information about the Bioperl-l mailing list