Hatena::Groupbioruby

"aac".translate #=> "N" このページをアンテナに追加 RSSフィード

2007-05-21Ensembl API

Ensembl API for ruby (on ActiveRecord)

|  Ensembl API for ruby (on ActiveRecord) - "aac".translate #=> "N" を含むブックマーク はてなブックマーク -  Ensembl API for ruby (on ActiveRecord) - "aac".translate #=> "N"  Ensembl API for ruby (on ActiveRecord) - "aac".translate #=> "N" のブックマークコメント

Jan Aerts commited a Ensembl ruby API for the http://bioruby-annex.rubyforge.org.

screenshot

How to use script/example_emsembl.rb

  1. Provides a core db variable in a file (cf. coredb.rb).
$ENSEMBL_CORE_DATABASE = 'homo_sapiens_core_44_36f'
  1. Set a library path and required files.
bioruby-annex/ensembl-api% ruby -I lib -r coredb.rb -r lib/bio/api/enxembl script/example_ensembl.rb
--- !ruby/object:Bio::Api::Ensembl::Core::SeqRegion 
attributes:
  name: "1"
  coord_system_id: "17"
  length: "247249719"
  seq_region_id: "226034"
Number of simple features: 0
--- 
...
トラックバック - http://bioruby.g.hatena.ne.jp/nakao_mitsuteru/20070521

2007-04-11

GO Database on ActiveRecord plugin released.

|  GO Database on ActiveRecord plugin released. - "aac".translate #=> "N" を含むブックマーク はてなブックマーク -  GO Database on ActiveRecord plugin released. - "aac".translate #=> "N"  GO Database on ActiveRecord plugin released. - "aac".translate #=> "N" のブックマークコメント

I released GO Database on ActiveRecord, an active record models for the GO Database at the BioRuby Rails Plugins. The GO Database is the backend RDB for Amigo, the gene ontology broswer. The plugin works as an alternative SQL query interface for the GO Database.

screenshot screenshot screenshot screenshot

To install the go_database Rails plugin, on a rails application directory,

% script/plugin source svn://rubyforge.org/var/svn/bioruby-annex/rails/plugins/
% script/plugin list
% script/plugin install go_database

.

RDoc manual is available.

% cd vendor/plugins/go_database
% rake rdoc

After that, open rdoc/index.html.

トラックバック - http://bioruby.g.hatena.ne.jp/nakao_mitsuteru/20070411

2007-04-10

UniProt on ActiveRecord plugin released

|  UniProt on ActiveRecord plugin released - "aac".translate #=> "N" を含むブックマーク はてなブックマーク -  UniProt on ActiveRecord plugin released - "aac".translate #=> "N"  UniProt on ActiveRecord plugin released - "aac".translate #=> "N" のブックマークコメント

I released UniProt on ActiveRrcord a rails plugin. The plugin distributed via subversion repository at BioRuby Rails Plugins (bioruby-annex).

screenshot screenshot screenshot

Add the bioruby-annex subversion repository to the plugin sources.

% script/plugin source svn://rubyforge.org/var/svn/bioruby-annex/rails/plugins/
% script/plugin list | egrep uniprot
uniprot           svn://rubyforge.org/var/svn/bioruby-annex/rails/plugins/uniprot/

Install the uniprot plugin form the bioruby-annex subversion repository.

% script/plugin install uniprot

Generate uniprot files.

% script/generate uniprot 
% script/generate uniprot add_uniprot_models

Build RDoc.

% cd vendor/plugins/uniprot
% rake rdoc

See the RDoc generated for more details of the models and schema.

トラックバック - http://bioruby.g.hatena.ne.jp/nakao_mitsuteru/20070410

2007-04-08

Update UniProt release 10 (6 Martch 2007) on ActiveRecord

|  Update UniProt release 10 (6 Martch 2007) on ActiveRecord - "aac".translate #=> "N" を含むブックマーク はてなブックマーク -  Update UniProt release 10 (6 Martch 2007) on ActiveRecord - "aac".translate #=> "N"  Update UniProt release 10 (6 Martch 2007) on ActiveRecord - "aac".translate #=> "N" のブックマークコメント

UniProt release 10 released on 6 March 2007. To up to data the UniProt on ActiveRecord, some codes need to update.

screenshot screenshot screenshot


UniProt chaged the ID line format at the previous release (UniProtKB release 9.0 of 31-Oct-2006). The CVS HEAD version of bioruby supported the lastest uniprot format.

Import the ralatest UniProt/SwissProt into my mysql via ActiveRecord.

Download the latest version of uniprot_sprot.dat.

% curl -O ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.dat.gz

Execute an importing rake script.

% rake uniprot:import
...
rake uniprot:import  34054.50s user 1845.74s system 55% cpu 18:07:24.06 total

Too many time spent. :(

I beleve such waste of time may be reduced by ActiveRecord.transaction method.

Using script/console at the uniprot rails directory,

>> Entry.count
=> 263525
>> Os.find_by_name("Homo sapiens").entries.size
=> 16053

It seems to work fine.

Dump uniprot_sprot.dat from the mysql database.

% rake uniprot:dump
mysqldump -uroot uniprot_development > db/uniprot_development.dump
% du -sh db/uniprot_development.dump
904M    uniprot_development.dump
% gzip -9 db/uniprot_development.dump
% du -sh db/uniprot_development.dump.gz
179M    uniprot_development.dump.gz
トラックバック - http://bioruby.g.hatena.ne.jp/nakao_mitsuteru/20070408