From raoul.bonnal at itb.cnr.it Fri Feb 1 03:41:36 2008 From: raoul.bonnal at itb.cnr.it (Raoul Jean Pierre Bonnal) Date: Fri, 01 Feb 2008 09:41:36 +0100 Subject: [BioRuby] BioRuby Shell Rails Generator Bug ? In-Reply-To: <5EA1E3E5-9E75-4EB5-9E5F-524B2A6D425D@hgc.jp> References: <1201603231.7826.15.camel@Graco> <5EA1E3E5-9E75-4EB5-9E5F-524B2A6D425D@hgc.jp> Message-ID: <1201855296.7300.6.camel@Graco> Il giorno ven, 01/02/2008 alle 09.15 +0900, Toshiaki Katayama ha scritto: > Hmm, it is working in my environment without any changes. > What version of rails are you using? [febo at Graco BiosqlApp]$ ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) [i586-linux-gnu] [febo at Graco BiosqlApp]$ gem -v 1.0.1 [febo at Graco ~]$ rails --version Rails 2.0.2 http://api.rubyonrails.org/classes/Rails/Generator.html "For a Rails plugin, make a generators directory at the root of your plugin." > By the way, rails mode (bioruby -r) is not yet tested > with Rails 2.x and may not work. Seems to work fixing that, only a little problem whit Bio::Shell in script/console [febo at Graco BiosqlApp]$ script/console Loading development environment (Rails 2.0.2) /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in `load_missing_constant':NameError: uninitialized constant Bio::Shell Ciao. -- Ra From georgkam at gmail.com Fri Feb 1 09:15:21 2008 From: georgkam at gmail.com (George Githinji) Date: Fri, 1 Feb 2008 17:15:21 +0300 Subject: [BioRuby] bio blast In-Reply-To: <90ca35f70801300828y520186ci4673fd2d763b825d@mail.gmail.com> References: <55915f820801300401s79aed759k2921da0fdff5a05a@mail.gmail.com> <90ca35f70801300828y520186ci4673fd2d763b825d@mail.gmail.com> Message-ID: <55915f820802010615t532db910w4cb0bc323ec3885e@mail.gmail.com> Thank you Nakao for the reply. Removing the M 0 does not get the error off instead i get this: [NULL_Caption] ERROR: Arguments must start with '-' (the offending argument #7 was: 'local') Which i presume means i have to give an argurments list so i try declaring the matrix with -M BLOSUM62 and i get this: C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast/format8.rb:70:in `tab_parse_hsp': undefined method `strip' for nil:NilClass (NoMethodError) from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast/format8.rb:32:in `tab_parse' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast/format8.rb:30:in `each' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast/format8.rb:30:in `tab_parse' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast/report.rb:71:in `auto_parse' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast/report.rb:89:in `initialize' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:232:in `new' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:232:in `parse_result' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:246:in `exec_local' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:212:in `send' from C:/ruby-1.8.6/ruby/lib/ruby/gems/1.8/gems/bio-1.2.1/lib/bio/appl/blast.rb:212:in `query' from F:/Netbeans_folder/vargene/lib/bio_blast.rb:8 On Jan 30, 2008 7:28 PM, Mitsuteru Nakao wrote: > Hi > > If you remove the options "-m 0", you may get the search result > without the error. > # Because I don't have Windows.:-( > > > factory = Bio::Blast.new("blastp","#{db}","", "local") > > > And thank you for your bug report. > this is a bug in the Bio::Blast::Report class. > > > factory = Bio::Blast.new("blastp","#{db}","-m 0", "local") > > > hanks. > > Mitsuteru, > - > Mitsuteru Nakao, Ph.D. > n at bioruby.org / mn at kazusa.or.jp > -- --------------- Sincerely George Skype: george_g2 Website: http://biorelated.wordpress.com/ From adamnkraut at gmail.com Fri Feb 1 10:39:45 2008 From: adamnkraut at gmail.com (Adam Kraut) Date: Fri, 1 Feb 2008 10:39:45 -0500 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? In-Reply-To: References: Message-ID: <134ede0b0802010739q646711b9xc3cd3a10bd16e16f@mail.gmail.com> Oops! I sent this solution directly to Gordon rather than the bioruby list. Here's the original message I sent in case anyone else is interested. Hi Gordon, I grepped for the string method called downcase in the Sequence class and noticed, # Nucleic Acid sequences are *always* all lowercase in bioruby def initialize(str) super self.downcase ! self.tr!(" \t\n\r",'') end When you call NA.new("atgcATGcaaaa"), your string is converted to lowercase and white space is stripped. One way you might work around this is to simply open up the class and redefine the constructor. Since Ruby classes are open, you can redefine the Sequence class on the fly if you'd like. seq = Bio::Sequence::NA.new("atgcATGcaaaa") # => "atgcatgcaaaa" class Bio::Sequence::NA def initialize(str) # !> method redefined; discarding old initialize super self.tr!(" \t\n\r",'') end end seq2 = Bio::Sequence::NA.new("atgcATGcaaaa") # => "atgcATGcaaaa" I am also new to Bioruby so there may be a more fitting solution that's already been discussed. Best Regards, Adam From robert.citek at gmail.com Fri Feb 1 10:48:00 2008 From: robert.citek at gmail.com (Robert Citek) Date: Fri, 1 Feb 2008 09:48:00 -0600 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? In-Reply-To: <134ede0b0802010739q646711b9xc3cd3a10bd16e16f@mail.gmail.com> References: <134ede0b0802010739q646711b9xc3cd3a10bd16e16f@mail.gmail.com> Message-ID: <4145b6790802010748v5c1542b2q23764594074b8f2@mail.gmail.com> On Jan 30, 2008 10:10 AM, Jan Aerts wrote: > So the 'right' way to do it is to create a Bio::Sequence object as you > did above and then attach a Bio::Feature object to it describing the > start codon. On Feb 1, 2008 9:39 AM, Adam Kraut wrote: > I am also new to Bioruby so there may be a more fitting solution that's > already been discussed. Thanks, Jan and Adam. Jan's solution is probably the right way. Unfortunately, I'm new enough to ruby that I'm not sure how to make that work for me. Adam's solution may not be the "right" way, but it works good enough for me for now. Again, thanks. Regards, - Robert From ktym at hgc.jp Fri Feb 1 11:22:31 2008 From: ktym at hgc.jp (Toshiaki Katayama) Date: Sat, 2 Feb 2008 01:22:31 +0900 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? In-Reply-To: <4145b6790802010748v5c1542b2q23764594074b8f2@mail.gmail.com> References: <134ede0b0802010739q646711b9xc3cd3a10bd16e16f@mail.gmail.com> <4145b6790802010748v5c1542b2q23764594074b8f2@mail.gmail.com> Message-ID: On 2008/02/02, at 0:48, Robert Citek wrote: > On Jan 30, 2008 10:10 AM, Jan Aerts wrote: >> So the 'right' way to do it is to create a Bio::Sequence object as you >> did above and then attach a Bio::Feature object to it describing the >> start codon. > > On Feb 1, 2008 9:39 AM, Adam Kraut wrote: >> I am also new to Bioruby so there may be a more fitting solution that's >> already been discussed. > > Thanks, Jan and Adam. Jan's solution is probably the right way. > Unfortunately, I'm new enough to ruby that I'm not sure how to make > that work for me. Adam's solution may not be the "right" way, but it > works good enough for me for now. In the current implementation of the Bio::Sequence class, some methods like 'translate', 'complement', 'molecular_weight', 'names' ... depends on the case of the sequence. If we re-implement all these methods to normalize the sequence (internally) before they do the job, we may conserve the original cases. Regards, Toshiaki Katayama From ktym at hgc.jp Fri Feb 1 22:31:39 2008 From: ktym at hgc.jp (Toshiaki Katayama) Date: Sat, 2 Feb 2008 12:31:39 +0900 Subject: [BioRuby] BioRuby Shell Rails Generator Bug ? In-Reply-To: <1201855296.7300.6.camel@Graco> References: <1201603231.7826.15.camel@Graco> <5EA1E3E5-9E75-4EB5-9E5F-524B2A6D425D@hgc.jp> <1201855296.7300.6.camel@Graco> Message-ID: Hi Raoul, I confirmed that your change % cd lib/bio/shell/rails/vendor/plugins/ % mkdir bioruby % mv generators bioruby works fine with Rails 1.2 and Rails 2 so I did a CVS magic to mv the directory directly in the open-bio.org CVS repository. > [febo at Graco BiosqlApp]$ script/console > Loading development environment (Rails 2.0.2) > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in `load_missing_constant':NameError: uninitialized constant Bio::Shell This only happens in Rails 2.x and I don't know what is the best way to fix this for now. Regards, Toshiaki On 2008/02/01, at 17:41, Raoul Jean Pierre Bonnal wrote: > > Il giorno ven, 01/02/2008 alle 09.15 +0900, Toshiaki Katayama ha > scritto: >> Hmm, it is working in my environment without any changes. >> What version of rails are you using? > [febo at Graco BiosqlApp]$ ruby --version > ruby 1.8.6 (2007-03-13 patchlevel 0) [i586-linux-gnu] > > [febo at Graco BiosqlApp]$ gem -v > 1.0.1 > > [febo at Graco ~]$ rails --version > Rails 2.0.2 > > http://api.rubyonrails.org/classes/Rails/Generator.html > "For a Rails plugin, make a generators directory at the root of your > plugin." > >> By the way, rails mode (bioruby -r) is not yet tested >> with Rails 2.x and may not work. > Seems to work fixing that, only a little problem whit Bio::Shell in > script/console > [febo at Graco BiosqlApp]$ script/console > Loading development environment (Rails 2.0.2) > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:263:in `load_missing_constant':NameError: uninitialized constant Bio::Shell > > Ciao. > > -- > Ra > From pjotr2007 at thebird.nl Sat Feb 2 04:55:54 2008 From: pjotr2007 at thebird.nl (pjotr2007 at thebird.nl) Date: Sat, 2 Feb 2008 10:55:54 +0100 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? Message-ID: <20080202095554.GA1104@thebird.nl> On Sat, Feb 02, 2008 at 01:22:31AM +0900, Toshiaki Katayama wrote: > > In the current implementation of the Bio::Sequence class, > some methods like 'translate', 'complement', 'molecular_weight', 'names' ... > depends on the case of the sequence. If we re-implement all these methods > to normalize the sequence (internally) before they do the job, > we may conserve the original cases. > > Regards, > Toshiaki Katayama As case contains (external) information to the Sequence class I would favour 'translate' and 'complement' would conserve case after their job. I think that is the correct thing to do. Not normalizing in the constructor also gains performance. Only thing is that changing this will break existing software, so it may be better to have a switch in the constructor for enforcing old behaviour (tolower=false). From pjotr2008 at thebird.nl Sat Feb 2 05:47:41 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sat, 2 Feb 2008 11:47:41 +0100 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? In-Reply-To: <20080202095554.GA1104@thebird.nl> References: <20080202095554.GA1104@thebird.nl> Message-ID: <20080202104741.GA2356@thebird.nl> On Sat, Feb 02, 2008 at 01:22:31AM +0900, Toshiaki Katayama wrote: > > In the current implementation of the Bio::Sequence class, > some methods like 'translate', 'complement', 'molecular_weight', 'names' ... > depends on the case of the sequence. If we re-implement all these methods > to normalize the sequence (internally) before they do the job, > we may conserve the original cases. > > Regards, > Toshiaki Katayama As case contains (external) information to the Sequence class I would favour 'translate' and 'complement' would conserve case after their job. I think that is the correct thing to do. Not normalizing in the constructor also gains performance. Only thing is that changing this will break existing software, so it may be better to have a switch in the constructor for enforcing old behaviour (tolower=false). From pjotr2008 at thebird.nl Sat Feb 2 09:22:35 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sat, 2 Feb 2008 15:22:35 +0100 Subject: [BioRuby] BioRuby Tutorial (en) Message-ID: <20080202142235.GA3314@thebird.nl> Noticing the increasing interest for BioRuby and in preparation for the BioHackathlon I have fixed the Tutorial.rd.en at: http://dev.bioruby.org/wiki/en/?Tutorial.rd Please have a look and see if the contained information is still valid. If you think anything is missing, or could be done easier, please send me a note too. Thanks, Pj. From robert.citek at gmail.com Sat Feb 2 09:30:29 2008 From: robert.citek at gmail.com (Robert Citek) Date: Sat, 2 Feb 2008 08:30:29 -0600 Subject: [BioRuby] BioRuby Tutorial (en) In-Reply-To: <20080202142235.GA3314@thebird.nl> References: <20080202142235.GA3314@thebird.nl> Message-ID: <4145b6790802020630j1f2841cfsa830378fef55f740@mail.gmail.com> On Feb 2, 2008 8:22 AM, Pjotr Prins wrote: > Noticing the increasing interest for BioRuby and in preparation for > the BioHackathlon BioHackathlon? Do you have more info? Googling got nothing: http://www.google.com/search?q=BioHackathlon > I have fixed the Tutorial.rd.en at: > > http://dev.bioruby.org/wiki/en/?Tutorial.rd > > Please have a look and see if the contained information is still > valid. If you think anything is missing, or could be done easier, > please send me a note too. Thanks for working on that. I'm particularly interested in GenBank parsing. Regards, - Robert From pjotr2008 at thebird.nl Sat Feb 2 10:14:20 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sat, 2 Feb 2008 16:14:20 +0100 Subject: [BioRuby] BioRuby Tutorial (en) In-Reply-To: <4145b6790802020630j1f2841cfsa830378fef55f740@mail.gmail.com> References: <20080202142235.GA3314@thebird.nl> <4145b6790802020630j1f2841cfsa830378fef55f740@mail.gmail.com> Message-ID: <20080202151420.GA3840@thebird.nl> On Sat, Feb 02, 2008 at 08:30:29AM -0600, Robert Citek wrote: > BioHackathlon? Do you have more info? Googling got nothing: First link on the Wiki. http://hackathon.dbcls.jp/ From ngoto at gen-info.osaka-u.ac.jp Sun Feb 3 00:21:21 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Sun, 3 Feb 2008 14:21:21 +0900 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? In-Reply-To: <20080202104741.GA2356@thebird.nl> References: <20080202095554.GA1104@thebird.nl> <20080202104741.GA2356@thebird.nl> Message-ID: <20080203052122.657FA1CBC407@idnmail.gen-info.osaka-u.ac.jp> On Sat, 2 Feb 2008 11:47:41 +0100 pjotr2008 at thebird.nl (Pjotr Prins) wrote: > As case contains (external) information to the Sequence class I would > favour 'translate' and 'complement' would conserve case after their > job. I think that is the correct thing to do. How do 'translate' conserve case when both upcase and downcase characters are mixed? 'atg' ==> 'm' 'ATG' ==> 'M' 'Atg', 'aTg', 'atG' ==> ??? 'm' or 'M'? 'ATg', 'AtG', 'aTG' ==> ??? 'm' or 'M'? -- Naohis Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From pjotr2008 at thebird.nl Sun Feb 3 04:43:49 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sun, 3 Feb 2008 10:43:49 +0100 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? In-Reply-To: <20080203052122.657FA1CBC407@idnmail.gen-info.osaka-u.ac.jp> References: <20080202095554.GA1104@thebird.nl> <20080202104741.GA2356@thebird.nl> <20080203052122.657FA1CBC407@idnmail.gen-info.osaka-u.ac.jp> Message-ID: <20080203094349.GA8863@thebird.nl> On Sun, Feb 03, 2008 at 02:21:21PM +0900, Naohisa GOTO wrote: > On Sat, 2 Feb 2008 11:47:41 +0100 > pjotr2008 at thebird.nl (Pjotr Prins) wrote: > > > As case contains (external) information to the Sequence class I would > > favour 'translate' and 'complement' would conserve case after their > > job. I think that is the correct thing to do. > > How do 'translate' conserve case when both upcase and downcase > characters are mixed? In fact what I meant was to retain case for AA and NA - as converting a sequence to lower or upper case makes the assumption the user actually wants that, while it may be he wants to retain that information. After some thought I realise that the requirement on the users-end for retaining case is really a poor-man's solution for storing positional binary information in addition to the sequence itself. He has: 'aAttGa' rather than ('aattga','010010'). His reason is that later modifications to the sequence - i.e. a deletion - he can do in one step, rather than two. I have been in that position where I wanted to store maximum likelihood values with each nucleotide. Any post processing required processing two data structures. It would be really nice to resolve this in a way where we can create a sequence, attach positional information (any object type), and allow processing where the positional information gets retained with the NAs or AAs. I think a generic solution would be often used if it is simple enough. Jan's proposal for using Bio::Feature was in this case useful, but would not hold for information over a full sequence - or would be overkill. So perhaps downcasing the sequence is, indeed, the right thing to do - but allow adding of positional information. It is a classic case for an adapter. Perhaps something like: seq = Bio::Sequence::NA.new(:adapter => Bio::Sequence::RetainCase('aAttGA')) and for maximum likelihoods class ML < Bio::Sequence::PositionalInformation end seqml = Bio::Sequence::NA.new('aattga', :adapter => ML([0.1,0.2,0.3,0.2,0.3,0.1])) where the adapter handles additional methods like: seqml[1] >> 'a' seqml.posinfo[1] >> 0.3 and in the RetainCase example: seq[1] >> 'a' seq.posinfo[1] >> 'A' Pj. From pjotr2008 at thebird.nl Sun Feb 3 05:05:51 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sun, 3 Feb 2008 11:05:51 +0100 Subject: [BioRuby] doctests for BioRuby Message-ID: <20080203100551.GA10457@thebird.nl> I have a doctest.rb program that works with BioRuby. Basically you can run doctest.rb [-v] sourcefilename(s) e.g. ruby doctest.rb -v Tutorial.rd Looking for doctests in 1 files Processing 'Tutorial.rd'Testing 'Testing bioruby'...OK Total tests: 1; assertions 2; succeeded: 2 Where in this case the Tutorial.rd contains bioruby shell type (you can check it!): bioruby> seq = Bio::Sequence::NA.new("atgcatgcaaaa") ==> "atgcatgcaaaa" bioruby> seq.complement ==> "ttttgcatgcat" The cool thing is allows writing tests in documentation - doubling as a unit or regression test and ascertaining the examples in the documentation are still valid. doctest is big in the Python community, and I think it is a very good idea. See http://docs.python.org/lib/module-doctest.html Question: where should I store this functionality? Should the script go into: ./bin/ ./bin/extra/ (my preference) ./test or even ./lib/test/doctest/ ./lib/testing/doctest/ At this point doctest.rb is not a module - though that may be useful when people start using doctests in place of unit tests. Pj. From ktym at hgc.jp Sun Feb 3 23:54:19 2008 From: ktym at hgc.jp (Toshiaki Katayama) Date: Mon, 4 Feb 2008 13:54:19 +0900 Subject: [BioRuby] Bio::Sequence forces a DNA sequence to lowercase? In-Reply-To: <20080203094349.GA8863@thebird.nl> References: <20080202095554.GA1104@thebird.nl> <20080202104741.GA2356@thebird.nl> <20080203052122.657FA1CBC407@idnmail.gen-info.osaka-u.ac.jp> <20080203094349.GA8863@thebird.nl> Message-ID: <7C2A1D09-A76F-42BD-9A79-9723E2F6CC2F@hgc.jp> Hi guys, Please do not to make things complicated. On 2008/02/03, at 14:21, Naohisa GOTO wrote: > How do 'translate' conserve case when both upcase and downcase > characters are mixed? > 'atg' ==> 'm' > 'ATG' ==> 'M' > 'Atg', 'aTg', 'atG' ==> ??? 'm' or 'M'? > 'ATg', 'AtG', 'aTG' ==> ??? 'm' or 'M'? Suppose upper case letters in the nucleic acid sequence are the marks of something, > 'Atg', 'aTg', 'atG' ==> ??? 'm' or 'M'? > 'ATg', 'AtG', 'aTG' ==> ??? 'm' or 'M'? these should be 'M'. However, if we change the policy to retain cases of the input sequence, we need to go over every aspects of the BioRuby functionality which utilize Bio::Sequence object (including restriction enzymes, features, locations, I/O adapters etc. although many of these would be OK). And, I think it is not worth to create another class PositionalInformation. All you need would be a instance variable to store an array of properties. # Also, I think many other important things to be done before we tackle this ... Regards, Toshiaki Katayama On 2008/02/03, at 18:43, Pjotr Prins wrote: > > On Sun, Feb 03, 2008 at 02:21:21PM +0900, Naohisa GOTO wrote: >> On Sat, 2 Feb 2008 11:47:41 +0100 >> pjotr2008 at thebird.nl (Pjotr Prins) wrote: >> >>> As case contains (external) information to the Sequence class I would >>> favour 'translate' and 'complement' would conserve case after their >>> job. I think that is the correct thing to do. >> >> How do 'translate' conserve case when both upcase and downcase >> characters are mixed? > > In fact what I meant was to retain case for AA and NA - as converting > a sequence to lower or upper case makes the assumption the user > actually wants that, while it may be he wants to retain that > information. > > After some thought I realise that the requirement on the users-end for > retaining case is really a poor-man's solution for storing positional > binary information in addition to the sequence itself. He has: > > 'aAttGa' rather than ('aattga','010010'). > > His reason is that later modifications to the sequence - i.e. a > deletion - he can do in one step, rather than two. > > I have been in that position where I wanted to store maximum > likelihood values with each nucleotide. Any post processing required > processing two data structures. > > It would be really nice to resolve this in a way where we can create a > sequence, attach positional information (any object type), and allow > processing where the positional information gets retained with the NAs > or AAs. I think a generic solution would be often used if it is > simple enough. > > Jan's proposal for using Bio::Feature was in this case useful, but > would not hold for information over a full sequence - or would be > overkill. So perhaps downcasing the sequence is, indeed, the right > thing to do - but allow adding of positional information. > > It is a classic case for an adapter. Perhaps something like: > > seq = Bio::Sequence::NA.new(:adapter => Bio::Sequence::RetainCase('aAttGA')) > > and for maximum likelihoods > > class ML < Bio::Sequence::PositionalInformation > end > > seqml = Bio::Sequence::NA.new('aattga', :adapter => ML([0.1,0.2,0.3,0.2,0.3,0.1])) > > where the adapter handles additional methods like: > > seqml[1] >>> 'a' > seqml.posinfo[1] >>> 0.3 > > and in the RetainCase example: > > seq[1] >>> 'a' > seq.posinfo[1] >>> 'A' > > Pj. > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From ktym at hgc.jp Sun Feb 3 23:58:38 2008 From: ktym at hgc.jp (Toshiaki Katayama) Date: Mon, 4 Feb 2008 13:58:38 +0900 Subject: [BioRuby] doctests for BioRuby In-Reply-To: <20080203100551.GA10457@thebird.nl> References: <20080203100551.GA10457@thebird.nl> Message-ID: Pj, I don't want to have this in the bioruby package for now, because: * it seems to be a general application * we need only one way for testing codes (unless you convert all unit tests in the bioruby distribution to doctest) If the doctest is your products, how about to release it as a gem package? Toshiaki On 2008/02/03, at 19:05, Pjotr Prins wrote: > I have a doctest.rb program that works with BioRuby. Basically you can run > > doctest.rb [-v] sourcefilename(s) e.g. > > ruby doctest.rb -v Tutorial.rd > Looking for doctests in 1 files > Processing 'Tutorial.rd'Testing 'Testing bioruby'...OK > Total tests: 1; assertions 2; succeeded: 2 > > Where in this case the Tutorial.rd contains bioruby shell type (you > can check it!): > > bioruby> seq = Bio::Sequence::NA.new("atgcatgcaaaa") > ==> "atgcatgcaaaa" > > bioruby> seq.complement > ==> "ttttgcatgcat" > > The cool thing is allows writing tests in documentation - doubling as > a unit or regression test and ascertaining the examples in the > documentation are still valid. doctest is big in the Python > community, and I think it is a very good idea. See > http://docs.python.org/lib/module-doctest.html > > Question: where should I store this functionality? Should the script > go into: > > ./bin/ > ./bin/extra/ (my preference) > ./test > > or even > > ./lib/test/doctest/ > ./lib/testing/doctest/ > > At this point doctest.rb is not a module - though that may be useful > when people start using doctests in place of unit tests. > > Pj. > > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From georgkam at gmail.com Wed Feb 13 03:13:58 2008 From: georgkam at gmail.com (George Githinji) Date: Wed, 13 Feb 2008 11:13:58 +0300 Subject: [BioRuby] bioruby, rubinius, jruby Message-ID: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> Hi All, I have been hearing a lot of buzz and talk about rubinius (http://rubini.us/), jruby and other implementations or ruby. Just how ready or compatible is bioruby with these implementations? -- --------------- Sincerely George Skype: george_g2 Website: http://biorelated.wordpress.com/ From pjotr2008 at thebird.nl Wed Feb 13 03:26:39 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Wed, 13 Feb 2008 09:26:39 +0100 Subject: [BioRuby] bioruby, rubinius, jruby In-Reply-To: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> Message-ID: <20080213082639.GA17325@thebird.nl> bioruby is 100% pure Ruby - so it should run with other implementations. You could try running the unit tests - if they work I would be surprised you run into problems. Pj. On Wed, Feb 13, 2008 at 11:13:58AM +0300, George Githinji wrote: > Hi All, > I have been hearing a lot of buzz and talk about rubinius (http://rubini.us/), > jruby and other implementations or ruby. Just how ready or compatible is > bioruby with these implementations? > > -- > --------------- > Sincerely > George > > Skype: george_g2 > Website: http://biorelated.wordpress.com/ > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From pjotr2008 at thebird.nl Wed Feb 13 03:51:13 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Wed, 13 Feb 2008 09:51:13 +0100 Subject: [BioRuby] Tomorrow evening BioRuby meeting in Tokyo Message-ID: <20080213085112.GA18555@thebird.nl> Thursday night (tomorrow) we will have dinner with BioRuby representatives from Europe and Japan. Place: Tokyo. Pj. From shameer at ncbs.res.in Wed Feb 13 03:24:24 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Wed, 13 Feb 2008 13:54:24 +0530 (IST) Subject: [BioRuby] bio.pdb doubt In-Reply-To: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> Message-ID: <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> Dear All, Now I am almost done with my basic Ruby reading/coding. So far it was a wonderful experience. I am currently looking for a simple way to extract pdb co-ordinates from a pdb file by using any inbuilt menthods available in bioruby. For example, I need to extract a particular region of a PDB file with multiple chains ; say A:22 to B:50 (22 and 50 are residue numbers). Is there any method in bio.pdb class to do this ? Thanks, K. Shameer From ngoto at gen-info.osaka-u.ac.jp Wed Feb 13 05:25:23 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa Goto) Date: Wed, 13 Feb 2008 19:25:23 +0900 Subject: [BioRuby] new branch for BioHackathon2008 in bioruby CVS Message-ID: <20080213192418.A1AB.NGOTO@gen-info.osaka-u.ac.jp> Hi BioHackathon2008 participants, CVS branch for BioHackathon2008 are created. Branch name is BRANCH-biohackathon2008. Please put experimental codes to this branch. Note that not experimental changes, e.g. updates of tutorial, will still be committed to the main branch. To change existing working copy in your computer: % cvs update -r BRANCH-biohackathon2008 To start new working copy: % mkdir XXXX; cd XXXX # if you want % cvs -d :ext:YOURACCOUNT at dev.open-bio.org;/home/repository/bioruby co bioruby % cd bioruby % cvs update -r BRANCH-biohackathon2008 To confirm you are in branch: % cat CVS/Tag (TBRANCH-biohackathon2008 shoud be shown.) -- Naohisa Goto ng at bioruby.org / ngoto at gen-info.osaka-u.ac.jp From jan.aerts at bbsrc.ac.uk Wed Feb 13 19:33:42 2008 From: jan.aerts at bbsrc.ac.uk (jan aerts (RI)) Date: Thu, 14 Feb 2008 00:33:42 -0000 Subject: [BioRuby] new branch for BioHackathon2008 in bioruby CVS References: <20080213192418.A1AB.NGOTO@gen-info.osaka-u.ac.jp> Message-ID: <1F16910BB8546C4DA5526FABB0C98D09AA9ADC@ebre2ksrv1.ebrc.bbsrc.ac.uk> Arigato Goto-san. I'll see if I can get that working... jan. -----Original Message----- From: bioruby-bounces at lists.open-bio.org on behalf of Naohisa Goto Sent: Wed 13/02/2008 10:25 To: bioruby at lists.open-bio.org Subject: [BioRuby] new branch for BioHackathon2008 in bioruby CVS Hi BioHackathon2008 participants, CVS branch for BioHackathon2008 are created. Branch name is BRANCH-biohackathon2008. Please put experimental codes to this branch. Note that not experimental changes, e.g. updates of tutorial, will still be committed to the main branch. To change existing working copy in your computer: % cvs update -r BRANCH-biohackathon2008 To start new working copy: % mkdir XXXX; cd XXXX # if you want % cvs -d :ext:YOURACCOUNT at dev.open-bio.org;/home/repository/bioruby co bioruby % cd bioruby % cvs update -r BRANCH-biohackathon2008 To confirm you are in branch: % cat CVS/Tag (TBRANCH-biohackathon2008 shoud be shown.) -- Naohisa Goto ng at bioruby.org / ngoto at gen-info.osaka-u.ac.jp _______________________________________________ BioRuby mailing list BioRuby at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/bioruby From ngoto at gen-info.osaka-u.ac.jp Thu Feb 14 04:29:57 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa Goto) Date: Thu, 14 Feb 2008 18:29:57 +0900 Subject: [BioRuby] bio.pdb doubt In-Reply-To: <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> Message-ID: <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> Hi, > I am currently looking for a simple way to extract pdb co-ordinates from a > pdb file by using any inbuilt menthods available in bioruby. > > For example, I need to extract a particular region of a PDB file with > multiple chains ; say A:22 to B:50 (22 and 50 are residue numbers). Is > there any method in bio.pdb class to do this ? You can use Bio::PDB#find_atom or Bio::PDB#find_residue methods. require 'bio' # reading PDB data pdb = Bio::FlatFile.open("pdb1a0d.ent") { |f| f.next_entry } # using Bio::PDB#find_atom atoms = pdb.find_atom do |atom| (atom.chainID == "A" and atom.resSeq >= 22) or (atom.chainID == "B" and atom.resSeq <= 50) end print atoms.to_s print "\n" # the same thing can be done by using Bio::PDB#find_residue residues = pdb.find_residue do |residue| (residue.chain.id == "A" and residue.resSeq >= 22) or (residue.chain.id == "B" and residue.resSeq <= 50) end print residues.to_s -- Naohisa Goto ngoto at gen-info.osaka-u.ac.jp / ng at bioruby.org From robert.citek at gmail.com Thu Feb 14 12:00:15 2008 From: robert.citek at gmail.com (Robert Citek) Date: Thu, 14 Feb 2008 11:00:15 -0600 Subject: [BioRuby] installing bio::graphics Message-ID: <4145b6790802140900p5de75698p43b06d0f5e98c0e6@mail.gmail.com> Hello all, I'm trying to install the Bio::Graphics package for Ruby: http://bio-graphics.rubyforge.org/ The site has instructions for installing under Ubuntu: * gem install bio * sudo apt-get install libcairo-ruby While I can get libcairo-ruby to install, I'm getting an error with using gem: $ sudo apt-get install rubygems $ gem install bio Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem ... (Errno::EACCES) Permission denied - /var/lib/gems/1.8/cache/bio-1.2.1.gem If I add a sudo, then things seem to work: $ sudo gem install bio Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed bio-1.2.1 $ sudo gem install bio-graphics Successfully installed bio-graphics-1.4 Installing ri documentation for bio-graphics-1.4... Installing RDoc documentation for bio-graphics-1.4... However, now when I try to run a trimmed down version of the example on the page, I get an error message: $ ruby -e "puts 'hello' " hello $ ruby -e "require 'bio' ; puts 'hello' " hello $ ruby -e "require 'bio-graphics' ; puts 'hello' " -e:1:in `require': no such file to load -- bio-graphics (LoadError) from -e:1 $ ruby -e "require_gem 'bio-graphics' ; puts 'hello' " -e:1: undefined method `require_gem' for main:Object (NoMethodError) $ ruby -e "gem 'bio-graphics' ; puts 'hello' " -e:1: undefined method `gem' for main:Object (NoMethodError) Did using gem to install bio and bio-graphics not work? What am I overlooking? Regards, - Robert From jan.aerts at bbsrc.ac.uk Thu Feb 14 20:39:16 2008 From: jan.aerts at bbsrc.ac.uk (jan aerts (RI)) Date: Fri, 15 Feb 2008 01:39:16 -0000 Subject: [BioRuby] FW: installing bio::graphics References: <4145b6790802140900p5de75698p43b06d0f5e98c0e6@mail.gmail.com> <1F16910BB8546C4DA5526FABB0C98D09AA9AEF@ebre2ksrv1.ebrc.bbsrc.ac.uk> Message-ID: <1F16910BB8546C4DA5526FABB0C98D09AA9AF0@ebre2ksrv1.ebrc.bbsrc.ac.uk> (Apparently Outlook Web Access does not automatically send back to a mailing list... So here you are.) -----Original Message----- From: jan aerts (RI) Sent: Fri 15/02/2008 01:38 To: Robert Citek Subject: RE: [BioRuby] installing bio::graphics Hi Robert. I'm testing things out here, and all seems to work... Could you tell me what version of rubygems you're using ("gem --version")? If it's not 1.0.1, you can upgrade using "sudo gem update --system". Then can you try the following? ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' " If this works, it means that rubygems were not loaded. You can fix that by setting the RUBYOPT environment variable. See http://docs.rubygems.org/read/chapter/3#page70 for more information. Hope this helps. jan. -----Original Message----- From: bioruby-bounces at lists.open-bio.org on behalf of Robert Citek Sent: Thu 14/02/2008 17:00 To: bioruby at lists.open-bio.org Subject: [BioRuby] installing bio::graphics Hello all, I'm trying to install the Bio::Graphics package for Ruby: http://bio-graphics.rubyforge.org/ The site has instructions for installing under Ubuntu: * gem install bio * sudo apt-get install libcairo-ruby While I can get libcairo-ruby to install, I'm getting an error with using gem: $ sudo apt-get install rubygems $ gem install bio Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem ... (Errno::EACCES) Permission denied - /var/lib/gems/1.8/cache/bio-1.2.1.gem If I add a sudo, then things seem to work: $ sudo gem install bio Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed bio-1.2.1 $ sudo gem install bio-graphics Successfully installed bio-graphics-1.4 Installing ri documentation for bio-graphics-1.4... Installing RDoc documentation for bio-graphics-1.4... However, now when I try to run a trimmed down version of the example on the page, I get an error message: $ ruby -e "puts 'hello' " hello $ ruby -e "require 'bio' ; puts 'hello' " hello $ ruby -e "require 'bio-graphics' ; puts 'hello' " -e:1:in `require': no such file to load -- bio-graphics (LoadError) from -e:1 $ ruby -e "require_gem 'bio-graphics' ; puts 'hello' " -e:1: undefined method `require_gem' for main:Object (NoMethodError) $ ruby -e "gem 'bio-graphics' ; puts 'hello' " -e:1: undefined method `gem' for main:Object (NoMethodError) Did using gem to install bio and bio-graphics not work? What am I overlooking? Regards, - Robert _______________________________________________ BioRuby mailing list BioRuby at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/bioruby From n at bioruby.org Thu Feb 14 22:07:36 2008 From: n at bioruby.org (Mitsuteru Nakao) Date: Fri, 15 Feb 2008 12:07:36 +0900 Subject: [BioRuby] new branch for BioHackathon2008 in bioruby CVS In-Reply-To: <1F16910BB8546C4DA5526FABB0C98D09AA9ADC@ebre2ksrv1.ebrc.bbsrc.ac.uk> References: <20080213192418.A1AB.NGOTO@gen-info.osaka-u.ac.jp> <1F16910BB8546C4DA5526FABB0C98D09AA9ADC@ebre2ksrv1.ebrc.bbsrc.ac.uk> Message-ID: <90ca35f70802141907u2b1904d5m2f4e84502877c06e@mail.gmail.com> You can use the BRANCH to corret a typo in the following script lines, > To start new working copy: > % mkdir XXXX; cd XXXX # if you want > % cvs -d :ext:YOURACCOUNT at dev.open-bio.org;/home/repository/bioruby co bioruby % cvs -d :ext:YOURACCOUNT at dev.open-bio.org:/home/repository/bioruby co bioruby # .sub(/org;/, 'org:') > % cd bioruby > % cvs update -r BRANCH-biohackathon2008 > > To confirm you are in branch: > % cat CVS/Tag > (TBRANCH-biohackathon2008 shoud be shown.) Best. Mitsuteru, - Mitsuteru Nakao n at bioruby.org / mn at kazusa.or.jp From robert.citek at gmail.com Thu Feb 14 22:37:10 2008 From: robert.citek at gmail.com (Robert Citek) Date: Thu, 14 Feb 2008 21:37:10 -0600 Subject: [BioRuby] FW: installing bio::graphics In-Reply-To: <1F16910BB8546C4DA5526FABB0C98D09AA9AF0@ebre2ksrv1.ebrc.bbsrc.ac.uk> References: <4145b6790802140900p5de75698p43b06d0f5e98c0e6@mail.gmail.com> <1F16910BB8546C4DA5526FABB0C98D09AA9AEF@ebre2ksrv1.ebrc.bbsrc.ac.uk> <1F16910BB8546C4DA5526FABB0C98D09AA9AF0@ebre2ksrv1.ebrc.bbsrc.ac.uk> Message-ID: <4145b6790802141937i3cf2dda6w5c5c543c31569d36@mail.gmail.com> On Thu, Feb 14, 2008 at 7:39 PM, jan aerts (RI) wrote: > (Apparently Outlook Web Access does not automatically send back to a mailing list... So here you are.) Thanks. > -----Original Message----- > From: jan aerts (RI) > Sent: Fri 15/02/2008 01:38 > To: Robert Citekt'' libyaml-ruby > Subject: RE: [BioRuby] installing bio::graphics > > Hi Robert. > > I'm testing things out here, and all seems to work... Could you tell me what version of rubygems you're using ("gem --version")? If it's not 1.0.1, you can upgrade using "sudo gem update --system". $ gem --version 0.9.4 $ sudo gem update --system ... $ gem --version /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError) That does not look good. > Then can you try the following? > ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' " $ ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' " /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- bio-graphics (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from -e:1 That doesn't look good, either. Back to more Googling and reading. Regards, - Robert From robert.citek at gmail.com Thu Feb 14 23:22:54 2008 From: robert.citek at gmail.com (Robert Citek) Date: Thu, 14 Feb 2008 22:22:54 -0600 Subject: [BioRuby] FW: installing bio::graphics In-Reply-To: <90ca35f70802141945q1ae25eqc78435e6108d6c43@mail.gmail.com> References: <4145b6790802140900p5de75698p43b06d0f5e98c0e6@mail.gmail.com> <1F16910BB8546C4DA5526FABB0C98D09AA9AEF@ebre2ksrv1.ebrc.bbsrc.ac.uk> <1F16910BB8546C4DA5526FABB0C98D09AA9AF0@ebre2ksrv1.ebrc.bbsrc.ac.uk> <4145b6790802141937i3cf2dda6w5c5c543c31569d36@mail.gmail.com> <90ca35f70802141945q1ae25eqc78435e6108d6c43@mail.gmail.com> Message-ID: <4145b6790802142022o5a636911ma96538d710b7a435@mail.gmail.com> Still no dice: $ ruby -rubygems -e "require 'bio'; gem 'bio-graphics' ; puts 'hello' " /usr/local/lib/site_ruby/1.8/rubygems.rb:379:in `report_activate_error': Could not find RubyGem bio-graphics (>= 0) (Gem::LoadError) from /usr/local/lib/site_ruby/1.8/rubygems.rb:311:in `activate' from /usr/local/lib/site_ruby/1.8/rubygems.rb:65:in `active_gem_with_options' from /usr/local/lib/site_ruby/1.8/rubygems.rb:50:in `gem' from -e:1 Some other information that may be helpful: $ uname -va Linux ubuntu-laptop 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=7.10 DISTRIB_CODENAME=gutsy DISTRIB_DESCRIPTION="Ubuntu 7.10" $ ruby -v ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux] Regards, - Robert On Thu, Feb 14, 2008 at 9:45 PM, Mitsuteru Nakao wrote: > Hi Robert, > > Try this line, > > $ ruby -rubygems -e "require 'bio'; gem 'bio-graphics' ; puts 'hello' " > > > > > > Then can you try the following? > > > ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' " > > > > $ ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' " > > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `gem_original_require': no such file to load -- bio-graphics > > (LoadError) > > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > > `require' > > from -e:1 > > > > That doesn't look good, either. > > Best, > Mitsuteru > - > Mitsuteru Nakao > n at bioruby / mn at kazusa.or.jp From jan.aerts at bbsrc.ac.uk Thu Feb 14 23:30:14 2008 From: jan.aerts at bbsrc.ac.uk (jan aerts (RI)) Date: Fri, 15 Feb 2008 04:30:14 -0000 Subject: [BioRuby] FW: installing bio::graphics References: <4145b6790802140900p5de75698p43b06d0f5e98c0e6@mail.gmail.com><1F16910BB8546C4DA5526FABB0C98D09AA9AEF@ebre2ksrv1.ebrc.bbsrc.ac.uk><1F16910BB8546C4DA5526FABB0C98D09AA9AF0@ebre2ksrv1.ebrc.bbsrc.ac.uk> <4145b6790802141937i3cf2dda6w5c5c543c31569d36@mail.gmail.com> Message-ID: <1F16910BB8546C4DA5526FABB0C98D09AA9AF2@ebre2ksrv1.ebrc.bbsrc.ac.uk> Does this help: http://ericbeland.com/2007/12/20/uninitialized-constant-gem-gemrunner ? -----Original Message----- From: bioruby-bounces at lists.open-bio.org on behalf of Robert Citek Sent: Fri 15/02/2008 03:37 To: bioruby at lists.open-bio.org Subject: Re: [BioRuby] FW: installing bio::graphics On Thu, Feb 14, 2008 at 7:39 PM, jan aerts (RI) wrote: > (Apparently Outlook Web Access does not automatically send back to a mailing list... So here you are.) Thanks. > -----Original Message----- > From: jan aerts (RI) > Sent: Fri 15/02/2008 01:38 > To: Robert Citekt'' libyaml-ruby > Subject: RE: [BioRuby] installing bio::graphics > > Hi Robert. > > I'm testing things out here, and all seems to work... Could you tell me what version of rubygems you're using ("gem --version")? If it's not 1.0.1, you can upgrade using "sudo gem update --system". $ gem --version 0.9.4 $ sudo gem update --system ... $ gem --version /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError) That does not look good. > Then can you try the following? > ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' " $ ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' " /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- bio-graphics (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from -e:1 That doesn't look good, either. Back to more Googling and reading. Regards, - Robert _______________________________________________ BioRuby mailing list BioRuby at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/bioruby From francesco.strozzi at gmail.com Fri Feb 15 03:09:12 2008 From: francesco.strozzi at gmail.com (Francesco Strozzi) Date: Fri, 15 Feb 2008 09:09:12 +0100 Subject: [BioRuby] FW: installing bio::graphics In-Reply-To: <1F16910BB8546C4DA5526FABB0C98D09AA9AF2@ebre2ksrv1.ebrc.bbsrc.ac.uk> References: <4145b6790802140900p5de75698p43b06d0f5e98c0e6@mail.gmail.com> <1F16910BB8546C4DA5526FABB0C98D09AA9AEF@ebre2ksrv1.ebrc.bbsrc.ac.uk> <1F16910BB8546C4DA5526FABB0C98D09AA9AF0@ebre2ksrv1.ebrc.bbsrc.ac.uk> <4145b6790802141937i3cf2dda6w5c5c543c31569d36@mail.gmail.com> <1F16910BB8546C4DA5526FABB0C98D09AA9AF2@ebre2ksrv1.ebrc.bbsrc.ac.uk> Message-ID: Have you tried to remove rubygems using "apt-get remove --purge rubygems" and install the original package? http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz Maybe there is some issue with the package installed using apt... Cheers 2008/2/15, jan aerts (RI) : > > Does this help: > http://ericbeland.com/2007/12/20/uninitialized-constant-gem-gemrunner ? > > > > -----Original Message----- > From: bioruby-bounces at lists.open-bio.org on behalf of Robert Citek > > Sent: Fri 15/02/2008 03:37 > To: bioruby at lists.open-bio.org > > Subject: Re: [BioRuby] FW: installing bio::graphics > > On Thu, Feb 14, 2008 at 7:39 PM, jan aerts (RI) > wrote: > > (Apparently Outlook Web Access does not automatically send back to a > mailing list... So here you are.) > > Thanks. > > > -----Original Message----- > > From: jan aerts (RI) > > Sent: Fri 15/02/2008 01:38 > > To: Robert Citekt'' libyaml-ruby > > Subject: RE: [BioRuby] installing bio::graphics > > > > Hi Robert. > > > > I'm testing things out here, and all seems to work... Could you tell me > what version of rubygems you're using ("gem --version")? If it's not 1.0.1, > you can upgrade using "sudo gem update --system". > > $ gem --version > 0.9.4 > > $ sudo gem update --system > ... > > $ gem --version > /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError) > > That does not look good. > > > Then can you try the following? > > ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts > 'hello' " > > $ ruby -rubygems -e "require 'bio'; require 'bio-graphics' ; puts 'hello' > " > /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `gem_original_require': no such file to load -- bio-graphics > (LoadError) > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require' > from -e:1 > > That doesn't look good, either. > > Back to more Googling and reading. > > Regards, > - Robert > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From pjotr2008 at thebird.nl Sun Feb 17 11:16:32 2008 From: pjotr2008 at thebird.nl (Pjotr Prins) Date: Sun, 17 Feb 2008 17:16:32 +0100 Subject: [BioRuby] FW: installing bio::graphics In-Reply-To: References: <4145b6790802140900p5de75698p43b06d0f5e98c0e6@mail.gmail.com> <1F16910BB8546C4DA5526FABB0C98D09AA9AEF@ebre2ksrv1.ebrc.bbsrc.ac.uk> <1F16910BB8546C4DA5526FABB0C98D09AA9AF0@ebre2ksrv1.ebrc.bbsrc.ac.uk> <4145b6790802141937i3cf2dda6w5c5c543c31569d36@mail.gmail.com> <1F16910BB8546C4DA5526FABB0C98D09AA9AF2@ebre2ksrv1.ebrc.bbsrc.ac.uk> Message-ID: <20080217161632.GA13250@thebird.nl> Take into account the following factors: 1. You may have multiple versions of Ruby installed (and dev libraries) 2. You may have multiple versions of gem installed (apt, or native) 3. You may have multiple versions of supported libraries installed (apt or native, in /usr/lib, /usr/local/lib/ or $HOME) I have had issues with different combinations of these. Debian, with its hare brained decision of splitting out Ruby into native packages, tends to accentuate the problem. It has little to do with Ruby itself - it is a package management issue and gems do not always play with apt. Careful checking of which ruby you are using and which packages get loaded in the load path (I sometimes just put invalid code in sources to see whether it will break) will solve it for you. Pj. From shameer at ncbs.res.in Mon Feb 18 00:16:03 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Mon, 18 Feb 2008 10:46:03 +0530 (IST) Subject: [BioRuby] bio.pdb doubt In-Reply-To: <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> Message-ID: <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> Dear Naohisa and Alex, Thanks for the links and the sample code. I have one more doubt :) . Is there any method to check whether a protein is multichain/single chain using BioRuby. I checked in BioRuby in Anger document and wiki, but I couldnt find it (May be am missing something important) Thanks, K. Shameer NCBS - TIFR > You can use Bio::PDB#find_atom or Bio::PDB#find_residue methods. > > require 'bio' > > # reading PDB data > pdb = Bio::FlatFile.open("pdb1a0d.ent") { |f| f.next_entry } > > # using Bio::PDB#find_atom > atoms = pdb.find_atom do |atom| > (atom.chainID == "A" and atom.resSeq >= 22) or > (atom.chainID == "B" and atom.resSeq <= 50) > end > print atoms.to_s > > print "\n" > > # the same thing can be done by using Bio::PDB#find_residue > residues = pdb.find_residue do |residue| > (residue.chain.id == "A" and residue.resSeq >= 22) or > (residue.chain.id == "B" and residue.resSeq <= 50) > end > print residues.to_s > > From ngoto at gen-info.osaka-u.ac.jp Wed Feb 20 08:53:53 2008 From: ngoto at gen-info.osaka-u.ac.jp (Naohisa GOTO) Date: Wed, 20 Feb 2008 22:53:53 +0900 Subject: [BioRuby] bio.pdb doubt In-Reply-To: <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> Message-ID: <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> Dear Shameer, Information of chains for each macromolecule is described in 'COMPND' record. In BioRuby, Bio::PDB#record method can be used. Because the information obtained by the method is sometimes naive, processing of the data would be needed. Below is a sample program: require 'bio' def parse_COMPND(pdb) molecules = [] current_molecule = nil pdb.record('COMPND')[0].compound.each do |a| case a[0] when 'MOL_ID' current_molecule = {} molecules.push current_molecule when 'CHAIN' chains = a[1].split(/\s*\,\s*/) current_molecule[:chains] = chains end current_molecule[a[0]] = a[1] end molecules end pdb1 = Bio::FlatFile.open('pdb1fjg.ent') { |f| f.next_entry } pdb2 = Bio::FlatFile.open('pdb1a0d.ent') { |f| f.next_entry } [ pdb1, pdb2 ].each do |pdb| compounds = parse_COMPND(pdb) compounds.each do |c| p c['MOLECULE'] p c[:chains] end end The meanings of the 'COMPND' record is described in PDB file format document: http://www.wwpdb.org/documentation/format23/sect2.html#COMPND -- Naohisa Goto ngoto at gen-info.osaka-u.ac.jp /ng at bioruby.org On Mon, 18 Feb 2008 10:46:03 +0530 (IST) "K. Shameer" wrote: > Dear Naohisa and Alex, > > Thanks for the links and the sample code. > I have one more doubt :) . > Is there any method to check whether a protein is multichain/single chain > using BioRuby. I checked in BioRuby in Anger document and wiki, but I > couldnt find it (May be am missing something important) > > Thanks, > K. Shameer > NCBS - TIFR > > > > You can use Bio::PDB#find_atom or Bio::PDB#find_residue methods. > > > > require 'bio' > > > > # reading PDB data > > pdb = Bio::FlatFile.open("pdb1a0d.ent") { |f| f.next_entry } > > > > # using Bio::PDB#find_atom > > atoms = pdb.find_atom do |atom| > > (atom.chainID == "A" and atom.resSeq >= 22) or > > (atom.chainID == "B" and atom.resSeq <= 50) > > end > > print atoms.to_s > > > > print "\n" > > > > # the same thing can be done by using Bio::PDB#find_residue > > residues = pdb.find_residue do |residue| > > (residue.chain.id == "A" and residue.resSeq >= 22) or > > (residue.chain.id == "B" and residue.resSeq <= 50) > > end > > print residues.to_s > > > > > From alexg at ruggedtextile.com Wed Feb 20 10:22:47 2008 From: alexg at ruggedtextile.com (Alex Gutteridge) Date: Wed, 20 Feb 2008 15:22:47 +0000 Subject: [BioRuby] bio.pdb doubt In-Reply-To: <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> Message-ID: <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> My posts don't seem to make it to the mailing list from this address, so I'm reposting - sorry if people get this twice! Shameer, There's no specific method for testing for multi-chain/single chain proteins and there are some interesting edge cases (does a small peptide bound to a large enzyme count as a chain for instance) where Naohisa's method may give different answers, but one simple way it just to grab the chains for as an array and check it's size: Bio::PDB.new(IO.read('1TIM.pdb')).chains.size And because this is Ruby you can always define your own convenience method on the Bio::PDB class: irb(main):007:0> module Bio irb(main):008:1> class PDB irb(main):009:2> def multichain? irb(main):010:3> self.chains.size > 1 irb(main):011:3> end irb(main):012:2> end irb(main):013:1> end => nil irb(main):014:0> Bio::PDB.new(IO.read('1TIM.pdb')).multichain? => true AlexG On 20 Feb 2008, at 13:53, Naohisa GOTO wrote: > Dear Shameer, > > Information of chains for each macromolecule is described in > 'COMPND' record. In BioRuby, Bio::PDB#record method can be used. > Because the information obtained by the method is sometimes > naive, processing of the data would be needed. > > Below is a sample program: > > require 'bio' > > def parse_COMPND(pdb) > molecules = [] > current_molecule = nil > pdb.record('COMPND')[0].compound.each do |a| > case a[0] > when 'MOL_ID' > current_molecule = {} > molecules.push current_molecule > when 'CHAIN' > chains = a[1].split(/\s*\,\s*/) > current_molecule[:chains] = chains > end > current_molecule[a[0]] = a[1] > end > molecules > end > > pdb1 = Bio::FlatFile.open('pdb1fjg.ent') { |f| f.next_entry } > pdb2 = Bio::FlatFile.open('pdb1a0d.ent') { |f| f.next_entry } > > [ pdb1, pdb2 ].each do |pdb| > compounds = parse_COMPND(pdb) > compounds.each do |c| > p c['MOLECULE'] > p c[:chains] > end > end > > The meanings of the 'COMPND' record is described in > PDB file format document: > http://www.wwpdb.org/documentation/format23/sect2.html#COMPND > > -- > Naohisa Goto > ngoto at gen-info.osaka-u.ac.jp /ng at bioruby.org > > > On Mon, 18 Feb 2008 10:46:03 +0530 (IST) > "K. Shameer" wrote: > >> Dear Naohisa and Alex, >> >> Thanks for the links and the sample code. >> I have one more doubt :) . >> Is there any method to check whether a protein is multichain/single >> chain >> using BioRuby. I checked in BioRuby in Anger document and wiki, but I >> couldnt find it (May be am missing something important) >> >> Thanks, >> K. Shameer >> NCBS - TIFR >> >> >>> You can use Bio::PDB#find_atom or Bio::PDB#find_residue methods. >>> >>> require 'bio' >>> >>> # reading PDB data >>> pdb = Bio::FlatFile.open("pdb1a0d.ent") { |f| f.next_entry } >>> >>> # using Bio::PDB#find_atom >>> atoms = pdb.find_atom do |atom| >>> (atom.chainID == "A" and atom.resSeq >= 22) or >>> (atom.chainID == "B" and atom.resSeq <= 50) >>> end >>> print atoms.to_s >>> >>> print "\n" >>> >>> # the same thing can be done by using Bio::PDB#find_residue >>> residues = pdb.find_residue do |residue| >>> (residue.chain.id == "A" and residue.resSeq >= 22) or >>> (residue.chain.id == "B" and residue.resSeq <= 50) >>> end >>> print residues.to_s >>> >>> >> > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From alexg at ruggedtextile.com Wed Feb 20 10:48:06 2008 From: alexg at ruggedtextile.com (Alex Gutteridge) Date: Wed, 20 Feb 2008 15:48:06 +0000 Subject: [BioRuby] Post Hackathon tasks Message-ID: Hi Everybody, I may have missed it in my XML/SOAP/MOBY haze, but was there any attempt to collate a to-do list for Bioruby during the hackathon? I have some time to spare but I'd like to know a) what's most important to work on and b) that no-one else is working on exactly the same thing. If nothing else I will move over the old (but still accurate I think) Bio::PDB documentation to the new wiki and add a section on that to the tutorial page. AlexG From czmasek at burnham.org Wed Feb 20 11:05:51 2008 From: czmasek at burnham.org (Christian M Zmasek) Date: Wed, 20 Feb 2008 08:05:51 -0800 Subject: [BioRuby] Post Hackathon tasks In-Reply-To: References: Message-ID: <47BC4FDF.8020704@burnham.org> Same here. As I mentioned, I would be interested in seeing a feature request list from/for BioRuby users. Christian Alex Gutteridge wrote: > Hi Everybody, > > I may have missed it in my XML/SOAP/MOBY haze, but was there any > attempt to collate a to-do list for Bioruby during the hackathon? I > have some time to spare but I'd like to know a) what's most important > to work on and b) that no-one else is working on exactly the same thing. > > If nothing else I will move over the old (but still accurate I think) > Bio::PDB documentation to the new wiki and add a section on that to > the tutorial page. > > AlexG > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From jan.aerts at bbsrc.ac.uk Wed Feb 20 11:21:18 2008 From: jan.aerts at bbsrc.ac.uk (Jan Aerts) Date: Wed, 20 Feb 2008 16:21:18 +0000 Subject: [BioRuby] Post Hackathon tasks In-Reply-To: <47BC4FDF.8020704@burnham.org> References: <47BC4FDF.8020704@burnham.org> Message-ID: <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> Goto-san, Raoul and I are involved in making sure that we can import/export from/to the main file and database formats such as EMBL, GenBank and BioSQL. See http://hackathon.dbcls.jp/wiki/OpenBio%2A for more info. Basically this involves reading such file into a Bio::Sequence, exporting it and reading it in a second time. The first version of the Bio::Sequence should be the same as the second one... As you can see in lib/bio/db, there are quite a few formats to do, so any help there would be appreciated. And this is all completely apart from any webservices related stuff that might be done... jan. On Wed, 2008-02-20 at 08:05 -0800, Christian M Zmasek wrote: > Same here. > As I mentioned, I would be interested in seeing a feature request list > from/for BioRuby users. > > Christian > > > Alex Gutteridge wrote: > > Hi Everybody, > > > > I may have missed it in my XML/SOAP/MOBY haze, but was there any > > attempt to collate a to-do list for Bioruby during the hackathon? I > > have some time to spare but I'd like to know a) what's most important > > to work on and b) that no-one else is working on exactly the same thing. > > > > If nothing else I will move over the old (but still accurate I think) > > Bio::PDB documentation to the new wiki and add a section on that to > > the tutorial page. > > > > AlexG > > _______________________________________________ > > BioRuby mailing list > > BioRuby at lists.open-bio.org > > http://lists.open-bio.org/mailman/listinfo/bioruby > > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby -- Dr Jan Aerts Bioinformatics Group Roslin Institute Roslin EH25 9PS Scotland, UK tel: +44 131 527 4198 ----...and the obligatory disclaimer---- Roslin Institute is a company limited by guarantee, registered in Scotland (registered number SC157100) and a Scottish Charity (registered number SC023592). Our registered office is at Roslin, Midlothian, EH25 9PS. VAT registration number 847380013. The information contained in this e-mail (including any attachments) is confidential and is intended for the use of the addressee only. The opinions expressed within this e-mail (including any attachments) are the opinions of the sender and do not necessarily constitute those of Roslin Institute (Edinburgh) ("the Institute") unless specifically stated by a sender who is duly authorised to do so on behalf of the Institute. From alexg at ruggedtextile.com Wed Feb 20 12:03:16 2008 From: alexg at ruggedtextile.com (Alex Gutteridge) Date: Wed, 20 Feb 2008 17:03:16 +0000 Subject: [BioRuby] Post Hackathon tasks In-Reply-To: <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> References: <47BC4FDF.8020704@burnham.org> <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> Message-ID: <7558DAFD-1783-4DD4-B7DB-52F2BF25E35E@ruggedtextile.com> Christian: The rubyforge feature request page linked to from here: http://bioruby.open-bio.org/wiki/Bioruby_Resources Seems to be the official way to do it though it is new and there's not much there at the moment. Perhaps a 'to-do' page on the wiki itself would be helpful as well? Jan: I'll see about picking up a sequence format. Do you have anything specific in mind when you say 'webservices related stuff'? I'm working on the Moby client, though that will probably go into BioMoby rather than BioRuby. Is there a specific service we're not supporting at the moment you're thinking of? AlexG On 20 Feb 2008, at 16:21, Jan Aerts wrote: > Goto-san, Raoul and I are involved in making sure that we can > import/export from/to the main file and database formats such as EMBL, > GenBank and BioSQL. See http://hackathon.dbcls.jp/wiki/OpenBio%2A for > more info. Basically this involves reading such file into a > Bio::Sequence, exporting it and reading it in a second time. The first > version of the Bio::Sequence should be the same as the second one... > > As you can see in lib/bio/db, there are quite a few formats to do, so > any help there would be appreciated. > > And this is all completely apart from any webservices related stuff > that > might be done... > > jan. > > > On Wed, 2008-02-20 at 08:05 -0800, Christian M Zmasek wrote: >> Same here. >> As I mentioned, I would be interested in seeing a feature request >> list >> from/for BioRuby users. >> >> Christian >> >> >> Alex Gutteridge wrote: >>> Hi Everybody, >>> >>> I may have missed it in my XML/SOAP/MOBY haze, but was there any >>> attempt to collate a to-do list for Bioruby during the hackathon? I >>> have some time to spare but I'd like to know a) what's most >>> important >>> to work on and b) that no-one else is working on exactly the same >>> thing. >>> >>> If nothing else I will move over the old (but still accurate I >>> think) >>> Bio::PDB documentation to the new wiki and add a section on that to >>> the tutorial page. >>> >>> AlexG >>> _______________________________________________ >>> BioRuby mailing list >>> BioRuby at lists.open-bio.org >>> http://lists.open-bio.org/mailman/listinfo/bioruby >> >> >> _______________________________________________ >> BioRuby mailing list >> BioRuby at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/bioruby > -- > Dr Jan Aerts > Bioinformatics Group > Roslin Institute > Roslin EH25 9PS > Scotland, UK > tel: +44 131 527 4198 > > ----...and the obligatory disclaimer---- > Roslin Institute is a company limited by guarantee, registered in > Scotland (registered number SC157100) and a Scottish Charity > (registered > number SC023592). Our registered office is at Roslin, Midlothian, EH25 > 9PS. VAT registration number 847380013. > > The information contained in this e-mail (including any attachments) > is > confidential and is intended for the use of the addressee only. The > opinions expressed within this e-mail (including any attachments) are > the opinions of the sender and do not necessarily constitute those of > Roslin Institute (Edinburgh) ("the Institute") unless specifically > stated by a sender who is duly authorised to do so on behalf of the > Institute. > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From ktym at hgc.jp Wed Feb 20 12:19:25 2008 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu, 21 Feb 2008 02:19:25 +0900 Subject: [BioRuby] Post Hackathon tasks In-Reply-To: <7558DAFD-1783-4DD4-B7DB-52F2BF25E35E@ruggedtextile.com> References: <47BC4FDF.8020704@burnham.org> <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> <7558DAFD-1783-4DD4-B7DB-52F2BF25E35E@ruggedtextile.com> Message-ID: Hi all, We made web site renewal during the hackathon and it is placed at http://bioruby.open-bio.org/ I'll point bioruby.org to this page shortly. All important resources are linked at the top page in the above. For the todo list, we use 'Bug report' or 'Feature request' at the RubyForge. We have * Wiki docs (replaced with Media Wiki at O|B|F from our own hiki) * API docs (RubyForge) * ML (no change, hosted by O|B|F) * CVS (will be replaced to SVN when BioPerl succeeded to migrate, hosted by O|B|F) * Bug report (RubyForge) * Feature request (RubyForge) Regards, Toshiaki Katayama On 2008/02/21, at 2:03, Alex Gutteridge wrote: > Christian: The rubyforge feature request page linked to from here: > > http://bioruby.open-bio.org/wiki/Bioruby_Resources > > Seems to be the official way to do it though it is new and there's not much there at the moment. Perhaps a 'to-do' page on the wiki itself would be helpful as well? > > Jan: I'll see about picking up a sequence format. Do you have anything specific in mind when you say 'webservices related stuff'? I'm working on the Moby client, though that will probably go into BioMoby rather than BioRuby. Is there a specific service we're not supporting at the moment you're thinking of? > > AlexG > > On 20 Feb 2008, at 16:21, Jan Aerts wrote: > >> Goto-san, Raoul and I are involved in making sure that we can >> import/export from/to the main file and database formats such as EMBL, >> GenBank and BioSQL. See http://hackathon.dbcls.jp/wiki/OpenBio%2A for >> more info. Basically this involves reading such file into a >> Bio::Sequence, exporting it and reading it in a second time. The first >> version of the Bio::Sequence should be the same as the second one... >> >> As you can see in lib/bio/db, there are quite a few formats to do, so >> any help there would be appreciated. >> >> And this is all completely apart from any webservices related stuff that >> might be done... >> >> jan. >> >> >> On Wed, 2008-02-20 at 08:05 -0800, Christian M Zmasek wrote: >>> Same here. >>> As I mentioned, I would be interested in seeing a feature request list >>> from/for BioRuby users. >>> >>> Christian >>> >>> >>> Alex Gutteridge wrote: >>>> Hi Everybody, >>>> >>>> I may have missed it in my XML/SOAP/MOBY haze, but was there any >>>> attempt to collate a to-do list for Bioruby during the hackathon? I >>>> have some time to spare but I'd like to know a) what's most important >>>> to work on and b) that no-one else is working on exactly the same thing. >>>> >>>> If nothing else I will move over the old (but still accurate I think) >>>> Bio::PDB documentation to the new wiki and add a section on that to >>>> the tutorial page. >>>> >>>> AlexG >>>> _______________________________________________ >>>> BioRuby mailing list >>>> BioRuby at lists.open-bio.org >>>> http://lists.open-bio.org/mailman/listinfo/bioruby >>> >>> >>> _______________________________________________ >>> BioRuby mailing list >>> BioRuby at lists.open-bio.org >>> http://lists.open-bio.org/mailman/listinfo/bioruby >> -- >> Dr Jan Aerts >> Bioinformatics Group >> Roslin Institute >> Roslin EH25 9PS >> Scotland, UK >> tel: +44 131 527 4198 >> >> ----...and the obligatory disclaimer---- >> Roslin Institute is a company limited by guarantee, registered in >> Scotland (registered number SC157100) and a Scottish Charity (registered >> number SC023592). Our registered office is at Roslin, Midlothian, EH25 >> 9PS. VAT registration number 847380013. >> >> The information contained in this e-mail (including any attachments) is >> confidential and is intended for the use of the addressee only. The >> opinions expressed within this e-mail (including any attachments) are >> the opinions of the sender and do not necessarily constitute those of >> Roslin Institute (Edinburgh) ("the Institute") unless specifically >> stated by a sender who is duly authorised to do so on behalf of the >> Institute. >> _______________________________________________ >> BioRuby mailing list >> BioRuby at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/bioruby >> > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From shameer at ncbs.res.in Wed Feb 20 11:01:54 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Wed, 20 Feb 2008 21:31:54 +0530 (IST) Subject: [BioRuby] bio.pdb doubt In-Reply-To: <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> Message-ID: <45259.192.168.1.1.1203523314.squirrel@mail.ncbs.res.in> Dear Alex & Goto, Thanks for two different and interesting flavors of Bioruby. Eventhough, I was looking for a simple way like Alex explained. I will go through Naohisa's detailed code as well. Thanks for the excellent support that you guys are giving to newbies like me. I was not able to check my email for last few days. Sorry if there was any delay in replies. Cheers, K. Shameer Computational Biology Group NCBS - TIFR > My posts don't seem to make it to the mailing list from this address, > so I'm reposting - sorry if people get this twice! > > Shameer, > > There's no specific method for testing for multi-chain/single chain > proteins and there are some interesting edge cases (does a small > peptide bound to a large enzyme count as a chain for instance) where > Naohisa's method may give different answers, but one simple way it > just to grab the chains for as an array and check it's size: > > Bio::PDB.new(IO.read('1TIM.pdb')).chains.size > > And because this is Ruby you can always define your own convenience > method on the Bio::PDB class: > > irb(main):007:0> module Bio > irb(main):008:1> class PDB > irb(main):009:2> def multichain? > irb(main):010:3> self.chains.size > 1 > irb(main):011:3> end > irb(main):012:2> end > irb(main):013:1> end > => nil > irb(main):014:0> Bio::PDB.new(IO.read('1TIM.pdb')).multichain? > => true > > AlexG > > On 20 Feb 2008, at 13:53, Naohisa GOTO wrote: > >> Dear Shameer, >> >> Information of chains for each macromolecule is described in >> 'COMPND' record. In BioRuby, Bio::PDB#record method can be used. >> Because the information obtained by the method is sometimes >> naive, processing of the data would be needed. >> >> Below is a sample program: >> >> require 'bio' >> >> def parse_COMPND(pdb) >> molecules = [] >> current_molecule = nil >> pdb.record('COMPND')[0].compound.each do |a| >> case a[0] >> when 'MOL_ID' >> current_molecule = {} >> molecules.push current_molecule >> when 'CHAIN' >> chains = a[1].split(/\s*\,\s*/) >> current_molecule[:chains] = chains >> end >> current_molecule[a[0]] = a[1] >> end >> molecules >> end >> >> pdb1 = Bio::FlatFile.open('pdb1fjg.ent') { |f| f.next_entry } >> pdb2 = Bio::FlatFile.open('pdb1a0d.ent') { |f| f.next_entry } >> >> [ pdb1, pdb2 ].each do |pdb| >> compounds = parse_COMPND(pdb) >> compounds.each do |c| >> p c['MOLECULE'] >> p c[:chains] >> end >> end >> >> The meanings of the 'COMPND' record is described in >> PDB file format document: >> http://www.wwpdb.org/documentation/format23/sect2.html#COMPND >> >> -- >> Naohisa Goto >> ngoto at gen-info.osaka-u.ac.jp /ng at bioruby.org >> From shameer at ncbs.res.in Wed Feb 20 11:19:13 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Wed, 20 Feb 2008 21:49:13 +0530 (IST) Subject: [BioRuby] Post Hackathon tasks In-Reply-To: <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> References: <47BC4FDF.8020704@burnham.org> <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> Message-ID: <55512.192.168.1.1.1203524353.squirrel@mail.ncbs.res.in> Dear All, Here is my .5 cents :) * Flat file conversion module (Genbank, FASTA, PIR, EMBL, SP, etc. ) Is there any flat file/feature rich format conversion module in BioRuby. If it is not there it will be nice to see one in the next release. This will be one of the basic and useful utility. * Revised tutorials are always welcome Alex, Hope you will include the examples based on the last two bio.pdb doubts as well. * More examples are required in Gene Ontology * It will be great if some one who implimented a bioruby + rails application using can explain it in the tutorial section. *** I am interested to contribute to BioRuby project, It will be great if somebody can direct me to do some works. Documentation work will be fine in the beginning and later I can contribute some modules as well. Cheers, -- K. Shameer Senior Research Fellow Prof. R. Sowdhamini's Lab (# 25) The Computational Biology Group National Centre for Biological Sciences (TIFR) GKVK Campus, Bangalore - 65, Karnataka - India T - 91-080-23666001 EXT - 6251 W - http://www.ncbs.res.in From shameer at ncbs.res.in Wed Feb 20 13:01:31 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Wed, 20 Feb 2008 23:31:31 +0530 (IST) Subject: [BioRuby] Bio.pdb doubt ... Message-ID: <59355.192.168.1.1.1203530491.squirrel@mail.ncbs.res.in> Hi Alex, I used this code to check chain identifiers. But I noticed the code is giving true for multichain and single chain entries. Can you please have a look at the code, require 'bio' module Bio class PDB def multichain? self.chains.size > 1 end end end inputpdb = ARGV[0] if ARGV[0] == nil puts "please give an argument" end test = Bio::PDB.new(IO.read(inputpdb)).multichain? print test,"\n" I run this code using chain.rb test/1tca.pdb -> out put was 'true'(this shouldbe false - there is only one chain in 1TCA) and out put was 'true' for 1a7b as well. Thanks in advance, Shameer PS. Now I am going to try Goto's code. From jan.aerts at bbsrc.ac.uk Thu Feb 21 04:54:37 2008 From: jan.aerts at bbsrc.ac.uk (Jan Aerts) Date: Thu, 21 Feb 2008 09:54:37 +0000 Subject: [BioRuby] Post Hackathon tasks In-Reply-To: <55512.192.168.1.1.1203524353.squirrel@mail.ncbs.res.in> References: <47BC4FDF.8020704@burnham.org> <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> <55512.192.168.1.1.1203524353.squirrel@mail.ncbs.res.in> Message-ID: <1203587677.6327.32.camel@rilxvm05.ebrc.bbsrc.ac.uk> Thanks Shameer. > * Flat file conversion module (Genbank, FASTA, PIR, EMBL, SP, etc. ) > Is there any flat file/feature rich format conversion module in BioRuby. > If it is not there it will be nice to see one in the next release. This > will be one of the basic and useful utility. > This happens to be something we started working on during the hackathon. You'll be able to read an EMBL file and write it out as GenBank. Formats we're looking at at the moment are GenBank, EMBL and Fasta. > * Revised tutorials are always welcome Alex, Hope you will include the > examples based on the last two bio.pdb doubts as well. These should end up on the new wiki: http://bioruby.open-bio.org/wiki/Main_Page -> Documentation -> Tutorials I'm planning on working on a tutorial myself on how to recalculate positions between query and subject in a BLAST output. > *** I am interested to contribute to BioRuby project, It will be great if > somebody can direct me to do some works. Documentation work will be fine > in the beginning and later I can contribute some modules as well. We might be able to think of something :-) jan. From alexg at ruggedtextile.com Thu Feb 21 05:27:56 2008 From: alexg at ruggedtextile.com (Alex Gutteridge) Date: Thu, 21 Feb 2008 10:27:56 +0000 Subject: [BioRuby] Bio.pdb doubt ... In-Reply-To: <59355.192.168.1.1.1203530491.squirrel@mail.ncbs.res.in> References: <59355.192.168.1.1.1203530491.squirrel@mail.ncbs.res.in> Message-ID: I shouldn't have posted code without testing first! The problem is that the PDB parser reads the solvent (water) molecules into a separate chain. So in this case we have the protein chain and the water 'chain'. My naive multichain? method then reports you have two chains. A reasonable workaround is to check each chain to see if it actually contains any residues. We can test this my retrieving the residue array for each chain and checking if its size is greater than 0. So our multichain? method becomes a bit more complex: irb(main):029:0> module Bio irb(main):030:1> class PDB irb(main):031:2> def multichain? irb(main):032:3> self.chains.select{|chain| chain.residues.size > 0}.size > 1 irb(main):033:3> end irb(main):034:2> end irb(main):035:1> end => nil irb(main):036:0> Bio::PDB.new(IO.read('1TCA.pdb')).multichain? => false irb(main):037:0> Bio::PDB.new(IO.read('1A7B.pdb')).multichain? => true DISCLAIMER: You still might run into edge cases with things like bound ligands and so on. If these are small peptides they will be considered as separate chains even if you don't think they should be. One way round this would be to alter the residue size test in the code above to look for chains with more than x residues (where x could be 5,10,30 or so) to filter out very small chains. You'll have to make that call according to your needs and particular research. On 20 Feb 2008, at 18:01, K. Shameer wrote: > Hi Alex, > > I used this code to check chain identifiers. But I noticed the code is > giving true for multichain and single chain entries. > > Can you please have a look at the code, > > require 'bio' > module Bio > class PDB > def multichain? > self.chains.size > 1 > end > end > end > inputpdb = ARGV[0] > if ARGV[0] == nil > puts "please give an argument" > end > test = Bio::PDB.new(IO.read(inputpdb)).multichain? > print test,"\n" > > I run this code using chain.rb test/1tca.pdb -> out put was > 'true'(this > shouldbe false - there is only one chain in 1TCA) and out put was > 'true' > for 1a7b as well. > > Thanks in advance, > Shameer > > PS. Now I am going to try Goto's code. > > > > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From shameer at ncbs.res.in Thu Feb 21 05:27:03 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Thu, 21 Feb 2008 15:57:03 +0530 (IST) Subject: [BioRuby] bio.pdb doubt In-Reply-To: <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> Message-ID: <44687.192.168.1.1.1203589623.squirrel@mail.ncbs.res.in> Alex, > I shouldn't have posted code without testing first! :) > > The problem is that the PDB parser reads the solvent (water) molecules > into a separate chain. So in this case we have the protein chain and > the water 'chain'. My naive multichain? method then reports you have > two chains. Is this something unusual ? In a structural bioinformatics scenario solvent/water belongs to the HETATM definition. I am not able understand the logic behind the consideration of a ATOM records as well as HETATM records as part of chain. > A reasonable workaround is to check each chain to see if it actually > contains any residues. We can test this my retrieving the residue > array for each chain and checking if its size is greater than 0. So > our multichain? method becomes a bit more complex: > > DISCLAIMER: You still might run into edge cases with things like bound > ligands and so on. If these are small peptides they will be considered > as separate chains even if you don't think they should be. One way > round this would be to alter the residue size test in the code above > to look for chains with more than x residues (where x could be 5,10,30 > or so) to filter out very small chains. You'll have to make that call > according to your needs and particular research. This alright with me. In case of small peptides, I need them to be considered as separate chains only. Thanks for the detailed explanation. I modified the script as you suggest. W00t!!! My first bioruby script (that not mentioned in tutorial) is up and running - Thank you Alex, Thanks Naohisa :) !!!! -- K. Shameer Lab (# 25) The Computational Biology Group National Centre for Biological Sciences (TIFR) GKVK Campus, Bangalore - 65, Karnataka - India T - 91-080-23666001 EXT - 6251 W - http://www.ncbs.res.in From shameer at ncbs.res.in Thu Feb 21 05:38:18 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Thu, 21 Feb 2008 16:08:18 +0530 (IST) Subject: [BioRuby] Post Hackathon tasks In-Reply-To: <1203587677.6327.32.camel@rilxvm05.ebrc.bbsrc.ac.uk> References: <47BC4FDF.8020704@burnham.org> <1203524478.19242.29.camel@rilxvm05.ebrc.bbsrc.ac.uk> <55512.192.168.1.1.1203524353.squirrel@mail.ncbs.res.in> <1203587677.6327.32.camel@rilxvm05.ebrc.bbsrc.ac.uk> Message-ID: <48746.192.168.1.1.1203590298.squirrel@mail.ncbs.res.in> Dear Jan and all, >> * Flat file conversion module (Genbank, FASTA, PIR, EMBL, SP, etc. ) >> Is there any flat file/feature rich format conversion module in BioRuby. >> If it is not there it will be nice to see one in the next release. This >> will be one of the basic and useful utility. >> > This happens to be something we started working on during the hackathon. > You'll be able to read an EMBL file and write it out as GenBank. Formats > we're looking at at the moment are GenBank, EMBL and Fasta. It will be great if you could add FASTA to PIR as well. I do a lot of homology modelling using MODELLER. I always need to convert my FASTA files to PIR using custom script either manually or custom-perl scripts. >> * Revised tutorials are always welcome Alex, Hope you will include the >> examples based on the last two bio.pdb doubts as well. > These should end up on the new wiki: > http://bioruby.open-bio.org/wiki/Main_Page -> Documentation -> Tutorials Hats off to all the people behind the new page !!! Excellent design :) Many thanks to Katayama for the Rails video. I am going try this out tonite. > > I'm planning on working on a tutorial myself on how to recalculate > positions between query and subject in a BLAST output. I am looking forward to see it. > >> *** I am interested to contribute to BioRuby project, It will be great >> if >> somebody can direct me to do some works. Documentation work will be fine >> in the beginning and later I can contribute some modules as well. > We might be able to think of something :-) My fingers are crossed, I am eagerly waiting for the reply :) -- K. Shameer Lab (# 25) The Computational Biology Group National Centre for Biological Sciences (TIFR) GKVK Campus, Bangalore - 65, Karnataka - India T - 91-080-23666001 EXT - 6251 W - http://www.ncbs.res.in From alexg at ruggedtextile.com Thu Feb 21 06:08:08 2008 From: alexg at ruggedtextile.com (Alex Gutteridge) Date: Thu, 21 Feb 2008 11:08:08 +0000 Subject: [BioRuby] bio.pdb doubt In-Reply-To: <44687.192.168.1.1.1203589623.squirrel@mail.ncbs.res.in> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> <44687.192.168.1.1.1203589623.squirrel@mail.ncbs.res.in> Message-ID: On 21 Feb 2008, at 10:27, K. Shameer wrote: > Alex, > >> I shouldn't have posted code without testing first! > > :) > >> >> The problem is that the PDB parser reads the solvent (water) >> molecules >> into a separate chain. So in this case we have the protein chain and >> the water 'chain'. My naive multichain? method then reports you have >> two chains. > > Is this something unusual ? In a structural bioinformatics scenario > solvent/water belongs to the HETATM definition. I am not able > understand > the logic behind the consideration of a ATOM records as well as HETATM > records as part of chain. It's a cludge, no doubt about that. There may well be a better solution but it's also not trivial. A couple of problems come up in practice: 1. How do you know what the solvent is? In 99% cases it's HOH but not always. Sometimes you have all sorts of other weird molecules floating around. If you siphon off all HOH molecules into a separate 'solvent' data structure you'll loose information for some structures. 2. The HETATM/ATOM distinction is tricky as well. Some HETATM records (including the solvent in some PDB files) are given distinct chain ids and in some cases do represent linear chain like molecules. Bound DNA for instance: ATOM? HETATM? Chain? Not a chain? There is no consistent representation of these things in (legacy) PDB files so any choice you make will be a compromise. That said, if you want to have a poke through the PDB parser and make some changes then be my guest. It's been a while since I did any PDB stuff (and god-willing it will be a while until I do some more!) so it's an area that could probably do with a fresh pair of eyes. From shameer at ncbs.res.in Thu Feb 21 07:31:45 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Thu, 21 Feb 2008 18:01:45 +0530 (IST) Subject: [BioRuby] bio.pdb doubt In-Reply-To: References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> <44687.192.168.1.1.1203589623.squirrel@mail.ncbs.res.in> Message-ID: <33444.192.168.1.1.1203597105.squirrel@mail.ncbs.res.in> Hi Alex, Thanks for the detailed explanation. > 1. How do you know what the solvent is? In 99% cases it's HOH but not > always. Sometimes you have all sorts of other weird molecules floating > around. If you siphon off all HOH molecules into a separate 'solvent' > data structure you'll loose information for some structures. This true. I agree with you. But it will be great if we could have a way to handle solvent as a separate data structure rather than part of the chain. This will be again useful for people who wanted to add water / remove water as a requirement for some analysis (for example Molecular Dynamics) > 2. The HETATM/ATOM distinction is tricky as well. Some HETATM records > (including the solvent in some PDB files) are given distinct chain ids > and in some cases do represent linear chain like molecules. Bound DNA > for instance: ATOM? HETATM? Chain? Not a chain? There is no consistent > representation of these things in (legacy) PDB files so any choice you > make will be a compromise. I agree with you in the case of NA and in the data inconsistency issues with PDB files. But in case of protein complexes HETATM tags are very helpful. For example I used to extract ligands(small molecules) from set of related PDB (ligand + receptor complex) files to use as a library of substrates for docking studies. I dont know how easily I can code this with BioRuby/Bio.PDB. I haven't tried this with bioruby. But I will try it out very soon. > That said, if you want to have a poke through the PDB parser and make > some changes then be my guest. It's been a while since I did any PDB > stuff (and god-willing it will be a while until I do some more!) so > it's an area that could probably do with a fresh pair of eyes. That will be interesting, provided if you could offer some offline help/directions to start with. Infact I am specifically interested in something that has not taken up by any of the Bio-toolkit libraries :). Can we (Alex, Jan, all other bioruby pros and Shameer) work on to develop a module that integrated both Bio.Pdb and Bio-Graphics module to generate modular topology diagrams ? Please let me know your comments, we can discuss and work on this :) !!! Thanks, Shameer NCBS-TIFR From alexg at ruggedtextile.com Thu Feb 21 08:47:37 2008 From: alexg at ruggedtextile.com (Alex Gutteridge) Date: Thu, 21 Feb 2008 13:47:37 +0000 Subject: [BioRuby] bio.pdb doubt In-Reply-To: <33444.192.168.1.1.1203597105.squirrel@mail.ncbs.res.in> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> <44687.192.168.1.1.1203589623.squirrel@mail.ncbs.res.in> <33444.192.168.1.1.1203597105.squirrel@mail.ncbs.res.in> Message-ID: <42A500BD-806D-4264-BF54-A025DEB5E036@ruggedtextile.com> On 21 Feb 2008, at 12:31, K. Shameer wrote: >> 2. The HETATM/ATOM distinction is tricky as well. Some HETATM records >> (including the solvent in some PDB files) are given distinct chain >> ids >> and in some cases do represent linear chain like molecules. Bound DNA >> for instance: ATOM? HETATM? Chain? Not a chain? There is no >> consistent >> representation of these things in (legacy) PDB files so any choice >> you >> make will be a compromise. > > I agree with you in the case of NA and in the data inconsistency > issues > with PDB files. But in case of protein complexes HETATM tags are > very > helpful. For example I used to extract ligands(small molecules) from > set > of related PDB (ligand + receptor complex) files to use as a library > of > substrates for docking studies. I dont know how easily I can code this > with BioRuby/Bio.PDB. I haven't tried this with bioruby. But I will > try > it out very soon. It should be easily doable. If not the library more needs work, as this is just the kind of thing it is designed to help with. >> That said, if you want to have a poke through the PDB parser and make >> some changes then be my guest. It's been a while since I did any PDB >> stuff (and god-willing it will be a while until I do some more!) so >> it's an area that could probably do with a fresh pair of eyes. > > That will be interesting, provided if you could offer some offline > help/directions to start with. Infact I am specifically interested in > something that has not taken up by any of the Bio-toolkit > libraries :). > Can we (Alex, Jan, all other bioruby pros and Shameer) work on to > develop > a module that integrated both Bio.Pdb and Bio-Graphics module to > generate > modular topology diagrams ? Please let me know your comments, we can > discuss and work on this :) !!! The parser reads the SHEET / HELIX / TURN records from the PDB file. I've never really played with them, but they look easily readable. irb(main):011:0> pdb = Bio::PDB.new(IO.read('/homes/alexg/Desktop/ 1TCA.pdb')) => # irb(main):012:0> pdb.record['HELIX'].each do |helix| irb(main):013:1* puts "Start: #{helix.initSeqNum} - End: #{helix.endSeqNum}" irb(main):014:1> end Start: 13 - End: 18 Start: 44 - End: 57 Start: 76 - End: 93 Start: 106 - End: 117 Start: 142 - End: 146 Start: 152 - End: 156 Start: 162 - End: 169 Start: 212 - End: 216 Start: 226 - End: 242 Start: 268 - End: 287 Start: 119 - End: 121 Start: 139 - End: 141 Start: 250 - End: 252 Start: 255 - End: 257 Start: 302 - End: 304 Start: 68 - End: 70 Going from there to an overall topology diagram (are you thinking of something like this: http://www.ebi.ac.uk/thornton-srv/databases/pdbsum/1tca/domA01.gif) is more complicated. I guess the first step would be analysing the structure to see how the secondary structure elements interact and then applying some kind of layout algorithm (putting sheets side by side, etc...) Once you have the layout, using Bio-graphics, Cairo or something else to do the drawing is pretty straight forward (I assume!). I know Roman Laskowski, who runs PDBSum. So I could ask him how his topology generation script works - if that's the kind of thing you are thinking of. AlexG From shameer at ncbs.res.in Thu Feb 21 14:09:30 2008 From: shameer at ncbs.res.in (K. Shameer) Date: Fri, 22 Feb 2008 00:39:30 +0530 (IST) Subject: [BioRuby] bio.pdb + biographics In-Reply-To: <42A500BD-806D-4264-BF54-A025DEB5E036@ruggedtextile.com> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <41452.192.168.1.1.1202891064.squirrel@mail.ncbs.res.in> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> <44687.192.168.1.1.1203589623.squirrel@mail.ncbs.res.in> <33444.192.168.1.1.1203597105.squirrel@mail.ncbs.res.in> <42A500BD-806D-4264-BF54-A025DEB5E036@ruggedtextile.com> Message-ID: <38761.192.168.1.1.1203620970.squirrel@mail.ncbs.res.in> Dear Alex, >> Infact I am specifically interested in >> something that has not taktions to start wen up by any of the Bio-toolkit >> libraries :). >> Can we (Alex, Jan, all other bioruby pros and Shameer) work on to >> develop a module that integrated both Bio.Pdb and Bio-Graphics module to >> generate odular topology diagrams ? Please let me know your comments, we >> can discuss and work on this :) !!! > The parser reads the SHEET / HELIX / TURN records from the PDB file. > I've never really played with them, but they look easily readable. It is always better to get the structure information from DSSP/SSTRUC sort of accessory files than the orginal PDB files. The secondory structure information will be in detail in these accessory files. If it works well with PDB, we can parse the SHEET / HELIX / TURN as well. > > Going from there to an overall topology diagram (are you thinking of > something like this: > http://www.ebi.ac.uk/thornton-srv/databases/pdbsum/1tca/domA01.gif) > is more complicated. Yep, some thing similar and elaboraded. If it is available as a module the interactivity will be high. In PDBSum only domain based topology diagrams are available. They are getting domain information from CATH. In our module there should be many possibilities : user can define the canvas, color the sec str, print residue no, residue details etc. The module should also be able to plot different chains of a given protein as well... (i think am all excited, am getting unlimited ideas ... :) ) > I guess the first step would be analysing the > structure to see how the secondary structure elements interact and > then applying some kind of layout algorithm (putting sheets side by > side, etc...) Once you have the layout, using Bio-graphics, Cairo or > something else to do the drawing is pretty straight forward (I assume!). There you go - You are right. I think we can easily trace out the structure layout from DSSP/SSTRUC file. I will talk to my Boss and get back to you with details. > > I know Roman Laskowski, who runs PDBSum. So I could ask him how his > topology generation script works - if that's the kind of thing you are > thinking of. That will be great !! I asked Roman Laskowski about the availability of that program, thats not available for the public at the moment. Thanks, Shameer From adamnkraut at gmail.com Thu Feb 21 17:27:17 2008 From: adamnkraut at gmail.com (Adam Kraut) Date: Thu, 21 Feb 2008 17:27:17 -0500 Subject: [BioRuby] bio.pdb + biographics In-Reply-To: <38761.192.168.1.1.1203620970.squirrel@mail.ncbs.res.in> References: <55915f820802130013y5b5606dao7b7a48416c8b5a15@mail.gmail.com> <20080214182633.A951.NGOTO@gen-info.osaka-u.ac.jp> <35356.192.168.1.1.1203311763.squirrel@mail.ncbs.res.in> <20080220135353.663401CBC441@idnmail.gen-info.osaka-u.ac.jp> <12761A93-613B-4CC6-9D11-8B02DAAB80FC@ruggedtextile.com> <44687.192.168.1.1.1203589623.squirrel@mail.ncbs.res.in> <33444.192.168.1.1.1203597105.squirrel@mail.ncbs.res.in> <42A500BD-806D-4264-BF54-A025DEB5E036@ruggedtextile.com> <38761.192.168.1.1.1203620970.squirrel@mail.ncbs.res.in> Message-ID: <134ede0b0802211427t4e05f588p82b21076b4d87684@mail.gmail.com> Even though I work with PDB's often I still write one-off parsers for each particular project since a generic parser tends to break more often than not. There's a good post about this at: http://boscoh.com/protein/parsing-pdb-files-sometimes-you-really-should-reinvent-the-wheel The challenges to having a robust PDB parser seem to be caused by inconsistency in the legacy format. Since the PDB remediation ( http://remediation.wwpdb.org/) maybe things could be better? The few times I've used Bio::PDB it was too slow for me, and this will only get worse if you try to include every possible use someone could have for macromolecular structures. It would be nice if the Ruby language had something new to offer as I recall similar frustrations when using the PDB parts of Bioperl. The best PDB manipulation scripts I've used are part of the MMTSB toolset: http://blue11.bch.msu.edu/mmtsb/Main_Page But it's still Perl and I'd love to see or help Ruby become more useful in structural bioinformatics. Bio::Graphics seems to be focused mostly on DNA sequences. I've been meaning to try adding secondary structure glyphs (Helix glyph, Sheet (arrow) glyph, etc) onto protein sequences similar to what you might see in the results of a secondary structure prediction. The topology graphics like those generated in PDBsum are very nice but just having the glyphs along a sequence would be convenient. If I really want to see a structure in detail it's best to use a something that supports 3D graphics such as VMD or PyMOL in my opinion. -Adam On Thu, Feb 21, 2008 at 2:09 PM, K. Shameer wrote: > Dear Alex, > > >> Infact I am specifically interested in > >> something that has not taktions to start wen up by any of the > Bio-toolkit > >> libraries :). > >> Can we (Alex, Jan, all other bioruby pros and Shameer) work on to > >> develop a module that integrated both Bio.Pdb and Bio-Graphics module > to > >> generate odular topology diagrams ? Please let me know your comments, > we >> can discuss and work on this :) !!! > > The parser reads the SHEET / HELIX / TURN records from the PDB file. > > I've never really played with them, but they look easily readable. > > It is always better to get the structure information from DSSP/SSTRUC sort > of accessory files than the orginal PDB files. The secondory structure > information will be in detail in these accessory files. If it works well > with PDB, we can parse the SHEET / HELIX / TURN as well. > > > > > Going from there to an overall topology diagram (are you thinking of > > something like this: > > http://www.ebi.ac.uk/thornton-srv/databases/pdbsum/1tca/domA01.gif) > > is more complicated. > Yep, some thing similar and elaboraded. If it is available as a module > the interactivity will be high. In PDBSum only domain based topology > diagrams are available. They are getting domain information from CATH. In > our module there should be many possibilities : user can define the > canvas, color the sec str, print residue no, residue details etc. The > module should also be able to plot different chains of a given protein as > well... (i think am all excited, am getting unlimited ideas ... :) ) > > > I guess the first step would be analysing the > > structure to see how the secondary structure elements interact and > > then applying some kind of layout algorithm (putting sheets side by > > side, etc...) Once you have the layout, using Bio-graphics, Cairo or > > something else to do the drawing is pretty straight forward (I assume!). > > There you go - You are right. I think we can easily trace out the > structure layout from DSSP/SSTRUC file. I will talk to my Boss and get > back to you with details. > > > > I know Roman Laskowski, who runs PDBSum. So I could ask him how his > > topology generation script works - if that's the kind of thing you are > > thinking of. > > That will be great !! I asked Roman Laskowski about the availability of > that program, thats not available for the public at the moment. > > Thanks, > Shameer > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From jan.aerts at bbsrc.ac.uk Fri Feb 22 02:49:42 2008 From: jan.aerts at bbsrc.ac.uk (jan aerts (RI)) Date: Fri, 22 Feb 2008 07:49:42 -0000 Subject: [BioRuby] bio.pdb + biographics Message-ID: <1F16910BB8546C4DA5526FABB0C98D09AA9B0C@ebre2ksrv1.ebrc.bbsrc.ac.uk> > sequences. I've been meaning to try adding secondary structure glyphs > (Helix glyph, Sheet (arrow) glyph, etc) onto protein sequences similar to > what you might see in the results of a secondary structure prediction. The > topology graphics like those generated in PDBsum are very nice but just > having the glyphs along a sequence would be convenient. If I really want to @Adam: Nice to see you're interested in Bio::Graphics. Have you had any success in writing those helix and sheet glyphs? At least the arrow glyph is easily done by modifying directed_generic a little bit. Note this is not the best code yet... Just a quick fix :-) module Bio::Graphics::Glyph class Bio::Graphics::Glyph::Arrow < Bio::Graphics::Glyph::Common def draw if @subfeature.strand == -1 # Reverse strand @feature_context.rectangle(self.left_pixel+Bio::Graphics::FEATURE_ARROW_LENGTH, 0, self.right_pixel - self.left_pixel - Bio::Graphics::FEATURE_ARROW_LENGTH, Bio::Graphics::FEATURE_HEIGHT).fill arrow(@feature_context,:left,self.left_pixel+Bio::Graphics::FEATURE_ARROW_LENGTH + 4,-4,Bio::Graphics::FEATURE_ARROW_LENGTH + 4) @feature_context.close_path.fill else #default is forward strand @feature_context.rectangle(self.left_pixel, 0, self.right_pixel- self.left_pixel - Bio::Graphics::FEATURE_ARROW_LENGTH, Bio::Graphics::FEATURE_HEIGHT).fill arrow(@feature_context,:right,self.right_pixel-Bio::Graphics::FEATURE_ARROW_LENGTH - 4,-4,Bio::Graphics::FEATURE_ARROW_LENGTH + 4) @feature_context.close_path.fill end end end end I'm looking into making feature height and stuff also adjustable by the user. At the moment it's fixed at 10 pixels. I suppose for a glyph like this you'd want much wider glyphs. It depends on what type of glyph you'd like to see for a helix if it's straightforward or not. At least _something_ should be possible. Whether it'd really look like a helix is up to our creativity... jan.