misshie / bioruby-ucsc-api Goto Github PK
View Code? Open in Web Editor NEWRuby UCSC API: An API for the UCSC Genome Database
License: MIT License
Ruby UCSC API: An API for the UCSC Genome Database
License: MIT License
Hi,
Since this is an important biogem,
please add bio-ucsc to travis-ci. Simply copy the .travis.yml file to the tree, and register the project with Travis, using your github acount. The next push will run the test system.
The mysql gem does not support ruby version 2.4 and is not actively developed now. Probably I should switch from the mysql gem to the mysql2 gem. For a while, please use older Ruby such as Ruby 2.3.3. I am sorry for any inconvenience this issue may cause.
See also:
https://stackoverflow.com/questions/41520996/mysql-gem-install-error-on-ruby-2-4
I have been using this gem for some time with no problems. Suddenly it cannot allocate memory. I tried upgrading to 0.6.1 but it did not make a difference.
Rails 4.0.2
ruby 1.9.3p327 (2012-11-10 revision 37606) [i686-linux]
1.9.1 :003 > seqfile = Ucsc::File::Twobit.open("/home/assay/apps/assay/shared/bin/hg19/hg19.2bit")
NoMemoryError: failed to allocate memory
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/bio-ucsc-api-0.6.1/lib/bio-ucsc/file/twobit.rb:37:in `read'
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/bio-ucsc-api-0.6.1/lib/bio-ucsc/file/twobit.rb:37:in `block in load'
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/bio-ucsc-api-0.6.1/lib/bio-ucsc/file/twobit.rb:37:in `open'
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/bio-ucsc-api-0.6.1/lib/bio-ucsc/file/twobit.rb:37:in `load'
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/bio-ucsc-api-0.6.1/lib/bio-ucsc/file/twobit.rb:59:in `open'
from (irb):3
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/railties-4.0.2/lib/rails/commands/console.rb:90:in `start'
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/railties-4.0.2/lib/rails/commands/console.rb:9:in `start'
from /home/assay/apps/assay/shared/bundle/ruby/1.9.1/gems/railties-4.0.2/lib/rails/commands.rb:62:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Hi.
The installation of mysql2 seems to fail.
At this time, it is Ruby 2.4. Is it similar? #6
Here is the error log.
Fetching activemodel-4.2.11.3.gem
Fetching tzinfo-1.2.9.gem
Fetching arel-6.0.4.gem
Fetching activesupport-4.2.11.3.gem
Fetching i18n-0.9.5.gem
Fetching safe_attributes-1.0.10.gem
Fetching activerecord-4.2.11.3.gem
Fetching mysql2-0.4.10.gem
Fetching bio-ucsc-api-0.6.5.gem
Fetching bio-genomic-interval-0.1.2.gem
Fetching activerecord-deprecated_finders-1.0.4.gem
Successfully installed arel-6.0.4
Successfully installed tzinfo-1.2.9
Successfully installed i18n-0.9.5
Successfully installed activesupport-4.2.11.3
Successfully installed activemodel-4.2.11.3
Successfully installed activerecord-4.2.11.3
Successfully installed safe_attributes-1.0.10
Building native extensions. This could take a while...
ERROR: Error installing bio-ucsc-api:
ERROR: Failed to build gem native extension.
current directory: /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mysql2-0.4.10/ext/mysql2
/home/kojix2/.rbenv/versions/3.1.0/bin/ruby -I /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0 -r ./siteconf20220114-62428-kqri37.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
checking for rb_big_cmp()... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/kojix2/.rbenv/versions/3.1.0/bin/$(RUBY_BASE_NAME)
--with-ruby-dir
--without-ruby-dir
--with-ruby-include
--without-ruby-include=${ruby-dir}/include
--with-ruby-lib
--without-ruby-lib=${ruby-dir}/lib
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysqlclient-dir
--without-mysqlclient-dir
--with-mysqlclient-include
--without-mysqlclient-include=${mysqlclient-dir}/include
--with-mysqlclient-lib
--without-mysqlclient-lib=${mysqlclient-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
/home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)
paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
^^^^^^
from /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `each'
from /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `flat_map'
from /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/3.1.0/mkmf.rb:1086:in `find_library'
from extconf.rb:95:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/mysql2-0.4.10/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/mysql2-0.4.10 for inspection.
Results logged to /home/kojix2/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/extensions/x86_64-linux/3.1.0/mysql2-0.4.10/gem_make.out
Hi, thanks for this awesome library!
I just wanted to let you know that I released bio-twobit yet another library to read 2bit files from ruby.
https://github.com/ruby-on-bioc/bio-twobit
This library is written in C extension and is expected to be fast. It may be used inside bioruby-ucsc-api if you like.
Feel free to create an issue on the project if anyone has feedback. Thanks!
If I try and retrieve a sequence that is all Ns by doing something like
puts hg19ref.find_by_interval("chr1:10-100")
or
puts hg19ref.subseq("chr1:10-100")
I get the following error:
ArgumentError: negative argument
from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:125:in *' from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:125:in
block in find_by_interval'
from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:117:in map' from /Users/morriwork/.rvm/gems/ruby-1.9.3-p125@methAnalysis/gems/bio-ucsc-api-0.5.1/lib/bio-ucsc/file/twobit.rb:117:in
find_by_interval'
from (irb):9
from /Users/morriwork/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `
I am using ruby 1.9.3-p125 and I installed bioruby-ucsc-api from the gem.
after implementing the hg19 tables, the hg18 tables should be implemented!
Many tables such as ncbiIncidentDB and wgEnsembleFooBar contains only a filename record pointing bigBed / bigWig files.
Some mechanism to support access to these files are required. Automatic download and caching is better.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.