Jrubyc problem

Hallo,
I installed Bioruby with

jruby setup.rb.

then I run this script with jruby

#!/usr/bin/env jruby

require ‘bio’

creating a Bio::Sequence::NA object containing ambiguous alphabets

ambiguous_seq = Bio::Sequence::NA.new(“atgcyrwskmbdhvn”)

show the contents and class of the DNA sequence object

p ambiguous_seq # => “atgcyrwskmbdhvn”
p ambiguous_seq.class # => Bio::Sequence::NA

convert the sequence to a Regexp object

p ambiguous_seq.to_re # =>
/atgc[tc][ag][at][gc][tg][ac][tgc][atg][atc][agc][atgc]/
p ambiguous_seq.to_re.class # => Regexp

example to match an ambiguous sequence to the rigid sequence

att_or_atc = Bio::Sequence::NA.new(“aty”).to_re
puts “match” if att_or_atc.match(Bio::Sequence::NA.new(“att”))
if Bio::Sequence::NA.new(“atc”) =~ att_or_atc
puts “also match”
end

without any problems.

After this I run it with Java and I have got following problem:

jrubyc s01.rb an then java -cp /home/mitlox/jruby-1.4.0/lib/jruby.jar:.
s01
Exception in thread “main” s01.rb:3:in `require’: no such file to load
– bio (LoadError)
from s01.rb:3
…internal jruby stack elided…
from Kernel.require(s01.rb:3)
from (unknown).(unknown)(:1)

What did I wrong?

Best regards,

On Fri, Feb 5, 2010 at 23:55, Fla As [email protected] wrote:

p ambiguous_seq.to_re.class # => Regexp

I’ve just installed bioruby as gem and it works adding require
‘rubygems’ at top. Both, plain .rb and compiled to .class


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Do:

jar -cf bioruby.jar bioruby.class

Then you can include bioruby.jar (which holds any other classes as
well) in your jruby project

To update the jar file

jar -uf bioruby.jar bioruby.class otherthings.class …

On Tue, Feb 9, 2010 at 1:31 PM, Fla As [email protected] wrote:

  http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

gem compiles Bioruby to class if yes how can I get a jar file of
Bioruby?

Jesús García Sáez wrote:

On Fri, Feb 5, 2010 at 23:55, Fla As [email protected] wrote:

p ambiguous_seq.to_re.class �# => Regexp

I’ve just installed bioruby as gem and it works adding require
‘rubygems’ at top. Both, plain .rb and compiled to .class


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Mon, Mar 1, 2010 at 6:55 AM, Fla As [email protected] wrote:

I did:
gem install bio
but in /jruby-1.4.0/lib/ruby/gems/1.8/gems/bio-1.4.0/lib/bio/ are only
rb files and not class files.

Where can I find bioruby.class and does this class file contain the
complete bioruby?

Do you need it in .class form? Generally Ruby applications ship in
source form.

Perhaps you can tell us what you’re trying to accomplish?

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I did:
gem install bio
but in /jruby-1.4.0/lib/ruby/gems/1.8/gems/bio-1.4.0/lib/bio/ are only
rb files and not class files.

Where can I find bioruby.class and does this class file contain the
complete bioruby?

Maarten M. wrote:

Do:

jar -cf bioruby.jar bioruby.class

Then you can include bioruby.jar (which holds any other classes as
well) in your jruby project

To update the jar file

jar -uf bioruby.jar bioruby.class otherthings.class …

Maybe class files could be faster than rb files and therefore I have
tried to use class files.

Charles Nutter wrote:

On Mon, Mar 1, 2010 at 6:55 AM, Fla As [email protected] wrote:

Perhaps you can tell us what you’re trying to accomplish?

  • Charlie

In JRuby, whether you run from .class files or .rb files, your
application code will eventually run as JVM bytecode. There’s no need
to compile to .class files to get better performance from JRuby.

On Wed, Mar 3, 2010 at 6:40 AM, Fla As [email protected] wrote:

Maybe class files could be faster than rb files and therefore I have
tried to use class files.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email