From ktym at hgc.jp Tue Apr 3 16:38:01 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Wed, 4 Apr 2007 05:38:01 +0900 Subject: [BioRuby] "Read an ASN.1 file" and "Using a BioSQL database" !!! In-Reply-To: References: <98028b00703081502p6277cc4h5bae0e0908b0fe89@mail.gmail.com> <98028b00703090653x1fc3567eyddf1f135d217f668@mail.gmail.com> Message-ID: <78F69ECC-32B8-4196-A409-1D5BE751DB27@hgc.jp> On 2007/03/27, at 14:48, Toshiaki Katayama wrote: > On 2007/03/13, at 14:23, Moses M. Hohman wrote: >> but AFAIK BioRuby does not support BioSQL, > > Currently it might be broken, but BioRuby supported BioSQL from the beginning of > the BioSQL project which is developed during three BioHackathon meetings (2002, 2003). > > I wrote basic BioSQL module which support Cape Town schema (2002), but I was lazy > to update it. > > However, AFAIK, RJP is working on ActiveRecord + BioSQL integration (2006, December) > to replace my old one. Raoul, could you post your recent status on it? Sorry, I forgot but RJP also worked on fixing bio/io/sql.rb module in 2006, so the current version should not be broken. I don't follow the recent changes on BioSQL schema but during the last Phyloinformatics Hackathon (2006 Dec http://hackathon.nescent.org/), which we (Goto-san and me) had attended, Hilmar was working on the integration of tree into the database. https://www.nescent.org/wg/phyloinformatics/index.php?title=Supporting_NEXUS BioSQL The BioSQL group created a new set of tables, optional within BioSQL, for the purposes of storing phylogenetic trees, both sequence or species. A script was added to the package that allows one to read NEXUS files and write any trees found in the files to the database. Toshiaki From ktym at hgc.jp Tue Apr 3 16:30:59 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Wed, 4 Apr 2007 05:30:59 +0900 Subject: [BioRuby] Fwd: [blast-announce] [BLAST-Announce #59] New BLAST design to be released on April 16, 2007 References: Message-ID: <2F9F87B4-5684-4CCB-BE05-9E1AFE0AEFE6@hgc.jp> Hi, NCBI announced that their BLAST interface will change. Currently, BioRuby does not support remote BLAST on NCBI server (we have remote BLAST on GenomeNet and SOAP access for DDBJ BLAST service, instead). Are there anyone working on the NCBI's URLAPI? Toshiaki Begin forwarded message: > From: "Mcginnis, Scott (NIH/NLM/NCBI) [E]" > Date: 2007?4?3? 2:57:48:JST > To: > Subject: [blast-announce] [BLAST-Announce #59] New BLAST design to be released on April 16, 2007 > > April 2, 2007: New BLAST design to be released on April 16, 2007 > ---------------------------------------------------------------- > > The new NCBI BLAST pages will become the default interface at > http://ncbi.nlm.nih.gov/blast on April 16, 2007. The new > interface is currently available as a beta release at > http://ncbi.nlm.nih.gov/blast/beta/. For details on the new > interface, see http://www.ncbi.nlm.nih.gov/BLAST/beta/about/. > > After the new interface is released, the previous interface will > remain available from a link on the new front page until May 14, > 2007. > > A Note About URLAPI > > The new BLAST pages support URLAPI, a protocol that scripts and > programs use to run BLAST searches and retrieve results over > HTTP. (For more on URLAPI, see > http://www.ncbi.nlm.nih.gov/blast/Doc/urlapi.html). The following > information only applies to you if you develop or are responsible > for software that uses URLAPI. > > The new pages have been tested and produce correct results with > the following URLAPI client programs: > > * the BioPERL RemoteBlast module > * the NCBI demo script http://ncbi.nlm.nih.gov/blast/docs/web_blast.pl > * various scripts used in-house at NCBI > > Users of URLAPI should be aware of the following minor > changes. In the new interface: > > 1. The Request ID (RID) format will be shorter. The new format > is 11 alphanumeric characters (e.g. RDEFEA5012) and will have no > internal structure. The previous RID format was 36 or more > characters long, including punctuation (e.g., > 1175172712-21345-42512597310.BLASTQ3). > > 2. BLAST reports will show masked regions as lower-case letters > by default (see > http://nar.oxfordjournals.org/cgi/content/full/34/suppl_2/W6, > figure 2. The current default behavior is to show masked > regions as N's or X's. Users may recover the current behavior > by adding &MASK_CHAR=0 to the query string for a URLAPI > request. > > 3. BLAST reports will show alignments for 100 database sequences > by default. The current reports show only 50 alignments by > default. > > If you have any questions please send them to mcginnis at ncbi.nlm.nih.gov From ktym at hgc.jp Tue Apr 3 16:30:20 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Wed, 4 Apr 2007 05:30:20 +0900 Subject: [BioRuby] restriction enzyme module Message-ID: Trevor, I think that we are ready for the next release on core part, but I have some requests on the coding style of your modules to be included in the release. Firstly, your code is well documented but you have a lot of sub classes under the Bio::RestrictionEnzyme name space. It looks very complicated and I still don't understand which class to use depending on the situations. Could you describe the typical use cases? I hope to include your description in the tutorial, if possible. module Bio class RestrictionEnzyme module CutSymbol class CutSymbol__ module StringFormatting class Fragments < Array class Analysis class DoubleStranded class EnzymeAction (empty?) class AlignedStrands class CutLocationPair < Array class CutLocationPairInEnzymeNotation < CutLocationPair class CutLocations < Array class CutLocationsInEnzymeNotation < CutLocations class SingleStrand < Bio::Sequence::NA class CutLocationsInEnzymeNotation < Array class SingleStrandComplement < SingleStrand (only def orientation; [3, 5]; end) class Range class CutRange (empty?) class CutRanges < Array class HorizontalCutRange < CutRange class SequenceRange class CalculatedCuts class Fragment class Fragments < Array class VerticalCutRange < CutRange Secondly, I don't like to have code to modify the RUBYLIB in the library. lib/bio/util/restriction_enzyme/analysis.rb lib/bio/util/restriction_enzyme/analysis_basic.rb lib/bio/util/restriction_enzyme/double_stranded.rb lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb lib/bio/util/restriction_enzyme/range/cut_range.rb lib/bio/util/restriction_enzyme/range/cut_ranges.rb lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb lib/bio/util/restriction_enzyme/range/sequence_range.rb lib/bio/util/restriction_enzyme/range/sequence_range/calculated_cuts.rb lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb lib/bio/util/restriction_enzyme/single_strand.rb lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb lib/bio/util/restriction_enzyme/single_strand_complement.rb lib/bio/util/restriction_enzyme/string_formatting.rb -------------------------------------------------- require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s $:.unshift(libpath) unless $:.include?(libpath) -------------------------------------------------- Why these lines are needed? Loading all modules under the restriction_enzyme directory in lib/bio/util/restriction_enzyme.rb isn't enough? lib/bio/util/restriction_enzyme/integer.rb -------------------------------------------------- class Integer #:nodoc: def negative? self < 0 end end -------------------------------------------------- I don't like to modify the Ruby's build-in classes in BioRuby library. Besides, this file only contains the above definition and the method doesn't seem to worth to be added. You used this method only few times and if (a != nil and a.negative?) or (b != nil and b.negative?) is enough to be if (a != nil and a < 0) or (b != nil and b < 0) How do you think? lib/bio/util/restriction_enzyme/analysis_basic.rb -------------------------------------------------- require 'pp' -------------------------------------------------- Why you need 'pp' library here? (It seems that the module is not used.) lib/bio/util/restriction_enzyme/range/cut_range.rb -------------------------------------------------- module Bio; end class Bio::RestrictionEnzyme class Range class CutRange end # CutRange end # Range end # Bio::RestrictionEnzyme -------------------------------------------------- Why this empty class need to be present? lib/bio/util/restriction_enzyme/analysis_basic.rb -------------------------------------------------- # Creates an array of EnzymeActions based on the DNA sequence and supplied enz ymes. # # --- # *Arguments* # * +sequence+: The string of DNA to match the enzyme recognition sites agains t # * +args+:: The enzymes to use. # *Returns*:: +Array+ with the first element being an array of EnzymeAction ob jects that +sometimes_cut+, and are subject to competition. The second is an ar ray of EnzymeAction objects that +always_cut+ and are not subject to competition . -------------------------------------------------- Could you fold your RDoc documents less than 80 columns as long as possible? Or should I use larger terminal width...? And, you looks to have different strategies for RDoc documentation on each file. Which is the best practice? lib/bio/util/restriction_enzyme.rb -------------------------------------------------- module Bio #:nodoc: -------------------------------------------------- or lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb -------------------------------------------------- module Bio; end -------------------------------------------------- or lib/bio/util/restrction_enzyme/cut_symbol.rb -------------------------------------------------- nil # to separate file-level rdoc from following statement # !> useless use of n il in void context -------------------------------------------------- Besides, many of your modules have duplicated header lines (module name, authors, copyright etc.). However, this is not the way documented in the README.DEV file (included in the BioRuby distribution). Why you do so? lib/bio/util/color_scheme.rb lib/bio/util/contingency_table.rb lib/bio/util/restriction_enzyme.rb lib/bio/util/restrction_enzyme/analysis.rb lib/bio/util/restriction_enzyme/analysis_basic.rb lib/bio/util/restriction_enzyme/cut_symbol.rb lib/bio/util/restriction_enzyme/double_stranded.rb lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb lib/bio/util/restriction_enzyme/range/cut_range.rb lib/bio/util/restriction_enzyme/range/cut_ranges.rb lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb lib/bio/util/restriction_enzyme/range/sequence_range.rb lib/bio/util/restriction_enzyme/range/sequence_range/calculated_cuts.rb lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb lib/bio/util/restriction_enzyme/single_strand.rb lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb lib/bio/util/restriction_enzyme/single_strand_complement.rb lib/bio/util/restriction_enzyme/string_formatting.rb -------------------------------------------------- # # bio/util/restrction_enzyme/cut_symbol.rb - Defines the symbol used to mark a c ut in an enzyme sequence # # Author:: Trevor Wennblom # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwin terlabs.com) # License:: Distributes under the same terms as Ruby # # $Id: cut_symbol.rb,v 1.4 2007/01/01 05:07:04 trevor Exp $ # (snip) # # bio/util/restrction_enzyme/cut_symbol.rb - Defines the symbol used to mark a c ut in an enzyme sequence # # Author:: Trevor Wennblom # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwin terlabs.com) # License:: Distributes under the same terms as Ruby # -------------------------------------------------- lib/bio/util/restriction_enzyme/analysis_basic.rb -------------------------------------------------- class Bio::Sequence::NA # NOTE: move this into Bio::Sequence::NA def cut_with_enzyme(*args) Bio::RestrictionEnzyme::Analysis.cut(self, *args) end alias cut_with_enzymes cut_with_enzyme end -------------------------------------------------- When do you plan to move this into lib/bio/sequence.rb? Sorry for many questions and thanks in advance. Toshiaki From ktym at hgc.jp Tue Apr 3 16:30:39 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Wed, 4 Apr 2007 05:30:39 +0900 Subject: [BioRuby] Subversion (Fwd: [Root-l] [Open-bio Board] OBF services) References: <3A5487BB-2DDA-43EC-9034-3BA82F987D29@sonsorol.org> Message-ID: <6A2262DC-4741-439E-B96E-61A08AE28D59@hgc.jp> Hi, Just for notice, I'm not sure when it will happen but Trevor and O|B|F staffs are now working on migration of the BioRuby code base to subversion. I failed to install svn on my MacBook with DarwinPorts. Does anyone know how to solve this? % sudo port install subversion Password: ---> Staging zlib into destroot ---> Configuring libz.a Error: Target com.apple.destroot returned: invalid command name "command_exec" Error: The following dependencies failed to build: neon openssl zlib Error: Status 1 encountered during processing. Toshiaki Begin forwarded message: > From: Chris Dagdigian > Date: 2007?4?3? 4:35:57:JST > To: Jason Stajich > Cc: Trevor Wennblom , Pjotr Prins , Root-l Admins , Katayama Toshiaki , OBF Board Board > Subject: Re: [Root-l] [Open-bio Board] OBF services > > Hi folks, > Another update > I've been working via Trevor on this separately -- we've got a helpdesk ticket pending on the switchover for BioRuby. > > -Chris > > On Apr 2, 2007, at 2:32 PM, Jason Stajich wrote: > >> Hi Trevor - this got caught in our list admin, so the lack of response was due to that, apologies. >> >> SVN is available - we've done that for a few projects on a test basis and biopython is getting ready to migrate to SVN. BioJava has talked about it for a while but it has not actually happened yet. We would be more than happy to see this happen and can help as much as we can- although CVS to SVN migration may require some babysitting on your part. >> >> In terms of setting up Trac - I think it is possible in principle, one thing is we protect our main code repository server (dev) where there are users which have r/w access by mirroring the code repository to a separate machine which is running web services (code.open-bio.org). I am not sure how Trac will interact with this, but it should be possible. Let's see if Chris Dagdigian (hopefully) can look into it a little and report back on what the challenges will be. >> >> -jason >> On Mar 15, 2007, at 10:03 AM, Trevor Wennblom wrote: >> >>> Hi guys, >>> >>> I'm a regular contributor to the BioRuby project and we're looking to >>> improve some of our services and interaction with the community. My >>> first question is if Subversion access is available? It would be >>> nice to transition from CVS to SVN sometime in the future. Also, if >>> it is available, would it be possible to run a Trac instance from an >>> open-bio server? >>> >>> Thanks for your help, >>> Trevor >>> >>> === >>> Trevor Wennblom >>> Software Development >>> Center for Biomedical Research Informatics >>> University of Minnesota >>> >>> >>> _______________________________________________ >>> Board mailing list >>> Board at lists.open-bio.org >>> http://lists.open-bio.org/mailman/listinfo/board >> >> -- >> Jason Stajich >> Miller Research Fellow >> University of California, Berkeley >> lab: 510.642.8441 >> http://pmb.berkeley.edu/~taylor/people/js.html >> http://fungalgenomes.org/ >> >> _______________________________________________ >> Root-l mailing list >> Root-l at lists.open-bio.org >> http://lists.open-bio.org/mailman/listinfo/root-l > From raoul.bonnal at itb.cnr.it Wed Apr 4 04:08:21 2007 From: raoul.bonnal at itb.cnr.it (RJP) Date: Wed, 04 Apr 2007 10:08:21 +0200 Subject: [BioRuby] "Read an ASN.1 file" and "Using a BioSQL database" !!! In-Reply-To: <78F69ECC-32B8-4196-A409-1D5BE751DB27@hgc.jp> References: <98028b00703081502p6277cc4h5bae0e0908b0fe89@mail.gmail.com> <98028b00703090653x1fc3567eyddf1f135d217f668@mail.gmail.com> <78F69ECC-32B8-4196-A409-1D5BE751DB27@hgc.jp> Message-ID: <1175674101.7011.19.camel@Graco> Il giorno mer, 04/04/2007 alle 05.38 +0900, Toshiaki Katayama ha scritto: > On 2007/03/27, at 14:48, Toshiaki Katayama wrote: > > > On 2007/03/13, at 14:23, Moses M. Hohman wrote: > >> but AFAIK BioRuby does not support BioSQL, > > > > Currently it might be broken, but BioRuby supported BioSQL from the beginning of > > the BioSQL project which is developed during three BioHackathon meetings (2002, 2003). > > > > I wrote basic BioSQL module which support Cape Town schema (2002), but I was lazy > > to update it. > > > > However, AFAIK, RJP is working on ActiveRecord + BioSQL integration (2006, December) > > to replace my old one. Raoul, could you post your recent status on it? Ok I'm currently using it and seems to work quite well. The file is in attachment, the code is a little bit dirty, sorry for that. > Sorry, I forgot but RJP also worked on fixing bio/io/sql.rb module in 2006, > so the current version should not be broken. I hope. > > I don't follow the recent changes on BioSQL schema but during the last > Phyloinformatics Hackathon (2006 Dec http://hackathon.nescent.org/), > which we (Goto-san and me) had attended, Hilmar was working on > the integration of tree into the database. > > https://www.nescent.org/wg/phyloinformatics/index.php?title=Supporting_NEXUS > > BioSQL The BioSQL group created a new set of tables, optional within BioSQL, > for the purposes of storing phylogenetic trees, both sequence or species. > A script was added to the package that allows one to read NEXUS files and > write any trees found in the files to the database. Now I'm a littel bit busy for adding the ne schema and update ActiveRecord implementation. Now I did a schema for blast and described it by Active Record too, could be of interest for you ? Cheers form Italy. -- Raoul From raoul.bonnal at itb.cnr.it Wed Apr 4 07:40:51 2007 From: raoul.bonnal at itb.cnr.it (RJP) Date: Wed, 04 Apr 2007 13:40:51 +0200 Subject: [BioRuby] Making Contributions In-Reply-To: <000c01c76198$53f8dc50$c2987ca5@pc13> References: <45EE6EAD.1010705@gmail.com> <000c01c76198$53f8dc50$c2987ca5@pc13> Message-ID: <1175686851.7941.7.camel@Graco> Il giorno gio, 08/03/2007 alle 09.42 -0600, Sohel Merchant ha scritto: > Hey Guys, > It is very exciting to see a number of people using Ruby/Rails in the > Bioinformatics community. Although, I have been primarily developing in > Perl, I have started and am working on some new projects in Rails. I was > wondering if any of you guys are planning to attend the Rails conference > coming up in May 2007, we could have a BOF session. Actually : RailsConf 2007 We're sorry, RailsConf 2007 is now sold out. Conference organizers have started a RailsConf waiting list to see how many more people would like to attend. Please add your name to the list and we'll let you know if we can find more space at the conference venue. Probably I will not partecipate :-( -- RJP From trevor at corevx.com Wed Apr 4 14:33:10 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Wed, 4 Apr 2007 13:33:10 -0500 Subject: [BioRuby] Subversion (Fwd: [Root-l] [Open-bio Board] OBF services) In-Reply-To: <6A2262DC-4741-439E-B96E-61A08AE28D59@hgc.jp> References: <3A5487BB-2DDA-43EC-9034-3BA82F987D29@sonsorol.org> <6A2262DC-4741-439E-B96E-61A08AE28D59@hgc.jp> Message-ID: On Apr 3, 2007, at 3:30 PM, Toshiaki Katayama wrote: > > Just for notice, I'm not sure when it will happen but Trevor and O| > B|F staffs are now working on migration of the BioRuby code base to > subversion. This is for everyone, so chime in - I would recommend waiting until BioRuby v1.1 is released to make the switch. At that point do a clean checkout of CVS and a commit to SVN. We would lose all previous change history which could be viewed as a positive or a negative. I like the idea of a clean break to the new repository since we wouldn't have to bring along any potential "cruft" from the CVS repository and we could start fresh. Not to mention it would be monumentally easier. ;) If this sounds like a good plan I'll start coordinating with Chris D. > I failed to install svn on my MacBook with DarwinPorts. Does anyone > know how to solve this? Personally I prefer to compile it from source - it's typically a rather painless process. (./configure; make; sudo make install - you get the idea) Alternatively you could try downloading a prepackaged binary, I found one here: http://www.codingmonkeys.de/mbo/ Direct link: http://www.codingmonkeys.de/mbo/Subversion-1.4.3.pkg.zip Don't forget to add /usr/local/bin to your path as well, something along the lines of: export PATH=$PATH:/usr/local/bin I haven't had a chance to answer one of your earlier questions, but yes I believe Subversion is included in the next version of OS X. Trevor From christophercyll at gmail.com Wed Apr 4 14:41:11 2007 From: christophercyll at gmail.com (Topher Cyll) Date: Wed, 4 Apr 2007 14:41:11 -0400 Subject: [BioRuby] Subversion (Fwd: [Root-l] [Open-bio Board] OBF services) In-Reply-To: <6A2262DC-4741-439E-B96E-61A08AE28D59@hgc.jp> References: <3A5487BB-2DDA-43EC-9034-3BA82F987D29@sonsorol.org> <6A2262DC-4741-439E-B96E-61A08AE28D59@hgc.jp> Message-ID: <2599499e0704041141g63c51eesaaca34553c976070@mail.gmail.com> Hmm, I successfully built subversion from DarwinPorts on an Intel mac this morning. Might be something specific to your system? Toph On 4/3/07, Toshiaki Katayama wrote: > Hi, > > Just for notice, I'm not sure when it will happen but Trevor and O|B|F staffs are now working on migration of the BioRuby code base to subversion. > > I failed to install svn on my MacBook with DarwinPorts. Does anyone know how to solve this? > > % sudo port install subversion > Password: > ---> Staging zlib into destroot > ---> Configuring libz.a > Error: Target com.apple.destroot returned: invalid command name "command_exec" > Error: The following dependencies failed to build: neon openssl zlib > Error: Status 1 encountered during processing. > > Toshiaki > > Begin forwarded message: > > > From: Chris Dagdigian > > Date: 2007?4?3? 4:35:57:JST > > To: Jason Stajich > > Cc: Trevor Wennblom , Pjotr Prins , Root-l Admins , Katayama Toshiaki , OBF Board Board > > Subject: Re: [Root-l] [Open-bio Board] OBF services > > > > Hi folks, > > Another update > > I've been working via Trevor on this separately -- we've got a helpdesk ticket pending on the switchover for BioRuby. > > > > -Chris > > > > On Apr 2, 2007, at 2:32 PM, Jason Stajich wrote: > > > >> Hi Trevor - this got caught in our list admin, so the lack of response was due to that, apologies. > >> > >> SVN is available - we've done that for a few projects on a test basis and biopython is getting ready to migrate to SVN. BioJava has talked about it for a while but it has not actually happened yet. We would be more than happy to see this happen and can help as much as we can- although CVS to SVN migration may require some babysitting on your part. > >> > >> In terms of setting up Trac - I think it is possible in principle, one thing is we protect our main code repository server (dev) where there are users which have r/w access by mirroring the code repository to a separate machine which is running web services (code.open-bio.org). I am not sure how Trac will interact with this, but it should be possible. Let's see if Chris Dagdigian (hopefully) can look into it a little and report back on what the challenges will be. > >> > >> -jason > >> On Mar 15, 2007, at 10:03 AM, Trevor Wennblom wrote: > >> > >>> Hi guys, > >>> > >>> I'm a regular contributor to the BioRuby project and we're looking to > >>> improve some of our services and interaction with the community. My > >>> first question is if Subversion access is available? It would be > >>> nice to transition from CVS to SVN sometime in the future. Also, if > >>> it is available, would it be possible to run a Trac instance from an > >>> open-bio server? > >>> > >>> Thanks for your help, > >>> Trevor > >>> > >>> === > >>> Trevor Wennblom > >>> Software Development > >>> Center for Biomedical Research Informatics > >>> University of Minnesota > >>> > >>> > >>> _______________________________________________ > >>> Board mailing list > >>> Board at lists.open-bio.org > >>> http://lists.open-bio.org/mailman/listinfo/board > >> > >> -- > >> Jason Stajich > >> Miller Research Fellow > >> University of California, Berkeley > >> lab: 510.642.8441 > >> http://pmb.berkeley.edu/~taylor/people/js.html > >> http://fungalgenomes.org/ > >> > >> _______________________________________________ > >> Root-l mailing list > >> Root-l at lists.open-bio.org > >> http://lists.open-bio.org/mailman/listinfo/root-l > > > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From pjotr2007 at thebird.nl Wed Apr 4 16:00:55 2007 From: pjotr2007 at thebird.nl (Pjotr Prins) Date: Wed, 4 Apr 2007 22:00:55 +0200 Subject: [BioRuby] Subversion (Fwd: [Root-l] [Open-bio Board] OBF services) In-Reply-To: References: <3A5487BB-2DDA-43EC-9034-3BA82F987D29@sonsorol.org> <6A2262DC-4741-439E-B96E-61A08AE28D59@hgc.jp> Message-ID: <20070404200055.GA18611@thebird.nl> On Wed, Apr 04, 2007 at 01:33:10PM -0500, Trevor Wennblom wrote: > > On Apr 3, 2007, at 3:30 PM, Toshiaki Katayama wrote: > > > > > Just for notice, I'm not sure when it will happen but Trevor and O| > > B|F staffs are now working on migration of the BioRuby code base to > > subversion. > > This is for everyone, so chime in - I would recommend waiting until > BioRuby v1.1 is released to make the switch. At that point do a > clean checkout of CVS and a commit to SVN. We would lose all > previous change history which could be viewed as a positive or a > negative. I like the idea of a clean break to the new repository > since we wouldn't have to bring along any potential "cruft" from the > CVS repository and we could start fresh. Actually it is quite straightforward to migrate the history too. Perhaps a good idea - it tells us who has done what. Pj. From trevor at corevx.com Wed Apr 4 17:48:46 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Wed, 4 Apr 2007 16:48:46 -0500 Subject: [BioRuby] restriction enzyme module In-Reply-To: References: Message-ID: Hi Toshiaki, Thanks for looking over my code. It's very helpful to have another pair of eyes. == 1 == > Firstly, your code is well documented but you have a lot of > sub classes under the Bio::RestrictionEnzyme name space. > It looks very complicated and I still don't understand which > class to use depending on the situations. > Could you describe the typical use cases? > I hope to include your description in the tutorial, if possible. The only classes I'm primarily concerned about exposing and having the API well documented at the moment are Bio::RestrictionEnzyme and Bio::RestrictionEnzyme::Analysis which are both documented in the Bio::RestrictionEnzyme RDoc. This could use some more examples and I'm putting together improved documentation as Pjotr and I are using this in some real-world tools. Everything else is supporting classes, not terribly useful in any other context outside of Bio::RestrictionEnzyme, and the underlying API and usage might change as I get feedback from users as to what's useful and what's not. The underlying structure itself is very detailed to account for an amazing amount of flexibility which I'll be happy to flesh out if there are individuals who would benefit from having the nitty-gritty internals exposed as a more user-friendly API. This is the kind of thing that I'd shoot for in a BioRuby 1.1 minor point release in the future. == 2 == > Secondly, I don't like to have code to modify the RUBYLIB in the library. done - it was incredibly convenient when designing but now that it's incorporated into BioRuby it's not needed. == 3 == > lib/bio/util/restriction_enzyme/integer.rb > > is enough to be > > if (a != nil and a < 0) or (b != nil and b < 0) > > How do you think? done - it was easier on the eyes, but perhaps at a slight speed disadvantage. == 4 == > Why you need 'pp' library here? (It seems that the module is not used.) done - left over from development. == 5 == > Why this empty class need to be present? Abstract base class - while not technically necessary I'm strongly in favor of keeping it for clarity and further development. == 6 == > Could you fold your RDoc documents less than 80 columns as long as possible? > Or should I use larger terminal width...? Yes to both! :D Sometimes I miss that since anytime I modify my comments I have to reformat them to be 80 characters wide. While I don't think it should be a requirement, it is something that we should strive for - perhaps a "strong suggestion." > Or should I use larger terminal width...? I use a mixture of TextMate and the terminal on OS X. Just a quick glance shows that I currently have terminals open with 147, 80, 175, 230, and 122 columns wide. I resize those little guys all the time. == 7 == > And, you looks to have different strategies for RDoc documentation on each file. > Which is the best practice? Thanks for catching a few mistakes of mine. I think the README.DEV is unclear or incorrect in how RDoc works in some circumstances. This is something that I wanted to address in a larger document. Since it seems like you're interested could you give me a few days to put together a well thought-out guide for that, would that be okay? == 8 == > def cut_with_enzyme(*args) > Bio::RestrictionEnzyme::Analysis.cut(self, *args) > end > alias cut_with_enzymes cut_with_enzyme > > When do you plan to move this into lib/bio/sequence.rb? I wanted to get you're approval first. Do you think that's the right thing to do? It would be nice since people wouldn't have to include the analysis file directly. Do you forsee any problems with me just moving the four lines over to Bio::Sequence::NA? == 9 == Regarding to_re Did you ever get to_re to work correctly? I seem to remember you had a pretty good patch a while back. I'm still really itching for an official fix since there are many cases where Bio::RestrictionEnzyme returns the wrong cut fragments because of incorrect matching. Presently puts Bio::Sequence::NA.new("tan").to_re # => (?-mix:ta[atgc]) Should be puts Bio::Sequence::NA.new("tan").to_re # => (?-mix:ta[atgcn]) Thanks! Trevor From trevor at corevx.com Wed Apr 4 17:56:30 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Wed, 4 Apr 2007 16:56:30 -0500 Subject: [BioRuby] restriction enzyme module In-Reply-To: References: Message-ID: On Apr 4, 2007, at 4:48 PM, Trevor Wennblom wrote: > > Should be > > puts Bio::Sequence::NA.new("tan").to_re # => (?-mix:ta[atgcn]) > Oh right - actually it should be all inclusive, so "n" should match "yrwskmbdhvnatgcu". In this case for the example giving: puts Bio::Sequence::NA.new("tan").to_re # => (?-mix:ta [yrwskmbdhvnatgcu]) Trevor From trevor at corevx.com Wed Apr 4 18:03:40 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Wed, 4 Apr 2007 17:03:40 -0500 Subject: [BioRuby] Grammatical pickiness Message-ID: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> Since we're on the topic of details, do we really want this: License:: Ruby's It seems a bit grammatically off to me. I've been using this as an alternative: License:: Distributes under the same terms as Ruby What about: License:: Ruby or License:: Ruby License Since these would refer to the name of the license itself. What's best? (I'd volunteer to replace all of these with whatever we agree on it since it's a quick regexp anyway) Trevor From ktym at hgc.jp Wed Apr 4 20:29:12 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu, 5 Apr 2007 09:29:12 +0900 Subject: [BioRuby] Grammatical pickiness In-Reply-To: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> References: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> Message-ID: I have no choice. Native speakers? Toshiaki On 2007/04/05, at 7:03, Trevor Wennblom wrote: > Since we're on the topic of details, do we really want this: > > License:: Ruby's > > > It seems a bit grammatically off to me. I've been using this as an > alternative: > > License:: Distributes under the same terms as Ruby > > > What about: > > License:: Ruby > > or > > License:: Ruby License > > > Since these would refer to the name of the license itself. What's best? > > (I'd volunteer to replace all of these with whatever we agree on it > since it's a quick regexp anyway) > > Trevor > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From ktym at hgc.jp Wed Apr 4 20:58:18 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu, 5 Apr 2007 09:58:18 +0900 Subject: [BioRuby] Subversion (Fwd: [Root-l] [Open-bio Board] OBF services) In-Reply-To: References: <3A5487BB-2DDA-43EC-9034-3BA82F987D29@sonsorol.org> <6A2262DC-4741-439E-B96E-61A08AE28D59@hgc.jp> Message-ID: Angel, Toph, Thank you for your suggestions! I re-run selfupdate and subversion is successfully installed. I'm using intel based MacBook Pro for now. Toshiaki % sudo port selfupdate DarwinPorts base version 1.400 installed Downloaded MacPorts base version 1.400 The MacPorts installation is not outdated and so was not updated selfupdate done! % sudo port install subversion Portfile changed since last build; discarding previous state. ---> Fetching zlib : ---> Installing subversion 1.4.3_0 ---> Activating subversion 1.4.3_0 ---> Cleaning subversion % which svn /opt/local/bin/svn On 2007/04/05, at 3:36, Angel Pizarro wrote: > A little more info please: > PPC or Intel? > Did you try "sudo port selfupdate" and try to install again? > -angel > > > > On 4/3/07, Toshiaki Katayama wrote:Hi, > > Just for notice, I'm not sure when it will happen but Trevor and O|B|F staffs are now working on migration of the BioRuby code base to subversion. > > I failed to install svn on my MacBook with DarwinPorts. Does anyone know how to solve this? > > % sudo port install subversion > Password: > ---> Staging zlib into destroot > ---> Configuring libz.a > Error: Target com.apple.destroot returned: invalid command name "command_exec" > Error: The following dependencies failed to build: neon openssl zlib > Error: Status 1 encountered during processing. > > Toshiaki > From ktym at hgc.jp Wed Apr 4 21:03:35 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu, 5 Apr 2007 10:03:35 +0900 Subject: [BioRuby] restriction enzyme module In-Reply-To: References: Message-ID: Trevor, Thank you for your reply. > == 7 == > >> And, you looks to have different strategies for RDoc documentation > on each file. >> Which is the best practice? > > Thanks for catching a few mistakes of mine. I think the README.DEV > is unclear or incorrect in how RDoc works in some circumstances. > This is something that I wanted to address in a larger document. > Since it seems like you're interested could you give me a few days to > put together a well thought-out guide for that, would that be okay? Yes, please. I'm not sure that the current README.DEV describes the best way for RDoc documentation so if you could provide best practice, I'm willing to wait for. On 2007/04/05, at 6:48, Trevor Wennblom wrote: > The only classes I'm primarily concerned about exposing and having > the API well documented at the moment are Bio::RestrictionEnzyme and > Bio::RestrictionEnzyme::Analysis which are both documented in the > Bio::RestrictionEnzyme RDoc. This could use some more examples and > I'm putting together improved documentation as Pjotr and I are using > this in some real-world tools. I see. > == 2 == > == 3 == > == 4 == > done Thanks. > == 5 == > >> Why this empty class need to be present? > > Abstract base class - while not technically necessary I'm strongly in > favor of keeping it for clarity and further development. OK. > == 6 == > >> Could you fold your RDoc documents less than 80 columns as long as > possible? >> Or should I use larger terminal width...? > > Yes to both! :D > > Sometimes I miss that since anytime I modify my comments I have to > reformat them to be 80 characters wide. While I don't think it > should be a requirement, it is something that we should strive for - > perhaps a "strong suggestion." > >> Or should I use larger terminal width...? > > I use a mixture of TextMate and the terminal on OS X. Just a quick > glance shows that I currently have terminals open with 147, 80, 175, > 230, and 122 columns wide. I resize those little guys all the time. I want to hear comments from others on this. I have been used 'emacs -nw' on terminal sized 80x80 for long time but now might be a time to resize it :) > == 8 == > >> def cut_with_enzyme(*args) >> Bio::RestrictionEnzyme::Analysis.cut(self, *args) >> end >> alias cut_with_enzymes cut_with_enzyme >> >> When do you plan to move this into lib/bio/sequence.rb? > > I wanted to get you're approval first. Do you think that's the right > thing to do? It would be nice since people wouldn't have to include > the analysis file directly. Do you forsee any problems with me just > moving the four lines over to Bio::Sequence::NA? As the restriction_enzyme/**/*.rb is autoloaded by default in the next release, there might be no problem to move this into Bio::Sequence::NA. However, will it slow down the loading time? When bio/sequence.rb is loaded, the above definition also loads bio/restriction_enzyme.rb also? or the loading of bio/restriction_enzyme.rb is delayed until the above method is called? > == 9 == > > Regarding to_re I'll reply to the next mail. Toshiaki From alexg at kuicr.kyoto-u.ac.jp Wed Apr 4 21:14:42 2007 From: alexg at kuicr.kyoto-u.ac.jp (Alex Gutteridge) Date: Thu, 5 Apr 2007 10:14:42 +0900 Subject: [BioRuby] Grammatical pickiness In-Reply-To: References: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> Message-ID: I don't see anything grammatically wrong with saying "Ruby's", but perhaps it is a bit 'off'. I would personally vote for either: License: Distributed under the same terms as Ruby or License: The Ruby License (Note slight change 'Distributes' to 'Distributed'). But I have no strong opinion on this! AlexG On 5 Apr 2007, at 09:29, Toshiaki Katayama wrote: > I have no choice. Native speakers? > > Toshiaki > > On 2007/04/05, at 7:03, Trevor Wennblom wrote: > >> Since we're on the topic of details, do we really want this: >> >> License:: Ruby's >> >> >> It seems a bit grammatically off to me. I've been using this as an >> alternative: >> >> License:: Distributes under the same terms as Ruby >> >> >> What about: >> >> License:: Ruby >> >> or >> >> License:: Ruby License >> >> >> Since these would refer to the name of the license itself. What's >> best? >> >> (I'd volunteer to replace all of these with whatever we agree on it >> since it's a quick regexp anyway) >> >> Trevor >> _______________________________________________ >> 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 > Alex Gutteridge Bioinformatics Center Kyoto University From trevor at corevx.com Wed Apr 4 23:29:51 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Wed, 4 Apr 2007 22:29:51 -0500 Subject: [BioRuby] Grammatical pickiness In-Reply-To: References: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> Message-ID: On Apr 4, 2007, at 8:14 PM, Alex Gutteridge wrote: > I don't see anything grammatically wrong with saying "Ruby's", but > Yeah, I can't quite put it into words since I don't know enough formal english, but I can't think of any good statement / sentence that ends with an apostrophe-s (ending with a possessive?). > License: The Ruby License > I like this! Trevor From ktym at hgc.jp Thu Apr 5 10:34:25 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu, 5 Apr 2007 23:34:25 +0900 Subject: [BioRuby] Grammatical pickiness In-Reply-To: References: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> Message-ID: <9427C706-3611-4F4B-B3E9-A2A67BFAA449@hgc.jp> Alex, Thank you for your valuable comment! On 2007/04/05, at 12:29, Trevor Wennblom wrote: >> License: The Ruby License > > I like this! OK. Is there any objection to this? On 2007/04/05, at 7:03, Trevor Wennblom wrote: > (I'd volunteer to replace all of these with whatever we agree on it > since it's a quick regexp anyway) Trevor, could you replace the license line in all modules or should I? Toshiaki From ktym at hgc.jp Thu Apr 5 10:55:48 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Thu, 5 Apr 2007 23:55:48 +0900 Subject: [BioRuby] restriction enzyme module In-Reply-To: References: Message-ID: <0071DCFD-F731-4C1B-B581-6C897026D0D3@hgc.jp> Trevor, On 2007/04/05, at 6:56, Trevor Wennblom wrote: > On Apr 4, 2007, at 4:48 PM, Trevor Wennblom wrote: >> == 9 == >> >> Regarding to_re >> >> Did you ever get to_re to work correctly? I seem to remember you had >> a pretty good patch a while back. I'm still really itching for an >> official fix since there are many cases where Bio::RestrictionEnzyme >> returns the wrong cut fragments because of incorrect matching. >> >> Presently >> >> puts Bio::Sequence::NA.new("tan").to_re # => (?-mix:ta[atgc]) >> >> Should be >> >> puts Bio::Sequence::NA.new("tan").to_re # => (?-mix:ta[atgcn]) > > Oh right - actually it should be all inclusive, so "n" should match > "yrwskmbdhvnatgcu". > > In this case for the example giving: > > puts Bio::Sequence::NA.new("tan").to_re # => (?-mix:ta[yrwskmbdhvnatgcu]) I'll forward the patch I sent to you. Do you think this is applicable? Toshiaki Begin forwarded message: > From: Toshiaki Katayama > Date: 2007?1?1? 15:10:11:JST > To: Trevor Wennblom > Cc: staff at bioruby.org > Subject: Re: to_re revisited > > Hi Trevor, > > Thank you for your CVS commits. > > On 2007/01/01, at 9:23, Trevor Wennblom wrote: >> I noticed that 'to_re' doesn't yet match itself. For example: >> >> irb(main):001:0> require 'bio' >> => true >> irb(main):002:0> seq = Bio::Sequence::NA.new('arg') >> => "arg" >> irb(main):003:0> seq =~ seq.to_re >> => nil >> irb(main):004:0> seq.to_re >> => /a[ag]g/ >> irb(main):005:0> seq =~ /a[rag]g/ >> => 0 >> >> Will there be any chance that this could be fixed before the next release? >> >> If you're interested we exchanged emails about this issue in 2005 with the subject: "Bio::NucleicAcid na.rb to_re bug" > > > I found attached my mail which couldn't be delivered to you. > > > RCS file: /home/repository/bioruby/bioruby/lib/bio/data/na.rb,v > retrieving revision 0.20 > diff -c -r0.20 na.rb > *** na.rb 8 Feb 2006 12:15:42 -0000 0.20 > --- na.rb 1 Jan 2007 05:52:14 -0000 > *************** > *** 158,172 **** > end > > def to_re(seq, rna = false) > ! str = seq.to_s.downcase > ! str.gsub!(/[^atgcu]/) { |base| > ! NAMES[base] || '.' > ! } > ! if rna > ! str.tr!("t", "u") > ! end > ! Regexp.new(str) > ! end > > end > > --- 158,186 ---- > end > > def to_re(seq, rna = false) > ! replace = { > ! 'y' => '[tcy]', > ! 'r' => '[agr]', > ! 'w' => '[atw]', > ! 's' => '[gcw]', > ! 'k' => '[tgk]', > ! 'm' => '[acm]', > ! 'b' => '[tgcyskb]', > ! 'd' => '[atgrwkd]', > ! 'h' => '[atcwmyh]', > ! 'v' => '[agcmrsv]', > ! 'n' => '[atgcyrwskmbdhvn]' > ! } > ! > ! str = seq.to_s.downcase > ! str.gsub!(/[^atgcu]/) { |base| > ! replace[base] || base > ! } > ! if rna > ! str.tr!("t", "u") > ! end > ! Regexp.new(str) > ! end > > end > > > By using this, following match works. > > > bioruby> seq = Bio::Sequence::NA.new('arg') > ==> "arg" > bioruby> seq =~ seq.to_re > ==> 0 > bioruby> seq.to_re > ==> /a[agr]g/ > > > But following still does not work as expected. > How do you think? > > > bioruby> seq = Bio::Sequence.new('arg') > ==> # > bioruby> seq.na > ==> Bio::Sequence::NA > bioruby> p seq > # > ==> nil > bioruby> seq.to_re > ==> /a[agr]g/ > bioruby> seq =~ seq.to_re > ==> false > bioruby> seq.seq =~ seq.to_re > ==> 0 > bioruby> p seq.to_re.match(seq) > # > ==> nil > bioruby> p seq.to_re.match(seq.seq) > # > ==> nil > > > Toshiaki > > > > Begin forwarded message: >> From: MAILER-DAEMON at bioruby.org (Mail Delivery System) >> Date: 2005?12?11? 13:37:45:JST >> To: k at bioruby.org >> Subject: Undelivered Mail Returned to Sender >> >> This is the Postfix program at host kumamushi.bioruby.org. >> >> I'm sorry to have to inform you that your message could not be >> be delivered to one or more recipients. It's attached below. >> >> For further assistance, please send mail to >> >> If you do so, please include this problem report. You can >> delete your own text from the attached returned message. >> >> The Postfix program >> >> : host mail.corevx.com[207.7.108.149] said: 554 Service >> unavailable; Client host [218.223.192.34] blocked using >> sbl-xbl.spamhaus.org; http://www.spamhaus.org/query/bl?ip=218.223.192.34 >> (in reply to RCPT TO command) >> Reporting-MTA: dns; kumamushi.bioruby.org >> X-Postfix-Queue-ID: 77FD72120EC >> X-Postfix-Sender: rfc822; k at bioruby.org >> Arrival-Date: Sun, 11 Dec 2005 13:37:33 +0900 (JST) >> >> Final-Recipient: rfc822; trevor at corevx.com >> Action: failed >> Status: 5.0.0 >> Diagnostic-Code: X-Postfix; host mail.corevx.com[207.7.108.149] said: 554 >> Service unavailable; Client host [218.223.192.34] blocked using >> sbl-xbl.spamhaus.org; http://www.spamhaus.org/query/bl?ip=218.223.192.34 >> (in reply to RCPT TO command) >> >> From: Toshiaki Katayama >> Date: 2005?12?11? 13:37:31:JST >> To: staff at bioruby.org >> Cc: Pjotr Prins , Trevor Wennblom >> Subject: Fwd: Undelivered Mail Returned to Sender >> >> >> Hi all, >> >> All my attempt to send my code to Trevor is failed. >> Could anyone let him know the following URL? >> >> http://kumamushi.org/~k/tmp/na_to_re.txt >> >> Toshiaki Katayama >> >> Begin forwarded message: >> >>> From: MAILER-DAEMON at bioruby.org (Mail Delivery System) >>> Date: 2005?12?11? 13:29:39:JST >>> To: ktym at hgc.jp >>> Subject: Undelivered Mail Returned to Sender >>> >>> This is the Postfix program at host kumamushi.bioruby.org. >>> >>> I'm sorry to have to inform you that your message could not be >>> be delivered to one or more recipients. It's attached below. >>> >>> For further assistance, please send mail to >>> >>> If you do so, please include this problem report. You can >>> delete your own text from the attached returned message. >>> >>> The Postfix program >>> >>> : host mail.corevx.com[207.7.108.149] said: 554 Service >>> unavailable; Client host [218.223.192.34] blocked using >>> sbl-xbl.spamhaus.org; http://www.spamhaus.org/query/bl?ip=218.223.192.34 >>> (in reply to RCPT TO command) >>> Reporting-MTA: dns; kumamushi.bioruby.org >>> X-Postfix-Queue-ID: E9C0D2120BC >>> X-Postfix-Sender: rfc822; ktym at hgc.jp >>> Arrival-Date: Sun, 11 Dec 2005 13:29:37 +0900 (JST) >>> >>> Final-Recipient: rfc822; trevor at corevx.com >>> Action: failed >>> Status: 5.0.0 >>> Diagnostic-Code: X-Postfix; host mail.corevx.com[207.7.108.149] said: 554 >>> Service unavailable; Client host [218.223.192.34] blocked using >>> sbl-xbl.spamhaus.org; http://www.spamhaus.org/query/bl?ip=218.223.192.34 >>> (in reply to RCPT TO command) >>> >>> From: Toshiaki Katayama >>> Date: 2005?12?11? 13:29:35:JST >>> To: Trevor Wennblom >>> Subject: Re: Bio::NucleicAcid na.rb to_re bug >>> >>> >>> Hello Trevor, >>> >>> Ughh, how could you receive my e-mail .....? >>> >>> I put the massage and the code at >>> >>> http://kumamushi.org/~k/tmp/na_to_re.txt >>> >>> Toshiaki >>> >>> On 2005/12/11, at 13:14, Toshiaki Katayama wrote: >>> >>>> Trevor, >>>> >>>> I think to embed all possible combinations would be most efficient, after all. >>>> Please see attached file, as your mail server reject my e-mail probably because >>>> most of the contents was code... >>>> >>>> On 2005/12/11, at 3:34, Trevor Wennblom wrote: >>>> >>>>> Toshiaki Katayama wrote: >>>>> >>>>>> And the below is a ad-hoc implementation to include all possible combination of the ambiguous bases. >>>>>> I removed brackets and sorted the bases contained in the ambiguous bases for easier implementation... >>>>>> >>>>> >>>>> >>>>> Great, I'll try to play with the ad-hoc code later this week. >>>>> >>>>> Thanks again for all your help Toshiaki! >>>>> Trevor >>>> >>>> >>> >>> >>> >> >> >> >> On 2005/12/11, at 12:55, Toshiaki Katayama wrote: >>> To embed all possible combinations would be most efficient, after all... >>> >>> def to_re(seq, rna = false) >>> replace = { >>> 'y' => '[tcy]', >>> 'r' => '[agr]', >>> 'w' => '[atw]', >>> 's' => '[gcw]', >>> 'k' => '[tgk]', >>> 'm' => '[acm]', >>> 'b' => '[tgcyskb]', >>> 'd' => '[atgrwkd]', >>> 'h' => '[atcwmyh]', >>> 'v' => '[agcmrsv]', >>> 'n' => '[atgcyrwskmbdhvn]' >>> } >>> >>> str = seq.to_s >>> str.gsub!(/[^atgcu]/) { |base| >>> replace[base] || base >>> } >>> if rna >>> str.tr!("t", "u") >>> end >>> Regexp.new(str) >>> end >>> >>> On 2005/12/11, at 3:34, Trevor Wennblom wrote: >>> >>>> Toshiaki Katayama wrote: >>>> >>>>> And the below is a ad-hoc implementation to include all possible combination of the ambiguous bases. >>>>> I removed brackets and sorted the bases contained in the ambiguous bases for easier implementation... >>>>> >>>> >>>> >>>> Great, I'll try to play with the ad-hoc code later this week. >>>> >>>> Thanks again for all your help Toshiaki! >>>> Trevor >>> >> >> >> >> On 2005/12/11, at 3:26, Toshiaki Katayama wrote: >>> Trevor, >>> >>> I have commited the following code for the meanwhile. >>> >>> def to_re(seq, rna = false) >>> str = seq.to_s >>> str.gsub!(/[^atgcu]/) { |base| >>> NAMES[base] || '.' >>> } >>> if rna >>> str.tr!("t", "u") >>> end >>> Regexp.new(str) >>> end >>> >>> And the below is a ad-hoc implementation to include all possible combination of the ambiguous bases. >>> I removed brackets and sorted the bases contained in the ambiguous bases for easier implementation... >>> >>> NAMES = { >>> 'y' => 'ct', >>> 'r' => 'ag', >>> 'w' => 'at', >>> 's' => 'cg', >>> 'k' => 'gt', >>> 'm' => 'ac', >>> >>> 'b' => 'cgt', >>> 'd' => 'agt', >>> 'h' => 'act', >>> 'v' => 'acg', >>> >>> 'n' => 'acgt', >>> >>> 'a' => 'a', >>> 't' => 't', >>> 'g' => 'g', >>> 'c' => 'c', >>> 'u' => 'u', >>> >>> 'A' => 'Adenine', >>> 'T' => 'Thymine', >>> 'G' => 'Guanine', >>> 'C' => 'Cytosine', >>> 'U' => 'Uracil', >>> >>> 'Y' => 'pYrimidine', >>> 'R' => 'puRine', >>> 'W' => 'Weak', >>> 'S' => 'Strong', >>> 'K' => 'Keto', >>> 'M' => 'aroMatic', >>> >>> 'B' => 'not A', >>> 'D' => 'not C', >>> 'H' => 'not G', >>> 'V' => 'not T', >>> } >>> >>> def to_re(seq, rna = false) >>> str = seq.to_s >>> str.gsub!(/[^atgcu]/) { |base| >>> set = NAMES[base].dup || '.' >>> case set.size >>> when 1 >>> # just pass the base >>> when 2 >>> # add ambiguous base >>> set += base >>> when 3 >>> # add any combination of the ambiguous bases >>> set = combination_3c2(set) >>> set += base >>> when 4 >>> # use the knowledge (or implement recursive method) >>> set = "atgcyrwskmbdhv" >>> end >>> set >>> } >>> if rna >>> str.tr!("t", "u") >>> end >>> Regexp.new(str) >>> end >>> >>> private >>> >>> def combination_3c2(str) >>> result = '' >>> rev = NAMES.invert >>> ary = str.split(//) >>> [ ary[0] + ary[1], ary[0] + ary[2], ary[1] + ary[2] ].each do |key| >>> result << rev[key] >>> end >>> result + str >>> end >>> >>> Toshiaki >>> >>> On 2005/12/11, at 2:37, Trevor Wennblom wrote: >>> >>>> Toshiaki Katayama wrote: >>>> >>>>> Trevor, >>>>> >>>>> In this sense, we need to include permutation of ambiguous bases recursively. >>>>> e.g. b => [tgc] not just match /[btgc]/ but also /[bkystgc]/ right? >>>>> >>>> >>>> >>>> Yes, you're correct. This is a bigger algorithm issue than I first realized. >>> >> >> >> >> >> On 2005/12/11, at 2:33, Toshiaki Katayama wrote: >>> Trevor, >>> >>> In this sense, we need to include permutation of ambiguous bases recursively. >>> e.g. b => [tgc] not just match /[btgc]/ but also /[bkystgc]/ right? >>> >>> Toshiaki >>> >>> On 2005/12/10, at 3:58, Trevor Wennblom wrote: >>> >>>> Trevor Wennblom wrote: >>>>> For the purposes of the Regexp (untested), would you be interested in adding the following to NAMES: >>>>> >>>>> 'n' => '.', >>>>> 'x' => '.?', >>>>> >>>>> 'N' => 'aNy', >>>>> 'X' => 'any or deletion', >>>> >>>> Just to follow-up - >>>> I see that NAMES presently has: >>>> 'n' => '[atgc]', >>>> >>>> Which of course wont match 's', 'y', 'w', etc. I'm trying to think of a case where 'n'=>'.' or 'x'=>'.?' may be problematic but I haven't been able to think of a problem with it yet. Perhaps it would fail in situations where the user may have provided non-nucleotide characters . >>>> >>>> I suppose if we wanted to be more explicit we could do: >>>> 'n' => '[atgcyrwskmbdhv]', >>>> 'x' => '[atgcyrwskmbdhv]?', >>>> >>>> 'N' => 'aNy', >>>> 'X' => 'any or deletion', >>>> >>>> I can come up with some tests for Regexp objects where 'x' may be involved to demonstrate it's utility. >>>> >>>> Thanks, >>>> Trevor >>> >> >> >> >> >> On 2005/12/10, at 3:46, Trevor Wennblom wrote: >>> Toshiaki Katayama wrote: >>>> def to_re(seq, rna = false) >>>> str = seq.to_s >>>> str.gsub!(/./) { |base| >>>> re = NAMES[base].dup || '.' >>>> if re[0] == ?[ >>>> re[1,0] = base >>>> end >>>> re >>>> } >>>> if rna >>>> str.tr!("t", "u") >>>> end >>>> Regexp.new(str) >>>> end >>>> >>> ... >>>> str.gsub!(/[^atgcu]/) { |base| >>>> >>>> would be much better! >>> >>> I haven't had a chance to test it, but just from looking at it seems very impressive Toshiaki! I think it's good to go. >>> >>> For the purposes of the Regexp (untested), would you be interested in adding the following to NAMES: >>> >>> 'n' => '.', >>> 'x' => '.?', >>> >>> 'N' => 'aNy', >>> 'X' => 'any or deletion', >>> >>> >>> Again, excellent work! >>> Trevor >> >> >> > > > > From ktym at hgc.jp Thu Apr 5 11:07:05 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Fri, 6 Apr 2007 00:07:05 +0900 Subject: [BioRuby] "Read an ASN.1 file" and "Using a BioSQL database" !!! In-Reply-To: <1175674101.7011.19.camel@Graco> References: <98028b00703081502p6277cc4h5bae0e0908b0fe89@mail.gmail.com> <98028b00703090653x1fc3567eyddf1f135d217f668@mail.gmail.com> <78F69ECC-32B8-4196-A409-1D5BE751DB27@hgc.jp> <1175674101.7011.19.camel@Graco> Message-ID: <0E1C617D-2690-4784-BAAD-7CB7803DB2BD@hgc.jp> Raoul, On 2007/04/04, at 17:08, RJP wrote: > Il giorno mer, 04/04/2007 alle 05.38 +0900, Toshiaki Katayama ha > scritto: >> On 2007/03/27, at 14:48, Toshiaki Katayama wrote: >> >>> On 2007/03/13, at 14:23, Moses M. Hohman wrote: >>>> but AFAIK BioRuby does not support BioSQL, >>> >>> Currently it might be broken, but BioRuby supported BioSQL from the beginning of >>> the BioSQL project which is developed during three BioHackathon meetings (2002, 2003). >>> >>> I wrote basic BioSQL module which support Cape Town schema (2002), but I was lazy >>> to update it. >>> >>> However, AFAIK, RJP is working on ActiveRecord + BioSQL integration (2006, December) >>> to replace my old one. Raoul, could you post your recent status on it? > Ok I'm currently using it and seems to work quite well. The file is in > attachment, the code is a little bit dirty, sorry for that. Sorry, this list server seems to eliminate the attachments. Could you put it on the web site or send it to me so that I can put somewhere. >> Sorry, I forgot but RJP also worked on fixing bio/io/sql.rb module in 2006, >> so the current version should not be broken. > I hope. > >> >> I don't follow the recent changes on BioSQL schema but during the last >> Phyloinformatics Hackathon (2006 Dec http://hackathon.nescent.org/), >> which we (Goto-san and me) had attended, Hilmar was working on >> the integration of tree into the database. >> >> https://www.nescent.org/wg/phyloinformatics/index.php?title=Supporting_NEXUS >> >> BioSQL The BioSQL group created a new set of tables, optional within BioSQL, >> for the purposes of storing phylogenetic trees, both sequence or species. >> A script was added to the package that allows one to read NEXUS files and >> write any trees found in the files to the database. > Now I'm a littel bit busy for adding the ne schema and update > ActiveRecord implementation. > > Now I did a schema for blast and described it by Active Record too, > could be of interest for you ? Nakao-san is preparing a repository for rails related projects at rubyforge (mainly for rails plugins utilizing bioruby library), so your code is also welcomed to be there. I proposed 'bioruby-annex' as the project name as the 'bioruby-rails-plugins' is too long (rubyforge's limit is 15 chars). Nakao-san, is your project already granted? We need to consider how to incorporate rails dependent codes in bioruby in the near future. Toshiaki From trevor at corevx.com Thu Apr 5 19:21:58 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Thu, 5 Apr 2007 18:21:58 -0500 Subject: [BioRuby] restriction enzyme module In-Reply-To: <0071DCFD-F731-4C1B-B581-6C897026D0D3@hgc.jp> References: <0071DCFD-F731-4C1B-B581-6C897026D0D3@hgc.jp> Message-ID: On Apr 5, 2007, at 9:55 AM, Toshiaki Katayama wrote: > > I'll forward the patch I sent to you. > Do you think this is applicable? Looks good to me, patch applied. Now how about taking care of AA: def to_re(seq) str = seq.to_s.upcase str.gsub!(/[^BZACDEFGHIKLMNPQRSTVWYU]/, ".") str.gsub!("B", "[DN]") str.gsub!("Z", "[EQ]") Regexp.new(str) end What if we changed it to: def to_re(seq) str = seq.to_s.upcase str.gsub!(/[^BZACDEFGHIKLMNPQRSTVWYU]/, ".") str.gsub!("B", "[BDN]") str.gsub!("Z", "[ZEQ]") str.gsub!("J", "[JIL]") Regexp.new(str) end Note i've added Xle to the list. Trevor From trevor at corevx.com Thu Apr 5 19:40:31 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Thu, 5 Apr 2007 18:40:31 -0500 Subject: [BioRuby] Grammatical pickiness In-Reply-To: <9427C706-3611-4F4B-B3E9-A2A67BFAA449@hgc.jp> References: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> <9427C706-3611-4F4B-B3E9-A2A67BFAA449@hgc.jp> Message-ID: <91D86E5B-4109-4725-9F5F-A5DEBEB51825@corevx.com> On Apr 5, 2007, at 9:34 AM, Toshiaki Katayama wrote: > > Trevor, could you replace the license line in all modules or should I? > Changed to The Ruby License - in TextMate I just did a Find in Project: Find: License::(\s*).* Replace: License::$1The Ruby License so hopefully everyone's spacing is preserved just fine. All - yell at me if there's any problems. Trevor From trevor at corevx.com Thu Apr 5 19:49:05 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Thu, 5 Apr 2007 18:49:05 -0500 Subject: [BioRuby] Subversion Message-ID: So what do people want as far as migrating the history from the soon- to-be-old CVS repository to the Subversion repository? My thoughts on this are that we can lock the CVS repository and keep it around for reading if we want to look up who did what in the future. So far the votes are: Start fresh - me Migrate the history - Pjotr Any other voters? I'm trying to set this up to coincide with the release of 1.1. If you're a core member and don't care either way just respond "no vote" or something so I know I'm not leaving anyone out here. Trevor From christophercyll at gmail.com Thu Apr 5 20:28:11 2007 From: christophercyll at gmail.com (Topher Cyll) Date: Thu, 5 Apr 2007 20:28:11 -0400 Subject: [BioRuby] Subversion In-Reply-To: References: Message-ID: <2599499e0704051728u57305371paf6bfd9a583fb8@mail.gmail.com> If someone is willing to do the migration, why wouldn't the history be kept? Too much work is a perfectly reasonable answer, by the way. =) On 4/5/07, Trevor Wennblom wrote: > So what do people want as far as migrating the history from the soon- > to-be-old CVS repository to the Subversion repository? > > My thoughts on this are that we can lock the CVS repository and keep > it around for reading if we want to look up who did what in the future. > > So far the votes are: > Start fresh - me > Migrate the history - Pjotr > > Any other voters? I'm trying to set this up to coincide with the > release of 1.1. If you're a core member and don't care either way > just respond "no vote" or something so I know I'm not leaving anyone > out here. > > Trevor > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby > From trevor at corevx.com Thu Apr 5 23:01:42 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Thu, 5 Apr 2007 22:01:42 -0500 Subject: [BioRuby] rcov Message-ID: <91A9D20D-BFB0-42E9-9050-F8F0EEC068EA@corevx.com> For the curious here's our current test coverage: http://swdev.cbri.umn.edu/rcov-bioruby20070405/ or on your own: cd test/unit rcov -x "test" `find . -name "*.rb"` From ktym at hgc.jp Fri Apr 6 00:27:39 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Fri, 6 Apr 2007 13:27:39 +0900 Subject: [BioRuby] rcov In-Reply-To: <91A9D20D-BFB0-42E9-9050-F8F0EEC068EA@corevx.com> References: <91A9D20D-BFB0-42E9-9050-F8F0EEC068EA@corevx.com> Message-ID: <52B8B585-6050-4894-98A5-E5BA66473D82@hgc.jp> Hi, All test passed. % ruby install.rb test install.rb: entering test phase... Running all tests in test... Loaded suite test Started ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ Finished in 76.315961 seconds.1304 tests, 2636 assertions, 0 failures, 0 errorsinstall.rb: test done. TODOs which I recognize in addition to the rubyforge's http://rubyforge.org/pm/task.php?group_project_id=194&group_id=769&func=browse are * fill the ChangeLog file * follow recent format change of some KEGG databases * update appl/fasta/*.rb * clean up sample/ directory * update tutorial, if possible (I've lost updated version by HDD crash in February ...) Should I release bioruby-1.1.0-pre3? Toshiaki On 2007/04/06, at 12:01, Trevor Wennblom wrote: > For the curious here's our current test coverage: > > http://swdev.cbri.umn.edu/rcov-bioruby20070405/ > > or on your own: > > cd test/unit > rcov -x "test" `find . -name "*.rb"` > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From ktym at hgc.jp Fri Apr 6 00:55:14 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Fri, 6 Apr 2007 13:55:14 +0900 Subject: [BioRuby] restriction enzyme module In-Reply-To: References: <0071DCFD-F731-4C1B-B581-6C897026D0D3@hgc.jp> Message-ID: <075600B7-D5AC-4B4B-81DF-772F092E44DB@hgc.jp> Trevor, I changed AA#to_re method symmetrically to the new NA#to_re. def to_re(seq) replace = { 'B' => '[DNB]', 'Z' => '[EQZ]', 'J' => '[ILJ]', 'X' => '[ACDEFGHIKLMNPQRSTVWYUOX]', } replace.default = '.' str = seq.to_s.upcase str.gsub!(/[^ACDEFGHIKLMNPQRSTVWYUO]/) { |aa| replace[aa] } Regexp.new(str) end I also added the default value '.' to rescue unexpected char in the sequence. There are two possibilities: 1. replace abnormal alphabet to '.' (current implementation) 2. left the alphabet as is (previous implementation) I suppose 1. is better if the sequence has gap signs '-' etc. which may have different meaning in regexp. Toshiaki On 2007/04/06, at 8:21, Trevor Wennblom wrote: > > On Apr 5, 2007, at 9:55 AM, Toshiaki Katayama wrote: > >> >> I'll forward the patch I sent to you. >> Do you think this is applicable? > > > Looks good to me, patch applied. Now how about taking care of AA: > > def to_re(seq) > str = seq.to_s.upcase > str.gsub!(/[^BZACDEFGHIKLMNPQRSTVWYU]/, ".") > str.gsub!("B", "[DN]") > str.gsub!("Z", "[EQ]") > Regexp.new(str) > end > > What if we changed it to: > > def to_re(seq) > str = seq.to_s.upcase > str.gsub!(/[^BZACDEFGHIKLMNPQRSTVWYU]/, ".") > str.gsub!("B", "[BDN]") > str.gsub!("Z", "[ZEQ]") > str.gsub!("J", "[JIL]") > Regexp.new(str) > end > > Note i've added Xle to the list. > > > Trevor > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From ktym at hgc.jp Fri Apr 6 01:05:03 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Fri, 6 Apr 2007 14:05:03 +0900 Subject: [BioRuby] Subversion In-Reply-To: <2599499e0704051728u57305371paf6bfd9a583fb8@mail.gmail.com> References: <2599499e0704051728u57305371paf6bfd9a583fb8@mail.gmail.com> Message-ID: <783718B8-657F-4333-A0F9-EDEEBA301910@hgc.jp> I'm new to subversion so I just want to know whether it is possible to keep our history or not. How technically difficult? Is there any demerit to migrate CVS history to SVN? I'm afraid that old system will be lost in the future so that we can't track the locked CVS repository at that time. Toshiaki On 2007/04/06, at 9:28, Topher Cyll wrote: > If someone is willing to do the migration, why wouldn't the history be kept? > > Too much work is a perfectly reasonable answer, by the way. =) > > > On 4/5/07, Trevor Wennblom wrote: >> So what do people want as far as migrating the history from the soon- >> to-be-old CVS repository to the Subversion repository? >> >> My thoughts on this are that we can lock the CVS repository and keep >> it around for reading if we want to look up who did what in the future. >> >> So far the votes are: >> Start fresh - me >> Migrate the history - Pjotr >> >> Any other voters? I'm trying to set this up to coincide with the >> release of 1.1. If you're a core member and don't care either way >> just respond "no vote" or something so I know I'm not leaving anyone >> out here. >> >> Trevor >> _______________________________________________ >> 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 ktym at hgc.jp Fri Apr 6 01:12:16 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Fri, 6 Apr 2007 14:12:16 +0900 Subject: [BioRuby] Grammatical pickiness In-Reply-To: <91D86E5B-4109-4725-9F5F-A5DEBEB51825@corevx.com> References: <540F714A-D0A0-45D0-8D2A-B3C217EBDEDC@corevx.com> <9427C706-3611-4F4B-B3E9-A2A67BFAA449@hgc.jp> <91D86E5B-4109-4725-9F5F-A5DEBEB51825@corevx.com> Message-ID: <2DFD68D3-42B6-4774-AF35-CC7134C83A26@hgc.jp> On 2007/04/06, at 8:40, Trevor Wennblom wrote: >> Trevor, could you replace the license line in all modules or should I? > > Changed to The Ruby License - in TextMate I just did a Find in Project: Trevor, thank you! However, I know some modules (i.e. bio/appl/fasta/*.rb <- I'll fix these) are not yet converted to RDoc, so that find and replace of "Licence::\s" may not take effect. :) Authors, please take a look on your codes once again. Toshiaki From pjotr2007 at thebird.nl Fri Apr 6 02:23:32 2007 From: pjotr2007 at thebird.nl (Pjotr Prins) Date: Fri, 6 Apr 2007 08:23:32 +0200 Subject: [BioRuby] Subversion In-Reply-To: <783718B8-657F-4333-A0F9-EDEEBA301910@hgc.jp> References: <2599499e0704051728u57305371paf6bfd9a583fb8@mail.gmail.com> <783718B8-657F-4333-A0F9-EDEEBA301910@hgc.jp> Message-ID: <20070406062332.GA1688@thebird.nl> On Fri, Apr 06, 2007 at 02:05:03PM +0900, Toshiaki Katayama wrote: > I'm new to subversion so I just want to know whether it is possible to keep our history or not. > How technically difficult? Is there any demerit to migrate CVS history to SVN? > I'm afraid that old system will be lost in the future so that we can't track the locked CVS repository at that time. Use http://cvs2svn.tigris.org/cvs2svn.html If you keep the old CVS repository files in a tar ball we can always make them available again - one of the nice things about CVS is the transparent server side storage. So ask for the repository tarball and put it somewhere safe. Pj. From raoul.bonnal at itb.cnr.it Fri Apr 6 06:40:16 2007 From: raoul.bonnal at itb.cnr.it (RJP) Date: Fri, 06 Apr 2007 12:40:16 +0200 Subject: [BioRuby] ARBioSQL In-Reply-To: <0E1C617D-2690-4784-BAAD-7CB7803DB2BD@hgc.jp> References: <98028b00703081502p6277cc4h5bae0e0908b0fe89@mail.gmail.com> <98028b00703090653x1fc3567eyddf1f135d217f668@mail.gmail.com> <78F69ECC-32B8-4196-A409-1D5BE751DB27@hgc.jp> <1175674101.7011.19.camel@Graco> <0E1C617D-2690-4784-BAAD-7CB7803DB2BD@hgc.jp> Message-ID: <1175856016.6811.8.camel@Graco> Hi Toshiaki, > >> > >> I don't follow the recent changes on BioSQL schema but during the last > >> Phyloinformatics Hackathon (2006 Dec http://hackathon.nescent.org/), > >> which we (Goto-san and me) had attended, Hilmar was working on > >> the integration of tree into the database. > >> > >> https://www.nescent.org/wg/phyloinformatics/index.php?title=Supporting_NEXUS > >> > >> BioSQL The BioSQL group created a new set of tables, optional within BioSQL, > >> for the purposes of storing phylogenetic trees, both sequence or species. > >> A script was added to the package that allows one to read NEXUS files and > >> write any trees found in the files to the database. > > Now I'm a littel bit busy for adding the ne schema and update > > ActiveRecord implementation. Mhhh Probably next weeks I'll take care of it. > > Now I did a schema for blast and described it by Active Record too, > > could be of interest for you ? > > Nakao-san is preparing a repository for rails related projects at rubyforge > (mainly for rails plugins utilizing bioruby library), so your code is also > welcomed to be there. Ok. We will discuss about the schema itself. > I proposed 'bioruby-annex' as the project name as the 'bioruby-rails-plugins' > is too long (rubyforge's limit is 15 chars). Nakao-san, is your project > already granted? What do you mean for "granted", founds ? I don't know if it's possible getting founds from the EU to developing Ruby + BioRuby + Activer Record. Probably we will need a project road map or ... for example develop a bioportal based on that technologies. > > We need to consider how to incorporate rails dependent codes in bioruby > in the near future. May you explain better your point,tnx ? ------------------------------THE~CODE-------------------------------------- # # bio/io/arbsql.rb - BioSQL access module by Active Record # # Inspired by bio/io/sql.sql Copyright (C) 2002 KATAYAMA Toshiaki # Copyright (C) 2006 Raoul Jean Pierre Bonnal # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # $Id: arbsql.rb,v 0.1 2007/04/06 13:04:28 k Exp $ # begin require 'active_record' rescue LoadError end require 'bio/sequence' require 'bio/feature' module Bio class BioSQL def initialize(adapter, database, username) ActiveRecord::Base.establish_connection(:adapter=>adapter, :database=>database, :username=>username) @adapter=adapter @database=database @username=username @connection=ActiveRecord::Base.connection() end def close #returns info to reestablish a new connection ActiveRecord::Base.remove_connection() end class Biodatabase < ActiveRecord::Base set_table_name "biodatabase" set_sequence_name "biodatabase_pk_seq" set_primary_key "biodatabase_id" has_many :bioentry #per la creazione richiesti: #name end class Bioentry < ActiveRecord::Base set_table_name "bioentry" set_sequence_name "bioentry_pk_seq" set_primary_key "bioentry_id" belongs_to :biodatabase belongs_to :taxon has_one :biosequence has_one :comment has_many :seqfeature has_many :bioentry_reference has_many :bioentry_dbxref #per la creazione richiesti: #name, accession, version end class ObjectBioentry < Bioentry end class SubjectBioentry < Bioentry end class BioentryReference < ActiveRecord::Base set_table_name "bioentry_reference" set_sequence_name nil set_primary_key nil belongs_to :bioentry belongs_to :reference end class BioentryDbxref < ActiveRecord::Base set_table_name "bioentry_dbxref" set_sequence_name nil set_primary_key nil #bioentry_id,dbxref_id belongs_to :bioentry belongs_to :dbxref end class BioentryPath < ActiveRecord::Base set_table_name "bioentry_path" set_primary_key nil set_sequence_name nil belongs_to :term belongs_to :object_bioentry, :foreign_key=>"object_bioentry_id" belongs_to :subject_bioentry, :foreign_key=>"subject_bioentry_id" end class BioentryQualifierValue < ActiveRecord::Base #completare end class BioentryRelationship < ActiveRecord::Base #completare end class Biosequence < ActiveRecord::Base set_table_name "biosequence" set_sequence_name "biosequene_pk_seq" set_primary_key "bioentry_id" belongs_to :bioentry end class Comment < ActiveRecord::Base set_table_name "comment" set_sequence_name "comment_pk_seq" set_primary_key "comment_id" belongs_to :bioentry end class Ontology < ActiveRecord::Base set_table_name "ontology" set_sequence_name "ontology_pk_seq" set_primary_key "ontology_id" has_many :term has_many :term_path has_many :term_relationship end class Term < ActiveRecord::Base set_table_name "term" set_sequence_name "term_pk_seq" set_primary_key "term_id" belongs_to :ontology has_many :seqfeature_qualifier_value has_many :dbxref_qualifier_value has_many :location has_many :seqfeature_relationship has_many :term_dbxref has_many :term_relationship_term has_many :term_synonym has_many :location_qualifier_value has_many :seqfeature has_many :term_path has_many :term_relationship end #created to satisfy relations inside Seqfeature. I have not found another way to define this. # the problem is how to distinguish between a typeterm and a source term class Typeterm < Term end #verificare le relazioni rispetto a term class Sourceterm < Term end class ObjectTerm < Term end class SubjectTerm < Term end class PredicateTerm < Term end class Seqfeature < ActiveRecord::Base set_table_name "seqfeature" set_sequence_name "seqfeature_pk_seq" set_primary_key "seqfeature_id" belongs_to :bioentry belongs_to :typeterm, :foreign_key=>"type_term_id" belongs_to :sourceterm, :foreign_key=>"source_term_id" has_many :seqfeature_dbxref has_many :dbxref has_many :seqfeature_qualifier_value has_many :location has_many :seqfeature_path has_many :seqfeature_relationship end class ObjectseqFeature < Seqfeature end class SubjectFeature < Seqfeature end class SeqfeatureDbxref < ActiveRecord::Base set_table_name "seqfeature_dbxref" set_primary_key nil #seqfeature_id, dbxref_id set_sequence_name nil belongs_to :seqfeature belongs_to :dbxref end class SeqfeaturePath < ActiveRecord::Base set_table_name "seqfeature_path" set_primary_key nil set_sequence_name nil belongs_to :object_feature belongs_to :subject_feature end class SeqfeatureQualifierValue < ActiveRecord::Base set_table_name "seqfeature_qualifier_value" set_primary_key nil #seqfeature_id, term_id, rank set_sequence_name nil belongs_to :seqfeature belongs_to :term end class SeqfeatureRelationship < ActiveRecord::Base set_table_name "seqfeature_relationship" set_primary_key "seqfeature_relationship_id" set_sequence_name "seqfeatue_relationship_pk_seq" belongs_to :term belongs_to :object_seqfeature belongs_to :subject_seqfeature end class Dbxref < ActiveRecord::Base set_table_name "dbxref" set_primary_key "dbxref_id" set_sequence_name "dbxref_pk_seq" has_many :dbxref_qualifier_value has_many :location has_many :reference #probably is a "has_one" rel. has_many :term_dbxref has_many :bioentry_dbxref end class DbxrefQualifierValue < ActiveRecord::Base set_table_name "dbxref_qualifier_value" set_primary_key nil #dbxref_id, term_id, rank set_sequence_name nil belongs_to :dbxref belongs_to :term end class Location < ActiveRecord::Base set_table_name "location" set_sequence_name "location_pk_seq" set_primary_key "location_id" belongs_to :seqfeature belongs_to :dbxref belongs_to :term has_many :locatio_qualifier_value def to_s if self.strand!=1 str="complement("+self.start_pos.to_s+".."+self.end_pos.to_s +")" else str="("+self.start_pos.to_s+".."+self.end_pos.to_s+")" end return str end end class LocationQualifierValue < ActiveRecord::Base set_table_name "location_qualifier_value" set_primary_key nil #location_id, term_id set_sequence_name nil belongs_to :location belongs_to :term end class Reference < ActiveRecord::Base set_table_name "reference" set_primary_key "reference_id" set_sequence_name "reference_pk_seq" belongs_to :dbxref has_many :bioentry_reference end class Taxon < ActiveRecord::Base set_table_name "taxon" set_primary_key "taxon_id" set_sequence_name "taxon_pk_seq" has_many :taxon_name #probably has_one has_one :bioentry end class TaxonName < ActiveRecord::Base set_table_name "taxon_name" set_primary_key nil set_sequence_name nil belongs_to :taxon end class TermDbxref < ActiveRecord::Base set_table_name "term_dbxref" set_primary_key nil #term_id, dbxref_id set_sequence_name nil belongs_to :term belongs_to :dbxref end class TermPath < ActiveRecord::Base set_table_name "term_path" set_primary_key "term_path_id" set_sequence_name "term_path_pk_seq" belongs_to :ontology belongs_to :subject_term belongs_to :object_term belongs_to :predicate_term end class TermRelationship < ActiveRecord::Base set_table_name "term_relationship" set_primary_key "term_relationship_id" set_sequence_name "term_relationship_pk_seq" belongs_to :ontology belongs_to :subject_term belongs_to :predicate_term belongs_to :object_term has_one :term_relationship_term end class TermRelationshipTerm < ActiveRecord::Base set_table_name "term_relationship_term" set_primary_key "term_relationship_id" set_sequence_name nil belongs_to :term_relationship belongs_to :term end class TermSynonym < ActiveRecord::Base set_table_name "term_synonym" set_primary_key nil #term_id, synonym set_sequence_name nil belongs_to :term end ###commented functions should be setted up as private. Only fetch should be public or better a few functions ## I should set up pub functions to explore database. #the only object user should see is the Sequence object ###anche se in teoria questa classe la potrei separate ( solo definizione di biosql) lasciando la def di seq di biosql separata. def find_bioentry_by_biodatabase_id(id) return Bioentry.find_by_biodatabase(id) end # def find_all_biodatabase # return Biodatabase.find_all # end def fetch_accession(accession) #forse dovrei fare qui il controllo della entry che ritorna qualche cosa non nella creazione dell'oggetto che ha come parametro un nil Sequence.new(self, Bioentry.find_by_accession(accession)) end def fetch_id(id) Sequence.new(self, Bioentry.find(id)) end class Sequence private def get_seqfeature(sf) #in seqfeature BioSQL class Bio::Feature.new(sf.typeterm.name, sf.location.to_s,sf.seqfeature_qualifier_value.collect{|sfqv| Bio::Feature::Qualifier.new(sfqv.term.name,sfqv.value)}) end def length=(len) @entry.biosequence.length=len end public def initialize(db,entry) @db=db unless entry.nil? @entry=entry unless entry.nil? end def bioentry_id @enty.bioentry_id end def name @entry.name end def name=(value) @entry.name=value end def accession @entry.accession end def accession=(value) @entry.accession=value end def taxon_id @entry.taxon_id end def database @entry.biodatabase.name end def database_desc @entry.biodatabase.description end def version @entry.version end def version=(value) @entry.version=value end def division @entry.division end def division=(value) @entry.division=value end def description @entry.description end def description=(value) @entry.description=value end def identifier @entry.identifier end def identifier=(value) @entry.identifier=value end def features Bio::Features.new(@db.find_feature_by_entry(@entry.bioentry_id).collect {|sf| self.get_seqfeature(sf)}) end def seq case @entry.biosequence.alphabet when /.na/i # 'dna' or 'rna' Bio::Sequence::NA.new(@entry.biosequence.seq) when /protein/i # 'protein' Bio::Sequence::AA.new(@entry.biosequence.seq) when nil nil end end def seq=(value) #chk which type of alphabet is, NU/NA/nil #value could be nil ? I think no. @entry.biosequence.seq=value self.length=value.length end def length @entry.biosequence.length end def references #return and array of hash, hash has these keys ["title", "dbxref_id", "reference_id", "authors", "crc", "location"] #probably would be better to create a class refrence to collect these informations @entry.bioentry_reference.collect{|item| item.reference.attributes} end def comment @entry.comment.comment_text end def save #I should add chks for SQL errors @entry.biosequence.save @entry.save end def to_fasta print ">" + accession + "\n" print seq.gsub(Regexp.new(".{1,#{60}}"), "\\0\n") end end end end =begin db=Bio::BioSQL.new('postgresql','discovery','febo') stampa le feature di una sequenza: s=db.find_seq_by_bioentry_id(7176) s.features.each{|x| x.qualifiers.each {|y| puts x.feature+' '+x.position +"\t"+y.qualifier+'-->'+y.value}} versione molto contratta nel caso fornisca gli id in un array h=[7294,7176,7094,7247,7294] h.each{|k| puts k; db.find_seq_by_bioentry_id(k).features.each{|x| x.qualifiers.each {|y| puts x.feature+' '+x.position+"\t"+y.qualifier +'-->'+y.value}}} per la creazione della sequenza prima qualifier, feature, features, sequenza, genbank =end =begin = Bio::BioSQL --- Bio::BioSQL.new(adapter = 'postgresql', database = 'yourdbname', username = 'yourdbusername') --- Bio::BioSQL.close -> Arguments for establish_connection in ActiveRecord::Base --- Bio::BioSQL#fetch_accession(accession) Returns Bio::BioSQL::Sequence object. --- Bio::BioSQL#fetch_id(bioentry_id) Returns Bio::BioSQL::Sequence object. --- Bio::BioSQL#find_bioentry_by_biodatabase_id(id) Returns Array of Bio::BioSQL::Bioentry selected by biodatabase_id Actually not very useful, I think would be usefull to return an array of sequences. == Bio::BioSQL::Sequence --- Bio::BioSQL::Sequence.new(db, entry) --- Bio::BioSQL::Sequence#bioentry_id -> Integer --- Bio::BioSQL::Sequence#_name -> String --- Bio::BioSQL::Sequence#accession -> String --- Bio::BioSQL::Sequence#definition -> String --- Bio::BioSQL::Sequence#comment -> String Returns the first comment. For complete comments, use comments method. Note: I have to test this. In not AR version there was comments I have not yet implemented it. --- Bio::BioSQL::Sequence#description -> String --- Bio::BioSQL::Sequence#database -> String Returns the name of the biodatabase associated with the sequence. --- Bio::BioSQL::Sequence#database_desc -> String Returns the description of biodatabase associated with the sequence. --- Bio::BioSQL::Sequence#date -> String NOT IMPLEMENTED --- Bio::BioSQL::Sequence#division -> String NOT IMPLEMENTED --- Bio::BioSQL::Sequence#length -> Integer Returns the length of the sequence stored into the db. --- Bio::BioSQL::Sequence#features Returns Bio::Features object. --- Bio::BioSQL::Sequence#references -> Array Returns reference informations in Array of Hash (not Bio::Reference) (hash has these keys ["title", "dbxref_id", "reference_id", "authors", "crc", "location"]) --- Bio::BioSQL::Sequence#identifier -> ? I can't remember. Sorry --- Bio::BioSQL::Sequence#seq Returns Bio::Sequence::NA or AA object. --- Bio::BioSQL::Sequence#subseq(from, to) NOT IMPLEMENTED Returns Bio::Sequence::NA or AA object (by lazy fetching). --- Bio::BioSQL::Sequence#taxonomy -> Integer Returns taxon_id of the sequence --- Bio::BioSQL::Sequence#version -> String --- Bio::BioSQL::Sequence#save Save the sequence into the db --- Bio::BioSQL::Sequence#to_fasta Prints on standard output the sequence formatted in fasta format =end -- Ra From ktym at hgc.jp Fri Apr 6 07:50:58 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Fri, 6 Apr 2007 20:50:58 +0900 Subject: [BioRuby] ARBioSQL In-Reply-To: <1175856016.6811.8.camel@Graco> References: <98028b00703081502p6277cc4h5bae0e0908b0fe89@mail.gmail.com> <98028b00703090653x1fc3567eyddf1f135d217f668@mail.gmail.com> <78F69ECC-32B8-4196-A409-1D5BE751DB27@hgc.jp> <1175674101.7011.19.camel@Graco> <0E1C617D-2690-4784-BAAD-7CB7803DB2BD@hgc.jp> <1175856016.6811.8.camel@Graco> Message-ID: <3DC632C9-F0A9-49AF-AEDA-AF5AC46506D5@hgc.jp> Hi Raoul, On 2007/04/06, at 19:40, RJP wrote: >> I proposed 'bioruby-annex' as the project name as the 'bioruby-rails-plugins' >> is too long (rubyforge's limit is 15 chars). Nakao-san, is your project >> already granted? > What do you mean for "granted", founds ? Sorry, my English might be wrong. To have project on RubyForge, you need to apply a form for the new project, and I just wonder the process is already finished or not yet. >> We need to consider how to incorporate rails dependent codes in bioruby >> in the near future. > May you explain better your point,tnx ? Currently, require 'bio' doesn't have any dependency on rails (activerecord etc.). I think it is better to have codes dependent on rails separately from bioruby library for now. And for this purpose, the above repository will be prepared at rubyforge. However, as the number of modules dependent on RDB increases (they should utilize ActiveRecord), we will consider to make rails as a requirement for the bioruby library in the future. > ------------------------------THE~CODE-------------------------------------- > # > # bio/io/arbsql.rb - BioSQL access module by Active Record Thank you for the code. Will it be distributed under the same terms as Ruby? Toshiaki From raoul.bonnal at itb.cnr.it Fri Apr 6 07:59:30 2007 From: raoul.bonnal at itb.cnr.it (RJP) Date: Fri, 06 Apr 2007 13:59:30 +0200 Subject: [BioRuby] ARBioSQL In-Reply-To: <3DC632C9-F0A9-49AF-AEDA-AF5AC46506D5@hgc.jp> References: <98028b00703081502p6277cc4h5bae0e0908b0fe89@mail.gmail.com> <98028b00703090653x1fc3567eyddf1f135d217f668@mail.gmail.com> <78F69ECC-32B8-4196-A409-1D5BE751DB27@hgc.jp> <1175674101.7011.19.camel@Graco> <0E1C617D-2690-4784-BAAD-7CB7803DB2BD@hgc.jp> <1175856016.6811.8.camel@Graco> <3DC632C9-F0A9-49AF-AEDA-AF5AC46506D5@hgc.jp> Message-ID: <1175860770.6811.10.camel@Graco> Il giorno ven, 06/04/2007 alle 20.50 +0900, Toshiaki Katayama ha scritto: > > ------------------------------THE~CODE-------------------------------------- > > # > > # bio/io/arbsql.rb - BioSQL access module by Active Record > > Thank you for the code. > Will it be distributed under the same terms as Ruby? I think so :-D -- RJP From s-merchant at northwestern.edu Fri Apr 6 10:54:03 2007 From: s-merchant at northwestern.edu (Sohel Merchant) Date: Fri, 6 Apr 2007 09:54:03 -0500 Subject: [BioRuby] Subversion In-Reply-To: References: Message-ID: <001801c7785b$6ae6b4d0$c2987ca5@pc13> Hi Trevor, I would recommend going ahead with Release 1.1 in CVS and work on migrating cvs2svn in parallel. I am currently working on converting our repositories to SVN and would be willing to give you a hand in doing that. Thanks, Sohel. -----Original Message----- From: bioruby-bounces at lists.open-bio.org [mailto:bioruby-bounces at lists.open-bio.org] On Behalf Of Trevor Wennblom Sent: Thursday, April 05, 2007 6:49 PM To: bioruby at lists.open-bio.org Subject: [BioRuby] Subversion So what do people want as far as migrating the history from the soon- to-be-old CVS repository to the Subversion repository? My thoughts on this are that we can lock the CVS repository and keep it around for reading if we want to look up who did what in the future. So far the votes are: Start fresh - me Migrate the history - Pjotr Any other voters? I'm trying to set this up to coincide with the release of 1.1. If you're a core member and don't care either way just respond "no vote" or something so I know I'm not leaving anyone out here. Trevor _______________________________________________ BioRuby mailing list BioRuby at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/bioruby From s-merchant at northwestern.edu Fri Apr 6 10:50:50 2007 From: s-merchant at northwestern.edu (Sohel Merchant) Date: Fri, 6 Apr 2007 09:50:50 -0500 Subject: [BioRuby] Subversion In-Reply-To: References: Message-ID: <001701c7785a$f8011a00$c2987ca5@pc13> I vote for keeping the history. And cvs2svn is works nicely. Sohel. -----Original Message----- From: bioruby-bounces at lists.open-bio.org [mailto:bioruby-bounces at lists.open-bio.org] On Behalf Of Trevor Wennblom Sent: Thursday, April 05, 2007 6:49 PM To: bioruby at lists.open-bio.org Subject: [BioRuby] Subversion So what do people want as far as migrating the history from the soon- to-be-old CVS repository to the Subversion repository? My thoughts on this are that we can lock the CVS repository and keep it around for reading if we want to look up who did what in the future. So far the votes are: Start fresh - me Migrate the history - Pjotr Any other voters? I'm trying to set this up to coincide with the release of 1.1. If you're a core member and don't care either way just respond "no vote" or something so I know I'm not leaving anyone out here. Trevor _______________________________________________ BioRuby mailing list BioRuby at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/bioruby From gross_yonatan at yahoo.com Sat Apr 7 19:31:39 2007 From: gross_yonatan at yahoo.com (Yonatan Gross) Date: Sun, 8 Apr 2007 02:31:39 +0300 Subject: [BioRuby] Calculation of Conserved residues. Message-ID: <30DDB1FD-F3C1-4CC5-A629-5103F0558DC4@yahoo.com> Hi all, first post to this group. I hope this question is legit. I am trying to quantify the alignment of few genes. with mac vector I am able to get a "conserved Identities" value i can use , but I need to manually run the clustalw procedure. I want to write a ruby script to do the same. any suggestions ? I have the following: #!/usr/bin/env ruby require 'rubygems' require 'bio' #----------------------------------------------------------------------- -- arabidopsis = <gi|9843639|emb|CAC03598.1| Rieske FeS protein [Arabidopsis thaliana] MASSSLSPATQLGSSRSALMAMSSGLFVKPTKMNHQMVRKEKIGLRIACQASSIPADRVPDMEKRKTLNL LLLGALSLPTGYMLVPYATFFVPPGTGGGGGGTPAKDALGNDVVAAEWLKTHGPGDRTLTQGLKGDPTYL VVENDKTLATYGINAVCTHLGCVVPWNKAENKFLCPCHGSQYNAQGRVVRGPAPLSLALAHADIDEAGKV LFVPWVETDFRTGDAPWWS END tobacco = <gi|19995|emb|CAA46808.1| Rieske FeS [Nicotiana tabacum] MASSTLSPVTQLCSSKSGLSSVSQCLLVKPMKINSHGLGKDKRMKVKCMATSIPADDRVPDMEKRNLMNL LLLGALSLPTAGMLVPYGTFFVPPGSGGGSGGTPAKDALGNDVIASEWLKTHPPGNRTLTQGLKGDPTYL VVENDGTLATYGINAVCTHLGCVVPFNAAENKFICPCHGSQYNNQGRVVRGPAPLSLALAHADIDDGKVV FVPWVETDFRTGEDPWWA END spinach = <gi|226151|prf||1412276A rieske FeS precursor protein [spinach] MIISIFNQLHLTENSSLMASFTLSSATPSQLCSSKNGMFAPSLALAKAGRVNVLISKERIRGMKLTCQAT SIPADNVPDMQKRETLNLLLLGALSLPTGYMLLPYASFFVPPGGGAGTGGTIAKDALGNDVIAAEWLKTH APGDRTLTQGLKGDPTYLVVESDKTLATFGINAVCTHLGCVVPFNAAENKFICPCHGSQYNNQGRVVRGP APLSLALAHCDVDDGKVVFVPWTETDFRTGEAPWWSA END rice = <gi|115472727|ref|NP_001059962.1| Os07g0556200 [Oryza sativa (japonica cultivar-group)] MASTALSTASNPTQLCRSRASLGKPVKGLGFGRERVPRTATTITCQAASSIPADRVPDMGKRQLMNLLLL GAISLPTVGMLVPYGAFFIPAGSGNAGGGQVAKDKLGNDVLAEEWLKTHGPNDRTLTQGLKGDPTYLVVE ADKTLATYGINAVCTHLGCVVPWNAAENKFICPCHGSQYNNQGRVVRGPAPLSLALVHADVDDGKVLFVP WVETDFRTGDNPWWA END potato = <gi|37222949|gb|AAQ90151.1| putative Rieske Fe-S protein precursor [Solanum tuberosum] MASSTLSHVTPSQLCSSKSGVSSVSQALLVKPMKINGHGMGKDKRMKAKCMAASIPADDRVPDMEKRNLM NLLLLGALALPTGGMLVPYATFFAPPGSGGGSSGTIAKDANGNDVVVTEWLKTHSPGTRTLTQGLKGDPT YLVVENDGTLATYGINAVCTHLGCVVPWNTAENKFICPCHGSQYNNQGKVVRGPAPLSLALAHADIDDGK VVFVPWVETDFRTGDSPWWA END seqs = [] seqs << Bio::Sequence::AA.new(arabidopsis) seqs << Bio::Sequence::AA.new(tobacco) seqs << Bio::Sequence::AA.new(spinach) seqs << Bio::Sequence::AA.new(rice) seqs << Bio::Sequence::AA.new(potato) factory = Bio::ClustalW.new report = factory.query_align(seqs) puts report.alignment.match_line #----------------------------------------------------------------------- -- thanks ahead. Yonatan Gross. From moses at collaborativedrug.com Sat Apr 7 20:37:07 2007 From: moses at collaborativedrug.com (Moses M. Hohman) Date: Sat, 7 Apr 2007 17:37:07 -0700 Subject: [BioRuby] Subversion In-Reply-To: <001701c7785a$f8011a00$c2987ca5@pc13> References: <001701c7785a$f8011a00$c2987ca5@pc13> Message-ID: +1 I've used cvs2svn a couple times, and it works very smoothly, shouldn't take more than an hour of effort (15 minutes if you're lucky). Cool to see all the activity on this mailing list, I hadn't looked for a while! Moses On Apr 6, 2007, at 7:50 AM, Sohel Merchant wrote: > I vote for keeping the history. And cvs2svn is works nicely. > > Sohel. > > -----Original Message----- > From: bioruby-bounces at lists.open-bio.org > [mailto:bioruby-bounces at lists.open-bio.org] On Behalf Of Trevor > Wennblom > Sent: Thursday, April 05, 2007 6:49 PM > To: bioruby at lists.open-bio.org > Subject: [BioRuby] Subversion > > So what do people want as far as migrating the history from the soon- > to-be-old CVS repository to the Subversion repository? > > My thoughts on this are that we can lock the CVS repository and keep > it around for reading if we want to look up who did what in the > future. > > So far the votes are: > Start fresh - me > Migrate the history - Pjotr > > Any other voters? I'm trying to set this up to coincide with the > release of 1.1. If you're a core member and don't care either way > just respond "no vote" or something so I know I'm not leaving anyone > out here. > > Trevor > _______________________________________________ > 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 trevor at corevx.com Sun Apr 8 15:36:56 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Sun, 8 Apr 2007 14:36:56 -0500 Subject: [BioRuby] RDoc examples Message-ID: I've assembled a list of examples of how RDoc comment blocks work (and don't work): http://ninecoldwinters.com/ferro/rdoc-comment-block-examples/ Be warned, it uses a frame here and there. This has a lot of good instances of things that we do wrong which we can work to correct. Most of the things in there should be self-explanatory. I'm going to wait a few days for people to make comments, after that we can start working on adding details to our formal specs for exactly how we should address these issues. We really don't need to wait to make everything perfect for BioRuby 1.1 as far as the RDoc goes. Let's just get it out the door and then we'll put together a close follow-up release following a nice regular release schedule. Trevor From trevor at corevx.com Sun Apr 8 15:41:53 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Sun, 8 Apr 2007 14:41:53 -0500 Subject: [BioRuby] Subversion Message-ID: Excellent, thanks for speaking up everyone. Looks like I'll push forward on migrating the history. Onto the next topic - tickets, bugs, requests, and milestones. I'm interested in having a Trac instance for BioRuby. I'm not interested in using the Trac wiki system, but the management of bugs and milestones and such is pretty good. Seems to work pretty well for Rails.[1] Opinions? Trevor [1]: http://dev.rubyonrails.org/ From ktym at hgc.jp Mon Apr 9 03:19:32 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Mon, 9 Apr 2007 16:19:32 +0900 Subject: [BioRuby] Calculation of Conserved residues. In-Reply-To: <30DDB1FD-F3C1-4CC5-A629-5103F0558DC4@yahoo.com> References: <30DDB1FD-F3C1-4CC5-A629-5103F0558DC4@yahoo.com> Message-ID: Hi, On 2007/04/08, at 8:31, Yonatan Gross wrote: > seqs = [] > seqs << Bio::Sequence::AA.new(arabidopsis) > seqs << Bio::Sequence::AA.new(tobacco) : The point is that Bio::Sequence::AA.new couldn't accept FASTA format string. (Should I change this behavior?) > factory = Bio::ClustalW.new > report = factory.query_align(seqs) Also, factory.query(seqs) finally passes seqs to Bio::OriginalAlignment.new(seqs) and it looks like that this method also expects array of Bio::Sequence::AA objects or array of objects which respond to one-of 'seq', 'naseq' or 'aaseq' methods. In your case, I recommend you to have your sequence in the separate file and read it through the Bio::FlatFile interface (which recognize FASTA formatted file and iterates on each sequence by creating Bio::FastaFormat object) then run clustalw through BioRuby. % ruby run_clustalw.rb sequences.txt *** :** .: ** *: .: * :: * *:* **** **** **: :*******::*** **:**.:** *.* * . .* *** ****:. ****** *. ***************** * ****:**************:* *****:********* **:************.*.*:*: ***:****.*******: ***: The revised version of your script is as follows: run_clustalw.rb ------------------------------------------------------------ #!/usr/bin/env ruby require 'bio' seqs = [] Bio::FlatFile.auto(ARGF).each do |fasta| seqs << fasta.seq end clustalw = Bio::ClustalW.new report = clustalw.query(seqs) puts report.alignment.match_line ------------------------------------------------------------ sequences.txt: ------------------------------------------------------------ >gi|9843639|emb|CAC03598.1| Rieske FeS protein [Arabidopsis thaliana] (arabidopsis) MASSSLSPATQLGSSRSALMAMSSGLFVKPTKMNHQMVRKEKIGLRIACQASSIPADRVPDMEKRKTLNL LLLGALSLPTGYMLVPYATFFVPPGTGGGGGGTPAKDALGNDVVAAEWLKTHGPGDRTLTQGLKGDPTYL VVENDKTLATYGINAVCTHLGCVVPWNKAENKFLCPCHGSQYNAQGRVVRGPAPLSLALAHADIDEAGKV LFVPWVETDFRTGDAPWWS >gi|19995|emb|CAA46808.1| Rieske FeS [Nicotiana tabacum] (tobacco) MASSTLSPVTQLCSSKSGLSSVSQCLLVKPMKINSHGLGKDKRMKVKCMATSIPADDRVPDMEKRNLMNL LLLGALSLPTAGMLVPYGTFFVPPGSGGGSGGTPAKDALGNDVIASEWLKTHPPGNRTLTQGLKGDPTYL VVENDGTLATYGINAVCTHLGCVVPFNAAENKFICPCHGSQYNNQGRVVRGPAPLSLALAHADIDDGKVV FVPWVETDFRTGEDPWWA >gi|226151|prf||1412276A rieske FeS precursor protein [spinach] (spinach) MIISIFNQLHLTENSSLMASFTLSSATPSQLCSSKNGMFAPSLALAKAGRVNVLISKERIRGMKLTCQAT SIPADNVPDMQKRETLNLLLLGALSLPTGYMLLPYASFFVPPGGGAGTGGTIAKDALGNDVIAAEWLKTH APGDRTLTQGLKGDPTYLVVESDKTLATFGINAVCTHLGCVVPFNAAENKFICPCHGSQYNNQGRVVRGP APLSLALAHCDVDDGKVVFVPWTETDFRTGEAPWWSA >gi|115472727|ref|NP_001059962.1| Os07g0556200 [Oryza sativa (japonica cultivar-group)] (rice) MASTALSTASNPTQLCRSRASLGKPVKGLGFGRERVPRTATTITCQAASSIPADRVPDMGKRQLMNLLLL GAISLPTVGMLVPYGAFFIPAGSGNAGGGQVAKDKLGNDVLAEEWLKTHGPNDRTLTQGLKGDPTYLVVE ADKTLATYGINAVCTHLGCVVPWNAAENKFICPCHGSQYNNQGRVVRGPAPLSLALVHADVDDGKVLFVP WVETDFRTGDNPWWA >gi|37222949|gb|AAQ90151.1| putative Rieske Fe-S protein precursor [Solanum tuberosum] (potato) MASSTLSHVTPSQLCSSKSGVSSVSQALLVKPMKINGHGMGKDKRMKAKCMAASIPADDRVPDMEKRNLM NLLLLGALALPTGGMLVPYATFFAPPGSGGGSSGTIAKDANGNDVVVTEWLKTHSPGTRTLTQGLKGDPT YLVVENDGTLATYGINAVCTHLGCVVPWNTAENKFICPCHGSQYNNQGKVVRGPAPLSLALAHADIDDGK VVFVPWVETDFRTGDSPWWA ------------------------------------------------------------ Hope this helps. Toshiaki From s-merchant at northwestern.edu Mon Apr 9 14:23:36 2007 From: s-merchant at northwestern.edu (Sohel Merchant) Date: Mon, 9 Apr 2007 13:23:36 -0500 Subject: [BioRuby] Subversion In-Reply-To: References: Message-ID: <000b01c77ad4$3087cc90$c2987ca5@pc13> Hey Trevor, Thanks for working on the subversion repository. I am wondering how the Rails Trac system works compared with RubyForge. Did you guys already decide on moving the project out of RubyForge? I briefly looked at the rails trac system and it looks great to me. I vote for the Rails Trac. Cheers, Sohel. -----Original Message----- From: bioruby-bounces at lists.open-bio.org [mailto:bioruby-bounces at lists.open-bio.org] On Behalf Of Trevor Wennblom Sent: Sunday, April 08, 2007 2:42 PM To: bioruby at lists.open-bio.org Subject: Re: [BioRuby] Subversion Excellent, thanks for speaking up everyone. Looks like I'll push forward on migrating the history. Onto the next topic - tickets, bugs, requests, and milestones. I'm interested in having a Trac instance for BioRuby. I'm not interested in using the Trac wiki system, but the management of bugs and milestones and such is pretty good. Seems to work pretty well for Rails.[1] Opinions? Trevor [1]: http://dev.rubyonrails.org/ _______________________________________________ BioRuby mailing list BioRuby at lists.open-bio.org http://lists.open-bio.org/mailman/listinfo/bioruby From angel at mail.med.upenn.edu Mon Apr 9 14:50:11 2007 From: angel at mail.med.upenn.edu (Angel Pizarro) Date: Mon, 9 Apr 2007 14:50:11 -0400 Subject: [BioRuby] Subversion In-Reply-To: <000b01c77ad4$3087cc90$c2987ca5@pc13> References: <000b01c77ad4$3087cc90$c2987ca5@pc13> Message-ID: Trac is indeed a great system and project, but is not a system that is host-able by RubyForge. RubyForge, based on GForge, will only run plain HTML or PHP sites (maybe not even that) not a python web app, which is what Trac is. -angel On 4/9/07, Sohel Merchant wrote: > > Hey Trevor, > Thanks for working on the subversion repository. I am wondering how the > Rails Trac system works compared with RubyForge. Did you guys already > decide > on moving the project out of RubyForge? I briefly looked at the rails trac > system and it looks great to me. I vote for the Rails Trac. > > Cheers, > Sohel. > -----Original Message----- > From: bioruby-bounces at lists.open-bio.org > [mailto:bioruby-bounces at lists.open-bio.org] On Behalf Of Trevor Wennblom > Sent: Sunday, April 08, 2007 2:42 PM > To: bioruby at lists.open-bio.org > Subject: Re: [BioRuby] Subversion > > Excellent, thanks for speaking up everyone. Looks like I'll push > forward on migrating the history. > > Onto the next topic - tickets, bugs, requests, and milestones. I'm > interested in having a Trac instance for BioRuby. I'm not interested > in using the Trac wiki system, but the management of bugs and > milestones and such is pretty good. Seems to work pretty well for > Rails.[1] > > Opinions? > > Trevor > > [1]: http://dev.rubyonrails.org/ > _______________________________________________ > 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 > -- Angel Pizarro Director, Bioinformatics Facility Institute for Translational Medicine and Therapeutics University of Pennsylvania 806 BRB II/III 421 Curie Blvd. Philadelphia, PA 19104-6160 P: 215-573-3736 F: 215-573-9004 From trevor at corevx.com Mon Apr 9 14:56:17 2007 From: trevor at corevx.com (Trevor Wennblom) Date: Mon, 9 Apr 2007 13:56:17 -0500 Subject: [BioRuby] Subversion In-Reply-To: References: <000b01c77ad4$3087cc90$c2987ca5@pc13> Message-ID: <215C6ADB-A456-45A7-9DDE-5F51B0413547@corevx.com> Just to clear up any potential confusion before it arises - Trac is an independent system built on Python. It would likely be hosted at OpenBio or on the Bioruby server. I've used it on many projects and it works like a dream when setup right. It seems like a lot of good projects use it - I already mentioned the Rails instance earlier, here's Radiant's Trac site as well: http://dev.radiantcms.org/ Trevor From n at bioruby.org Tue Apr 10 00:26:15 2007 From: n at bioruby.org (Mitsuteru Nakao) Date: Tue, 10 Apr 2007 13:26:15 +0900 Subject: [BioRuby] BioRuby Rails Plugins: an open subversion repository at RubyForge. Message-ID: <90ca35f70704092126u21505ab4q81cf4cf274d1195d@mail.gmail.com> hi all, I set up BioRuby Rails Plugins, an open subversion repository at rubyforge.org. - BioRuby Rails Plugins http://rubyforge.org/projects/bioruby-annex/ This is an open repository for bioruby and rails users. The project provides a rails plugin source: % script/plugin source svn://rubyforge.org/var/svn/bioruby-annex/rails/plugins/ You can find bioruby rails plugins by, % script/plugin list Please let me know if you want to put your rails plugins for biological application. I will add you a developer in the project. And one more thing, I released a rails plugin of an uniprot modeling by ActiveRecord. You can use it, % script/plugin source svn://rubyforge.org/var/svn/bioruby-annex/rails/plugins/ % script/plugin install uniprot % script/generate uniprot add_uniprot_models % rake db:migrate % rake uniprot:import SPROT_DAT=uniprot_sprot.dat.gz ... 20 hours ... % script/console >> UniProt::Entry.find_by_name "P53_HUAMN" Have fun. Mitsuteru - Mitsuteru Nakao From ktym at hgc.jp Tue Apr 10 03:37:43 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Tue, 10 Apr 2007 16:37:43 +0900 Subject: [BioRuby] Subversion In-Reply-To: <215C6ADB-A456-45A7-9DDE-5F51B0413547@corevx.com> References: <000b01c77ad4$3087cc90$c2987ca5@pc13> <215C6ADB-A456-45A7-9DDE-5F51B0413547@corevx.com> Message-ID: Trevor, On 2007/04/10, at 3:56, Trevor Wennblom wrote: > Just to clear up any potential confusion before it arises - Trac is > an independent system built on Python. It would likely be hosted at > OpenBio or on the Bioruby server. I have never used but happy to have Trac for BioRuby project as long as it is hosted at OBF (I suppose that the Trac server should be on the same server with the subversion repository). I'll point dev.bioruby.org or trac.bioruby.org to the server so you could setup a virtual host at open-bio.org. Toshiaki From ktym at hgc.jp Tue Apr 10 03:49:57 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Tue, 10 Apr 2007 16:49:57 +0900 Subject: [BioRuby] RDoc examples In-Reply-To: References: Message-ID: Trevor, Thank you for the excellent page! However, I would like to see real world examples so that we can discuss how our RDoc template in the README.DEV file should be changed. I've put the latest RDoc docs generated from the recent CVS version at http://bioruby.org/rdoc-1.1/ but I can't find any difference regardless of the various format in your restriction_enzyme/**/*.rb modules which I pointed out in the following post. http://lists.open-bio.org/pipermail/bioruby/2007-April/000314.html I just want to know which is the best practice. Toshiaki On 2007/04/09, at 4:36, Trevor Wennblom wrote: > I've assembled a list of examples of how RDoc comment blocks work > (and don't work): > > http://ninecoldwinters.com/ferro/rdoc-comment-block-examples/ > > > Be warned, it uses a frame here and there. This has a lot of good > instances of things that we do wrong which we can work to correct. > > Most of the things in there should be self-explanatory. I'm going to > wait a few days for people to make comments, after that we can start > working on adding details to our formal specs for exactly how we > should address these issues. > > We really don't need to wait to make everything perfect for BioRuby > 1.1 as far as the RDoc goes. Let's just get it out the door and then > we'll put together a close follow-up release following a nice regular > release schedule. > > Trevor > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From georgkam at gmail.com Tue Apr 10 19:47:59 2007 From: georgkam at gmail.com (george) Date: Tue, 10 Apr 2007 16:47:59 -0700 Subject: [BioRuby] Blast Problem Message-ID: <461C222F.7020103@gmail.com> Hi, am trying to run a remote blast job as follows: require 'bio' sequence_text='MRKLYCVLLLSAFEFTYMINFGRGQNYWEHPYQNSDVYRPINEHREHPKEYEYPLHQEHT YQQEDSGEDENTLQHAYPIDHEGAEPAPQEQNLFSSIEIVERSNYMGNPWTEYMAKYDIE EVHGSGIRVDLGEDAEVAGTQYRLPSGKCPVFGKGIIIENSNTTFLTPVATGNQYLKDGG FAFPPTEPLMSPMTLDEMRHFYKDNKYVKNLDELTLCSRHAGNMIPDNDKNSNYKYPAVY DDKDKKCHILYIAAQENNGPRYCNKDESKRNSMFCFRPAKDISFQNYTYLSKNVVDNWEK VCPRKNLQNAKFGLWVDGNCEDIPHVNEFPAIDLFECNKLVFELSASDQPKQYEQHLTDY EKIKEGFKNKNASMIKSAFLPTGAFKADRYKSHGKGYNWGNYNTETQKCEIFNVKPTCLI NNSSYIATTALSHPIEVENNFPCSLYKDEIMKEIERESKRIKLNDNDDEGNKKIIAPRIF ISDDKDSLKCPCDPEMVSNSTCRFFVCKCVERRAEVTSNNEVVVKEEYKDEYADIPEHKP TYDKMKIIIASSAAVAVLATILMVYLYKRKGNAEKYDKMDEPQDYGKSNSRNDEMLDPEA SFWGEEKRASHTTPVLMEKPYY' program = 'blastp' database = 'SwissProt' options = '-e 0.0001' serv = Bio::Blast.new(program, database, options) server = 'genomenet' genomenet = Bio::Blast.remote(program, database, options, server) report = serv.query(sequence_text) But i get this: >ruby blast.rb [NULL_Caption] WARNING: Could not find index files for database SwissProt [NULL_Caption] WARNING: Could not find index files for database SwissProt [NULL_Caption] WARNING: Could not find index files for database SwissProt c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:77:in `tab_parse_hsp': undefined method `strip' for nil:NilClass (NoMethodError) from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:40:in `tab_parse' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:38:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:38:in `tab_parse' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/report.rb:54:in `auto_parse' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/report.rb:70:in `initialize' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:202:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:202:in `parse_result' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:216:in `exec_local' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:182:in `send' from c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:182:in `query' from blast.rb:23 >Exit code: 1 What could be the reason? Thanks From ktym at hgc.jp Wed Apr 11 09:51:05 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Wed, 11 Apr 2007 22:51:05 +0900 Subject: [BioRuby] Blast Problem In-Reply-To: <461C222F.7020103@gmail.com> References: <461C222F.7020103@gmail.com> Message-ID: Hi, To use GenomeNet server, you need to select the database name which the server can accept (described in the bio/appl/blast.rb or see the HTML source of http://blast.genome.jp/ form). ------------------------------------------------------------ program = 'blastp' database = 'swissprot' # <- here options = '-e 0.0001' server = 'genomenet' serv = Bio::Blast.remote(program, database, options, server) report = serv.query(sequence_text) p report ------------------------------------------------------------ Toshiaki On 2007/04/11, at 8:47, george wrote: > Hi, > am trying to run a remote blast job as follows: > > require 'bio' > sequence_text='MRKLYCVLLLSAFEFTYMINFGRGQNYWEHPYQNSDVYRPINEHREHPKEYEYPLHQEHT > YQQEDSGEDENTLQHAYPIDHEGAEPAPQEQNLFSSIEIVERSNYMGNPWTEYMAKYDIE > EVHGSGIRVDLGEDAEVAGTQYRLPSGKCPVFGKGIIIENSNTTFLTPVATGNQYLKDGG > FAFPPTEPLMSPMTLDEMRHFYKDNKYVKNLDELTLCSRHAGNMIPDNDKNSNYKYPAVY > DDKDKKCHILYIAAQENNGPRYCNKDESKRNSMFCFRPAKDISFQNYTYLSKNVVDNWEK > VCPRKNLQNAKFGLWVDGNCEDIPHVNEFPAIDLFECNKLVFELSASDQPKQYEQHLTDY > EKIKEGFKNKNASMIKSAFLPTGAFKADRYKSHGKGYNWGNYNTETQKCEIFNVKPTCLI > NNSSYIATTALSHPIEVENNFPCSLYKDEIMKEIERESKRIKLNDNDDEGNKKIIAPRIF > ISDDKDSLKCPCDPEMVSNSTCRFFVCKCVERRAEVTSNNEVVVKEEYKDEYADIPEHKP > TYDKMKIIIASSAAVAVLATILMVYLYKRKGNAEKYDKMDEPQDYGKSNSRNDEMLDPEA > SFWGEEKRASHTTPVLMEKPYY' > > > program = 'blastp' > database = 'SwissProt' > options = '-e 0.0001' > serv = Bio::Blast.new(program, database, options) > > server = 'genomenet' > genomenet = Bio::Blast.remote(program, database, options, server) > > report = serv.query(sequence_text) > > But i get this: > >> ruby blast.rb > [NULL_Caption] WARNING: Could not find index files for database SwissProt > [NULL_Caption] WARNING: Could not find index files for database SwissProt > [NULL_Caption] WARNING: Could not find index files for database SwissProt > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:77:in > `tab_parse_hsp': undefined method `strip' for nil:NilClass (NoMethodError) > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:40:in > `tab_parse' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:38:in > `each' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:38:in > `tab_parse' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/report.rb:54:in > `auto_parse' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/report.rb:70:in > `initialize' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:202:in `new' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:202:in > `parse_result' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:216:in > `exec_local' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:182:in `send' > from > c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:182:in > `query' > from blast.rb:23 >> Exit code: 1 > > > What could be the reason? > > Thanks > > _______________________________________________ > BioRuby mailing list > BioRuby at lists.open-bio.org > http://lists.open-bio.org/mailman/listinfo/bioruby From ktym at hgc.jp Wed Apr 11 10:12:13 2007 From: ktym at hgc.jp (Toshiaki Katayama) Date: Wed, 11 Apr 2007 23:12:13 +0900 Subject: [BioRuby] Blast Problem In-Reply-To: References: <461C222F.7020103@gmail.com> Message-ID: To be precisely, the error message you got is not returned from the remote server but raised from >> serv = Bio::Blast.new(program, database, options) this line, which execute local blast search. The meaning of the message is that your 'blastall' command couldn't find index files for your 'SwissProt' database. If you want to run BLAST locally, you need to run 'formatdb' command, bundled with the blast package, on your 'SwissProt' file. Toshiaki On 2007/04/11, at 22:51, Toshiaki Katayama wrote: > Hi, > > To use GenomeNet server, you need to select the database name > which the server can accept (described in the bio/appl/blast.rb > or see the HTML source of http://blast.genome.jp/ form). > > ------------------------------------------------------------ > program = 'blastp' > database = 'swissprot' # <- here > options = '-e 0.0001' > server = 'genomenet' > > serv = Bio::Blast.remote(program, database, options, server) > report = serv.query(sequence_text) > > p report > ------------------------------------------------------------ > > Toshiaki > > On 2007/04/11, at 8:47, george wrote: > >> Hi, >> am trying to run a remote blast job as follows: >> >> require 'bio' >> sequence_text='MRKLYCVLLLSAFEFTYMINFGRGQNYWEHPYQNSDVYRPINEHREHPKEYEYPLHQEHT >> YQQEDSGEDENTLQHAYPIDHEGAEPAPQEQNLFSSIEIVERSNYMGNPWTEYMAKYDIE >> EVHGSGIRVDLGEDAEVAGTQYRLPSGKCPVFGKGIIIENSNTTFLTPVATGNQYLKDGG >> FAFPPTEPLMSPMTLDEMRHFYKDNKYVKNLDELTLCSRHAGNMIPDNDKNSNYKYPAVY >> DDKDKKCHILYIAAQENNGPRYCNKDESKRNSMFCFRPAKDISFQNYTYLSKNVVDNWEK >> VCPRKNLQNAKFGLWVDGNCEDIPHVNEFPAIDLFECNKLVFELSASDQPKQYEQHLTDY >> EKIKEGFKNKNASMIKSAFLPTGAFKADRYKSHGKGYNWGNYNTETQKCEIFNVKPTCLI >> NNSSYIATTALSHPIEVENNFPCSLYKDEIMKEIERESKRIKLNDNDDEGNKKIIAPRIF >> ISDDKDSLKCPCDPEMVSNSTCRFFVCKCVERRAEVTSNNEVVVKEEYKDEYADIPEHKP >> TYDKMKIIIASSAAVAVLATILMVYLYKRKGNAEKYDKMDEPQDYGKSNSRNDEMLDPEA >> SFWGEEKRASHTTPVLMEKPYY' >> >> >> program = 'blastp' >> database = 'SwissProt' >> options = '-e 0.0001' >> serv = Bio::Blast.new(program, database, options) >> >> server = 'genomenet' >> genomenet = Bio::Blast.remote(program, database, options, server) >> >> report = serv.query(sequence_text) >> >> But i get this: >> >>> ruby blast.rb >> [NULL_Caption] WARNING: Could not find index files for database SwissProt >> [NULL_Caption] WARNING: Could not find index files for database SwissProt >> [NULL_Caption] WARNING: Could not find index files for database SwissProt >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:77:in >> `tab_parse_hsp': undefined method `strip' for nil:NilClass (NoMethodError) >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:40:in >> `tab_parse' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:38:in >> `each' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/format8.rb:38:in >> `tab_parse' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/report.rb:54:in >> `auto_parse' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast/report.rb:70:in >> `initialize' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:202:in `new' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:202:in >> `parse_result' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:216:in >> `exec_local' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:182:in `send' >> from >> c:/ruby/lib/ruby/gems/1.8/gems/bio-1.0.0/lib/bio/appl/blast.rb:182:in >> `query' >> from blast.rb:23 >>> Exit code: 1 >> >> >> What could be the reason? >> >> Thanks >> >> _______________________