[BioRuby-cvs] bioruby/lib/bio location.rb,0.25,0.26

Katayama Toshiaki k at dev.open-bio.org
Tue Sep 19 06:13:56 UTC 2006


Update of /home/repository/bioruby/bioruby/lib/bio
In directory dev.open-bio.org:/tmp/cvs-serv356/lib/bio

Modified Files:
	location.rb 
Log Message:
* license is changed from LGPL to Ruby's
* minor doc fix


Index: location.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/location.rb,v
retrieving revision 0.25
retrieving revision 0.26
diff -C2 -d -r0.25 -r0.26
*** location.rb	4 May 2006 18:40:26 -0000	0.25
--- location.rb	19 Sep 2006 06:13:54 -0000	0.26
***************
*** 2,39 ****
  # = bio/location.rb - Locations/Location class (GenBank location format)
  #
! # Copyright::	Copyright (C) 2001, 2005 KATAYAMA Toshiaki <k at bioruby.org>
  #                             2006 Jan Aerts <jan.aerts at bbsrc.ac.uk>
! # License::	LGPL
  #
  # $Id$
  #
- # 
- #--
- #
- #  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
- #
- #++
- #
  
  module Bio
  
! # = DESCRIPTION
  # The Bio::Location class describes the position of a genomic locus. Typically,
  # Bio::Location objects are created automatically when the user creates a
  # Bio::Locations object, instead of initialized directly.
  #
! # = USAGE
  #   location = Bio::Location.new('500..550')
  #   puts "start=" + location.from.to_s + ";end=" + location.to.to_s
--- 2,22 ----
  # = bio/location.rb - Locations/Location class (GenBank location format)
  #
! # Copyright::	Copyright (C) 2001, 2005 Toshiaki Katayama <k at bioruby.org>
  #                             2006 Jan Aerts <jan.aerts at bbsrc.ac.uk>
! # License::	Ruby's
  #
  # $Id$
  #
  
  module Bio
  
! # == Description
! #
  # The Bio::Location class describes the position of a genomic locus. Typically,
  # Bio::Location objects are created automatically when the user creates a
  # Bio::Locations object, instead of initialized directly.
  #
! # == Usage
! #
  #   location = Bio::Location.new('500..550')
  #   puts "start=" + location.from.to_s + ";end=" + location.to.to_s
***************
*** 44,47 ****
--- 27,31 ----
  #     puts "start=" + location.from.to_s + ";end=" + location.to.to_s
  #   end
+ #
  class Location
    include Comparable
***************
*** 165,174 ****
  end # class location
  
! # = DESCRIPTION
! # The Bio::Locations class is a container for Bio::Location objects: creating a 
! # Bio::Locations object (based on a GenBank style position string) will
! # spawn an array of Bio::Location objects.
  #
- # = USAGE
  #   locations = Bio::Locations.new('join(complement(500..550), 600..625)')
  #   locations.each do |location|
--- 149,160 ----
  end # class location
  
! # == Description
! #
! # The Bio::Locations class is a container for Bio::Location objects:
! # creating a Bio::Locations object (based on a GenBank style position string)
! # will spawn an array of Bio::Location objects.
! #
! # == Usage
  #
  #   locations = Bio::Locations.new('join(complement(500..550), 600..625)')
  #   locations.each do |location|
***************
*** 192,201 ****
  #  end
  #
! # = GENBANK LOCATION DESCRIPTOR CLASSIFICATION
  # 
  # === Definition of the position notation of the GenBank location format
  # 
! # According to the GenBank manual 'gbrel.txt', position notations were classified
! # into 10 patterns - (A) to (J).
  # 
  #       3.4.12.2 Feature Location
--- 178,187 ----
  #  end
  #
! # == GenBank location descriptor classification
  # 
  # === Definition of the position notation of the GenBank location format
  # 
! # According to the GenBank manual 'gbrel.txt', position notations were
! # classified into 10 patterns - (A) to (J).
  # 
  #       3.4.12.2 Feature Location
***************
*** 409,412 ****
--- 395,399 ----
  # * [ADR40FIB]	replace(510..520,	<= replace(510..520, "taatcctaccg")
  # * [RATDYIIAAB]	replace(1306..1443,"aagaacatccacggagtcagaactgggctcttcacgccggatttggcgttcgaggccattgtgaaaaagcaggcaatgcaccagcaagctcagttcctacccctgcgtggacctggttatccaggagctaatcagtacagttaggtggtcaagctgaaagagccctgtctgaaa")
+ #
  class Locations
    include Enumerable
***************
*** 486,491 ****
    # 
    # This method can for example be used to relate positions in a DNA-sequence
!   # with those in RNA. In this use, the optional ':aa'-flag returns the position
!   # of the associated amino-acid rather than the nucleotide.
    #   loc = Bio::Locations.new('complement(12838..13533)')
    #   puts loc.relative(13524)        # => 10
--- 473,479 ----
    # 
    # This method can for example be used to relate positions in a DNA-sequence
!   # with those in RNA. In this use, the optional ':aa'-flag returns the
!   # position of the associated amino-acid rather than the nucleotide.
!   #
    #   loc = Bio::Locations.new('complement(12838..13533)')
    #   puts loc.relative(13524)        # => 10
***************
*** 515,520 ****
    # 
    # This method can for example be used to relate positions in a DNA-sequence
!   # with those in RNA. In this use, the optional ':aa'-flag returns the position
!   # of the associated amino-acid rather than the nucleotide.
    #   loc = Bio::Locations.new('complement(12838..13533)')
    #   puts loc.absolute(10)          # => 13524
--- 503,509 ----
    # 
    # This method can for example be used to relate positions in a DNA-sequence
!   # with those in RNA. In this use, the optional ':aa'-flag returns the
!   # position of the associated amino-acid rather than the nucleotide.
!   #
    #   loc = Bio::Locations.new('complement(12838..13533)')
    #   puts loc.absolute(10)          # => 13524
***************
*** 613,617 ****
        end
  
!     when /^complement\((.*)\)$/			# (J) complement()
        position =       $1
        gbl_pos2loc(position).reverse_each do |location|
--- 602,606 ----
        end
  
!     when /^complement\((.*)\)$/				# (J) complement()
        position =       $1
        gbl_pos2loc(position).reverse_each do |location|
***************
*** 678,682 ****
        end
      end
!     return nil				# out of range
    end
  
--- 667,671 ----
        end
      end
!     return nil					# out of range
    end
  




More information about the bioruby-cvs mailing list