From k at dev.open-bio.org Tue Dec 12 18:57:44 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Tue, 12 Dec 2006 23:57:44 +0000 Subject: [BioRuby-cvs] bioruby/doc Design.rd.ja,1.7,NONE Message-ID: <200612122357.kBCNviTu005980@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv5976 Removed Files: Design.rd.ja Log Message: * obsoleted --- Design.rd.ja DELETED --- From k at dev.open-bio.org Tue Dec 12 18:58:06 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Tue, 12 Dec 2006 23:58:06 +0000 Subject: [BioRuby-cvs] bioruby/doc TODO.rd.ja,1.16,NONE Message-ID: <200612122358.kBCNw67S006004@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv6000 Removed Files: TODO.rd.ja Log Message: * obsoleted --- TODO.rd.ja DELETED --- From k at dev.open-bio.org Tue Dec 12 19:00:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Wed, 13 Dec 2006 00:00:17 +0000 Subject: [BioRuby-cvs] bioruby/doc BioRuby.rd.ja,1.10,NONE Message-ID: <200612130000.kBD00HAF006046@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv6042 Removed Files: BioRuby.rd.ja Log Message: * obsoleted --- BioRuby.rd.ja DELETED --- From ngoto at dev.open-bio.org Wed Dec 13 10:46:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 15:46:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.1,1.2 Message-ID: <200612131546.kBDFkUYH008108@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8064/db Modified Files: newick.rb Log Message: NHX (New Hampshire eXtended) input is supported by Bio::Newick class. Bio::PhylogeneticTree supports NHX output (as a string) by #output(:NHX). When outputs tree, indention can be specified by options. Many attributes are added to support Bio::PhylogeneticTree::Node and Bio::PhylogeneticTree::Edge. Node order in original Newick data is stored to Bio::PhylogeneticTree::Node#order_number. Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newick.rb 5 Oct 2006 13:38:22 -0000 1.1 --- newick.rb 13 Dec 2006 15:46:28 -0000 1.2 *************** *** 17,22 **** #+++ def __get_option(key, options) ! options[key] or (@options ? @options[key] : nil) end private :__get_option --- 17,31 ---- #+++ + DEFAULT_OPTIONS = + { :indent => ' ' } + def __get_option(key, options) ! if (r = options[key]) != nil then ! r ! elsif @options && (r = @options[key]) != nil then ! r ! else ! DEFAULT_OPTIONS[key] ! end end private :__get_option *************** *** 49,82 **** private :__to_newick_format_leaf # ! def __to_newick(parents, source, depth, options) result = [] ! indent0 = ' ' * depth ! indent = ' ' * (depth + 1) ! self.each_out_edge(source) do |src, tgt, edge| if parents.include?(tgt) then ;; elsif self.out_degree(tgt) == 1 then ! result << indent + __to_newick_format_leaf(tgt, edge, options) else result << ! __to_newick([ src ].concat(parents), tgt, depth + 1, options) + ! __to_newick_format_leaf(tgt, edge, options) end end ! indent0 + "(\n" + result.join(",\n") + ! (result.size > 0 ? "\n" : '') + indent0 + ')' end private :__to_newick # Returns a newick formatted string. ! def newick(options = {}) root = @root root ||= self.nodes.first return '();' unless root ! __to_newick([], root, 0, options) + __to_newick_format_leaf(root, Edge.new, options) + ";\n" end end #class PhylogeneticTree --- 58,212 ---- private :__to_newick_format_leaf + # formats leaf for NHX + def __to_newick_format_leaf_NHX(node, edge, options) + + label = get_node_name(node).to_s + + dist = get_edge_distance_string(edge) + + bs = get_node_bootstrap_string(node) + + if __get_option(:branch_length_style, options) == :disabled + dist = nil + end + + nhx = {} + + # bootstrap + nhx[:B] = bs if bs and !(bs.empty?) + # EC number + nhx[:E] = node.ec_number if node.instance_eval { + defined?(@ec_number) && self.ec_number + } + # scientific name + nhx[:S] = node.scientific_name if node.instance_eval { + defined?(@scientific_name) && self.scientific_name + } + # taxonomy id + nhx[:T] = node.taxonomy_id if node.instance_eval { + defined?(@taxonomy_id) && self.taxonomy_id + } + + # :D (gene duplication or speciation) + if node.instance_eval { defined?(@events) && !(self.events.empty?) } then + if node.events.include?(:gene_duplication) + nhx[:D] = 'Y' + elsif node.events.include?(:speciation) + nhx[:D] = 'N' + end + end + + # log likelihood + nhx[:L] = edge.log_likelihood if edge.instance_eval { + defined?(@log_likelihood) && self.log_likelihood } + # width + nhx[:W] = edge.width if edge.instance_eval { + defined?(@width) && self.width } + + # merges other parameters + flag = node.instance_eval { defined? @nhx_parameters } + nhx.merge!(node.nhx_parameters) if flag + flag = edge.instance_eval { defined? @nhx_parameters } + nhx.merge!(edge.nhx_parameters) if flag + + nhx_string = nhx.keys.sort{ |a,b| a.to_s <=> b.to_s }.collect do |key| + "#{key.to_s}=#{nhx[key].to_s}" + end.join(':') + nhx_string = "[&&NHX:" + nhx_string + "]" unless nhx_string.empty? + + label + (dist ? ":#{dist}" : '') + nhx_string + end + private :__to_newick_format_leaf_NHX + # ! def __to_newick(parents, source, depth, format_leaf, ! options, &block) result = [] ! if indent_string = __get_option(:indent, options) then ! indent0 = indent_string * depth ! indent = indent_string * (depth + 1) ! newline = "\n" ! else ! indent0 = indent = newline = '' ! end ! out_edges = self.out_edges(source) ! if block_given? then ! out_edges.sort! { |edge1, edge2| yield(edge1[1], edge2[1]) } ! else ! out_edges.sort! do |edge1, edge2| ! o1 = edge1[1].order_number ! o2 = edge2[1].order_number ! if o1 and o2 then ! o1 <=> o2 ! else ! edge1[1].name.to_s <=> edge2[1].name.to_s ! end ! end ! end ! out_edges.each do |src, tgt, edge| if parents.include?(tgt) then ;; elsif self.out_degree(tgt) == 1 then ! result << indent + __send__(format_leaf, tgt, edge, options) else result << ! __to_newick([ src ].concat(parents), tgt, depth + 1, ! format_leaf, options) + ! __send__(format_leaf, tgt, edge, options) end end ! indent0 + "(" + newline + result.join(',' + newline) + ! (result.size > 0 ? newline : '') + indent0 + ')' end private :__to_newick # Returns a newick formatted string. ! # If block is given, the order of the node is sorted ! # (as the same manner as Enumerable#sort). ! # Description about options. ! # :indent : indent string; set false to disable (default: ' ') ! # :bootstrap_style : :disabled disables bootstrap representations ! # :traditional traditional style ! # :molphy Molphy style (default) ! def output_newick(options = {}, &block) #:yields: node1, node2 root = @root root ||= self.nodes.first return '();' unless root ! __to_newick([], root, 0, :__to_newick_format_leaf, options, &block) + __to_newick_format_leaf(root, Edge.new, options) + ";\n" end + + alias newick output_newick + + + # Returns a NHX (New Hampshire eXtended) formatted string. + # If block is given, the order of the node is sorted + # (as the same manner as Enumerable#sort). + # Description about options. + # :indent : indent string; set false to disable (default: ' ') + def output_nhx(options = {}, &block) #:yields: node1, node2 + root = @root + root ||= self.nodes.first + return '();' unless root + __to_newick([], root, 0, + :__to_newick_format_leaf_NHX, options, &block) + + __to_newick_format_leaf_NHX(root, Edge.new, options) + + ";\n" + end + + # Returns formatted text (or something) of the tree + # Currently supported format is: :newick, :NHX + def output(format, *arg, &block) + case format + when :newick + output_newick(*arg, &block) + when :NHX + output_nhx(*arg, &block) + else + raise 'Unknown format' + end + end + end #class PhylogeneticTree *************** *** 105,114 **** # _options_ for parsing can be set. # ! # Note: molphy-style bootstrap values are always parsed, even if # the options[:bootstrap_style] is set to :traditional or :disabled. # Note: By default, if all of the internal node's names are numeric ! # and there are no molphy-style boostrap values, ! # the names are regarded as bootstrap values. ! # options[:bootstrap_style] = :disabled or :molphy to disable the feature. def initialize(str, options = nil) str = str.sub(/\;(.*)/m, ';') --- 235,245 ---- # _options_ for parsing can be set. # ! # Note: molphy-style bootstrap values may be parsed, even if # the options[:bootstrap_style] is set to :traditional or :disabled. # Note: By default, if all of the internal node's names are numeric ! # and there are no NHX and no molphy-style boostrap values, ! # the names of internal nodes are regarded as bootstrap values. ! # options[:bootstrap_style] = :disabled or :molphy to disable the feature ! # (or at least one NHX tag exists). def initialize(str, options = nil) str = str.sub(/\;(.*)/m, ';') *************** *** 155,167 **** # Parses newick formatted leaf (or internal node) name. ! def __parse_newick_leaf(str, node, edge) case str when /(.*)\:(.*)\[(.*)\]/ node.name = $1 edge.distance_string = $2 if $2 and !($2.strip.empty?) ! node.bootstrap_string = $3 if $3 and !($3.strip.empty?) when /(.*)\[(.*)\]/ node.name = $1 ! node.bootstrap_string = $2 if $2 and !($2.strip.empty?) when /(.*)\:(.*)/ node.name = $1 --- 286,300 ---- # Parses newick formatted leaf (or internal node) name. ! def __parse_newick_leaf(str, node, edge, options) case str when /(.*)\:(.*)\[(.*)\]/ node.name = $1 edge.distance_string = $2 if $2 and !($2.strip.empty?) ! # bracketted string into bstr ! bstr = $3 when /(.*)\[(.*)\]/ node.name = $1 ! # bracketted string into bstr ! bstr = $2 when /(.*)\:(.*)/ node.name = $1 *************** *** 170,173 **** --- 303,369 ---- node.name = str end + + # determines NHX or Molphy-style bootstrap + if bstr and !(bstr.strip.empty?) + case __get_option(:original_format, options) + when :nhx + # regarded as NHX string which might be broken + __parse_nhx(bstr, node, edge) + when :traditional + # simply ignored + else + case bstr + when /\A\&\&NHX/ + # NHX string + # force to set NHX mode + @options[:original_format] = :nhx + __parse_nhx(bstr, node, edge) + else + # Molphy-style boostrap values + # let molphy mode if nothing determined + @options[:original_format] ||= :molphy + node.bootstrap_string = bstr + end #case bstr + end + end + + # returns true + true + end + + # Parses NHX (New Hampshire eXtended) string + def __parse_nhx(bstr, node, edge) + a = bstr.split(/\:/) + a.shift if a[0] == '&&NHX' + a.each do |str| + tag, val = str.split(/\=/, 2) + case tag + when 'B' + node.bootstrap_string = val + when 'D' + case val + when 'Y' + node.events.push :gene_duplication + when 'N' + node.events.push :speciation + end + when 'E' + node.ec_number = val + when 'L' + edge.log_likelihood = val.to_f + when 'S' + node.scientific_name = val + when 'T' + node.taxonomy_id = val + when 'W' + edge.width = val.to_i + when 'XB' + edge.nhx_parameters[:XB] = val + when 'O', 'SO' + node.nhx_parameters[tag.to_sym] = val.to_i + else # :Co, :SN, :Sw, :XN, and others + node.nhx_parameters[tag.to_sym] = val + end + end #each true end *************** *** 215,219 **** next_token = ary[0] if next_token and next_token != ',' and next_token != ')' then ! __parse_newick_leaf(next_token, cur_node, edge) ary.shift end --- 411,415 ---- next_token = ary[0] if next_token and next_token != ',' and next_token != ')' then ! __parse_newick_leaf(next_token, cur_node, edge, options) ary.shift end *************** *** 226,230 **** leaf = Node.new edge = Edge.new ! __parse_newick_leaf(token, leaf, edge) nodes << leaf edges << Bio::Relation.new(cur_node, leaf, edge) --- 422,426 ---- leaf = Node.new edge = Edge.new ! __parse_newick_leaf(token, leaf, edge, options) nodes << leaf edges << Bio::Relation.new(cur_node, leaf, edge) *************** *** 234,250 **** raise ParseError, 'unmatched parentheses' unless node_stack.empty? bsopt = __get_option(:bootstrap_style, options) ! unless bsopt == :disabled or bsopt == :molphy then ! # If all of the internal node's names are numeric ! # and there are no molphy-style boostrap values, # the names are regarded as bootstrap values. flag = false internal_nodes.each do |node| - if node.bootstrap - unless __get_option(:bootstrap_style, options) == :traditional - @options[:bootstrap_style] = :molphy - end - flag = false - break - end if node.name and !node.name.to_s.strip.empty? then if /\A[\+\-]?\d*\.?\d*\z/ =~ node.name --- 430,440 ---- raise ParseError, 'unmatched parentheses' unless node_stack.empty? bsopt = __get_option(:bootstrap_style, options) ! ofmt = __get_option(:original_format, options) ! unless bsopt == :disabled or bsopt == :molphy or ! ofmt == :nhx or ofmt == :molphy then ! # If all of the internal node's names are numeric, # the names are regarded as bootstrap values. flag = false internal_nodes.each do |node| if node.name and !node.name.to_s.strip.empty? then if /\A[\+\-]?\d*\.?\d*\z/ =~ node.name *************** *** 258,261 **** --- 448,452 ---- if flag then @options[:bootstrap_style] = :traditional + @options[:original_format] = :traditional internal_nodes.each do |node| if node.name then *************** *** 266,274 **** end end # If the root implicitly prepared by the program is a leaf and # there are no additional information for the edge from the root to # the first internal node, the root is removed. if rel = edges[-1] and rel.node == [ root, internal_nodes[0] ] and ! rel.relation.instance_eval { !defined?(@distance) } and edges.find_all { |x| x.node.include?(root) }.size == 1 nodes.shift --- 457,471 ---- end end + # Sets nodes order numbers + nodes.each_with_index do |node, i| + node.order_number = i + end # If the root implicitly prepared by the program is a leaf and # there are no additional information for the edge from the root to # the first internal node, the root is removed. if rel = edges[-1] and rel.node == [ root, internal_nodes[0] ] and ! rel.relation.instance_eval { ! !defined?(@distance) and !defined?(@log_likelihood) and ! !defined?(@width) and !defined?(@nhx_parameters) } and edges.find_all { |x| x.node.include?(root) }.size == 1 nodes.shift From ngoto at dev.open-bio.org Wed Dec 13 10:46:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 15:46:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio phylogenetictree.rb,1.1,1.2 Message-ID: <200612131546.kBDFkUUO008111@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv8064 Modified Files: phylogenetictree.rb Log Message: NHX (New Hampshire eXtended) input is supported by Bio::Newick class. Bio::PhylogeneticTree supports NHX output (as a string) by #output(:NHX). When outputs tree, indention can be specified by options. Many attributes are added to support Bio::PhylogeneticTree::Node and Bio::PhylogeneticTree::Edge. Node order in original Newick data is stored to Bio::PhylogeneticTree::Node#order_number. Index: phylogenetictree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/phylogenetictree.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** phylogenetictree.rb 5 Oct 2006 13:38:21 -0000 1.1 --- phylogenetictree.rb 13 Dec 2006 15:46:28 -0000 1.2 *************** *** 74,77 **** --- 74,101 ---- @distance_string.to_s end + + #--- + # methods for NHX (New Hampshire eXtended) and/or PhyloXML + #+++ + + # log likelihood value (:L in NHX) + attr_accessor :log_likelihood + + # width of the edge + # ( of PhyloXML, or :W="w" in NHX) + attr_accessor :width + + # Other NHX parameters. Returns a Hash. + # Note that :L and :W + # are not stored here but stored in the proper attributes in this class. + # However, if you force to set these parameters in this hash, + # the parameters in this hash are preferred when generating NHX. + # In addition, If the same parameters are defined at Node object, + # the parameters in the node are preferred. + def nhx_parameters + @nhx_parameters ||= {} + @nhx_parameters + end + end #class Edge *************** *** 165,168 **** --- 189,229 ---- @name.to_s end + + # the order of the node + # (lower value, high priority) + attr_accessor :order_number + + #--- + # methods for NHX (New Hampshire eXtended) and/or PhyloXML + #+++ + + # Phylogenetic events. + # Returns an Array of one (or more?) of the following symbols + # :gene_duplication + # :speciation + def events + @events ||= [] + @events + end + + # EC number (EC_number in PhyloXML, or :E in NHX) + attr_accessor :ec_number + + # scientific name (scientific_name in PhyloXML, or :S in NHX) + attr_accessor :scientific_name + + # taxonomy identifier (taxonomy_identifier in PhyloXML, or :T in NHX) + attr_accessor :taxonomy_id + + # Other NHX parameters. Returns a Hash. + # Note that :D, :E, :S, and :T + # are not stored here but stored in the proper attributes in this class. + # However, if you force to set these parameters in this hash, + # the parameters in this hash are preferred when generating NHX. + def nhx_parameters + @nhx_parameters ||= {} + @nhx_parameters + end + end #class Node From ngoto at dev.open-bio.org Wed Dec 13 10:55:31 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 15:55:31 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.2,1.3 Message-ID: <200612131555.kBDFtVp3008178@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8158/lib/bio/db Modified Files: newick.rb Log Message: added "require bio/phylogenetictree" Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newick.rb 13 Dec 2006 15:46:28 -0000 1.2 --- newick.rb 13 Dec 2006 15:55:29 -0000 1.3 *************** *** 10,13 **** --- 10,15 ---- # + require 'bio/phylogenetictree' + module Bio class PhylogeneticTree From ngoto at dev.open-bio.org Wed Dec 13 11:01:37 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:01:37 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.70,1.71 Message-ID: <200612131601.kBDG1bBL008208@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv8186/lib Modified Files: bio.rb Log Message: added autoload of Bio::PhylogeneticTree and Bio::Newick. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** bio.rb 19 Sep 2006 05:41:45 -0000 1.70 --- bio.rb 13 Dec 2006 16:01:35 -0000 1.71 *************** *** 43,46 **** --- 43,48 ---- autoload :Alignment, 'bio/alignment' + ## PhylogeneticTree + autoload :PhylogeneticTree, 'bio/phylogenetictree' ## Map *************** *** 115,118 **** --- 117,121 ---- autoload :NBRF, 'bio/db/nbrf' + autoload :Newick, 'bio/db/newick' ### IO interface modules From ngoto at dev.open-bio.org Wed Dec 13 11:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.71,1.72 Message-ID: <200612131629.kBDGTduQ008839@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv8729/lib Modified Files: bio.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** bio.rb 13 Dec 2006 16:01:35 -0000 1.71 --- bio.rb 13 Dec 2006 16:29:36 -0000 1.72 *************** *** 43,48 **** autoload :Alignment, 'bio/alignment' ! ## PhylogeneticTree ! autoload :PhylogeneticTree, 'bio/phylogenetictree' ## Map --- 43,48 ---- autoload :Alignment, 'bio/alignment' ! ## Tree ! autoload :Tree, 'bio/tree' ## Map From ngoto at dev.open-bio.org Wed Dec 13 11:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.3,1.4 Message-ID: <200612131629.kBDGTdFZ008849@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8729/lib/bio/db Modified Files: newick.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newick.rb 13 Dec 2006 15:55:29 -0000 1.3 --- newick.rb 13 Dec 2006 16:29:37 -0000 1.4 *************** *** 10,17 **** # ! require 'bio/phylogenetictree' module Bio ! class PhylogeneticTree #--- --- 10,17 ---- # ! require 'bio/tree' module Bio ! class Tree #--- *************** *** 211,215 **** end ! end #class PhylogeneticTree #--- --- 211,215 ---- end ! end #class Tree #--- *************** *** 228,236 **** class ParseError < RuntimeError; end ! # same as Bio::PhylogeneticTree::Edge ! Edge = Bio::PhylogeneticTree::Edge ! # same as Bio::PhylogeneticTree::Node ! Node = Bio::PhylogeneticTree::Node # Creates a new Newick object. --- 228,236 ---- class ParseError < RuntimeError; end ! # same as Bio::Tree::Edge ! Edge = Bio::Tree::Edge ! # same as Bio::Tree::Node ! Node = Bio::Tree::Node # Creates a new Newick object. *************** *** 262,266 **** # Gets the tree. ! # Returns a Bio::PhylogeneticTree object. def tree if !defined?(@tree) --- 262,266 ---- # Gets the tree. ! # Returns a Bio::Tree object. def tree if !defined?(@tree) *************** *** 475,479 **** end # Let the tree into instance variables ! tree = Bio::PhylogeneticTree.new tree.instance_eval { @pathway.relations.concat(edges) --- 475,479 ---- end # Let the tree into instance variables ! tree = Bio::Tree.new tree.instance_eval { @pathway.relations.concat(edges) From ngoto at dev.open-bio.org Wed Dec 13 11:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_newick.rb,1.1,1.2 Message-ID: <200612131629.kBDGTduG008859@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8729/test/unit/bio/db Modified Files: test_newick.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: test_newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_newick.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_newick.rb 5 Oct 2006 13:38:22 -0000 1.1 --- test_newick.rb 13 Dec 2006 16:29:37 -0000 1.2 *************** *** 17,21 **** require 'bio' ! require 'bio/phylogenetictree' require 'bio/db/newick' --- 17,21 ---- require 'bio' ! require 'bio/tree' require 'bio/db/newick' From ngoto at dev.open-bio.org Wed Dec 13 11:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.2,1.3 Message-ID: <200612131629.kBDGTd34008842@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv8729/lib/bio Modified Files: tree.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tree.rb 13 Dec 2006 15:46:28 -0000 1.2 --- tree.rb 13 Dec 2006 16:29:37 -0000 1.3 *************** *** 1,4 **** # ! # = bio/phylogenetictree.rb - phylogenetic tree data structure class # # Copyright:: Copyright (C) 2006 --- 1,4 ---- # ! # = bio/tree.rb - phylogenetic tree data structure class # # Copyright:: Copyright (C) 2006 *************** *** 21,25 **** # # This is alpha version. Incompatible changes may be made frequently. ! class PhylogeneticTree # Error when there are no path between specified nodes --- 21,25 ---- # # This is alpha version. Incompatible changes may be made frequently. ! class Tree # Error when there are no path between specified nodes *************** *** 255,259 **** # Creates a new phylogenetic tree. # When no arguments are given, it creates a new empty tree. ! # When a PhylogeneticTree object is given, it copies the tree. # Note that the new tree shares Node and Edge objects # with the given tree. --- 255,259 ---- # Creates a new phylogenetic tree. # When no arguments are given, it creates a new empty tree. ! # When a Tree object is given, it copies the tree. # Note that the new tree shares Node and Edge objects # with the given tree. *************** *** 499,503 **** # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a PhylogeneticTree object. # Note that the sub-tree shares Node and Edge objects # with the original tree. --- 499,503 ---- # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a Tree object. # Note that the sub-tree shares Node and Edge objects # with the original tree. *************** *** 524,528 **** # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a PhylogeneticTree object. # The result is unspecified for cyclic trees. # Note that the sub-tree shares Node and Edge objects --- 524,528 ---- # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a Tree object. # The result is unspecified for cyclic trees. # Note that the sub-tree shares Node and Edge objects *************** *** 551,555 **** # If the same edge exists, the edge in _other_ is used. # Returns self. ! # The result is unspecified if _other_ isn't a PhylogeneticTree object. # Note that the Node and Edge objects in the _other_ tree are # shared in the concatinated tree. --- 551,555 ---- # If the same edge exists, the edge in _other_ is used. # Returns self. ! # The result is unspecified if _other_ isn't a Tree object. # Note that the Node and Edge objects in the _other_ tree are # shared in the concatinated tree. *************** *** 816,820 **** self end ! end #class PhylogeneticTree end #module Bio --- 816,820 ---- self end ! end #class Tree end #module Bio From ngoto at dev.open-bio.org Wed Dec 13 11:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_tree.rb,1.2,1.3 Message-ID: <200612131629.kBDGTd1C008854@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv8729/test/unit/bio Modified Files: test_tree.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: test_tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_tree.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_tree.rb 6 Oct 2006 14:18:51 -0000 1.2 --- test_tree.rb 13 Dec 2006 16:29:37 -0000 1.3 *************** *** 1,4 **** # ! # = test/bio/test_phylogenetictree.rb - unit test for Bio::PhylogeneticTree # # Copyright:: Copyright (C) 2006 --- 1,4 ---- # ! # = test/bio/test_tree.rb - unit test for Bio::Tree # # Copyright:: Copyright (C) 2006 *************** *** 16,31 **** require 'bio' ! require 'bio/phylogenetictree' module Bio ! class TestPhylogeneticTreeEdge < Test::Unit::TestCase def setup ! @obj = Bio::PhylogeneticTree::Edge.new(123.45) end def test_initialize ! assert_nothing_raised { Bio::PhylogeneticTree::Edge.new } ! assert_equal(1.23, Bio::PhylogeneticTree::Edge.new(1.23).distance) ! assert_equal(12.3, Bio::PhylogeneticTree::Edge.new('12.3').distance) end --- 16,31 ---- require 'bio' ! require 'bio/tree' module Bio ! class TestTreeEdge < Test::Unit::TestCase def setup ! @obj = Bio::Tree::Edge.new(123.45) end def test_initialize ! assert_nothing_raised { Bio::Tree::Edge.new } ! assert_equal(1.23, Bio::Tree::Edge.new(1.23).distance) ! assert_equal(12.3, Bio::Tree::Edge.new('12.3').distance) end *************** *** 63,77 **** assert_equal("123.45", @obj.to_s) end ! end #class TestPhylogeneticTreeEdge ! class TestPhylogeneticTreeNode < Test::Unit::TestCase def setup ! @obj = Bio::PhylogeneticTree::Node.new end def test_initialize ! assert_nothing_raised { Bio::PhylogeneticTree::Node.new } a = nil ! assert_nothing_raised { a = Bio::PhylogeneticTree::Node.new('mouse') } assert_equal('mouse', a.name) end --- 63,77 ---- assert_equal("123.45", @obj.to_s) end ! end #class TestTreeEdge ! class TestTreeNode < Test::Unit::TestCase def setup ! @obj = Bio::Tree::Node.new end def test_initialize ! assert_nothing_raised { Bio::Tree::Node.new } a = nil ! assert_nothing_raised { a = Bio::Tree::Node.new('mouse') } assert_equal('mouse', a.name) end *************** *** 123,137 **** assert_equal('human', @obj.to_s) end ! end #class TestPhylogeneticTreeNode ! class TestPhylogeneticTree < Test::Unit::TestCase def setup ! @tree = Bio::PhylogeneticTree.new end def test_get_edge_distance ! edge = Bio::PhylogeneticTree::Edge.new assert_equal(nil, @tree.get_edge_distance(edge)) ! edge = Bio::PhylogeneticTree::Edge.new(12.34) assert_equal(12.34, @tree.get_edge_distance(edge)) assert_equal(12.34, @tree.get_edge_distance(12.34)) --- 123,137 ---- assert_equal('human', @obj.to_s) end ! end #class TestTreeNode ! class TestTree < Test::Unit::TestCase def setup ! @tree = Bio::Tree.new end def test_get_edge_distance ! edge = Bio::Tree::Edge.new assert_equal(nil, @tree.get_edge_distance(edge)) ! edge = Bio::Tree::Edge.new(12.34) assert_equal(12.34, @tree.get_edge_distance(edge)) assert_equal(12.34, @tree.get_edge_distance(12.34)) *************** *** 139,145 **** def test_get_edge_distance_string ! edge = Bio::PhylogeneticTree::Edge.new assert_equal(nil, @tree.get_edge_distance_string(edge)) ! edge = Bio::PhylogeneticTree::Edge.new(12.34) assert_equal("12.34", @tree.get_edge_distance_string(edge)) assert_equal("12.34", @tree.get_edge_distance_string(12.34)) --- 139,145 ---- def test_get_edge_distance_string ! edge = Bio::Tree::Edge.new assert_equal(nil, @tree.get_edge_distance_string(edge)) ! edge = Bio::Tree::Edge.new(12.34) assert_equal("12.34", @tree.get_edge_distance_string(edge)) assert_equal("12.34", @tree.get_edge_distance_string(12.34)) *************** *** 147,151 **** def test_get_node_name ! node = Bio::PhylogeneticTree::Node.new assert_equal(nil, @tree.get_node_name(node)) node.name = 'human' --- 147,151 ---- def test_get_node_name ! node = Bio::Tree::Node.new assert_equal(nil, @tree.get_node_name(node)) node.name = 'human' *************** *** 154,159 **** def test_initialize ! assert_nothing_raised { Bio::PhylogeneticTree.new } ! assert_nothing_raised { Bio::PhylogeneticTree.new(@tree) } end --- 154,159 ---- def test_initialize ! assert_nothing_raised { Bio::Tree.new } ! assert_nothing_raised { Bio::Tree.new(@tree) } end *************** *** 164,168 **** def test_root=() assert_equal(nil, @tree.root) ! node = Bio::PhylogeneticTree::Node.new @tree.root = node assert_equal(node, @tree.root) --- 164,168 ---- def test_root=() assert_equal(nil, @tree.root) ! node = Bio::Tree::Node.new @tree.root = node assert_equal(node, @tree.root) *************** *** 175,199 **** end ! end #class TestPhylogeneticTree ! class TestPhylogeneticTree2 < Test::Unit::TestCase def setup # Note that below data is NOT real. The distances are random. ! @tree = Bio::PhylogeneticTree.new ! @mouse = Bio::PhylogeneticTree::Node.new('mouse') ! @rat = Bio::PhylogeneticTree::Node.new('rat') ! @rodents = Bio::PhylogeneticTree::Node.new('rodents') ! @human = Bio::PhylogeneticTree::Node.new('human') ! @chimpanzee = Bio::PhylogeneticTree::Node.new('chimpanzee') ! @primates = Bio::PhylogeneticTree::Node.new('primates') ! @mammals = Bio::PhylogeneticTree::Node.new('mammals') @nodes = [ @mouse, @rat, @rodents, @human, @chimpanzee, @primates, @mammals ] ! @edge_rodents_mouse = Bio::PhylogeneticTree::Edge.new(0.0968) ! @edge_rodents_rat = Bio::PhylogeneticTree::Edge.new(0.1125) ! @edge_mammals_rodents = Bio::PhylogeneticTree::Edge.new(0.2560) ! @edge_primates_human = Bio::PhylogeneticTree::Edge.new(0.0386) ! @edge_primates_chimpanzee = Bio::PhylogeneticTree::Edge.new(0.0503) ! @edge_mammals_primates = Bio::PhylogeneticTree::Edge.new(0.2235) @edges = [ [ @rodents, @mouse, @edge_rodents_mouse ], --- 175,199 ---- end ! end #class TestTree ! class TestTree2 < Test::Unit::TestCase def setup # Note that below data is NOT real. The distances are random. ! @tree = Bio::Tree.new ! @mouse = Bio::Tree::Node.new('mouse') ! @rat = Bio::Tree::Node.new('rat') ! @rodents = Bio::Tree::Node.new('rodents') ! @human = Bio::Tree::Node.new('human') ! @chimpanzee = Bio::Tree::Node.new('chimpanzee') ! @primates = Bio::Tree::Node.new('primates') ! @mammals = Bio::Tree::Node.new('mammals') @nodes = [ @mouse, @rat, @rodents, @human, @chimpanzee, @primates, @mammals ] ! @edge_rodents_mouse = Bio::Tree::Edge.new(0.0968) ! @edge_rodents_rat = Bio::Tree::Edge.new(0.1125) ! @edge_mammals_rodents = Bio::Tree::Edge.new(0.2560) ! @edge_primates_human = Bio::Tree::Edge.new(0.0386) ! @edge_primates_chimpanzee = Bio::Tree::Edge.new(0.0503) ! @edge_mammals_primates = Bio::Tree::Edge.new(0.2235) @edges = [ [ @rodents, @mouse, @edge_rodents_mouse ], *************** *** 263,267 **** @tree.adjacent_nodes(@mammals).sort(&@by_id)) # test for not existed nodes ! assert_equal([], @tree.adjacent_nodes(Bio::PhylogeneticTree::Node.new)) end --- 263,267 ---- @tree.adjacent_nodes(@mammals).sort(&@by_id)) # test for not existed nodes ! assert_equal([], @tree.adjacent_nodes(Bio::Tree::Node.new)) end *************** *** 314,318 **** # test for not existed nodes ! assert_equal([], @tree.out_edges(Bio::PhylogeneticTree::Node.new)) end --- 314,318 ---- # test for not existed nodes ! assert_equal([], @tree.out_edges(Bio::Tree::Node.new)) end *************** *** 397,401 **** # test for not existed nodes flag = nil ! node = Bio::PhylogeneticTree::Node.new r = @tree.each_out_edge(node) do |src, tgt, edge| flag = true --- 397,401 ---- # test for not existed nodes flag = nil ! node = Bio::Tree::Node.new r = @tree.each_out_edge(node) do |src, tgt, edge| flag = true *************** *** 405,409 **** end ! end #class TestPhylogeneticTree2 end #module Bio --- 405,409 ---- end ! end #class TestTree2 end #module Bio From ngoto at dev.open-bio.org Wed Dec 13 11:58:41 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:58:41 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.16,1.17 Message-ID: <200612131658.kBDGwfYL009269@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv9231/lib/bio Modified Files: alignment.rb Log Message: changed RDoc Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** alignment.rb 30 Apr 2006 05:56:40 -0000 1.16 --- alignment.rb 13 Dec 2006 16:58:39 -0000 1.17 *************** *** 2,7 **** # = bio/alignment.rb - multiple alignment of sequences # ! # Copyright:: Copyright (C) 2003, 2005 ! # GOTO Naohisa # # License:: Ruby's --- 2,7 ---- # = bio/alignment.rb - multiple alignment of sequences # ! # Copyright:: Copyright (C) 2003, 2005, 2006 ! # GOTO Naohisa # # License:: Ruby's *************** *** 26,69 **** module Bio ! =begin rdoc ! ! = About Bio::Alignment ! ! Bio::Alignment is a namespace of classes/modules for multiple sequence ! alignment. ! ! = Multiple alignment container classes ! ! == Bio::Alignment::OriginalAlignment ! ! == Bio::Alignment::SequenceArray ! ! == Bio::Alignment::SequenceHash ! ! = Bio::Alignment::Site ! ! = Modules ! ! == Bio::Alignment::EnumerableExtension ! ! Mix-in for classes included Enumerable. ! ! == Bio::Alignment::ArrayExtension ! ! Mix-in for Array or Array-like classes. ! ! == Bio::Alignment::HashExtension ! ! Mix-in for Hash or Hash-like classes. ! ! == Bio::Alignment::SiteMethods ! ! == Bio::Alignment::PropertyMethods ! ! = Bio::Alignment::GAP ! ! = Compatibility from older BioRuby ! ! =end module Alignment --- 26,67 ---- module Bio ! # ! # = About Bio::Alignment ! # ! # Bio::Alignment is a namespace of classes/modules for multiple sequence ! # alignment. ! # ! # = Multiple alignment container classes ! # ! # == Bio::Alignment::OriginalAlignment ! # ! # == Bio::Alignment::SequenceArray ! # ! # == Bio::Alignment::SequenceHash ! # ! # = Bio::Alignment::Site ! # ! # = Modules ! # ! # == Bio::Alignment::EnumerableExtension ! # ! # Mix-in for classes included Enumerable. ! # ! # == Bio::Alignment::ArrayExtension ! # ! # Mix-in for Array or Array-like classes. ! # ! # == Bio::Alignment::HashExtension ! # ! # Mix-in for Hash or Hash-like classes. ! # ! # == Bio::Alignment::SiteMethods ! # ! # == Bio::Alignment::PropertyMethods ! # ! # = Bio::Alignment::GAP ! # ! # = Compatibility from older BioRuby ! # module Alignment From ngoto at dev.open-bio.org Wed Dec 13 12:29:20 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 17:29:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.4,1.5 Message-ID: <200612131729.kBDHTKrR010219@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv10199/lib/bio/db Modified Files: newick.rb Log Message: output(:NHX) is changed to output(:nhx) Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** newick.rb 13 Dec 2006 16:29:37 -0000 1.4 --- newick.rb 13 Dec 2006 17:29:17 -0000 1.5 *************** *** 199,208 **** # Returns formatted text (or something) of the tree ! # Currently supported format is: :newick, :NHX def output(format, *arg, &block) case format when :newick output_newick(*arg, &block) ! when :NHX output_nhx(*arg, &block) else --- 199,208 ---- # Returns formatted text (or something) of the tree ! # Currently supported format is: :newick, :nhx def output(format, *arg, &block) case format when :newick output_newick(*arg, &block) ! when :nhx output_nhx(*arg, &block) else From ngoto at dev.open-bio.org Thu Dec 14 07:39:48 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 12:39:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.17,1.18 Message-ID: <200612141239.kBECdmPI013100@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv13080/lib/bio Modified Files: alignment.rb Log Message: Bio::Alignment::ClustalWFormatter was removed and methods were renemed and moved to Bio::Alignment::Output. Output of Phylip interleaved and non-interleaved and Molphy multiple alignment formats are supported. Some bug fix about ClustalW output about SequenceHash. Some changes in SequenceHash. Bio::Alignment::EnumerableExtension#sequnece_names are newly added. to_fasta and to_clustal methods are now obsoleted. Instead, please use output methods. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** alignment.rb 13 Dec 2006 16:58:39 -0000 1.17 --- alignment.rb 14 Dec 2006 12:39:45 -0000 1.18 *************** *** 623,627 **** elsif seqclass == Bio::Sequence::NA then amino = false ! elsif self.find { |x| /[EFILPQ]/i =~ x } then amino = true else --- 623,627 ---- elsif seqclass == Bio::Sequence::NA then amino = false ! elsif self.each_seq { |x| /[EFILPQ]/i =~ x } then amino = true else *************** *** 856,869 **** end #module EnumerableExtension ! # ClustalWFormatter is a module to create ClustalW-formatted text ! # from an alignment object. ! # ! # It will be obsoleted and the methods will be frequently changed. ! module ClustalWFormatter ! # Check whether there are same names. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def have_same_name?(array, len = 30) na30 = array.collect do |k| k.to_s.split(/[\x00\s]/)[0].to_s[0, len].gsub(/\:\;\,\(\)/, '_').to_s --- 856,882 ---- end #module EnumerableExtension ! module Output ! def output(format, *arg) ! case format ! when :clustal ! output_clustal(*arg) ! when :fasta ! output_fasta(*arg) ! when :phylip ! output_phylip(*arg) ! when :phylipnon ! output_phylipnon(*arg) ! when :molphy ! output_molphy(*arg) ! else ! raise "Unknown format: #{format.inspect}" ! end ! end ! ! # Check whether there are same names for ClustalW format. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def __clustal_have_same_name?(array, len = 30) na30 = array.collect do |k| k.to_s.split(/[\x00\s]/)[0].to_s[0, len].gsub(/\:\;\,\(\)/, '_').to_s *************** *** 892,904 **** end end ! private :have_same_name? ! # Changes sequence names if there are conflicted names. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def avoid_same_name(array, len = 30) na = array.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } ! if dupidx = have_same_name?(na, len) procs = [ Proc.new { |s, i| --- 905,918 ---- end end ! private :__clustal_have_same_name? ! # Changes sequence names if there are conflicted names ! # for ClustalW format. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def __clustal_avoid_same_name(array, len = 30) na = array.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } ! if dupidx = __clustal_have_same_name?(na, len) procs = [ Proc.new { |s, i| *************** *** 914,918 **** na[i] = pr.call(s.to_s, i) end ! dupidx = have_same_name?(na, len) break unless dupidx end --- 928,932 ---- na[i] = pr.call(s.to_s, i) end ! dupidx = __clustal_have_same_name?(na, len) break unless dupidx end *************** *** 925,929 **** na end ! private :avoid_same_name # Generates ClustalW-formatted text --- 939,943 ---- na end ! private :__clustal_avoid_same_name # Generates ClustalW-formatted text *************** *** 931,935 **** # names:: names of the sequences # options:: options ! def clustalw_formatter(seqs, names, options = {}) #(original) aln = [ "CLUSTAL (0.00) multiple sequence alignment\n\n" ] --- 945,949 ---- # names:: names of the sequences # options:: options ! def __clustal_formatter(seqs, names, options = {}) #(original) aln = [ "CLUSTAL (0.00) multiple sequence alignment\n\n" ] *************** *** 946,950 **** end if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] ! sn = avoid_same_name(sn) end --- 960,964 ---- end if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] ! sn = __clustal_avoid_same_name(sn) end *************** *** 971,976 **** mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = seqs.collect do |s| ! s.to_s.gsub(seqs.gap_regexp, gchar) end case options[:case].to_s --- 985,991 ---- mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = Array.new(seqs.size).clear ! seqs.each_seq do |s| ! aseqs << s.to_s.gsub(seqs.gap_regexp, gchar) end case options[:case].to_s *************** *** 1006,1012 **** aln.join('') end ! private :clustalw_formatter ! end #module ClustalWFormatter # Bio::Alignment::ArrayExtension is a set of useful methods for --- 1021,1190 ---- aln.join('') end ! private :__clustal_formatter ! ! # Generates ClustalW-formatted text ! # seqs:: sequences (must be an alignment object) ! # names:: names of the sequences ! # options:: options ! def output_clustal(options = {}) ! __clustal_formatter(self, self.sequence_names, options) ! end ! ! # to_clustal is deprecated. Instead, please use output_clustal. ! #--- ! #alias to_clustal output_clustal ! #+++ ! def to_clustal(*arg) ! warn "to_clustal is deprecated. Please use output_clustal." ! output_clustal(*arg) ! end ! ! # Generates fasta format text and returns a string. ! def output_fasta(options={}) ! #(original) ! width = (options[:width] or 70) ! if options[:avoid_same_name] then ! na = __clustal_avoid_same_name(self.sequence_names, 30) ! else ! na = self.sequence_names.collect do |k| ! k.to_s.gsub(/[\r\n\x00]/, ' ') ! end ! end ! if width and width > 0 then ! w_reg = Regexp.new(".{1,#{width}}") ! self.collect do |s| ! ">#{na.shift}\n" + s.to_s.gsub(w_reg, "\\0\n") ! end.join('') ! else ! self.collect do |s| ! ">#{na.shift}\n" + s.to_s + "\n" ! end.join('') ! end ! end ! ! # generates phylip interleaved alignment format as a string ! def output_phylip(options = {}) ! aln, aseqs, lines = __output_phylip_common(options) ! lines.times do ! aseqs.each { |a| aln << a.shift } ! aln << "\n" ! end ! aln.pop if aln[-1] == "\n" ! aln.join('') ! end ! ! # generates Phylip3.2 (old) non-interleaved format as a string ! def output_phylipnon(options = {}) ! aln, aseqs, lines = __output_phylip_common(options) ! aln.first + aseqs.join('') ! end + # common routine for interleaved/non-interleaved phylip format + def __output_phylip_common(options = {}) + len = self.alignment_length + aln = [ " #{self.size} #{len}\n" ] + sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } + if options[:replace_space] + sn.collect! { |x| x.gsub(/\s/, '_') } + end + if !options.has_key?(:escape) or options[:escape] + sn.collect! { |x| x.gsub(/[\:\;\,\(\)]/, '_') } + end + if !options.has_key?(:split) or options[:split] + sn.collect! { |x| x.split(/\s/)[0].to_s } + end + if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] + sn = __clustal_avoid_same_name(sn, 10) + end + + namewidth = 10 + seqwidth = (options[:width] or 60) + seqwidth = seqwidth.div(10) * 10 + seqregexp = Regexp.new("(.{1,#{seqwidth.div(10) * 11}})") + gchar = (options[:gap_char] or '-') + + aseqs = Array.new(len).clear + self.each_seq do |s| + aseqs << s.to_s.gsub(self.gap_regexp, gchar) + end + case options[:case].to_s + when /lower/i + aseqs.each { |s| s.downcase! } + when /upper/i + aseqs.each { |s| s.upcase! } + end + + aseqs.collect! do |s| + snx = sn.shift + head = sprintf("%*s", -namewidth, snx.to_s)[0, namewidth] + head2 = ' ' * namewidth + s << (gchar * (len - s.length)) + s.gsub!(/(.{1,10})/n, " \\1") + s.gsub!(seqregexp, "\\1\n") + a = s.split(/^/) + head += a.shift + ret = a.collect { |x| head2 + x } + ret.unshift(head) + ret + end + lines = (len + seqwidth - 1).div(seqwidth) + [ aln, aseqs, lines ] + end + + # Generates Molphy alignment format text as a string + def output_molphy(options = {}) + len = self.alignment_length + header = "#{self.size} #{len}\n" + sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } + if options[:replace_space] + sn.collect! { |x| x.gsub(/\s/, '_') } + end + if !options.has_key?(:escape) or options[:escape] + sn.collect! { |x| x.gsub(/[\:\;\,\(\)]/, '_') } + end + if !options.has_key?(:split) or options[:split] + sn.collect! { |x| x.split(/\s/)[0].to_s } + end + if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] + sn = __clustal_avoid_same_name(sn, 30) + end + + seqwidth = (options[:width] or 60) + seqregexp = Regexp.new("(.{1,#{seqwidth}})") + gchar = (options[:gap_char] or '-') + + aseqs = Array.new(len).clear + self.each_seq do |s| + aseqs << s.to_s.gsub(self.gap_regexp, gchar) + end + case options[:case].to_s + when /lower/i + aseqs.each { |s| s.downcase! } + when /upper/i + aseqs.each { |s| s.upcase! } + end + + aseqs.collect! do |s| + s << (gchar * (len - s.length)) + s.gsub!(seqregexp, "\\1\n") + sn.shift + "\n" + s + end + aseqs.unshift(header) + aseqs.join('') + end + end #module Output + + module EnumerableExtension + include Output + + # Returns an array of sequence names. + # The order of the names must be the same as + # the order of each_seq. + def sequence_names + i = 0 + self.each_seq { |s| i += 1 } + (0...i).to_a + end + end #module EnumerableExtension # Bio::Alignment::ArrayExtension is a set of useful methods for *************** *** 1028,1037 **** each(&block) end - - include ClustalWFormatter - # Returns a string of Clustal W formatted text of the alignment. - def to_clustal(options = {}) - clustalw_formatter(self, (0...(self.size)).to_a, options) - end end #module ArrayExtension --- 1206,1209 ---- *************** *** 1060,1065 **** # # It works the same as Hash#each_value. ! def each_seq(&block) #:yields: seq ! each_value(&block) end --- 1232,1238 ---- # # It works the same as Hash#each_value. ! def each_seq #:yields: seq ! #each_value(&block) ! each_key { |k| yield self[k] } end *************** *** 1123,1135 **** end ! include ClustalWFormatter ! # Returns a string of Clustal W formatted text of the alignment. ! def to_clustal(options = {}) ! seqs = SequenceArray.new ! names = self.keys ! names.each do |k| ! seqs << self[k] ! end ! clustalw_formatter(seqs, names, options) end end #module HashExtension --- 1296,1304 ---- end ! # Returns an array of sequence names. ! # The order of the names must be the same as ! # the order of each_seq. ! def sequence_names ! self.keys end end #module HashExtension *************** *** 1783,1787 **** width = options[:width] unless width if options[:avoid_same_name] then ! na = avoid_same_name(self.keys, 30) else na = self.keys.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } --- 1952,1956 ---- width = options[:width] unless width if options[:avoid_same_name] then ! na = __clustal_avoid_same_name(self.keys, 30) else na = self.keys.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } *************** *** 1814,1828 **** # # The specification of the argument will be changed. def to_fasta(*arg) #(original) self.to_fasta_array(*arg).join('') end - include ClustalWFormatter - # Returns a string of Clustal W formatted text of the alignment. - def to_clustal(options = {}) - clustalw_formatter(self, self.keys, options) - end - # The method name consensus will be obsoleted. # Please use consensus_string instead. --- 1983,1995 ---- # # The specification of the argument will be changed. + # + # Note: to_fasta is deprecated. + # Please use output_fasta instead. def to_fasta(*arg) #(original) + warn "to_fasta is deprecated. Please use output_fasta." self.to_fasta_array(*arg).join('') end # The method name consensus will be obsoleted. # Please use consensus_string instead. From ngoto at dev.open-bio.org Thu Dec 14 09:10:59 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 14:10:59 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_alignment.rb,1.7,1.8 Message-ID: <200612141410.kBEEAxCp013352@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv13312/test/unit/bio Modified Files: test_alignment.rb Log Message: Unit tests changed following the changes of Bio::Alignment. Index: test_alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_alignment.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_alignment.rb 24 Jan 2006 14:11:34 -0000 1.7 --- test_alignment.rb 14 Dec 2006 14:10:57 -0000 1.8 *************** *** 545,576 **** end #class TestAlignmentEnumerableExtension ! class TestAlignmentClustalWFormatter < Test::Unit::TestCase def setup @obj = Object.new ! @obj.extend(Alignment::ClustalWFormatter) end ! def test_have_same_name_true assert_equal([ 0, 1 ], @obj.instance_eval { ! have_same_name?([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end def test_have_same_name_false assert_equal(false, @obj.instance_eval { ! have_same_name?([ 'GTP ATG', 'ATP ATA', 'BBB' ]) }) end def test_avoid_same_name assert_equal([ 'ATP_ATG', 'ATP_ATA', 'BBB' ], ! @obj.instance_eval { ! avoid_same_name([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end def test_avoid_same_name_numbering assert_equal([ '0_ATP', '1_ATP', '2_BBB' ], ! @obj.instance_eval { ! avoid_same_name([ 'ATP', 'ATP', 'BBB' ]) }) end ! end #class TestAlignmentClustalWFormatter --- 545,577 ---- end #class TestAlignmentEnumerableExtension ! class TestAlignmentOutput < Test::Unit::TestCase def setup @obj = Object.new ! @obj.extend(Alignment::Output) end ! def test_clustal_have_same_name_true assert_equal([ 0, 1 ], @obj.instance_eval { ! __clustal_have_same_name?([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end def test_have_same_name_false assert_equal(false, @obj.instance_eval { ! __clustal_have_same_name?([ 'GTP ATG', 'ATP ATA', 'BBB' ]) }) end def test_avoid_same_name assert_equal([ 'ATP_ATG', 'ATP_ATA', 'BBB' ], ! @obj.instance_eval { ! __clustal_avoid_same_name([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end + def test_avoid_same_name_numbering assert_equal([ '0_ATP', '1_ATP', '2_BBB' ], ! @obj.instance_eval { ! __clustal_avoid_same_name([ 'ATP', 'ATP', 'BBB' ]) }) end ! end #class TestAlignmentOutput From ngoto at dev.open-bio.org Thu Dec 14 09:11:56 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 14:11:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.18,1.19 Message-ID: <200612141411.kBEEBuxZ013380@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv13360/lib/bio Modified Files: alignment.rb Log Message: fixed mistaken amino distingushing routine in match_line. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** alignment.rb 14 Dec 2006 12:39:45 -0000 1.18 --- alignment.rb 14 Dec 2006 14:11:54 -0000 1.19 *************** *** 623,630 **** elsif seqclass == Bio::Sequence::NA then amino = false - elsif self.each_seq { |x| /[EFILPQ]/i =~ x } then - amino = true else amino = nil end end --- 623,634 ---- elsif seqclass == Bio::Sequence::NA then amino = false else amino = nil + self.each_seq do |x| + if /[EFILPQ]/i =~ x + amino = true + break + end + end end end From ngoto at dev.open-bio.org Thu Dec 14 09:54:53 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 14:54:53 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.11, 1.12 mafft.rb, 1.11, 1.12 sim4.rb, 1.6, 1.7 Message-ID: <200612141454.kBEEsqG1013493@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv13473/lib/bio/appl Modified Files: clustalw.rb mafft.rb sim4.rb Log Message: Changed to use Bio::Command in bio/command.rb instead of Open3.popen3. Bio::(ClustalW|MAFFT|Sim4)#option is changed to #options. Bio::ClustalW::errorlog and Bio::(MAFFT|Sim4)#log are deprecated and there are no replacements for the methods. Index: sim4.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/sim4.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sim4.rb 30 Apr 2006 05:50:19 -0000 1.6 --- sim4.rb 14 Dec 2006 14:54:50 -0000 1.7 *************** *** 16,21 **** # - require 'open3' require 'tempfile' module Bio --- 16,21 ---- # require 'tempfile' + require 'bio/command' module Bio *************** *** 30,41 **** # [+database+] Default file name of database('seq2'). # [+option+] Options (array of strings). ! def initialize(program = 'sim4', database = nil, option = []) @program = program ! @option = option @database = database #seq2 @command = nil @output = nil @report = nil - @log = nil end --- 30,40 ---- # [+database+] Default file name of database('seq2'). # [+option+] Options (array of strings). ! def initialize(program = 'sim4', database = nil, opt = []) @program = program ! @options = opt @database = database #seq2 @command = nil @output = nil @report = nil end *************** *** 47,57 **** # options ! attr_reader :option # last command-line strings executed by the object attr_reader :command # last messages of program reported to the STDERR ! attr_reader :log # last result text (String) --- 46,70 ---- # options ! attr_accessor :options ! ! # option is deprecated. Instead, please use options. ! def option ! warn "option is deprecated. Please use options." ! options ! end # last command-line strings executed by the object attr_reader :command + #--- # last messages of program reported to the STDERR ! #attr_reader :log ! #+++ ! ! #log is deprecated (no replacement) and returns empty string. ! def log ! warn "log is deprecated (no replacement) and returns empty string." ! '' ! end # last result text (String) *************** *** 97,112 **** @command = [ @program, filename1, (filename2 or @database), *@option ] @output = nil - @log = nil @report = nil ! Open3.popen3(*@command) do |din, dout, derr| ! din.close ! derr.sync = true ! t = Thread.start { @log = derr.read } ! begin ! @output = dout.read ! @report = Bio::Sim4::Report.new(@output) ! ensure ! t.join ! end end @report --- 110,118 ---- @command = [ @program, filename1, (filename2 or @database), *@option ] @output = nil @report = nil ! Bio::Command.call_command(*@command) do |io| ! io.close_write ! @output = io.read ! @report = Bio::Sim4::Report.new(@output) end @report Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** clustalw.rb 30 Apr 2006 05:50:19 -0000 1.11 --- clustalw.rb 14 Dec 2006 14:54:50 -0000 1.12 *************** *** 24,29 **** require 'tempfile' - require 'open3' require 'bio/sequence' require 'bio/alignment' --- 24,29 ---- require 'tempfile' + require 'bio/command' require 'bio/sequence' require 'bio/alignment' *************** *** 39,45 **** # Creates a new CLUSTAL W execution wrapper object (alignment factory). ! def initialize(program = 'clustalw', option = []) @program = program ! @option = option @command = nil @output = nil --- 39,45 ---- # Creates a new CLUSTAL W execution wrapper object (alignment factory). ! def initialize(program = 'clustalw', opt = []) @program = program ! @options = opt @command = nil @output = nil *************** *** 52,56 **** # options ! attr_accessor :option # Returns last command-line strings executed by this factory. --- 52,62 ---- # options ! attr_accessor :options ! ! # option is deprecated. Instead, please use options. ! def option ! warn "option is deprecated. Please use options." ! options ! end # Returns last command-line strings executed by this factory. *************** *** 144,149 **** attr_reader :output_dnd # Returns last error messages (to stderr) of CLUSTAL W execution. ! attr_reader :errorlog private --- 150,162 ---- attr_reader :output_dnd + #--- # Returns last error messages (to stderr) of CLUSTAL W execution. ! #attr_reader :errorlog ! #+++ ! #errorlog is deprecated (no replacement) and returns empty string. ! def errorlog ! warn "errorlog is deprecated (no replacement) and returns empty string." ! '' ! end private *************** *** 154,170 **** @log = nil ! Open3.popen3(*@command) do |din, dout, derr| ! din.close ! t = Thread.start do ! @errorlog = derr.read ! end @log = dout.read t.join end - # @command_string = @command.join(" ") - # IO.popen(@command, "r") do |io| - # io.sync = true - # @log = io.read - # end @log end --- 167,175 ---- @log = nil ! Bio::Command.call_command(*@command) do |io| ! io.close_write @log = dout.read t.join end @log end Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mafft.rb 25 Sep 2006 08:09:22 -0000 1.11 --- mafft.rb 14 Dec 2006 14:54:50 -0000 1.12 *************** *** 24,36 **** # require 'bio/db/fasta' require 'bio/io/flatfile' - #-- - # We use Open3.popen3, because MAFFT on win32 requires Cygwin. - #++ - require 'open3' - require 'tempfile' - module Bio --- 24,34 ---- # + require 'tempfile' + + require 'bio/command' + require 'bio/db/fasta' require 'bio/io/flatfile' module Bio *************** *** 108,118 **** # +program+ is the name of the program. # +opt+ is options of the program. ! def initialize(program, option) @program = program ! @option = option @command = nil @output = nil @report = nil - @log = nil end --- 106,115 ---- # +program+ is the name of the program. # +opt+ is options of the program. ! def initialize(program, opt) @program = program ! @options = opt @command = nil @output = nil @report = nil end *************** *** 121,125 **** # options ! attr_accessor :option # Shows last command-line string. Returns nil or an array of String. --- 118,128 ---- # options ! attr_accessor :options ! ! # option is deprecated. Instead, please use options. ! def option ! warn "option is deprecated. Please use options." ! options ! end # Shows last command-line string. Returns nil or an array of String. *************** *** 128,133 **** attr_reader :command # last message to STDERR when executing the program. ! attr_reader :log # Shows latest raw alignment result. --- 131,144 ---- attr_reader :command + #--- # last message to STDERR when executing the program. ! #attr_reader :log ! #+++ ! ! #log is deprecated (no replacement) and returns empty string. ! def log ! warn "log is deprecated (no replacement) and returns empty string." ! '' ! end # Shows latest raw alignment result. *************** *** 189,204 **** #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! @log = nil ! Open3.popen3(*@command) do |din, dout, derr| ! din.close ! derr.sync = true ! t = Thread.start do ! @log = derr.read ! end ! ff = Bio::FlatFile.new(Bio::FastaFormat, dout) @output = ff.to_a - t.join end - @log end --- 200,208 ---- #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! Bio::Command.call_command(*@command) do |io| ! io.close_write ! ff = Bio::FlatFile.new(Bio::FastaFormat, io) @output = ff.to_a end end From ngoto at dev.open-bio.org Thu Dec 14 10:09:01 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:09:01 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.19,1.20 Message-ID: <200612141509.kBEF91un013590@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv13570/lib/bio Modified Files: alignment.rb Log Message: EnumerableExtension#number_of_sequences are added and some methods are modifed to use it. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** alignment.rb 14 Dec 2006 14:11:54 -0000 1.19 --- alignment.rb 14 Dec 2006 15:08:59 -0000 1.20 *************** *** 989,993 **** mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = Array.new(seqs.size).clear seqs.each_seq do |s| aseqs << s.to_s.gsub(seqs.gap_regexp, gchar) --- 989,993 ---- mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = Array.new(seqs.number_of_sequences).clear seqs.each_seq do |s| aseqs << s.to_s.gsub(seqs.gap_regexp, gchar) *************** *** 1087,1091 **** def __output_phylip_common(options = {}) len = self.alignment_length ! aln = [ " #{self.size} #{len}\n" ] sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] --- 1087,1091 ---- def __output_phylip_common(options = {}) len = self.alignment_length ! aln = [ " #{self.number_of_sequences} #{len}\n" ] sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] *************** *** 1108,1112 **** gchar = (options[:gap_char] or '-') ! aseqs = Array.new(len).clear self.each_seq do |s| aseqs << s.to_s.gsub(self.gap_regexp, gchar) --- 1108,1112 ---- gchar = (options[:gap_char] or '-') ! aseqs = Array.new(self.number_of_sequences).clear self.each_seq do |s| aseqs << s.to_s.gsub(self.gap_regexp, gchar) *************** *** 1139,1143 **** def output_molphy(options = {}) len = self.alignment_length ! header = "#{self.size} #{len}\n" sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] --- 1139,1143 ---- def output_molphy(options = {}) len = self.alignment_length ! header = "#{self.number_of_sequences} #{len}\n" sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] *************** *** 1182,1192 **** include Output # Returns an array of sequence names. # The order of the names must be the same as # the order of each_seq. def sequence_names ! i = 0 ! self.each_seq { |s| i += 1 } ! (0...i).to_a end end #module EnumerableExtension --- 1182,1197 ---- include Output + # Returns number of sequences in this alignment. + def number_of_sequences + i = 0 + self.each_seq { |s| i += 1 } + i + end + # Returns an array of sequence names. # The order of the names must be the same as # the order of each_seq. def sequence_names ! (0...(self.number_of_sequences)).to_a end end #module EnumerableExtension *************** *** 1210,1213 **** --- 1215,1223 ---- each(&block) end + + # Returns number of sequences in this alignment. + def number_of_sequences + self.size + end end #module ArrayExtension *************** *** 1300,1303 **** --- 1310,1318 ---- end + # Returns number of sequences in this alignment. + def number_of_sequences + self.size + end + # Returns an array of sequence names. # The order of the names must be the same as *************** *** 1579,1582 **** --- 1594,1598 ---- @seqs.size end + alias number_of_sequences size # If the key exists, returns true. Otherwise, returns false. From ngoto at dev.open-bio.org Thu Dec 14 10:22:07 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:22:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/clustalw report.rb,1.10,1.11 Message-ID: <200612141522.kBEFM7ni013826@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/clustalw In directory dev.open-bio.org:/tmp/cvs-serv13804/lib/bio/appl/clustalw Modified Files: report.rb Log Message: Bio::(ClustalW|MAFFT)::Report#algin is deprecated. Instead, please use #alignment method. Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw/report.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** report.rb 30 Apr 2006 05:50:19 -0000 1.10 --- report.rb 14 Dec 2006 15:22:05 -0000 1.11 *************** *** 82,95 **** # Gets an multiple alignment. # Returns a Bio::Alignment object. ! def align do_parse() unless @align @align end ! alias alignment align # Gets an fasta-format string of the sequences. # Returns a string. def to_fasta(*arg) ! align.to_fasta(*arg) end --- 82,103 ---- # Gets an multiple alignment. # Returns a Bio::Alignment object. ! def alignment do_parse() unless @align @align end ! ! # This will be deprecated. Instead, please use alignment. ! # ! # Gets an multiple alignment. ! # Returns a Bio::Alignment object. ! def align ! warn "align method will be deprecated. Please use \'alignment\'." ! alignment ! end # Gets an fasta-format string of the sequences. # Returns a string. def to_fasta(*arg) ! alignment.to_fasta(*arg) end *************** *** 97,101 **** # Returns an array of Bio::FastaFormat objects. def to_a ! align.to_fastaformat_array end --- 105,109 ---- # Returns an array of Bio::FastaFormat objects. def to_a ! alignment.to_fastaformat_array end From ngoto at dev.open-bio.org Thu Dec 14 10:22:07 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:22:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/mafft report.rb,1.9,1.10 Message-ID: <200612141522.kBEFM7vN013829@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/mafft In directory dev.open-bio.org:/tmp/cvs-serv13804/lib/bio/appl/mafft Modified Files: report.rb Log Message: Bio::(ClustalW|MAFFT)::Report#algin is deprecated. Instead, please use #alignment method. Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft/report.rb,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** report.rb 30 Apr 2006 05:50:19 -0000 1.9 --- report.rb 14 Dec 2006 15:22:05 -0000 1.10 *************** *** 67,76 **** # Gets an multiple alignment. ! # Returns an instance of Bio::Alignment class. ! def align do_parse() unless @align @align end ! alias alignment align # Gets an fasta-format string of the sequences. --- 67,84 ---- # Gets an multiple alignment. ! # Returns a Bio::Alignment object. ! def alignment do_parse() unless @align @align end ! ! # This will be deprecated. Instead, please use alignment. ! # ! # Gets an multiple alignment. ! # Returns a Bio::Alignment object. ! def align ! warn "align method will be deprecated. Please use \'alignment\'." ! alignment ! end # Gets an fasta-format string of the sequences. *************** *** 79,83 **** # Please refer to Bio::Alignment#to_fasta for arguments. def to_fasta(*arg) ! align.to_fasta(*arg) end --- 87,91 ---- # Please refer to Bio::Alignment#to_fasta for arguments. def to_fasta(*arg) ! alignment.to_fasta(*arg) end From ngoto at dev.open-bio.org Thu Dec 14 10:56:25 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:56:25 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.12, 1.13 mafft.rb, 1.12, 1.13 sim4.rb, 1.7, 1.8 Message-ID: <200612141556.kBEFuPd7014039@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14019/lib/bio/appl Modified Files: clustalw.rb mafft.rb sim4.rb Log Message: forggoten to change @option into @options Index: sim4.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/sim4.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sim4.rb 14 Dec 2006 14:54:50 -0000 1.7 --- sim4.rb 14 Dec 2006 15:56:22 -0000 1.8 *************** *** 108,112 **** # If filename2 is not specified, using self.database. def exec_local(filename1, filename2 = nil) ! @command = [ @program, filename1, (filename2 or @database), *@option ] @output = nil @report = nil --- 108,112 ---- # If filename2 is not specified, using self.database. def exec_local(filename1, filename2 = nil) ! @command = [ @program, filename1, (filename2 or @database), *@options ] @output = nil @report = nil Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** clustalw.rb 14 Dec 2006 14:54:50 -0000 1.12 --- clustalw.rb 14 Dec 2006 15:56:22 -0000 1.13 *************** *** 83,87 **** query_align(seqs) else ! exec_local(@option) end end --- 83,87 ---- query_align(seqs) else ! exec_local(@options) end end *************** *** 135,139 **** ] opt << "-type=#{seqtype}" if seqtype ! opt.concat(@option) exec_local(opt) tf_out.open --- 135,139 ---- ] opt << "-type=#{seqtype}" if seqtype ! opt.concat(@options) exec_local(opt) tf_out.open Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mafft.rb 14 Dec 2006 14:54:50 -0000 1.12 --- mafft.rb 14 Dec 2006 15:56:22 -0000 1.13 *************** *** 159,163 **** query_align(seqs) else ! exec_local(@option) end end --- 159,163 ---- query_align(seqs) else ! exec_local(@options) end end *************** *** 188,192 **** # Performs alignment of sequences in the file named +fn+. def query_by_filename(fn, seqtype = nil) ! opt = @option + [ fn ] exec_local(opt) @report = Report.new(@output, seqtype) --- 188,192 ---- # Performs alignment of sequences in the file named +fn+. def query_by_filename(fn, seqtype = nil) ! opt = @options + [ fn ] exec_local(opt) @report = Report.new(@output, seqtype) From ngoto at dev.open-bio.org Thu Dec 14 10:59:23 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:59:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.13, 1.14 mafft.rb, 1.13, 1.14 sim4.rb, 1.8, 1.9 Message-ID: <200612141559.kBEFxNqn014111@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14091/lib/bio/appl Modified Files: clustalw.rb mafft.rb sim4.rb Log Message: forgotten to change *@command to @command. Index: sim4.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/sim4.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sim4.rb 14 Dec 2006 15:56:22 -0000 1.8 --- sim4.rb 14 Dec 2006 15:59:21 -0000 1.9 *************** *** 111,115 **** @output = nil @report = nil ! Bio::Command.call_command(*@command) do |io| io.close_write @output = io.read --- 111,115 ---- @output = nil @report = nil ! Bio::Command.call_command(@command) do |io| io.close_write @output = io.read Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** clustalw.rb 14 Dec 2006 15:56:22 -0000 1.13 --- clustalw.rb 14 Dec 2006 15:59:21 -0000 1.14 *************** *** 167,171 **** @log = nil ! Bio::Command.call_command(*@command) do |io| io.close_write @log = dout.read --- 167,171 ---- @log = nil ! Bio::Command.call_command(@command) do |io| io.close_write @log = dout.read Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mafft.rb 14 Dec 2006 15:56:22 -0000 1.13 --- mafft.rb 14 Dec 2006 15:59:21 -0000 1.14 *************** *** 200,204 **** #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! Bio::Command.call_command(*@command) do |io| io.close_write ff = Bio::FlatFile.new(Bio::FastaFormat, io) --- 200,204 ---- #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! Bio::Command.call_command(@command) do |io| io.close_write ff = Bio::FlatFile.new(Bio::FastaFormat, io) From ngoto at dev.open-bio.org Thu Dec 14 11:04:04 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:04:04 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb,1.14,1.15 Message-ID: <200612141604.kBEG44Cx014165@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14145 Modified Files: clustalw.rb Log Message: forgotten mistakes (din was changed to io) Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** clustalw.rb 14 Dec 2006 15:59:21 -0000 1.14 --- clustalw.rb 14 Dec 2006 16:04:02 -0000 1.15 *************** *** 169,173 **** Bio::Command.call_command(@command) do |io| io.close_write ! @log = dout.read t.join end --- 169,173 ---- Bio::Command.call_command(@command) do |io| io.close_write ! @log = io.read t.join end From ngoto at dev.open-bio.org Thu Dec 14 11:06:01 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:06:01 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb,1.15,1.16 Message-ID: <200612141606.kBEG61eJ014214@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14194 Modified Files: clustalw.rb Log Message: changed to use output_fasta instead of to_fasta Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** clustalw.rb 14 Dec 2006 16:04:02 -0000 1.15 --- clustalw.rb 14 Dec 2006 16:05:59 -0000 1.16 *************** *** 102,106 **** break if seqtype end ! query_string(seqs.to_fasta(70, :avoid_same_name => true), seqtype) end --- 102,106 ---- break if seqtype end ! query_string(seqs.output_fasta(70, :avoid_same_name => true), seqtype) end From ngoto at dev.open-bio.org Thu Dec 14 11:08:48 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:08:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.16, 1.17 mafft.rb, 1.14, 1.15 Message-ID: <200612141608.kBEG8mYv014242@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14222 Modified Files: clustalw.rb mafft.rb Log Message: Changed to use output_fasta instead of to_fasta and options are changed. A mistake is fixed in clustalw.rb Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** clustalw.rb 14 Dec 2006 16:05:59 -0000 1.16 --- clustalw.rb 14 Dec 2006 16:08:46 -0000 1.17 *************** *** 102,106 **** break if seqtype end ! query_string(seqs.output_fasta(70, :avoid_same_name => true), seqtype) end --- 102,107 ---- break if seqtype end ! query_string(seqs.output_fasta(:width => 70, ! :avoid_same_name => true), seqtype) end *************** *** 170,174 **** io.close_write @log = io.read - t.join end @log --- 171,174 ---- Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mafft.rb 14 Dec 2006 15:59:21 -0000 1.14 --- mafft.rb 14 Dec 2006 16:08:46 -0000 1.15 *************** *** 169,173 **** seqs = Bio::Alignment.new(seqs, *arg) end ! query_string(seqs.to_fasta(70)) end --- 169,173 ---- seqs = Bio::Alignment.new(seqs, *arg) end ! query_string(seqs.output_fasta(:width => 70)) end From ngoto at dev.open-bio.org Thu Dec 14 11:13:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:13:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip - New directory Message-ID: <200612141613.kBEGDUlK014339@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv14317/phylip Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/appl/phylip added to the repository From ngoto at dev.open-bio.org Thu Dec 14 11:13:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:13:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/gcg - New directory Message-ID: <200612141613.kBEGDUfW014343@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/gcg In directory dev.open-bio.org:/tmp/cvs-serv14317/gcg Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/appl/gcg added to the repository From nakao at dev.open-bio.org Thu Dec 14 11:19:25 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:19:25 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/iprscan - New directory Message-ID: <200612141619.kBEGJPNB014391@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14371/lib/bio/appl/iprscan Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/appl/iprscan added to the repository From nakao at dev.open-bio.org Thu Dec 14 11:20:03 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:20:03 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/iprscan - New directory Message-ID: <200612141620.kBEGK3Qd014439@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14419/test/unit/bio/appl/iprscan Log Message: Directory /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan added to the repository From nakao at dev.open-bio.org Thu Dec 14 11:20:27 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:20:27 +0000 Subject: [BioRuby-cvs] bioruby/test/data/iprscan - New directory Message-ID: <200612141620.kBEGKRYP014523@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/data/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14502/test/data/iprscan Log Message: Directory /home/repository/bioruby/bioruby/test/data/iprscan added to the repository From nakao at dev.open-bio.org Thu Dec 14 11:22:14 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:22:14 +0000 Subject: [BioRuby-cvs] bioruby/test/data/iprscan merged.raw,NONE,1.1 Message-ID: <200612141622.kBEGMEvx014606@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/data/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14577/test/data/iprscan Added Files: merged.raw Log Message: * Newly added files for InterProScan. --- NEW FILE: merged.raw --- Q9RHD9 D44DAE8C544CB7C1 267 HMMPfam PF00575 S1 1 55 3.3E-6 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMPfam PF00575 S1 68 142 4.1E-19 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMPfam PF00575 S1 155 228 1.8E-19 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMSmart SM00316 S1 3 55 7.1E-7 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMSmart SM00316 S1 70 142 8.1E-20 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMSmart SM00316 S1 157 228 1.5E-21 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 ProfileScan PS50126 S1 1 55 14.869 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 ProfileScan PS50126 S1 72 142 20.809 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 ProfileScan PS50126 S1 159 228 22.541 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 FPrintScan PR00681 RIBOSOMALS1 6 27 1.5E-17 T 11-Nov-2005 IPR000110 Ribosomal protein S1 Molecular Function:RNA binding (GO:0003723), Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Q9RHD9 D44DAE8C544CB7C1 267 FPrintScan PR00681 RIBOSOMALS1 85 104 1.5E-17 T 11-Nov-2005 IPR000110 Ribosomal protein S1 Molecular Function:RNA binding (GO:0003723), Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Q9RHD9 D44DAE8C544CB7C1 267 FPrintScan PR00681 RIBOSOMALS1 125 143 1.5E-17 T 11-Nov-2005 IPR000110 Ribosomal protein S1 Molecular Function:RNA binding (GO:0003723), Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Q9RHD9 D44DAE8C544CB7C1 267 superfamily SSF50249 Nucleic_acid_OB 3 60 1.4E-7 T 11-Nov-2005 IPR008994 Nucleic acid-binding OB-fold Molecular Function:nucleic acid binding (GO:0003676) Q9RHD9 D44DAE8C544CB7C1 267 superfamily SSF50249 Nucleic_acid_OB 61 205 6.3999999999999995E-24 T 11-Nov-2005 IPR008994 Nucleic acid-binding OB-fold Molecular Function:nucleic acid binding (GO:0003676) RS16_ECOLI F94D07049A6D489D 82 HMMTigr TIGR00002 S16 2 81 117.16 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 superfamily SSF54565 Ribosomal_S16 1 79 1.81E-8 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 HMMPfam PF00886 Ribosomal_S16 8 68 2.7000000000000004E-33 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 BlastProDom PD003791 Ribosomal_S16 10 77 4.0E-33 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 ProfileScan PS00732 RIBOSOMAL_S16 2 11 8.0E-5 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Y902_MYCTU CD84A335CCFFE6D7 446 superfamily SSF47384 His_kin_homodim 220 292 5.89E-7 T 11-Nov-2005 IPR009082 Histidine kinase, homodimeric Y902_MYCTU CD84A335CCFFE6D7 446 HMMSmart SM00304 HAMP 170 222 1.8E-6 T 11-Nov-2005 IPR003660 Histidine kinase, HAMP region Molecular Function:signal transducer activity (GO:0004871), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 ProfileScan PS50885 HAMP 170 222 7.777 T 11-Nov-2005 IPR003660 Histidine kinase, HAMP region Molecular Function:signal transducer activity (GO:0004871), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 HMMPfam PF00672 HAMP 151 219 1.1E-8 T 11-Nov-2005 IPR003660 Histidine kinase, HAMP region Molecular Function:signal transducer activity (GO:0004871), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 ProfileScan PS50109 HIS_KIN 237 446 34.449 T 11-Nov-2005 IPR005467 Histidine kinase Biological Process:protein amino acid phosphorylation (GO:0006468), Molecular Function:kinase activity (GO:0016301) Y902_MYCTU CD84A335CCFFE6D7 446 HMMSmart SM00388 HisKA 230 296 1.4E-12 T 11-Nov-2005 IPR003661 Histidine kinase A, N-terminal Molecular Function:two-component sensor molecule activity (GO:0000155), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 HMMPfam PF00512 HisKA 230 296 2.4E-11 T 11-Nov-2005 IPR003661 Histidine kinase A, N-terminal Molecular Function:two-component sensor molecule activity (GO:0000155), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 HMMSmart SM00387 HATPase_c 338 446 2.9E-24 T 11-Nov-2005 IPR003594 ATP-binding region, ATPase-like Molecular Function:ATP binding (GO:0005524) Y902_MYCTU CD84A335CCFFE6D7 446 HMMPfam PF02518 HATPase_c 338 445 2.5E-26 T 11-Nov-2005 IPR003594 ATP-binding region, ATPase-like Molecular Function:ATP binding (GO:0005524) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 374 388 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 392 402 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 406 424 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 430 443 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) From nakao at dev.open-bio.org Thu Dec 14 11:22:14 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:22:14 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/iprscan test_report.rb, NONE, 1.1 Message-ID: <200612141622.kBEGMEgZ014610@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14577/test/unit/bio/appl/iprscan Added Files: test_report.rb Log Message: * Newly added files for InterProScan. --- NEW FILE: test_report.rb --- # # test/unit/bio/appl/iprscan/test_report.rb - Unit test for Bio::InterProScan::Report # # Copyright (C) 2006 Mitsuteru Nakao # # $Id: test_report.rb,v 1.1 2006/12/14 16:22:12 nakao Exp $ # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s $:.unshift(libpath) unless $:.include?(libpath) require 'test/unit' require 'bio/appl/iprscan/report' module Bio class TestIprscanData bioruby_root = Pathname.new(File.join(File.dirname(__FILE__), [".."] * 5)).cleanpath.to_s TestDataIprscan = Pathname.new(File.join(bioruby_root, "test", "data", "iprscan")).cleanpath.to_s def self.raw_format File.open(File.join(TestDataIprscan, "merged.raw")) end end class TestIprscanTxtReport < Test::Unit::TestCase def setup test_entry=<<-END slr0002\t860 InterPro\tIPR001264\tGlycosyl transferase, family 51 BlastProDom\tPD001895\tsp_Q55683_SYNY3_Q55683\t2e-37\t292-370 HMMPfam\tPF00912\tTransglycosyl\t8e-104\t204-372 InterPro\tIPR001460\tPenicillin-binding protein, transpeptidase domain HMMPfam\tPF00905\tTranspeptidase\t5.7e-30\t451-742 InterPro\tNULL\tNULL ProfileScan\tPS50310\tALA_RICH\t10.224\t805-856 // END @obj = Bio::Iprscan::Report.parse_in_txt(test_entry) end def test_query_id assert_equal('slr0002', @obj.query_id) end def test_query_length assert_equal(860, @obj.query_length) end def test_matches_size assert_equal(4, @obj.matches.size) end def test_match_ipr_id assert_equal('IPR001264', @obj.matches.first.ipr_id) end def test_match_ipr_description assert_equal('Glycosyl transferase, family 51', @obj.matches.first.ipr_description) end def test_match_method assert_equal('BlastProDom', @obj.matches.first.method) end def test_match_accession assert_equal('PD001895', @obj.matches.first.accession) end def test_match_description assert_equal('sp_Q55683_SYNY3_Q55683', @obj.matches.first.description) end def test_match_evalue assert_equal('2e-37', @obj.matches.first.evalue) end def test_match_match_start assert_equal(292, @obj.matches.first.match_start) end def test_match_match_end assert_equal(370, @obj.matches.first.match_end) end end # TestIprscanTxtReport class TestIprscanRawReport < Test::Unit::TestCase def setup test_raw = Bio::TestIprscanData.raw_format entry = '' @obj = [] while line = test_raw.gets if entry != '' and entry.split("\t").first == line.split("\t").first entry << line elsif entry != '' @obj << Bio::Iprscan::Report.parse_in_raw(entry) entry = line else entry << line end end end def test_obj assert_equal(2, @obj.size) end def test_query_id assert_equal('Q9RHD9', @obj.first.query_id) end def test_entry_id assert_equal('Q9RHD9', @obj.first.entry_id) end def test_query_length assert_equal(267, @obj.first.query_length) end def test_match_query_id assert_equal('Q9RHD9', @obj.first.matches.first.query_id) end def test_match_crc64 assert_equal('D44DAE8C544CB7C1', @obj.first.matches.first.crc64) end def test_match_query_length assert_equal(267, @obj.first.matches.first.query_length) end def test_match_method assert_equal('HMMPfam', @obj.first.matches.first.method) end def test_match_accession assert_equal('PF00575', @obj.first.matches.first.accession) end def test_match_description assert_equal('S1', @obj.first.matches.first.description) end def test_match_match_start assert_equal(1, @obj.first.matches.first.match_start) end def test_match_match_end assert_equal(55, @obj.first.matches.first.match_end) end def test_match_evalue assert_equal('3.3E-6', @obj.first.matches.first.evalue) end def test_match_status assert_equal('T', @obj.first.matches.first.status) end def test_match_date assert_equal('11-Nov-2005', @obj.first.matches.first.date) end def test_match_ipr_id assert_equal('IPR003029', @obj.first.matches.first.ipr_id) end def test_match_ipr_description assert_equal('RNA binding S1', @obj.first.matches.first.ipr_description) end def test_match_go_terms assert_equal(["Molecular Function:RNA binding (GO:0003723)"], @obj.first.matches.first.go_terms) end end end From nakao at dev.open-bio.org Thu Dec 14 11:22:14 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:22:14 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/iprscan report.rb,NONE,1.1 Message-ID: <200612141622.kBEGMEmb014615@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14577/lib/bio/appl/iprscan Added Files: report.rb Log Message: * Newly added files for InterProScan. --- NEW FILE: report.rb --- # # = bio/appl/iprscan/report.rb - a class for iprscan output. # # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao # License:: Ruby's # # $Id: report.rb,v 1.1 2006/12/14 16:22:12 nakao Exp $ # # == Report classes for the iprscan program. # module Bio class Iprscan # = DESCRIPTION # Class for InterProScan report. It is used to parse results and reformat # results from (raw|xml|txt) into (html, xml, ebihtml, txt, gff3) format. # # See ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/README.html # # == USAGE # # Read a marged.txt and split each entry. # Bio::Iprscan::Report.reports_in_txt(File.read("marged.txt") do |report| # report.query_id # report.matches.size # report.matches.each do |match| # match.ipr_id #=> 'IPR...' # match.ipr_description # match.method # match.accession # match.description # match.match_start # match.match_end # match.evalue # end # # report.to_gff3 # # report.to_html # end # # Bio::Iprscan::Report.reports_in_raw(File.read("marged.raw") do |report| # report.class #=> Bio::Iprscan::Report # end # class Report # Entry delimiter pattern. RS = DELIMITER = "\n\/\/\n" # Qeury sequence name (entry_id). attr_accessor :query_id alias :entry_id :query_id # Qeury sequence length. attr_accessor :query_length # Matched InterPro motifs in Hash. Each InterPro motif have :name, # :definition, :accession and :motifs keys. And :motifs key contains # motifs in Array. Each motif have :method, :accession, :definition, # :score, :location_from and :location_to keys. attr_accessor :matches # == USAGE # Bio::Iprscan::Report.reports_in_raw(File.open("merged.raw")) do |report| # report # end # def self.reports_in_raw(io) entry = '' while line = io.gets if entry != '' and entry.split("\t").first == line.split("\t").first entry << line elsif entry != '' yield Bio::Iprscan::Report.parse_in_raw(entry) entry = line else entry << line end end end # Parser method for a raw formated entry. Retruns a Bio::Iprscan::Report # object. def self.parse_in_raw(str) report = self.new str.split(/\n/).each do |line| line = line.split("\t") report.matches << Match.new(:query_id => line[0], :crc64 => line[1], :query_length => line[2].to_i, :method => line[3], :accession => line[4], :description => line[5], :match_start => line[6].to_i, :match_end => line[7].to_i, :evalue => line[8], :status => line[9], :date => line[10]) if line[11] report.matches.last.ipr_id = line[11] report.matches.last.ipr_description = line[12] end report.matches.last.go_terms = line[13].split(', ') if line[13] end report.query_id = report.matches.first.query_id report.query_length = report.matches.first.query_length report end # Parser method for a xml formated entry. Retruns a Bio::Iprscan::Report # object. def self.parse_in_xml(str) NotImplementedError end # Splits entry stream. # # == Usage # Bio::Iprscan::Report.reports_in_txt(File.open("merged.txt")) do |report| # report # end def self.reports_in_txt(io) io.each(/\n\/\/\n/m) do |entry| yield self.parse_in_txt(entry) end end # Parser method for a txt formated entry. Retruns a Bio::Iprscan::Report # object. # # == Usage # # File.read("marged.txt").each(Bio::Iprscan::Report::RS) do |e| # report = Bio::Iprscan::Report.parse_in_txt(e) # end # def self.parse_in_txt(str) report = self.new ipr_line = '' str.split(/\n/).each do |line| line = line.split("\t") if line.size == 2 report.query_id = line[0] report.query_length = line[1].to_i elsif line.first == '//' elsif line.first == 'InterPro' ipr_line = line else startp, endp = line[4].split("-") report.matches << Match.new(:ipr_id => ipr_line[1], :ipr_description => ipr_line[2], :method => line[0], :accession => line[1], :description => line[2], :evalue => line[3], :match_start => startp.to_i, :match_end => endp.to_i) end end report end # def initialize @query_id = nil @query_length = nil @matches = [] end def to_html NotImplementedError end def to_xml NotImplementedError end def to_ebihtml NotImplementedError end def to_txt NotImplementedError end def to_raw NotImplementedError end def to_gff3 NotImplementedError end # == DESCRIPTION # Container class for InterProScan matches. # # == USAGE # match = Match.new(:query_id => ...) # # match.ipr_id = 'IPR001234' # match.ipr_id #=> 'IPR1234' # class Match def initialize(hash) @data = Hash.new hash.each do |key, value| @data[key.to_sym] = value end end # Date for computation. def date; @data[:date]; end # CRC64 checksum of query sequence. def crc64; @data[:crc64]; end # E-value of the match def evalue; @data[:evalue]; end # Status of the match (T for true / M for marginal). def status; @data[:status]; end # the corresponding InterPro entry (if any). def ipr_id; @data[:ipr_id]; end # the length of the sequence in AA. def length; @data[:length]; end # the analysis method launched. def method; @data[:method]; end # Object#metod overrided by Match#method # the Gene Ontology description for the InterPro entry, in "Aspect:term (ID)" format. def go_terms; @data[:go_terms]; end # Id of the input sequence. def query_id; @data[:query_id]; end # the end of the domain match. def match_end; @data[:match_end]; end # the database members entry for this match. def accession; @data[:accession]; end # the database mambers description for this match. def description; @data[:description]; end # the start of the domain match. def match_start; @data[:match_start]; end # the descriotion of the InterPro entry. def ipr_description; @data[:ipr_description]; end def method_missing(name, arg = nil) if arg name = name.to_s.sub(/=$/, '') @data[name.to_sym] = arg else @data[name.to_sym] end end end # class Match end # class Report end # class Iprscan end # module Bio From nakao at dev.open-bio.org Thu Dec 14 11:42:38 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:42:38 +0000 Subject: [BioRuby-cvs] bioruby ChangeLog,1.54,1.55 Message-ID: <200612141642.kBEGgckx014692@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv14672 Modified Files: ChangeLog Log Message: * lib/bio/appl/iprscan/report.rb Newly added. Index: ChangeLog =================================================================== RCS file: /home/repository/bioruby/bioruby/ChangeLog,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** ChangeLog 6 Oct 2006 09:53:38 -0000 1.54 --- ChangeLog 14 Dec 2006 16:42:36 -0000 1.55 *************** *** 1,2 **** --- 1,8 ---- + 2006-12-15 Mitsuteru Nakao + + * lib/bio/appl/iprscan/report.rb + + Bio::Iprscan::Report for InterProScan output is newly added. + 2006-10-05 Naohisa Goto From ngoto at dev.open-bio.org Thu Dec 14 14:52:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:55 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.72,1.73 Message-ID: <200612141952.kBEJqtim015845@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv15819/lib Modified Files: bio.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** bio.rb 13 Dec 2006 16:29:36 -0000 1.72 --- bio.rb 14 Dec 2006 19:52:53 -0000 1.73 *************** *** 231,234 **** --- 231,238 ---- autoload :Blat, 'bio/appl/blat/report' + module GCG + autoload :Msf, 'bio/appl/gcg/msf' + autoload :Seq, 'bio/appl/gcg/seq' + end ### Utilities From ngoto at dev.open-bio.org Thu Dec 14 14:52:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.20,1.21 Message-ID: <200612141952.kBEJqtEn015850@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv15819/lib/bio Modified Files: alignment.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** alignment.rb 14 Dec 2006 15:08:59 -0000 1.20 --- alignment.rb 14 Dec 2006 19:52:53 -0000 1.21 *************** *** 24,27 **** --- 24,32 ---- require 'bio/sequence' + #--- + # (depends on autoload) + #require 'bio/appl/gcg/seq' + #+++ + module Bio *************** *** 871,874 **** --- 876,881 ---- when :phylipnon output_phylipnon(*arg) + when :msf + output_msf(*arg) when :molphy output_molphy(*arg) *************** *** 1177,1180 **** --- 1184,1305 ---- aseqs.join('') end + + # Generates msf formatted text as a string + def output_msf(options = {}) + len = self.seq_length + + if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] + sn = __clustal_avoid_same_name(self.sequence_names) + else + sn = self.sequence_names.collect do |x| + x.to_s.gsub(/[\r\n\x00]/, ' ') + end + end + if !options.has_key?(:replace_space) or options[:replace_space] + sn.collect! { |x| x.gsub(/\s/, '_') } + end + if !options.has_key?(:escape) or options[:escape] + sn.collect! { |x| x.gsub(/[\:\;\,\(\)]/, '_') } + end + if !options.has_key?(:split) or options[:split] + sn.collect! { |x| x.split(/\s/)[0].to_s } + end + + seqwidth = 50 + namewidth = [31, sn.collect { |x| x.length }.max ].min + sep = ' ' * 2 + + seqregexp = Regexp.new("(.{1,#{seqwidth}})") + gchar = (options[:gap_char] or '.') + pchar = (options[:padding_char] or '~') + + aseqs = Array.new(self.number_of_sequences).clear + self.each_seq do |s| + aseqs << s.to_s.gsub(self.gap_regexp, gchar) + end + aseqs.each do |s| + s.sub!(/\A#{Regexp.escape(gchar)}+/) { |x| pchar * x.length } + s.sub!(/#{Regexp.escape(gchar)}+\z/, '') + s << (pchar * (len - s.length)) + end + + case options[:case].to_s + when /lower/i + aseqs.each { |s| s.downcase! } + when /upper/i + aseqs.each { |s| s.upcase! } + else #default upcase + aseqs.each { |s| s.upcase! } + end + + case options[:type].to_s + when /protein/i, /aa/i + amino = true + when /na/i + amino = false + else + if seqclass == Bio::Sequence::AA then + amino = true + elsif seqclass == Bio::Sequence::NA then + amino = false + else + # if we can't determine, we asuume as protein. + amino = aseqs.size + aseqs.each { |x| amino -= 1 if /\A[acgt]\z/i =~ x } + amino = false if amino <= 0 + end + end + + seq_type = (amino ? 'P' : 'N') + + fn = (options[:entry_id] or self.__id__.abs.to_s + '.msf') + dt = (options[:time] or Time.now).strftime('%B %d, %Y %H:%M') + + sums = aseqs.collect { |s| GCG::Seq.calc_checksum(s) } + #sums = aseqs.collect { |s| 0 } + sum = 0; sums.each { |x| sum += x }; sum %= 10000 + msf = + [ + "#{seq_type == 'N' ? 'N' : 'A' }A_MULTIPLE_ALIGNMENT 1.0\n", + "\n", + "\n", + " #{fn} MSF: #{len} Type: #{seq_type} #{dt} Check: #{sum} ..\n", + "\n" + ] + + sn.each do |snx| + msf << ' Name: ' + + sprintf('%*s', -namewidth, snx.to_s)[0, namewidth] + + " Len: #{len} Check: #{sums.shift} Weight: 1.00\n" + end + msf << "\n//\n" + + aseqs.collect! do |s| + snx = sn.shift + head = sprintf("%*s", namewidth, snx.to_s)[0, namewidth] + sep + s.gsub!(seqregexp, "\\1\n") + a = s.split(/^/) + a.collect { |x| head + x } + end + lines = (len + seqwidth - 1).div(seqwidth) + i = 1 + lines.times do + msf << "\n" + n_l = i + n_r = [ i + seqwidth - 1, len ].min + if n_l != n_r then + w = [ n_r - n_l + 1 - n_l.to_s.length - n_r.to_s.length, 1 ].max + msf << (' ' * namewidth + sep + n_l.to_s + + ' ' * w + n_r.to_s + "\n") + else + msf << (' ' * namewidth + sep + n_l.to_s + "\n") + end + aseqs.each { |a| msf << a.shift } + i += seqwidth + end + msf << "\n" + msf.join('') + end + end #module Output From ngoto at dev.open-bio.org Thu Dec 14 14:52:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/gcg msf.rb, NONE, 1.1 seq.rb, NONE, 1.1 Message-ID: <200612141952.kBEJqtQA015855@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/gcg In directory dev.open-bio.org:/tmp/cvs-serv15819/lib/bio/appl/gcg Added Files: msf.rb seq.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. --- NEW FILE: msf.rb --- # # = bio/appl/gcg/msf.rb - GCG multiple sequence alignment (.msf) parser class # # Copyright:: Copyright (C) 2003, 2006 # Naohisa Goto # License:: Ruby's # # $Id: msf.rb,v 1.1 2006/12/14 19:52:53 ngoto Exp $ # # = About Bio::GCG::Msf # # Please refer document of Bio::GCG::Msf. # #--- # (depends on autoload) #require 'bio/appl/gcg/seq' #+++ module Bio module GCG # The msf is a multiple sequence alignment format developed by Wisconsin. # Bio::GCG::Msf is a msf format parser. class Msf #< DB # delimiter used by Bio::FlatFile DELIMITER = RS = nil # Creates a new Msf object. def initialize(str) str = str.sub(/\A[\r\n]+/, '') if /^\!\![A-Z]+\_MULTIPLE\_ALIGNMNENT/ =~ str[/.*/] then @heading = str[/.*/] # '!!NA_MULTIPLE_ALIGNMENT 1.0' or like this str.sub!(/.*/, '') end str.sub!(/.*\.\.$/m, '') @description = $&.to_s.sub(/^.*\.\.$/, '').to_s d = $&.to_s if m = /(.+)\s+MSF\:\s+(\d+)\s+Type\:\s+(\w)\s+(.+)\s+(Comp)?Check\:\s+(\d+)/.match(d) then @entry_id = m[1].to_s.strip @length = (m[2] ? m[2].to_i : nil) @seq_type = m[3] @date = m[4].to_s.strip @checksum = (m[6] ? m[6].to_i : nil) end str.sub!(/.*\/\/$/m, '') a = $&.to_s.split(/^/) @seq_info = [] a.each do |x| if /Name\: / =~ x then s = {} x.scan(/(\S+)\: +(\S*)/) { |y| s[$1] = $2 } @seq_info << s end end @data = str @description.sub!(/\A(\r\n|\r|\n)/, '') @align = nil end # description attr_reader :description # ID of the alignment attr_reader :entry_id # alignment length attr_reader :length # sequence type ("N" for DNA/RNA or "P" for protein) attr_reader :seq_type # date attr_reader :date # checksum attr_reader :checksum # heading # ('!!NA_MULTIPLE_ALIGNMENT 1.0' or whatever like this) attr_reader :heading #--- ## data (internally used, will be obsoleted) #attr_reader :data # ## seq. info. (internally used, will be obsoleted) #attr_reader :seq_info #+++ # symbol comparison table def symbol_comparison_table unless defined?(@symbol_comparison_table) /Symbol comparison table\: +(\S+)/ =~ @description @symbol_comparison_table = $1 end @symbol_comparison_table end # gap weight def gap_weight unless defined?(@gap_weight) /GapWeight\: +(\S+)/ =~ @description @gap_weight = $1 end @gap_weight end # gap length weight def gap_length_weight unless defined?(@gap_length_weight) /GapLengthWeight\: +(\S+)/ =~ @description @gap_length_weight = $1 end @gap_length_weight end # CompCheck field def compcheck unless defined?(@compcheck) if /CompCheck\: +(\d+)/ =~ @description then @compcheck = $1.to_i else @compcheck = nil end end @compcheck end # parsing def do_parse return if @align a = @data.strip.split(/\n\n/) @seq_data = Array.new(@seq_info.size) @seq_data.collect! { |x| Array.new } a.each do |x| b = x.split(/\n/) nw = 0 if b.size > @seq_info.size then if /^ +/ =~ b.shift.to_s nw = $&.to_s.length end end if nw > 0 then b.each_with_index { |y, i| y[0, nw] = ''; @seq_data[i] << y } else b.each_with_index { |y, i| @seq_data[i] << y.strip.split(/ +/, 2)[1].to_s } end end case seq_type when 'P', 'p' k = Bio::Sequence::AA when 'N', 'n' k = Bio::Sequence::NA else k = Bio::Sequence::Generic end @seq_data.collect! do |x| y = x.join('') y.gsub!(/[\s\d]+/, '') k.new(y) end aln = Bio::Alignment.new @seq_data.each_with_index do |x, i| aln.store(@seq_info[i]['Name'], x) end @align = aln end private :do_parse # returns Bio::Alignment object. def alignment do_parse @align end # gets seq data (used internally) (will be obsoleted) def seq_data do_parse @seq_data end # validates checksum def validate_checksum do_parse valid = true total = 0 @seq_data.each_with_index do |x, i| sum = Bio::GCG::Seq.calc_checksum(x) if sum != @seq_info[i]['Check'].to_i valid = false break end total += sum end return false unless valid if @checksum != 0 # "Check:" field of BioPerl is always 0 valid = ((total % 10000) == @checksum) end valid end end #class Msf end #module GCG end # module Bio --- NEW FILE: seq.rb --- # # = bio/appl/gcg/seq.rb - GCG sequence file format class (.seq/.pep file) # # Copyright:: Copyright (C) 2003, 2006 # Naohisa Goto # License:: Ruby's # # $Id: seq.rb,v 1.1 2006/12/14 19:52:53 ngoto Exp $ # # = About Bio::GCG::Msf # # Please refer document of Bio::GCG::Msf. # module Bio module GCG # # = Bio::GCG::Seq # # This is GCG sequence file format (.seq or .pep) parser class. # # = References # # * Information about GCG Wisconsin Package(R) # http://www.accelrys.com/products/gcg_wisconsin_package . # * EMBOSS sequence formats # http://www.hgmp.mrc.ac.uk/Software/EMBOSS/Themes/SequenceFormats.html # * BioPerl document # http://docs.bioperl.org/releases/bioperl-1.2.3/Bio/SeqIO/gcg.html class Seq #< DB # delimiter used by Bio::FlatFile DELIMITER = RS = nil # Creates new instance of this class. # str must be a GCG seq formatted string. def initialize(str) @heading = str[/.*/] # '!!NA_SEQUENCE 1.0' or like this str = str.sub(/.*/, '') str.sub!(/.*\.\.$/m, '') @definition = $&.to_s.sub(/^.*\.\.$/, '').to_s desc = $&.to_s if m = /(.+)\s+Length\:\s+(\d+)\s+(.+)\s+Type\:\s+(\w)\s+Check\:\s+(\d+)/.match(desc) then @entry_id = m[1].to_s.strip @length = (m[2] ? m[2].to_i : nil) @date = m[3].to_s.strip @seq_type = m[4] @checksum = (m[5] ? m[5].to_i : nil) end @data = str @seq = nil @definition.strip! end # ID field. attr_reader :entry_id # Description field. attr_reader :definition # "Length:" field. # Note that sometimes this might differ from real sequence length. attr_reader :length # Date field of this entry. attr_reader :date # "Type:" field, which indicates sequence type. # "N" means nucleic acid sequence, "P" means protein sequence. attr_reader :seq_type # "Check:" field, which indicates checksum of current sequence. attr_reader :checksum # heading # ('!!NA_SEQUENCE 1.0' or whatever like this) attr_reader :heading #--- ## data (internally used, will be obsoleted) #attr_reader :data #+++ # Sequence data. # The class of the sequence is Bio::Sequence::NA, Bio::Sequence::AA # or Bio::Sequence::Generic, according to the sequence type. def seq unless @seq then case @seq_type when 'N', 'n' k = Bio::Sequence::NA when 'P', 'p' k = Bio::Sequence::AA else k = Bio::Sequence end @seq = k.new(@data.tr('^-a-zA-Z.~', '')) end @seq end # If you know the sequence is AA, use this method. # Returns a Bio::Sequence::AA object. # # If you call naseq for protein sequence, # or aaseq for nucleic sequence, RuntimeError will be raised. def aaseq if seq.is_a?(Bio::Sequence::AA) then @seq else raise 'seq_type != \'P\'' end end # If you know the sequence is NA, use this method. # Returens a Bio::Sequence::NA object. # # If you call naseq for protein sequence, # or aaseq for nucleic sequence, RuntimeError will be raised. def naseq if seq.is_a?(Bio::Sequence::NA) then @seq else raise 'seq_type != \'N\'' end end # Validates checksum. # If validation succeeds, returns true. # Otherwise, returns false. def validate_checksum checksum == self.class.calc_checksum(seq) end #--- # class methods #+++ # Calculates checksum from given string. def self.calc_checksum(str) # Reference: Bio::SeqIO::gcg of BioPerl-1.2.3 idx = 0 sum = 0 str.upcase.tr('^A-Z.~', '').each_byte do |c| idx += 1 sum += idx * c idx = 0 if idx >= 57 end (sum % 10000) end # Creates a new GCG sequence format text. # Parameters can be omitted. # # Examples: # Bio::GCG::Seq.to_gcg(:definition=>'H.sapiens DNA', # :seq_type=>'N', :entry_id=>'gi-1234567', # :seq=>seq, :date=>date) # def self.to_gcg(hash) seq = hash[:seq] if seq.is_a?(Bio::Sequence::NA) then seq_type = 'N' elsif seq.is_a?(Bio::Sequence::AA) then seq_type = 'P' else seq_type = (hash[:seq_type] or 'P') end if seq_type == 'N' then head = '!!NA_SEQUENCE 1.0' else head = '!!AA_SEQUENCE 1.0' end date = (hash[:date] or Time.now.strftime('%B %d, %Y %H:%M')) entry_id = hash[:entry_id].to_s.strip len = seq.length checksum = self.calc_checksum(seq) definition = hash[:definition].to_s.strip seq = seq.upcase.gsub(/.{1,50}/, "\\0\n") seq.gsub!(/.{10}/, "\\0 ") w = len.to_s.size + 1 i = 1 seq.gsub!(/^/) { |x| s = sprintf("\n%*d ", w, i); i += 50; s } [ head, "\n", definition, "\n\n", "#{entry_id} Length: #{len} #{date} " \ "Type: #{seq_type} Check: #{checksum} ..\n", seq, "\n" ].join('') end end #class Seq end #module GCG end #module Bio From ngoto at dev.open-bio.org Thu Dec 14 14:52:56 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io flatfile.rb,1.51,1.52 Message-ID: <200612141952.kBEJquI0015861@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv15819/lib/bio/io Modified Files: flatfile.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. Index: flatfile.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/flatfile.rb,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** flatfile.rb 22 Jun 2006 14:32:47 -0000 1.51 --- flatfile.rb 14 Dec 2006 19:52:53 -0000 1.52 *************** *** 1184,1187 **** --- 1184,1193 ---- /^CLUSTAL .*\(.*\).*sequence +alignment/ ], + gcg_msf = RuleRegexp[ 'Bio::GCG::Msf', + /^!!(N|A)A_MULTIPLE_ALIGNMENT .+/ ], + + gcg_seq = RuleRegexp[ 'Bio::GCG::Seq', + /^!!(N|A)A_SEQUENCE .+/ ], + blastxml = RuleRegexp[ 'Bio::Blast::Report', /\<\!DOCTYPE BlastOutput PUBLIC / ], From ngoto at dev.open-bio.org Thu Dec 14 14:55:12 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:55:12 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/gcg seq.rb,1.1,1.2 Message-ID: <200612141955.kBEJtCuL015910@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/gcg In directory dev.open-bio.org:/tmp/cvs-serv15890/appl/gcg Modified Files: seq.rb Log Message: fixed mistakes in Rdoc Index: seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/gcg/seq.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** seq.rb 14 Dec 2006 19:52:53 -0000 1.1 --- seq.rb 14 Dec 2006 19:55:10 -0000 1.2 *************** *** 8,14 **** # $Id$ # ! # = About Bio::GCG::Msf # ! # Please refer document of Bio::GCG::Msf. # --- 8,14 ---- # $Id$ # ! # = About Bio::GCG::Seq # ! # Please refer document of Bio::GCG::Seq. # From ngoto at dev.open-bio.org Thu Dec 14 17:38:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 22:38:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip alignment.rb,NONE,1.1 Message-ID: <200612142238.kBEMctul016532@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv16512 Added Files: alignment.rb Log Message: Phylip format multiple sequence alignment parser class Bio::Phylip::PhylipFormat is added. --- NEW FILE: alignment.rb --- # # = bio/appl/phylip/alignment.rb - phylip multiple alignment format parser # # Copyright:: Copyright (C) 2006 # GOTO Naohisa # # License:: Ruby's # # $Id: alignment.rb,v 1.1 2006/12/14 22:38:53 ngoto Exp $ # # = About Bio::Phylip::PhylipFormat # # Please refer document of Bio::Phylip::PhylipFormat class. # module Bio module Phylip # This is phylip multiple alignment format parser. # The two formats, interleaved and non-interleaved, are # automatically determined. # class PhylipFormat # create a new object from a string def initialize(str) @data = str.strip.split(/(?:\r\n|\r|\n)/) @first_line = @data.shift @number_of_sequences, @alignment_length = @first_line.to_s.strip.split(/\s+/).collect { |x| x.to_i } end # number of sequences attr_reader :number_of_sequences # alignment length attr_reader :alignment_length # If the alignment format is "interleaved", returns true. # If not, returns false. # It would mistake to determine if the alignment is very short. def interleaved? unless defined? @interleaved_flag then if /\A +/ =~ @data[1].to_s then @interleaved_flag = false else @interleaved_flag = true end end @interleaved_flag end # Gets the alignment. Returns a Bio::Alignment object. def alignment unless defined? @alignment then do_parse a = Bio::Alignment.new (0... at number_of_sequences).each do |i| a.add_seq(@sequences[i], @sequence_names[i]) end @alignment = a end @alignment end private def do_parse if interleaved? then do_parse_interleaved else do_parse_noninterleaved end end def do_parse_interleaved first_block = @data[0, @number_of_sequences] @data[0, @number_of_sequences] = '' @sequence_names = Array.new(@number_of_sequences) { '' } @sequences = Array.new(@number_of_sequences) do ' ' * @alignment_length end first_block.each_with_index do |x, i| n, s = x.split(/ +/, 2) @sequence_names[i] = n @sequences[i].replace(s.gsub(/\s+/, '')) end i = 0 @data.each do |x| if x.strip.length <= 0 then i = 0 else @sequences[i] << x.gsub(/\s+/, '') i = (i + 1) % @number_of_sequences end end @data.clear true end def do_parse_noninterleaved @sequence_names = Array.new(@number_of_sequences) { '' } @sequences = Array.new(@number_of_sequences) do ' ' * @alignment_length end curseq = nil i = 0 @data.each do |x| next if x.strip.length <= 0 if !curseq or curseq.length > @alignment_length or /^\s/ !~ x then p i n, s = x.strip.split(/ +/, 2) @sequence_names[i] = n curseq = @sequences[i] curseq.replace(s.gsub(/\s+/, '')) i += 1 else curseq << x.gsub(/\s+/, '') end end @data.clear true end end #class PhylipFormat end #module Phylip end #module Bio From nakao at dev.open-bio.org Fri Dec 15 01:29:04 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Fri, 15 Dec 2006 06:29:04 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.73,1.74 Message-ID: <200612150629.kBF6T4Fm017361@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv17341/lib Modified Files: bio.rb Log Message: * Added autoload for Bio::Iprscan. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** bio.rb 14 Dec 2006 19:52:53 -0000 1.73 --- bio.rb 15 Dec 2006 06:29:01 -0000 1.74 *************** *** 236,239 **** --- 236,241 ---- end + autoload :Iprscan, 'bio/appl/iprscan/report' + ### Utilities From k at dev.open-bio.org Fri Dec 15 09:24:44 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Fri, 15 Dec 2006 14:24:44 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io sql.rb,1.5,1.6 Message-ID: <200612151424.kBFEOifa019643@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv19598 Modified Files: sql.rb Log Message: * a patch contributed from Raoul Pierre Bonnai Jean (RJP) which is improved to catch up with the recent BioSQL schema. Index: sql.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/sql.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sql.rb 19 Sep 2006 05:49:19 -0000 1.5 --- sql.rb 15 Dec 2006 14:24:42 -0000 1.6 *************** *** 3,6 **** --- 3,7 ---- # # Copyright:: Copyright (C) 2002 Toshiaki Katayama + # Copyright:: Copyright (C) 2006 Raoul Pierre Bonnal Jean # License:: Ruby's # *************** *** 69,74 **** return unless row ! mol = row['molecule'] ! seq = row['biosequence_str'] case mol --- 70,75 ---- return unless row ! mol = row['alphabet'] ! seq = row['seq'] case mol *************** *** 83,92 **** def subseq(from, to) length = to - from + 1 ! query = "select molecule, substring(biosequence_str, ?, ?) as subseq" + " from biosequence where bioentry_id = ?" row = @dbh.execute(query, from, length, @bioentry_id).fetch return unless row ! mol = row['molecule'] seq = row['subseq'] --- 84,93 ---- def subseq(from, to) length = to - from + 1 ! query = "select alphabet, substring(seq, ?, ?) as subseq" + " from biosequence where bioentry_id = ?" row = @dbh.execute(query, from, length, @bioentry_id).fetch return unless row ! mol = row['alphabet'] seq = row['subseq'] *************** *** 108,114 **** f_id = row['seqfeature_id'] ! k_id = row['seqfeature_key_id'] ! s_id = row['seqfeature_source_id'] ! rank = row['seqfeature_rank'].to_i - 1 # key : type (gene, CDS, ...) --- 109,115 ---- f_id = row['seqfeature_id'] ! k_id = row['type_term_id'] ! s_id = row['source_term_id'] ! rank = row['rank'].to_i - 1 # key : type (gene, CDS, ...) *************** *** 143,156 **** hash = { ! 'start' => row['reference_start'], ! 'end' => row['reference_end'], ! 'journal' => row['reference_location'], ! 'title' => row['reference_title'], ! 'authors' => row['reference_authors'], ! 'medline' => row['reference_medline'] } hash.default = '' ! rank = row['reference_rank'].to_i - 1 array[rank] = hash end --- 144,157 ---- hash = { ! 'start' => row['start_pos'], ! 'end' => row['end_pos'], ! 'journal' => row['location'], ! 'title' => row['title'], ! 'authors' => row['authors'], ! 'medline' => row['crc'] } hash.default = '' ! rank = row['rank'].to_i - 1 array[rank] = hash end *************** *** 172,176 **** @dbh.execute(query, @bioentry_id).fetch_all.each do |row| next unless row ! rank = row['comment_rank'].to_i - 1 array[rank] = row['comment_text'] end --- 173,177 ---- @dbh.execute(query, @bioentry_id).fetch_all.each do |row| next unless row ! rank = row['rank'].to_i - 1 array[rank] = row['comment_text'] end *************** *** 211,222 **** def taxonomy query = <<-END ! select full_lineage, common_name, ncbi_taxa_id ! from bioentry_taxa, taxa ! where bioentry_id = ? and bioentry_taxa.taxa_id = taxa.taxa_id END row = @dbh.execute(query, @bioentry_id).fetch ! @lineage = row ? row['full_lineage'] : '' ! @common_name = row ? row['common_name'] : '' ! @ncbi_taxa_id = row ? row['ncbi_taxa_id'] : '' row ? [@lineage, @common_name, @ncbi_taxa_id] : [] end --- 212,223 ---- def taxonomy query = <<-END ! select taxon_name.name, taxon.ncbi_taxon_id from bioentry ! join taxon_name using(taxon_id) join taxon using (taxon_id) ! where bioentry_id = ? END row = @dbh.execute(query, @bioentry_id).fetch ! # @lineage = row ? row['full_lineage'] : '' ! @common_name = row ? row['name'] : '' ! @ncbi_taxa_id = row ? row['ncbi_taxon_id'] : '' row ? [@lineage, @common_name, @ncbi_taxa_id] : [] end *************** *** 241,267 **** def feature_key(k_id) ! query = "select * from seqfeature_key where seqfeature_key_id = ?" row = @dbh.execute(query, k_id).fetch ! row ? row['key_name'] : '' end def feature_source(s_id) ! query = "select * from seqfeature_source where seqfeature_source_id = ?" row = @dbh.execute(query, s_id).fetch ! row ? row['source_name'] : '' end def feature_locations(f_id) locations = [] ! query = "select * from seqfeature_location where seqfeature_id = ?" @dbh.execute(query, f_id).fetch_all.each do |row| next unless row location = Bio::Location.new ! location.strand = row['seq_strand'] ! location.from = row['seq_start'] ! location.to = row['seq_end'] ! xref = feature_locations_remote(row['seqfeature_location_id']) location.xref_id = xref.shift unless xref.empty? --- 242,268 ---- def feature_key(k_id) ! query = "select * from term where term_id= ?" row = @dbh.execute(query, k_id).fetch ! row ? row['name'] : '' end def feature_source(s_id) ! query = "select * from term where term_id = ?" row = @dbh.execute(query, s_id).fetch ! row ? row['name'] : '' end def feature_locations(f_id) locations = [] ! query = "select * from location where seqfeature_id = ?" @dbh.execute(query, f_id).fetch_all.each do |row| next unless row location = Bio::Location.new ! location.strand = row['strand'] ! location.from = row['start_pos'] ! location.to = row['end_pos'] ! xref = feature_locations_remote(row['dbxref_if']) location.xref_id = xref.shift unless xref.empty? *************** *** 269,273 **** #feature_locations_qv(row['seqfeature_location_id']) ! rank = row['location_rank'].to_i - 1 locations[rank] = location end --- 270,274 ---- #feature_locations_qv(row['seqfeature_location_id']) ! rank = row['rank'].to_i - 1 locations[rank] = location end *************** *** 276,280 **** def feature_locations_remote(l_id) ! query = "select * from remote_seqfeature_name where seqfeature_location_id = ?" row = @dbh.execute(query, l_id).fetch row ? [row['accession'], row['version']] : [] --- 277,281 ---- def feature_locations_remote(l_id) ! query = "select * from dbxref where dbxref_id = ?" row = @dbh.execute(query, l_id).fetch row ? [row['accession'], row['version']] : [] *************** *** 282,288 **** def feature_locations_qv(l_id) ! query = "select * from location_qualifier_value where seqfeature_location_id = ?" row = @dbh.execute(query, l_id).fetch ! row ? [row['qualifier_value'], row['slot_value']] : [] end --- 283,289 ---- def feature_locations_qv(l_id) ! query = "select * from location_qualifier_value where location_id = ?" row = @dbh.execute(query, l_id).fetch ! row ? [row['value'], row['int_value']] : [] end *************** *** 293,301 **** next unless row ! key = feature_qualifiers_key(row['seqfeature_qualifier_id']) ! value = row['qualifier_value'] qualifier = Bio::Feature::Qualifier.new(key, value) ! rank = row['seqfeature_qualifier_rank'].to_i - 1 qualifiers[rank] = qualifier end --- 294,302 ---- next unless row ! key = feature_qualifiers_key(row['seqfeature_id']) ! value = row['value'] qualifier = Bio::Feature::Qualifier.new(key, value) ! rank = row['rank'].to_i - 1 qualifiers[rank] = qualifier end *************** *** 304,310 **** def feature_qualifiers_key(q_id) ! query = "select * from seqfeature_qualifier where seqfeature_qualifier_id = ?" row = @dbh.execute(query, q_id).fetch ! row ? row['qualifier_name'] : '' end end --- 305,314 ---- def feature_qualifiers_key(q_id) ! query = <<-END ! select * from seqfeature_qualifier_value ! join term using(term_id) where seqfeature_id = ? ! END row = @dbh.execute(query, q_id).fetch ! row ? row['name'] : '' end end From ngoto at dev.open-bio.org Fri Dec 15 09:36:16 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 14:36:16 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip distance_matrix.rb, NONE, 1.1 Message-ID: <200612151436.kBFEaGGP019713@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv19693/lib/bio/appl/phylip Added Files: distance_matrix.rb Log Message: New class Bio::Phylip::DistanceMatrix, parser of phylip distance matrix (generated by dnadist/protdist/restdist). --- NEW FILE: distance_matrix.rb --- # # = bio/appl/phylip/distance_matrix.rb - phylip distance matrix parser # # Copyright:: Copyright (C) 2006 # GOTO Naohisa # # License:: Ruby's # # $Id: distance_matrix.rb,v 1.1 2006/12/15 14:36:14 ngoto Exp $ # # = About Bio::Phylip::DistanceMatrix # # Please refer document of Bio::Phylip::DistanceMatrix class. # require 'matrix' module Bio module Phylip # This is a parser class for phylip distance matrix data # created by dnadist, protdist, or restdist commands. # class DistanceMatrix # creates a new distance matrix object def initialize(str) data = str.strip.split(/(?:\r\n|\r|\n)/) @otus = data.shift.to_s.strip.to_i prev = nil data.collect! do |x| if /\A +/ =~ x and prev then prev.concat x.strip.split(/\s+/) nil else prev = x.strip.split(/\s+/) prev end end data.compact! if data.size != @otus then raise "inconsistent data (OTUs=#{@otus} but #{data.size} rows)" end @otu_names = data.collect { |x| x.shift } mat = data.collect do |x| if x.size != @otus then raise "inconsistent data (OTUs=#{@otus} but #{x.size} columns)" end x.collect { |y| y.to_f } end @matrix = Matrix.rows(mat, false) @original_matrix = Matrix.rows(data, false) end # distance matrix (returns Ruby's Matrix object) attr_reader :matrix # matrix contains values as original strings. # Use it when you doubt precision of floating-point numbers. attr_reader :original_matrix # number of OTUs attr_reader :otus # names of OTUs attr_reader :otu_names # Generates a new phylip distance matrix formatted text as a string. def self.generate(matrix, otu_names = nil) if matrix.row_size != matrix.column_size then raise "must be a square matrix" end otus = matrix.row_size data = (0...otus).collect do |i| name = ((otu_names and otu_names[i]) or "OTU#{i.to_s}") x = (0...otus).collect { |j| sprintf("%9.6f", matrix[i, j]) } x.unshift(sprintf("%-10s", name)[0, 10]) str = x[0, 7].join(' ') + "\n" 7.step(otus + 1, 7) do |k| str << ' ' + x[k, 7].join(' ') + "\n" end str end sprintf("%5d\n", otus) + data.join('') end end #class DistanceMatrix end #module Phylip end #module Bio From ngoto at dev.open-bio.org Fri Dec 15 09:59:28 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 14:59:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip distance_matrix.rb, 1.1, 1.2 Message-ID: <200612151459.kBFExS52019864@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv19837/lib/bio/appl/phylip Modified Files: distance_matrix.rb Log Message: Bio::Tree#output_phylip_distance_matrix(...) and Bio::Tree#output(:phylip_distance_matrix, ...) are added to output phylip-style distance matrix as a string. Index: distance_matrix.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/phylip/distance_matrix.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** distance_matrix.rb 15 Dec 2006 14:36:14 -0000 1.1 --- distance_matrix.rb 15 Dec 2006 14:59:26 -0000 1.2 *************** *** 67,79 **** # Generates a new phylip distance matrix formatted text as a string. ! def self.generate(matrix, otu_names = nil) if matrix.row_size != matrix.column_size then raise "must be a square matrix" end otus = matrix.row_size ! data = (0...otus).collect do |i| name = ((otu_names and otu_names[i]) or "OTU#{i.to_s}") x = (0...otus).collect { |j| sprintf("%9.6f", matrix[i, j]) } ! x.unshift(sprintf("%-10s", name)[0, 10]) str = x[0, 7].join(' ') + "\n" --- 67,82 ---- # Generates a new phylip distance matrix formatted text as a string. ! def self.generate(matrix, otu_names = nil, options = {}) if matrix.row_size != matrix.column_size then raise "must be a square matrix" end otus = matrix.row_size ! names = (0...otus).collect do |i| name = ((otu_names and otu_names[i]) or "OTU#{i.to_s}") + name + end + data = (0...otus).collect do |i| x = (0...otus).collect { |j| sprintf("%9.6f", matrix[i, j]) } ! x.unshift(sprintf("%-10s", names[i])[0, 10]) str = x[0, 7].join(' ') + "\n" From ngoto at dev.open-bio.org Fri Dec 15 09:59:28 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 14:59:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.5,1.6 Message-ID: <200612151459.kBFExSDP019859@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv19837/lib/bio/db Modified Files: newick.rb Log Message: Bio::Tree#output_phylip_distance_matrix(...) and Bio::Tree#output(:phylip_distance_matrix, ...) are added to output phylip-style distance matrix as a string. Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** newick.rb 13 Dec 2006 17:29:17 -0000 1.5 --- newick.rb 15 Dec 2006 14:59:25 -0000 1.6 *************** *** 206,209 **** --- 206,211 ---- when :nhx output_nhx(*arg, &block) + when :phylip_distance_matrix + output_phylip_distance_matrix(*arg, &block) else raise 'Unknown format' *************** *** 211,214 **** --- 213,235 ---- end + #--- + # This method isn't suitable to written in this file? + #+++ + + # Generates phylip-style distance matrix as a string. + # if nodes is not given, all leaves in the tree are used. + # If the names of some of the given (or default) nodes + # are not defined or are empty, the names are automatically generated. + def output_phylip_distance_matrix(nodes = nil, options = {}) + nodes = self.leaves unless nodes + names = nodes.collect do |x| + y = get_node_name(x) + y = sprintf("%x", x.__id__.abs) if y.empty? + y + end + m = self.distance_matrix(nodes) + Bio::Phylip::DistanceMatrix.generate(m, names, options) + end + end #class Tree From ngoto at dev.open-bio.org Fri Dec 15 10:02:29 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 15:02:29 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.74,1.75 Message-ID: <200612151502.kBFF2Txu019936@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv19916/lib Modified Files: bio.rb Log Message: autoload of Bio::Phylip::PhylipFormat and Bio::Phylip::DistanceMatrix are added. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** bio.rb 15 Dec 2006 06:29:01 -0000 1.74 --- bio.rb 15 Dec 2006 15:02:27 -0000 1.75 *************** *** 236,239 **** --- 236,244 ---- end + module Phylip + autoload :PhylipFormat, 'bio/appl/phylip/alignment' + autoload :DistanceMatrix, 'bio/appl/phylip/distance_matrix' + end + autoload :Iprscan, 'bio/appl/iprscan/report' From ngoto at dev.open-bio.org Fri Dec 15 11:23:20 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 16:23:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/mafft report.rb,1.10,1.11 Message-ID: <200612151623.kBFGNKi5020171@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/mafft In directory dev.open-bio.org:/tmp/cvs-serv20151/lib/bio/appl/mafft Modified Files: report.rb Log Message: INCOMAPTIBLE CHANGE: Bio::MAFFT::Report#initialize now gets string of multi-fasta formmatted text instead of Array. Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft/report.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** report.rb 14 Dec 2006 15:22:05 -0000 1.10 --- report.rb 15 Dec 2006 16:23:18 -0000 1.11 *************** *** 23,26 **** --- 23,27 ---- # + require 'stringio' require 'bio/db/fasta' require 'bio/io/flatfile' *************** *** 39,48 **** # Creates a new Report object. ! # +ary+ should be an Array of Bio::FastaFormat. # +seqclass+ should on of following: # Class: Bio::Sequence::AA, Bio::Sequence::NA, ... # String: 'PROTEIN', 'DNA', ... ! def initialize(ary, seqclass = nil) ! @data = ary @align = nil case seqclass --- 40,58 ---- # Creates a new Report object. ! # +str+ should be multi-fasta formatted text as a string. # +seqclass+ should on of following: # Class: Bio::Sequence::AA, Bio::Sequence::NA, ... # String: 'PROTEIN', 'DNA', ... ! # ! # Compatibility Note: the old usage (to get array of Bio::FastaFormat ! # objects) is deprecated. ! def initialize(str, seqclass = nil) ! if str.is_a?(Array) then ! warn "Array of Bio::FastaFormat objects will be no longer accepted." ! @data = str ! else ! ff = Bio::FlatFile.new(Bio::FastaFormat, StringIO.new(str)) ! @data = ff.to_a ! end @align = nil case seqclass From k at dev.open-bio.org Fri Dec 15 11:53:22 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Fri, 15 Dec 2006 16:53:22 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io sql.rb,1.6,1.7 Message-ID: <200612151653.kBFGrMJp020261@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv20257/io Modified Files: sql.rb Log Message: * fixed author's name, sorry. Index: sql.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/sql.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sql.rb 15 Dec 2006 14:24:42 -0000 1.6 --- sql.rb 15 Dec 2006 16:53:20 -0000 1.7 *************** *** 3,7 **** # # Copyright:: Copyright (C) 2002 Toshiaki Katayama ! # Copyright:: Copyright (C) 2006 Raoul Pierre Bonnal Jean # License:: Ruby's # --- 3,7 ---- # # Copyright:: Copyright (C) 2002 Toshiaki Katayama ! # Copyright:: Copyright (C) 2006 Raoul Jean Pierre Bonnal # License:: Ruby's # From ngoto at dev.open-bio.org Fri Dec 15 11:54:27 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 16:54:27 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io flatfile.rb,1.52,1.53 Message-ID: <200612151654.kBFGsRBx020289@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv20269/lib/bio/io Modified Files: flatfile.rb Log Message: Added file format autodetection support for T-COFFEE clustal format. Index: flatfile.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/flatfile.rb,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** flatfile.rb 14 Dec 2006 19:52:53 -0000 1.52 --- flatfile.rb 15 Dec 2006 16:54:25 -0000 1.53 *************** *** 1181,1186 **** /^RESIDUE +.+ +\d+\s*$/ ], ! clustal = RuleRegexp[ 'Bio::ClustalW::Report', ! /^CLUSTAL .*\(.*\).*sequence +alignment/ ], gcg_msf = RuleRegexp[ 'Bio::GCG::Msf', --- 1181,1187 ---- /^RESIDUE +.+ +\d+\s*$/ ], ! clustal = RuleRegexp2[ 'Bio::ClustalW::Report', ! /^CLUSTAL .*\(.*\).*sequence +alignment/, ! /^CLUSTAL FORMAT for T-COFFEE/ ], gcg_msf = RuleRegexp[ 'Bio::GCG::Msf', From ngoto at dev.open-bio.org Fri Dec 15 13:32:02 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 18:32:02 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.3,1.4 Message-ID: <200612151832.kBFIW2Wp020742@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv20722/lib/bio Modified Files: tree.rb Log Message: Added Bio::Tree::total_distance to calculate total distance (total length) of the current tree. Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tree.rb 13 Dec 2006 16:29:37 -0000 1.3 --- tree.rb 15 Dec 2006 18:32:00 -0000 1.4 *************** *** 694,697 **** --- 694,706 ---- end + # Returns total distance of all edges. + # It would raise error if some edges didn't contain distance values. + def total_distance + distance = 0 + self.each_edge do |source, target, edge| + distance += get_edge_distance(edge) + end + distance + end # Calculates distance matrix of given nodes. From ngoto at dev.open-bio.org Fri Dec 15 13:43:12 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 18:43:12 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.4,1.5 Message-ID: <200612151843.kBFIhC6H020832@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv20812/lib/bio Modified Files: tree.rb Log Message: added Bio::Tree#find_node_by_name to get node by name. Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tree.rb 15 Dec 2006 18:32:00 -0000 1.4 --- tree.rb 15 Dec 2006 18:43:10 -0000 1.5 *************** *** 372,375 **** --- 372,388 ---- end + # Finds a node in the tree by given name and returns the node. + # If the node does not found, returns nil. + # If multiple nodes with the same name exist, + # the result would be one of those (unspecified). + def find_node_by_name(str) + self.each_node do |node| + if get_node_name(node) == str + return node + end + end + nil + end + # Adds a node to the tree. # Returns self. From ngoto at dev.open-bio.org Fri Dec 15 13:45:19 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 18:45:19 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.5,1.6 Message-ID: <200612151845.kBFIjJVZ020881@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv20861/lib/bio Modified Files: tree.rb Log Message: find_node_by_name is renamed to get_node_by_name Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tree.rb 15 Dec 2006 18:43:10 -0000 1.5 --- tree.rb 15 Dec 2006 18:45:17 -0000 1.6 *************** *** 376,380 **** # If multiple nodes with the same name exist, # the result would be one of those (unspecified). ! def find_node_by_name(str) self.each_node do |node| if get_node_name(node) == str --- 376,380 ---- # If multiple nodes with the same name exist, # the result would be one of those (unspecified). ! def get_node_by_name(str) self.each_node do |node| if get_node_name(node) == str From k at dev.open-bio.org Sat Dec 23 21:39:46 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:39:46 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails Rakefile,1.1,NONE Message-ID: <200612240239.kBO2dkuE007571@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails In directory dev.open-bio.org:/tmp/cvs-serv7567 Removed Files: Rakefile Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- Rakefile DELETED --- From k at dev.open-bio.org Sat Dec 23 21:40:28 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/test test_helper.rb, 1.1, NONE Message-ID: <200612240240.kBO2eSi7007595@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/test In directory dev.open-bio.org:/tmp/cvs-serv7591/test Removed Files: test_helper.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- test_helper.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:40:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script server,1.1,NONE Message-ID: <200612240240.kBO2edfk007619@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7615/script Removed Files: server Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- server DELETED --- From k at dev.open-bio.org Sat Dec 23 21:40:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script runner,1.1,NONE Message-ID: <200612240240.kBO2emLY007643@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7639/script Removed Files: runner Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- runner DELETED --- From k at dev.open-bio.org Sat Dec 23 21:40:56 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/process spinner, 1.1, NONE Message-ID: <200612240240.kBO2eumJ007667@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/process In directory dev.open-bio.org:/tmp/cvs-serv7663/script/process Removed Files: spinner Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- spinner DELETED --- From k at dev.open-bio.org Sat Dec 23 21:41:07 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/process spawner, 1.1, NONE Message-ID: <200612240241.kBO2f7bw007691@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/process In directory dev.open-bio.org:/tmp/cvs-serv7687/script/process Removed Files: spawner Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- spawner DELETED --- From k at dev.open-bio.org Sat Dec 23 21:41:15 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:15 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/process reaper, 1.1, NONE Message-ID: <200612240241.kBO2fFCi007715@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/process In directory dev.open-bio.org:/tmp/cvs-serv7711/script/process Removed Files: reaper Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- reaper DELETED --- From k at dev.open-bio.org Sat Dec 23 21:41:24 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:24 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script plugin,1.1,NONE Message-ID: <200612240241.kBO2fOYG007739@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7735/script Removed Files: plugin Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- plugin DELETED --- From k at dev.open-bio.org Sat Dec 23 21:41:33 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/performance profiler, 1.1, NONE Message-ID: <200612240241.kBO2fX2Y007763@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/performance In directory dev.open-bio.org:/tmp/cvs-serv7759/script/performance Removed Files: profiler Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- profiler DELETED --- From k at dev.open-bio.org Sat Dec 23 21:41:42 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:42 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/performance benchmarker, 1.1, NONE Message-ID: <200612240241.kBO2fg0G007787@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/performance In directory dev.open-bio.org:/tmp/cvs-serv7783/script/performance Removed Files: benchmarker Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- benchmarker DELETED --- From k at dev.open-bio.org Sat Dec 23 21:41:51 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script generate, 1.1, NONE Message-ID: <200612240241.kBO2fp7v007811@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7807/script Removed Files: generate Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- generate DELETED --- From k at dev.open-bio.org Sat Dec 23 21:41:59 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:59 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script destroy,1.1,NONE Message-ID: <200612240241.kBO2fxFO007835@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7831/script Removed Files: destroy Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- destroy DELETED --- From k at dev.open-bio.org Sat Dec 23 21:42:09 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:42:09 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script console,1.1,NONE Message-ID: <200612240242.kBO2g9Qq007859@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7855/script Removed Files: console Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- console DELETED --- From k at dev.open-bio.org Sat Dec 23 21:42:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:42:21 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script breakpointer, 1.1, NONE Message-ID: <200612240242.kBO2gLNH007883@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7879/script Removed Files: breakpointer Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- breakpointer DELETED --- From k at dev.open-bio.org Sat Dec 23 21:42:32 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:42:32 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script about,1.1,NONE Message-ID: <200612240242.kBO2gWDE007907@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7903/script Removed Files: about Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- about DELETED --- From k at dev.open-bio.org Sat Dec 23 21:44:20 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/stylesheets main.css, 1.1, NONE Message-ID: <200612240244.kBO2iKKQ007937@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/stylesheets In directory dev.open-bio.org:/tmp/cvs-serv7933/public/stylesheets Removed Files: main.css Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- main.css DELETED --- From k at dev.open-bio.org Sat Dec 23 21:44:28 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public robots.txt, 1.1, NONE Message-ID: <200612240244.kBO2iSQc007961@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv7957/public Removed Files: robots.txt Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- robots.txt DELETED --- From k at dev.open-bio.org Sat Dec 23 21:44:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts prototype.js, 1.1, NONE Message-ID: <200612240244.kBO2ideA007985@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv7981/public/javascripts Removed Files: prototype.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- prototype.js DELETED --- From k at dev.open-bio.org Sat Dec 23 21:44:49 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:49 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts effects.js, 1.1, NONE Message-ID: <200612240244.kBO2inXG008009@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv8005/public/javascripts Removed Files: effects.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- effects.js DELETED --- From k at dev.open-bio.org Sat Dec 23 21:44:58 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:58 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts dragdrop.js, 1.1, NONE Message-ID: <200612240244.kBO2iw7M008033@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv8029/public/javascripts Removed Files: dragdrop.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dragdrop.js DELETED --- From k at dev.open-bio.org Sat Dec 23 21:45:08 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:45:08 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts controls.js, 1.1, NONE Message-ID: <200612240245.kBO2j8GH008057@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv8053/public/javascripts Removed Files: controls.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- controls.js DELETED --- From k at dev.open-bio.org Sat Dec 23 21:45:23 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:45:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public index.html, 1.1, NONE Message-ID: <200612240245.kBO2jNvr008081@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8077/public Removed Files: index.html Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- index.html DELETED --- From k at dev.open-bio.org Sat Dec 23 21:45:33 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:45:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/images rails.png, 1.1, NONE Message-ID: <200612240245.kBO2jXV9008105@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/images In directory dev.open-bio.org:/tmp/cvs-serv8101/public/images Removed Files: rails.png Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- rails.png DELETED --- From k at dev.open-bio.org Sat Dec 23 21:48:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:48:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/images icon.png, 1.1, NONE Message-ID: <200612240248.kBO2mm5q008129@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/images In directory dev.open-bio.org:/tmp/cvs-serv8125/public/images Removed Files: icon.png Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- icon.png DELETED --- From k at dev.open-bio.org Sat Dec 23 21:48:57 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:48:57 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public favicon.ico, 1.1, NONE Message-ID: <200612240248.kBO2mvuw008153@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8149/public Removed Files: favicon.ico Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- favicon.ico DELETED --- From k at dev.open-bio.org Sat Dec 23 21:49:13 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:13 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public dispatch.rb, 1.1, NONE Message-ID: <200612240249.kBO2nD9B008177@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8173/public Removed Files: dispatch.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dispatch.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:49:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:21 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public dispatch.fcgi, 1.1, NONE Message-ID: <200612240249.kBO2nL71008201@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8197/public Removed Files: dispatch.fcgi Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dispatch.fcgi DELETED --- From k at dev.open-bio.org Sat Dec 23 21:49:30 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public dispatch.cgi, 1.1, NONE Message-ID: <200612240249.kBO2nUPR008225@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8221/public Removed Files: dispatch.cgi Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dispatch.cgi DELETED --- From k at dev.open-bio.org Sat Dec 23 21:49:38 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:38 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public 500.html, 1.1, NONE Message-ID: <200612240249.kBO2ncEJ008249@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8245/public Removed Files: 500.html Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- 500.html DELETED --- From k at dev.open-bio.org Sat Dec 23 21:49:49 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:49 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public 404.html, 1.1, NONE Message-ID: <200612240249.kBO2nnGS008273@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8269/public Removed Files: 404.html Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- 404.html DELETED --- From k at dev.open-bio.org Sat Dec 23 21:50:12 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:50:12 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public .htaccess, 1.1, NONE Message-ID: <200612240250.kBO2oCsq008297@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8293/public Removed Files: .htaccess Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- .htaccess DELETED --- From k at dev.open-bio.org Sat Dec 23 21:50:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:50:21 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/doc README_FOR_APP, 1.1, NONE Message-ID: <200612240250.kBO2oLAX008321@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/doc In directory dev.open-bio.org:/tmp/cvs-serv8317/doc Removed Files: README_FOR_APP Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- README_FOR_APP DELETED --- From k at dev.open-bio.org Sat Dec 23 21:50:29 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:50:29 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config routes.rb, 1.1, NONE Message-ID: <200612240250.kBO2oT0Z008345@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8341/config Removed Files: routes.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- routes.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:51:15 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:51:15 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config/environments test.rb, 1.1, NONE Message-ID: <200612240251.kBO2pFMU008369@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config/environments In directory dev.open-bio.org:/tmp/cvs-serv8365/config/environments Removed Files: test.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- test.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:51:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:51:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config/environments production.rb, 1.1, NONE Message-ID: <200612240251.kBO2pmI0008393@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config/environments In directory dev.open-bio.org:/tmp/cvs-serv8389/config/environments Removed Files: production.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- production.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:51:59 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:51:59 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config/environments development.rb, 1.1, NONE Message-ID: <200612240251.kBO2pxYk008417@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config/environments In directory dev.open-bio.org:/tmp/cvs-serv8413/config/environments Removed Files: development.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- development.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:52:23 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:52:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config environment.rb, 1.1, NONE Message-ID: <200612240252.kBO2qNkK008441@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8437/config Removed Files: environment.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- environment.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:53:07 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config database.yml, 1.1, NONE Message-ID: <200612240253.kBO2r7Ui008465@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8461/config Removed Files: database.yml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- database.yml DELETED --- From k at dev.open-bio.org Sat Dec 23 21:53:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config boot.rb,1.1,NONE Message-ID: <200612240253.kBO2rH92008489@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8485/config Removed Files: boot.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- boot.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:53:26 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:26 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/shell show.rhtml, 1.1, NONE Message-ID: <200612240253.kBO2rQYl008513@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/shell In directory dev.open-bio.org:/tmp/cvs-serv8509/app/views/shell Removed Files: show.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- show.rhtml DELETED --- From k at dev.open-bio.org Sat Dec 23 21:53:56 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/shell index.rhtml, 1.1, NONE Message-ID: <200612240253.kBO2ruGr008537@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/shell In directory dev.open-bio.org:/tmp/cvs-serv8533/app/views/shell Removed Files: index.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- index.rhtml DELETED --- From k at dev.open-bio.org Sat Dec 23 21:54:05 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:05 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/shell history.rhtml, 1.1, NONE Message-ID: <200612240254.kBO2s52p008561@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/shell In directory dev.open-bio.org:/tmp/cvs-serv8557/app/views/shell Removed Files: history.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- history.rhtml DELETED --- From k at dev.open-bio.org Sat Dec 23 21:54:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/layouts shell.rhtml, 1.1, NONE Message-ID: <200612240254.kBO2sHa3008585@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/layouts In directory dev.open-bio.org:/tmp/cvs-serv8581/app/views/layouts Removed Files: shell.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- shell.rhtml DELETED --- From k at dev.open-bio.org Sat Dec 23 21:54:30 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/models shell_connection.rb, 1.1, NONE Message-ID: <200612240254.kBO2sUhj008609@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/models In directory dev.open-bio.org:/tmp/cvs-serv8605/app/models Removed Files: shell_connection.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- shell_connection.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:54:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/helpers application_helper.rb, 1.1, NONE Message-ID: <200612240254.kBO2sdQ8008633@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/helpers In directory dev.open-bio.org:/tmp/cvs-serv8629/app/helpers Removed Files: application_helper.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- application_helper.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:54:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/controllers shell_controller.rb, 1.1, NONE Message-ID: <200612240254.kBO2smnH008657@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/controllers In directory dev.open-bio.org:/tmp/cvs-serv8653/app/controllers Removed Files: shell_controller.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- shell_controller.rb DELETED --- From k at dev.open-bio.org Sat Dec 23 21:54:58 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:58 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/controllers application.rb, 1.1, NONE Message-ID: <200612240254.kBO2sw4C008681@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/controllers In directory dev.open-bio.org:/tmp/cvs-serv8677/app/controllers Removed Files: application.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- application.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 01:18:52 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 06:18:52 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators - New directory Message-ID: <200612240618.kBO6Iqcc009086@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators In directory dev.open-bio.org:/tmp/cvs-serv9082/generators Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators added to the repository From k at dev.open-bio.org Sun Dec 24 01:19:19 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 06:19:19 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby - New directory Message-ID: <200612240619.kBO6JJFK009111@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby In directory dev.open-bio.org:/tmp/cvs-serv9107/bioruby Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby added to the repository From k at dev.open-bio.org Sun Dec 24 01:19:55 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 06:19:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates - New directory Message-ID: <200612240619.kBO6JtNK009135@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates In directory dev.open-bio.org:/tmp/cvs-serv9131/templates Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates added to the repository From k at dev.open-bio.org Sun Dec 24 03:27:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:27:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby bioruby_generator.rb, NONE, 1.1 Message-ID: <200612240827.kBO8RHk0009285@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby In directory dev.open-bio.org:/tmp/cvs-serv9279 Added Files: bioruby_generator.rb Log Message: * Rails generator for BioRuby shell on Rails --- NEW FILE: bioruby_generator.rb --- class BiorubyGenerator < Rails::Generator::Base def manifest record do |m| m.directory 'app/controllers' m.directory 'app/helpers' m.directory 'app/views/bioruby' m.directory 'app/views/layouts' m.directory 'public/images' m.directory 'public/stylesheets' m.file 'bioruby_controller.rb', 'app/controllers/bioruby_controller.rb' m.file 'bioruby_helper.rb', 'app/helpers/bioruby_helper.rb' m.file '_methods.rhtml', 'app/views/bioruby/_methods.rhtml' m.file '_classes.rhtml', 'app/views/bioruby/_classes.rhtml' m.file '_modules.rhtml', 'app/views/bioruby/_modules.rhtml' m.file '_result.rhtml', 'app/views/bioruby/_result.rhtml' m.file '_variables.rhtml', 'app/views/bioruby/_variables.rhtml' m.file 'commands.rhtml', 'app/views/bioruby/commands.rhtml' m.file 'history.rhtml', 'app/views/bioruby/history.rhtml' m.file 'index.rhtml', 'app/views/bioruby/index.rhtml' m.file 'bioruby.rhtml', 'app/views/layouts/bioruby.rhtml' m.file 'bioruby.png', 'public/images/bioruby.png' m.file 'bioruby.css', 'public/stylesheets/bioruby.css' end end end From k at dev.open-bio.org Sun Dec 24 03:27:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:27:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates _classes.rhtml, NONE, 1.1 _methods.rhtml, NONE, 1.1 _modules.rhtml, NONE, 1.1 _result.rhtml, NONE, 1.1 _variables.rhtml, NONE, 1.1 bioruby.css, NONE, 1.1 bioruby.png, NONE, 1.1 bioruby.rhtml, NONE, 1.1 bioruby_controller.rb, NONE, 1.1 bioruby_helper.rb, NONE, 1.1 commands.rhtml, NONE, 1.1 history.rhtml, NONE, 1.1 index.rhtml, NONE, 1.1 shell_helper.rb, NONE, 1.1 Message-ID: <200612240827.kBO8RHVb009287@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates In directory dev.open-bio.org:/tmp/cvs-serv9279/templates Added Files: _classes.rhtml _methods.rhtml _modules.rhtml _result.rhtml _variables.rhtml bioruby.css bioruby.png bioruby.rhtml bioruby_controller.rb bioruby_helper.rb commands.rhtml history.rhtml index.rhtml shell_helper.rb Log Message: * Rails generator for BioRuby shell on Rails --- NEW FILE: shell_helper.rb --- module ShellHelper include Bio::Shell def evaluate_script(script) @local_variables = eval("local_variables", Bio::Shell.cache[:binding]) - ["_erbout"] # write out to history begin Bio::Shell.cache[:histfile].puts "#{Time.now}\t#{script.strip.inspect}" eval(script, Bio::Shell.cache[:binding]) rescue $! end end def method_link() end def reference_link(class_name) case class_name when /Bio::(.+)/ "http://bioruby.org/rdoc/classes/Bio/#{$1.split('::').join('/')}.html" when /Chem::(.+)/ "http://chemruby.org/rdoc/classes/Chem/#{$1.split('::').join('/')}.html" else "http://www.ruby-doc.org/core/classes/#{class_name.split('::').join('/')}.html" end end end --- NEW FILE: _classes.rhtml --- [ <%= @class %> ] <%= @classes.map{ |x| reference_link(x) }.join(" > ") %> --- NEW FILE: commands.rhtml ---

BioRuby shell commands

    <% @bioruby_commands.each do |cmd| %>
  • <%= cmd %>
  • <% end %>
--- NEW FILE: bioruby.rhtml --- BioRuby shell on Rails <%= stylesheet_link_tag "bioruby.css" %> <%= javascript_include_tag :defaults %>

Project
  • <%= project_workdir %>
Functions
  • <%= link_to "Console", :action => "index" %>
  • <%= link_to "History", :action => "history" %>
  • <%= link_to "Commands", :action => "commands" %>
Local variables
<%= render :partial => "variables" %>

BioRuby shell on Rails

<%= yield %>
--- NEW FILE: _modules.rhtml --- [ <%= @class %> ] <%= @modules.map {|x| reference_link(x) }.join(" | ") %> --- NEW FILE: _variables.rhtml ---
    <% local_variables.each do |var| %>
  • <%= link_to_remote var, :update => "index", :url => {:action => "evaluate", :script => var} %>
  • <% end %>
--- NEW FILE: bioruby.css --- /* body */ body { color: #6e8377; background-color: #ffffff; font-family: verdana, arial, helvetica, sans-serif; } /* main */ div#main { width: 700px; background-color: #ffffff; padding-top: 0px; padding-left: 10px; } pre { color: #6e8377; background-color: #eaedeb; border-color: #6e8377; border-style: dashed; border-width: 1px; padding: 5px; overflow: auto; } div.evaluate div.input pre.script { background-color: #ffffeb; border-style: solid; } div.evaluate div.output div.methods { padding: 5px; background-color: #ffffdd; border: 1px solid #ffcc00; } div.evaluate div.output div.classes { padding: 5px; background-color: #ccffcc; border: 1px solid #00ff00; } div.evaluate div.output div.modules { padding: 5px; background-color: #ffcccc; border: 1px solid #ff0000; } div.evaluate div.output pre.result { border-style: dashed; } div.evaluate div.output pre.output { border-style: dashed; } div.evaluate hr.evaluate { border-style: dotted none none none; border-top-width: 1px; border-color: #6e8377; height: 1px; } /* side */ div#side { width: 150px; background-color: #ffffff; position: absolute; top: 10px; left: 10px; } div#side div.title { border-width: 0px 0px 1px 0px; } div#side img { padding: 5px; } /* history */ div#history { } div#history div.histtime { background-color: #eaedeb; padding: 5px; } div#history div.histline { background-color: #ffffeb; padding: 5px; font-family: monospace; white-space: pre; } /* image */ img { /* centering */ display: block; margin-left: auto; margin-right: auto; } /* em */ em { color: #6e8377; font-style: normal; } /* link */ a { text-decoration: none; } a:link { color: #669933; } a:visited { color: #669933; } a:hover { text-decoration: underline; } /* header */ h1 { font-size: 200%; color: #ffffff; background-color: #6e8377; line-height: 64px; text-align: right; padding-right: 20px; } h2 { font-size: 160%; color: #6e8377; border-color: #b9c3be; border-style: dashed; border-width: 0px 0px 1px 0px; } h3 { font-size: 140%; color: #6e8377; border-color: #b9c3be; border-style: dotted; border-width: 0px 0px 1px 0px; } h4 { font-size: 130%; color: #6e8377; border-color: #b9c3be; border-style: solid; border-width: 0px 0px 1px 0px; } h5 { font-size: 120%; color: #6e8377; } h6 { font-size: 110%; color: #6e8377; } /* list */ dt { color: #6e8377; border-color: #b9c3be; border-style: dashed; border-width: 1px; padding: 5px; } ul { color: #6e8377; } /* table */ th { vertical-align: top; } td { vertical-align: top; } /* textarea */ textarea { overflow: auto; } /* blockquote */ blockquote { color: #6e8377; background-color: #eaedeb; border-color: #6e8377; border-style: dashed; border-width: 1px; } /* media */ @media print { div#main { margin-left: 0px; } div#side { display: none; } } @media screen { div#main { margin-left: 150px; } div#side { display: block; } } --- NEW FILE: bioruby_helper.rb --- module BiorubyHelper HIDE_VARIABLES = [ "_", "irb", "_erbout", ] include Bio::Shell def project_workdir Bio::Shell.cache[:workdir] end def have_results Bio::Shell.cache[:results].number > 0 end def local_variables eval("local_variables", Bio::Shell.cache[:binding]) - HIDE_VARIABLES end def reference_link(class_or_module) name = class_or_module.to_s case name when /Bio::(.+)/ path = $1.split('::').join('/') url = "http://bioruby.org/rdoc/classes/Bio/#{path}.html" when /Chem::(.+)/ path = $1.split('::').join('/') url = "http://chemruby.org/rdoc/classes/Chem/#{path}.html" else path = name.split('::').join('/') url = "http://www.ruby-doc.org/core/classes/#{path}.html" end return "#{name}" end end --- NEW FILE: _result.rhtml ---

Input: [<%= @number %>]
<%=h @script %>
Result: [<%= link_to_remote "methods", :url => {:action => "list_methods", :number => @number} %>] [<%= link_to_remote "classes", :url => {:action => "list_classes", :number => @number} %>] [<%= link_to_remote "modules", :url => {:action => "list_modules", :number => @number} %>]
<%=h @result %>
<% if @output %> Output:
<%=h @output %>
<% end %>
--- NEW FILE: _methods.rhtml --- [ <%= @class %> ] <% @methods.sort.each do |x| %> <%= x %> <% end %> --- NEW FILE: index.rhtml ---
<%= form_remote_tag(:url => {:action => "evaluate"}, :position => "top") %> BioRuby script    Show [ <%= link_to_remote "All", :url => {:action => "results", :limit => 0} %> | <%= link_to_remote "Last 5", :url => {:action => "results", :limit => 5} %> | <%= link_to_remote "Previous", :url => {:action => "results", :limit => 1} %> ] or [ <%= link_to "Clear", :action => "index" %> ] results

<%= end_form_tag %>
--- NEW FILE: history.rhtml ---

Command history

<% @history.each do |line| %> <% if line[/^# /] %>
<%= line %>
<% else %>
<%= line %>
<% end %> <% end %>
--- NEW FILE: bioruby_controller.rb --- class BiorubyController < ApplicationController HIDE_METHODS = Object.methods HIDE_MODULES = [ WEBrick, Base64::Deprecated, Base64, PP::ObjectMixin, ] def evaluate begin @script = params[:script].strip # write out to history Bio::Shell.store_history(@script) # evaluate ruby script @result = eval(@script, Bio::Shell.cache[:binding]) # *TODO* need to handle with output of print/puts/p/pp etc. here @output = nil rescue @result = $! @output = nil end @number = Bio::Shell.cache[:results].store(@script, @result, @output) render :update do |page| page.insert_html :after, "console", :partial => "result" page.replace_html "variables", :partial => "variables" page.hide "methods_#{@number}" page.hide "classes_#{@number}" page.hide "modules_#{@number}" end end def list_methods number = params[:number].to_i script, result, output = Bio::Shell.cache[:results].restore(number) @class = result.class @methods = result.methods - HIDE_METHODS render :update do |page| page.replace_html "methods_#{number}", :partial => "methods" page.visual_effect :toggle_blind, "methods_#{number}", :duration => 0.5 end end def list_classes number = params[:number].to_i script, result, output = Bio::Shell.cache[:results].restore(number) class_name = result.class @class = class_name @classes = [] loop do @classes.unshift(class_name) if class_name == Object break else class_name = class_name.superclass end end render :update do |page| page.replace_html "classes_#{number}", :partial => "classes" page.visual_effect :toggle_blind, "classes_#{number}", :duration => 0.5 end end def list_modules number = params[:number].to_i script, result, output = Bio::Shell.cache[:results].restore(number) @class = result.class @modules = result.class.included_modules - HIDE_MODULES render :update do |page| page.replace_html "modules_#{number}", :partial => "modules" page.visual_effect :toggle_blind, "modules_#{number}", :duration => 0.5 end end def results if Bio::Shell.cache[:results].number > 0 limit = params[:limit].to_i max_num = Bio::Shell.cache[:results].number min_num = [ max_num - limit + 1, 1 ].max min_num = 1 if limit == 0 render :update do |page| # delete all existing results in the current DOM for clean up page.select(".evaluate").each do |element| page.remove element end # add selected results to the current DOM min_num.upto(max_num) do |@number| @script, @result, @output = Bio::Shell.cache[:results].restore(@number) if @script page.insert_html :after, "console", :partial => "result" page.replace_html "variables", :partial => "variables" page.hide "methods_#{@number}" page.hide "classes_#{@number}" page.hide "modules_#{@number}" end end end end end def commands @bioruby_commands = Bio::Shell.private_instance_methods.sort end def history @history = File.readlines(Bio::Shell.history_file) end end --- NEW FILE: bioruby.png --- (This appears to be a binary file; contents omitted.) From k at dev.open-bio.org Sun Dec 24 03:32:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:32:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio shell.rb,1.16,1.17 Message-ID: <200612240832.kBO8WAHA009411@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv9398/lib/bio Modified Files: shell.rb Log Message: * New BioRuby shell with Ruby on Rails generator functionality is integrated. Index: shell.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell.rb,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** shell.rb 25 Jul 2006 18:45:27 -0000 1.16 --- shell.rb 24 Dec 2006 08:32:08 -0000 1.17 *************** *** 12,23 **** require 'yaml' require 'open-uri' require 'pp' module Bio::Shell require 'bio/shell/core' require 'bio/shell/interface' require 'bio/shell/object' - require 'bio/shell/web' require 'bio/shell/demo' require 'bio/shell/plugin/entry' --- 12,27 ---- require 'yaml' require 'open-uri' + require 'fileutils' require 'pp' module Bio::Shell + require 'bio/shell/setup' + require 'bio/shell/irb' + require 'bio/shell/web' + require 'bio/shell/script' require 'bio/shell/core' require 'bio/shell/interface' require 'bio/shell/object' require 'bio/shell/demo' require 'bio/shell/plugin/entry' *************** *** 33,37 **** extend Ghost - extend Private end --- 37,40 ---- From k at dev.open-bio.org Sun Dec 24 03:32:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:32:10 +0000 Subject: [BioRuby-cvs] bioruby/bin bioruby,1.16,1.17 Message-ID: <200612240832.kBO8WA76009406@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/bin In directory dev.open-bio.org:/tmp/cvs-serv9398/bin Modified Files: bioruby Log Message: * New BioRuby shell with Ruby on Rails generator functionality is integrated. Index: bioruby =================================================================== RCS file: /home/repository/bioruby/bioruby/bin/bioruby,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** bioruby 25 Jul 2006 18:16:28 -0000 1.16 --- bioruby 24 Dec 2006 08:32:08 -0000 1.17 *************** *** 15,151 **** rescue LoadError end - - - ### BioRuby shell setup - require 'bio/shell' include Bio::Shell ! # command line argument (working directory or bioruby shell script file) ! workdir = nil ! script = nil ! if arg = ARGV.shift ! if File.directory?(arg) ! # directory or symlink to directory ! workdir = arg ! Dir.chdir(workdir) ! elsif File.exists?(arg) ! # BioRuby shell script (load script after the previous session is restored) ! workdir = File.dirname(arg) ! script = File.basename(arg) ! Dir.chdir(workdir) ! else ! workdir = arg ! Dir.mkdir(workdir) ! Dir.chdir(workdir) ! end ! else ! unless File.exists?(Bio::Shell.history) ! message = "Are you sure to start new session in this directory? [y/n] " ! unless Bio::Shell.ask_yes_or_no(message) ! exit ! end ! end ! end ! ! # loading configuration and plugins ! Bio::Shell.setup ! ! ! ### IRB setup ! ! require 'irb' ! begin ! require 'irb/completion' ! Bio::Shell.cache[:readline] = true ! rescue LoadError ! Bio::Shell.cache[:readline] = false ! end ! ! IRB.setup(nil) ! ! # set application name ! IRB.conf[:AP_NAME] = 'bioruby' ! ! # change prompt for bioruby ! $_ = Bio::Shell.esc_seq ! IRB.conf[:PROMPT][:BIORUBY_COLOR] = { ! :PROMPT_I => "bio#{$_[:ruby]}ruby#{$_[:none]}> ", ! :PROMPT_S => "bio#{$_[:ruby]}ruby#{$_[:none]}%l ", ! :PROMPT_C => "bio#{$_[:ruby]}ruby#{$_[:none]}+ ", ! :RETURN => " ==> %s\n" ! } ! IRB.conf[:PROMPT][:BIORUBY] = { ! :PROMPT_I => "bioruby> ", ! :PROMPT_S => "bioruby%l ", ! :PROMPT_C => "bioruby+ ", ! :RETURN => " ==> %s\n" ! } ! if Bio::Shell.config[:color] ! IRB.conf[:PROMPT_MODE] = :BIORUBY_COLOR ! else ! IRB.conf[:PROMPT_MODE] = :BIORUBY ! end ! IRB.conf[:ECHO] = Bio::Shell.config[:echo] || false ! ! # irb/input-method.rb >= v1.5 (not in 1.8.2) ! #IRB.conf[:SAVE_HISTORY] = 100000 ! ! # not beautifully works ! #IRB.conf[:AUTO_INDENT] = true ! ! ! ### Start IRB ! ! irb = IRB::Irb.new ! ! # needed for method completion ! IRB.conf[:MAIN_CONTEXT] = irb.context # loading workspace and command history Bio::Shell.load_session - if script - load script - exit - end - - Bio::Shell.create_save_dir - - $history_file = File.open(Bio::Shell.history, "a") - $history_file.sync = true - - # overwrite gets to store history with time stamp - io = IRB.conf[:MAIN_CONTEXT].io - - io.class.class_eval do - alias_method :irb_original_gets, :gets - end - - def io.gets - line = irb_original_gets - $history_file.puts "#{Time.now}\t#{line}" if line - line - end - # main loop ! Signal.trap("SIGINT") do ! irb.signal_handle ! end ! ! catch(:IRB_EXIT) do ! irb.eval_input ! end ! ! $history_file.close if $history_file ! # shut down the rails server ! if $web_server ! $web_server.each do |io| ! io.close end - $web_access_log.close if $web_access_log - $web_error_log.close if $web_error_log end --- 15,40 ---- rescue LoadError end require 'bio/shell' + # required to run commands (getseq, ls etc.) include Bio::Shell ! # setup command line options, working directory, and irb configurations ! Bio::Shell::Setup.new # loading workspace and command history Bio::Shell.load_session # main loop ! if Bio::Shell.cache[:rails] ! Bio::Shell.cache[:rails].join ! else ! Signal.trap("SIGINT") do ! Bio::Shell.cache[:irb].signal_handle ! end ! catch(:IRB_EXIT) do ! Bio::Shell.cache[:irb].eval_input end end *************** *** 153,160 **** Bio::Shell.save_session - if workdir - puts "Leaving directory '#{workdir}'." - puts "History is saved in '#{workdir}/#{Bio::Shell.history}'." - end - - --- 42,43 ---- From k at dev.open-bio.org Sun Dec 24 03:32:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:32:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell setup.rb, NONE, 1.1 irb.rb, NONE, 1.1 script.rb, NONE, 1.1 web.rb, 1.1, 1.2 Message-ID: <200612240832.kBO8WAbT009416@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9398/lib/bio/shell Modified Files: web.rb Added Files: setup.rb irb.rb script.rb Log Message: * New BioRuby shell with Ruby on Rails generator functionality is integrated. Index: web.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/web.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** web.rb 27 Feb 2006 09:22:42 -0000 1.1 --- web.rb 24 Dec 2006 08:32:08 -0000 1.2 *************** *** 13,88 **** module Bio::Shell ! private ! def rails_directory_setup ! server = "script/server" ! unless File.exists?(server) ! require 'fileutils' ! basedir = File.dirname(__FILE__) ! print "Copying web server files ... " ! FileUtils.cp_r("#{basedir}/rails/.", ".") ! puts "done" end - end ! def rails_server_setup ! require 'open3' ! $web_server = Open3.popen3(server) ! $web_error_log = File.open("log/web-error.log", "a") ! $web_server[2].reopen($web_error_log) ! while line = $web_server[1].gets ! if line[/druby:\/\/localhost/] ! uri = line.chomp ! puts uri if $DEBUG ! break end end ! $web_access_log = File.open("log/web-access.log", "a") ! $web_server[1].reopen($web_access_log) ! ! return uri ! end ! def web ! return if $web_server ! require 'drb/drb' ! # $SAFE = 1 # disable eval() and friends ! rails_directory_setup ! #uri = rails_server_setup ! uri = 'druby://localhost:81064' # baioroji- ! $drb_server = DRbObject.new_with_uri(uri) ! $drb_server.puts_remote("Connected") ! puts "Connected to server #{uri}" ! puts "Open http://localhost:3000/shell/" ! io = IRB.conf[:MAIN_CONTEXT].io ! io.class.class_eval do ! alias_method :shell_original_gets, :gets ! end - def io.gets - bind = IRB.conf[:MAIN_CONTEXT].workspace.binding - vars = eval("local_variables", bind) - vars.each do |var| - next if var == "_" - if val = eval("#{var}", bind) - $drb_server[var] = val - else - $drb_server.delete(var) - end - end - line = shell_original_gets - line - end - end - end --- 13,93 ---- module Bio::Shell ! class Web ! def initialize ! Bio::Shell.cache[:binding] = binding ! Bio::Shell.cache[:results] ||= Results.new ! install_rails ! setup_rails ! start_rails end ! private ! def setup_rails ! puts ! puts ">>>" ! puts ">>> open http://localhost:3000/bioruby" ! puts ">>>" ! puts ! puts '(port # may differ if opts for rails are given "bioruby --web proj -- -p port")' ! puts ! end ! def install_rails ! unless File.exist?("script/generate") ! puts "Installing Rails application for BioRuby shell ... " ! system("rails .") ! puts "done" ! end ! unless File.exist?("app/controllers/bioruby_controller.rb") ! basedir = File.dirname(__FILE__) ! puts "Installing Rails plugin for BioRuby shell ... " ! FileUtils.cp_r("#{basedir}/rails/.", ".") ! system("./script/generate bioruby shell") ! puts "done" end end ! def start_rails ! begin ! Bio::Shell.cache[:rails] = Thread.new { ! require './config/boot' ! require 'commands/server' ! } ! end ! end ! class Results ! attr_accessor :number, :script, :result, :output ! def initialize ! @number = 0 ! @script = [] ! @result = [] ! @output = [] ! end ! def store(script, result, output) ! @number += 1 ! @script[@number] = script ! @result[@number] = result ! @output[@number] = output ! return @number ! end ! def restore(number) ! return @script[number], @result[number], @output[number] ! end ! end ! end ! private ! # *TODO* stop irb and start rails? ! #def web ! #end end --- NEW FILE: irb.rb --- # # = bio/shell/irb.rb - CUI for the BioRuby shell # # Copyright:: Copyright (C) 2006 # Toshiaki Katayama # License:: Ruby's # # $Id: irb.rb,v 1.1 2006/12/24 08:32:08 k Exp $ # module Bio::Shell class Irb def initialize require 'irb' begin require 'irb/completion' Bio::Shell.cache[:readline] = true rescue LoadError Bio::Shell.cache[:readline] = false end IRB.setup(nil) setup_irb start_irb end def start_irb Bio::Shell.cache[:irb] = IRB::Irb.new # needed for method completion IRB.conf[:MAIN_CONTEXT] = Bio::Shell.cache[:irb].context # store binding for evaluation Bio::Shell.cache[:binding] = IRB.conf[:MAIN_CONTEXT].workspace.binding # overwrite gets to store history with time stamp io = IRB.conf[:MAIN_CONTEXT].io io.class.class_eval do alias_method :irb_original_gets, :gets end def io.gets line = irb_original_gets if line Bio::Shell.store_history(line) end return line end end def setup_irb # set application name IRB.conf[:AP_NAME] = 'bioruby' # change prompt for bioruby $_ = Bio::Shell.colors IRB.conf[:PROMPT][:BIORUBY_COLOR] = { :PROMPT_I => "bio#{$_[:ruby]}ruby#{$_[:none]}> ", :PROMPT_S => "bio#{$_[:ruby]}ruby#{$_[:none]}%l ", :PROMPT_C => "bio#{$_[:ruby]}ruby#{$_[:none]}+ ", :RETURN => " ==> %s\n" } IRB.conf[:PROMPT][:BIORUBY] = { :PROMPT_I => "bioruby> ", :PROMPT_S => "bioruby%l ", :PROMPT_C => "bioruby+ ", :RETURN => " ==> %s\n" } if Bio::Shell.config[:color] IRB.conf[:PROMPT_MODE] = :BIORUBY_COLOR else IRB.conf[:PROMPT_MODE] = :BIORUBY end # echo mode (uncomment to off by default) #IRB.conf[:ECHO] = Bio::Shell.config[:echo] || false # irb/input-method.rb >= v1.5 (not in 1.8.2) #IRB.conf[:SAVE_HISTORY] = 100000 # not nicely works #IRB.conf[:AUTO_INDENT] = true end end # Irb end --- NEW FILE: script.rb --- # # = bio/shell/script.rb - script mode for the BioRuby shell # # Copyright:: Copyright (C) 2006 # Toshiaki Katayama # License:: Ruby's # # $Id: script.rb,v 1.1 2006/12/24 08:32:08 k Exp $ # module Bio::Shell class Script def initialize(script) Bio::Shell.cache[:binding] = TOPLEVEL_BINDING Bio::Shell.load_session eval(File.read(File.join(Bio::Shell.script_dir, script)), TOPLEVEL_BINDING) exit end end # Script end --- NEW FILE: setup.rb --- # # = bio/shell/setup.rb - setup initial environment for the BioRuby shell # # Copyright:: Copyright (C) 2006 # Toshiaki Katayama # License:: Ruby's # # $Id: setup.rb,v 1.1 2006/12/24 08:32:08 k Exp $ # require 'getoptlong' class Bio::Shell::Setup def initialize check_ruby_version # command line options getoptlong # setup working directory setup_workdir # load configuration and plugins Dir.chdir(@workdir) Bio::Shell.configure Bio::Shell.cache[:workdir] = @workdir # set default to irb mode @mode ||= :irb case @mode when :web # setup rails server Bio::Shell::Web.new when :irb # setup irb server Bio::Shell::Irb.new when :script # run bioruby shell script Bio::Shell::Script.new(@script) end end def check_ruby_version if RUBY_VERSION < "1.8.2" raise "BioRuby shell runs on Ruby version >= 1.8.2" end end # command line argument (working directory or bioruby shell script file) def getoptlong opts = GetoptLong.new opts.set_options( [ '--rails', '-r', GetoptLong::NO_ARGUMENT ], [ '--web', '-w', GetoptLong::NO_ARGUMENT ], [ '--console', '-c', GetoptLong::NO_ARGUMENT ], [ '--irb', '-i', GetoptLong::NO_ARGUMENT ] ) opts.each_option do |opt, arg| case opt when /--rails/, /--web/ @mode = :web when /--console/, /--irb/ @mode = :irb end end end def setup_workdir arg = ARGV.shift # Options after the '--' argument are not parsed by GetoptLong and # are passed to irb or rails. This hack preserve the first option # when working directory of the project is not given. if arg and arg[/^-/] ARGV.unshift arg arg = nil end if arg.nil? # run in current directory @workdir = current_workdir elsif File.directory?(arg) # run in existing directory @workdir = arg elsif File.file?(arg) # run file as a bioruby shell script @workdir = File.join(File.dirname(arg), "..") @script = File.basename(arg) @mode = :script else # run in new directory @workdir = install_workdir(arg) end end def current_workdir unless File.exists?(Bio::Shell.datadir) message = "Are you sure to start new session in this directory? [y/n] " unless Bio::Shell.ask_yes_or_no(message) exit end end return '.' end def install_workdir(workdir) FileUtils.mkdir_p(workdir) return workdir end end # Setup From k at dev.open-bio.org Sun Dec 24 03:36:02 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:36:02 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell core.rb,1.21,1.22 Message-ID: <200612240836.kBO8a244009480@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9476 Modified Files: core.rb Log Message: * independent from IRB (except for some config routines) * interface (Core) is separated from internals (Ghost) Index: core.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/core.rb,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** core.rb 27 Feb 2006 09:09:57 -0000 1.21 --- core.rb 24 Dec 2006 08:36:00 -0000 1.22 *************** *** 9,23 **** # ! module Bio::Shell::Ghost ! ! SAVEDIR = "session/" CONFIG = "config" OBJECT = "object" HISTORY = "history" ! SCRIPT = "script.rb" ! PLUGIN = "plugin/" DATADIR = "data/" ! BIOFLAT = "bioflat/" MARSHAL = [ Marshal::MAJOR_VERSION, Marshal::MINOR_VERSION ] --- 9,22 ---- # + module Bio::Shell::Core ! SAVEDIR = "shell/session/" CONFIG = "config" OBJECT = "object" HISTORY = "history" ! SCRIPT = "shell/script.rb" ! PLUGIN = "shell/plugin/" DATADIR = "data/" ! BIOFLAT = "data/bioflat/" MARSHAL = [ Marshal::MAJOR_VERSION, Marshal::MINOR_VERSION ] *************** *** 37,42 **** } ! def history ! SAVEDIR + HISTORY end --- 36,41 ---- } ! def colors ! ESC_SEQ end *************** *** 45,63 **** end ! def esc_seq ! ESC_SEQ end ! ### save/restore the environment ! def setup ! @config = {} ! @cache = {} ! check_version ! check_marshal ! load_config ! load_plugin end ! # A hash to store persistent configurations attr_accessor :config --- 44,83 ---- end ! def script_dir ! File.dirname(SCRIPT) end ! def object_file ! SAVEDIR + OBJECT ! end ! def history_file ! SAVEDIR + HISTORY end ! ! def ask_yes_or_no(message) ! loop do ! print "#{message}" ! answer = gets ! if answer.nil? ! # readline support might be broken ! return false ! elsif /^\s*[Nn]/.match(answer) ! return false ! elsif /^\s*[Yy]/.match(answer) ! return true ! else ! # loop ! end ! end ! end ! ! end ! ! ! module Bio::Shell::Ghost ! ! include Bio::Shell::Core ! # A hash to store persistent configurations attr_accessor :config *************** *** 66,76 **** --- 86,108 ---- attr_accessor :cache + ### save/restore the environment + + def configure + @config = {} + @cache = {} + create_save_dir + load_config + load_plugin + end + def load_session load_object load_history opening_splash + open_history end def save_session + close_history closing_splash if create_save_dir_ask *************** *** 79,97 **** save_config end end ! ### setup ! ! def check_version ! if RUBY_VERSION < "1.8.2" ! raise "BioRuby shell runs on Ruby version >= 1.8.2" ! end ! end ! ! def check_marshal ! if @config[:marshal] and @config[:marshal] != MARSHAL ! raise "Marshal version mismatch" ! end ! end def create_save_dir --- 111,119 ---- save_config end + puts "Leaving directory '#{@cache[:workdir]}'" + puts "History is saved in '#{@cache[:workdir]}/#{SAVEDIR + HISTORY}'" end ! ### directories def create_save_dir *************** *** 108,114 **** if ask_yes_or_no("Save session in '#{SAVEDIR}' directory? [y/n] ") create_real_dir(SAVEDIR) - create_real_dir(DATADIR) create_real_dir(PLUGIN) ! # create_real_dir(BIOFLAT) @cache[:save] = true else --- 130,136 ---- if ask_yes_or_no("Save session in '#{SAVEDIR}' directory? [y/n] ") create_real_dir(SAVEDIR) create_real_dir(PLUGIN) ! create_real_dir(DATADIR) ! create_real_dir(BIOFLAT) @cache[:save] = true else *************** *** 119,144 **** end - def ask_yes_or_no(message) - loop do - print "#{message}" - answer = gets - if answer.nil? - # readline support might be broken - return false - elsif /^\s*[Nn]/.match(answer) - return false - elsif /^\s*[Yy]/.match(answer) - return true - else - # loop - end - end - end - def create_real_dir(dir) unless File.directory?(dir) begin print "Creating directory (#{dir}) ... " ! Dir.mkdir(dir) puts "done" rescue --- 141,149 ---- end def create_real_dir(dir) unless File.directory?(dir) begin print "Creating directory (#{dir}) ... " ! FileUtils.mkdir_p(dir) puts "done" rescue *************** *** 152,160 **** def create_flat_dir(dbname) dir = BIOFLAT + dbname.to_s.strip - unless File.directory?(BIOFLAT) - Dir.mkdir(BIOFLAT) - end unless File.directory?(dir) ! Dir.mkdir(dir) end return dir --- 157,162 ---- def create_flat_dir(dbname) dir = BIOFLAT + dbname.to_s.strip unless File.directory?(dir) ! FileUtils.mkdir_p(dir) end return dir *************** *** 209,213 **** def config_echo ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding flag = ! @config[:echo] @config[:echo] = IRB.conf[:ECHO] = flag --- 211,215 ---- def config_echo ! bind = Bio::Shell.cache[:binding] flag = ! @config[:echo] @config[:echo] = IRB.conf[:ECHO] = flag *************** *** 217,221 **** def config_color ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding flag = ! @config[:color] @config[:color] = flag --- 219,223 ---- def config_color ! bind = Bio::Shell.cache[:binding] flag = ! @config[:color] @config[:color] = flag *************** *** 264,269 **** ### object def load_object ! load_object_file(SAVEDIR + OBJECT) end --- 266,282 ---- ### object + def check_marshal + if @config[:marshal] and @config[:marshal] != MARSHAL + raise "Marshal version mismatch" + end + end + def load_object ! begin ! check_marshal ! load_object_file(SAVEDIR + OBJECT) ! rescue ! warn "Error: Load aborted : #{$!}" ! end end *************** *** 272,276 **** print "Loading object (#{file}) ... " begin ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding hash = Marshal.load(File.read(file)) hash.each do |k, v| --- 285,289 ---- print "Loading object (#{file}) ... " begin ! bind = Bio::Shell.cache[:binding] hash = Marshal.load(File.read(file)) hash.each do |k, v| *************** *** 288,292 **** end end ! def save_object save_object_file(SAVEDIR + OBJECT) --- 301,305 ---- end end ! def save_object save_object_file(SAVEDIR + OBJECT) *************** *** 296,324 **** begin print "Saving object (#{file}) ... " File.open(file, "w") do |f| ! begin ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding ! list = eval("local_variables", bind) ! list -= ["_"] ! hash = {} ! list.each do |elem| ! value = eval(elem, bind) ! if value ! begin ! Marshal.dump(value) ! hash[elem] = value ! rescue ! # value could not be dumped. ! end end end - Marshal.dump(hash, f) - @config[:marshal] = MARSHAL - rescue - warn "Error: Failed to dump (#{file}) : #{$!}" end end puts "done" rescue warn "Error: Failed to save (#{file}) : #{$!}" end --- 309,335 ---- begin print "Saving object (#{file}) ... " + File.rename(file, "#{file}.old") if File.exist?(file) File.open(file, "w") do |f| ! bind = Bio::Shell.cache[:binding] ! list = eval("local_variables", bind) ! list -= ["_"] ! hash = {} ! list.each do |elem| ! value = eval(elem, bind) ! if value ! begin ! Marshal.dump(value) ! hash[elem] = value ! rescue ! # value could not be dumped. end end end + Marshal.dump(hash, f) + @config[:marshal] = MARSHAL end puts "done" rescue + File.rename("#{file}.old", file) if File.exist?("#{file}.old") warn "Error: Failed to save (#{file}) : #{$!}" end *************** *** 327,330 **** --- 338,355 ---- ### history + def open_history + @cache[:histfile] = File.open(SAVEDIR + HISTORY, "a") + @cache[:histfile].sync = true + end + + def store_history(line) + Bio::Shell.cache[:histfile].puts "# #{Time.now}" + Bio::Shell.cache[:histfile].puts line + end + + def close_history + @cache[:histfile].close if @cache[:histfile] + end + def load_history if @cache[:readline] *************** *** 337,343 **** print "Loading history (#{file}) ... " File.open(file).each do |line| ! #Readline::HISTORY.push line.chomp ! date, hist = line.chomp.split("\t") ! Readline::HISTORY.push hist if hist end puts "done" --- 362,368 ---- print "Loading history (#{file}) ... " File.open(file).each do |line| ! unless line[/^# /] ! Readline::HISTORY.push line.chomp ! end end puts "done" *************** *** 345,348 **** --- 370,374 ---- end + # not used (use open_history/close_history instead) def save_history if @cache[:readline] *************** *** 440,445 **** def splash_message_color str = splash_message ! ruby = ESC_SEQ[:ruby] ! none = ESC_SEQ[:none] return str.sub(/R u b y/) { "#{ruby}R u b y#{none}" } end --- 466,471 ---- def splash_message_color str = splash_message ! ruby = colors[:ruby] ! none = colors[:none] return str.sub(/R u b y/) { "#{ruby}R u b y#{none}" } end *************** *** 465,469 **** s = message || splash_message l = s.length ! c = ESC_SEQ x = " " 0.step(l,2) do |i| --- 491,495 ---- s = message || splash_message l = s.length ! c = colors x = " " 0.step(l,2) do |i| From k at dev.open-bio.org Sun Dec 24 03:36:47 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:36:47 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell interface.rb,1.14,1.15 Message-ID: <200612240836.kBO8alCD009541@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9537 Modified Files: interface.rb Log Message: * independent from IRB Index: interface.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/interface.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** interface.rb 27 Feb 2006 09:36:35 -0000 1.14 --- interface.rb 24 Dec 2006 08:36:45 -0000 1.15 *************** *** 16,21 **** def ls ! list = eval("local_variables", conf.workspace.binding).reject { |x| ! eval(x, conf.workspace.binding).nil? } puts list.inspect --- 16,22 ---- def ls ! bind = Bio::Shell.cache[:binding] ! list = eval("local_variables", bind).reject { |x| ! eval(x, bind).nil? } puts list.inspect *************** *** 24,33 **** def rm(name) ! list = eval("local_variables", conf.workspace.binding).reject { |x| ! eval(x, conf.workspace.binding).nil? } begin if list.include?(name.to_s) ! eval("#{name} = nil", conf.workspace.binding) else raise --- 25,35 ---- def rm(name) ! bind = Bio::Shell.cache[:binding] ! list = eval("local_variables", bind).reject { |x| ! eval(x, bind).nil? } begin if list.include?(name.to_s) ! eval("#{name} = nil", bind) else raise From k at dev.open-bio.org Sun Dec 24 03:40:02 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:40:02 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell object.rb,1.1,1.2 Message-ID: <200612240840.kBO8e2UM009604@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9600 Modified Files: object.rb Log Message: * skeletal attempt for object formatting Index: object.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/object.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object.rb 27 Feb 2006 09:16:13 -0000 1.1 --- object.rb 24 Dec 2006 08:40:00 -0000 1.2 *************** *** 10,15 **** # - require 'cgi' require 'pp' ### Object extention --- 10,16 ---- # require 'pp' + require 'cgi' + require 'yaml' ### Object extention *************** *** 19,52 **** attr_accessor :memo ! # *TODO* ! def to_html ! if self.is_a?(String) ! "
" + self + "
" else ! str = "" ! PP.pp(self, str) ! "
" + str + "
" ! #"
" + CGI.escapeHTML(str) + "
" ! #self.inspect ! #"
" + self.inspect + "
" ! #"
" + self.to_s + "
" end end end ! =begin ! module Bio ! class DB ! def to_html ! html = "" ! html += "" ! @data.each do |k, v| ! html += "" ! end ! html += "
#{k}#{v}
" end end end - =end - --- 20,71 ---- attr_accessor :memo ! def output(format = :yaml) ! case format ! when :yaml ! self.to_yaml ! when :html ! format_html ! when :inspect ! format_pp ! when :png ! # *TODO* ! when :svg ! # *TODO* ! when :graph ! # *TODO* (Gruff, RSRuby etc.) else ! #self.inspect.to_s.fold(80) ! self.to_s end end + + private + + def format_html + "
#{CGI.escapeHTML(format_pp)}
" + end + + def format_pp + str = "" + PP.pp(self, str) + return str + end + end ! class Hash ! ! private ! ! def format_html ! html = "" ! html += "" ! @data.each do |k, v| ! html += "" end + html += "
#{k}#{v}
" + return html end + end From k at dev.open-bio.org Sun Dec 24 03:40:45 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:40:45 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell demo.rb,1.2,1.3 Message-ID: <200612240840.kBO8ejTW009647@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9643 Modified Files: demo.rb Log Message: * follow the change of some bioruby shell commands Index: demo.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/demo.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** demo.rb 26 Mar 2006 00:38:10 -0000 1.2 --- demo.rb 24 Dec 2006 08:40:43 -0000 1.3 *************** *** 25,29 **** def initialize ! @bind = IRB.conf[:MAIN_CONTEXT].workspace.binding end --- 25,29 ---- def initialize ! @bind = Bio::Shell.cache[:binding] end *************** *** 39,44 **** end def mito ! run(%q[entry = ent("data/kumamushi.gb")], "Load kumamushi gene from GenBank database entry ...", false) && run(%q[disp entry], "Check the contents ...", false) && run(%q[kuma = flatparse(entry)], "Parse the database entry ...", true) && --- 39,47 ---- end + def aldh2 + end + def mito ! run(%q[entry = getent("data/kumamushi.gb")], "Load kumamushi gene from GenBank database entry ...", false) && run(%q[disp entry], "Check the contents ...", false) && run(%q[kuma = flatparse(entry)], "Parse the database entry ...", true) && *************** *** 62,66 **** def sequence ! run(%q[dna = seq("atgc" * 100)], "Generating DNA sequence ...", true) && run(%q[doublehelix dna], "Double helix representation", false) && run(%q[protein = dna.translate], "Translate DNA into Protein ...", true) && --- 65,69 ---- def sequence ! run(%q[dna = getseq("atgc" * 100)], "Generating DNA sequence ...", true) && run(%q[doublehelix dna], "Double helix representation", false) && run(%q[protein = dna.translate], "Translate DNA into Protein ...", true) && *************** *** 71,75 **** def entry ! run(%q[kuma = obj("gb:AF237819")], "Obtain an entry from GenBank database", false) && run(%q[kuma.definition], "Definition of the entry", true) && run(%q[kuma.naseq], "Sequence of the entry", true) && --- 74,78 ---- def entry ! run(%q[kuma = getobj("gb:AF237819")], "Obtain an entry from GenBank database", false) && run(%q[kuma.definition], "Definition of the entry", true) && run(%q[kuma.naseq], "Sequence of the entry", true) && *************** *** 82,91 **** run(%q[pwd], "Show current working directory ...", false) && run(%q[dir], "Show directory contents ...", false) && ! run(%q[dir "session"], "Show directory contents ...", false) && true end def pdb ! run(%q[ent_1bl8 = ent("pdb:1bl8")], "Retrieving PDB entry 1BL8 ...", false) && run(%q[head ent_1bl8], "Head part of the entry ...", false) && run(%q[savefile("1bl8.pdb", ent_1bl8)], "Saving the original entry in file ...", false) && --- 85,94 ---- run(%q[pwd], "Show current working directory ...", false) && run(%q[dir], "Show directory contents ...", false) && ! run(%q[dir "shell/session"], "Show directory contents ...", false) && true end def pdb ! run(%q[ent_1bl8 = getent("pdb:1bl8")], "Retrieving PDB entry 1BL8 ...", false) && run(%q[head ent_1bl8], "Head part of the entry ...", false) && run(%q[savefile("1bl8.pdb", ent_1bl8)], "Saving the original entry in file ...", false) && From k at dev.open-bio.org Sun Dec 24 03:46:52 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:46:52 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin codon.rb,1.14,1.15 Message-ID: <200612240846.kBO8kqQW009816@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv9812 Modified Files: codon.rb Log Message: * changed to use Bio::Shell.colors instead of Bio::Shell.esc_seq Index: codon.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/codon.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** codon.rb 19 Sep 2006 06:17:19 -0000 1.14 --- codon.rb 24 Dec 2006 08:46:50 -0000 1.15 *************** *** 36,50 **** def setup_colors ! esc_seq = Bio::Shell.esc_seq @colors = { ! :text => esc_seq[:none], ! :aa => esc_seq[:green], ! :start => esc_seq[:red], ! :stop => esc_seq[:red], ! :basic => esc_seq[:cyan], ! :polar => esc_seq[:blue], ! :acidic => esc_seq[:magenta], ! :nonpolar => esc_seq[:yellow], } end --- 36,50 ---- def setup_colors ! c = Bio::Shell.colors @colors = { ! :text => c[:none], ! :aa => c[:green], ! :start => c[:red], ! :stop => c[:red], ! :basic => c[:cyan], ! :polar => c[:blue], ! :acidic => c[:magenta], ! :nonpolar => c[:yellow], } end From k at dev.open-bio.org Sun Dec 24 03:49:14 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:49:14 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin keggapi.rb,1.10,1.11 Message-ID: <200612240849.kBO8nEAG009897@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv9893 Modified Files: keggapi.rb Log Message: * Bio::Shell::Private module is nolonger extended to Bio::Shell Index: keggapi.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/keggapi.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** keggapi.rb 9 Feb 2006 20:48:53 -0000 1.10 --- keggapi.rb 24 Dec 2006 08:49:12 -0000 1.11 *************** *** 12,19 **** module Private def keggapi_definition2tab(list) ary = [] list.each do |entry| ! ary << "#{entry.entry_id}:\t#{entry.definition}" end return ary --- 12,22 ---- module Private + + module_function + def keggapi_definition2tab(list) ary = [] list.each do |entry| ! ary << "#{entry.entry_id}\t#{entry.definition}" end return ary *************** *** 50,53 **** --- 53,57 ---- yield result else + puts result return result end *************** *** 56,59 **** --- 60,64 ---- def btit(str) result = keggapi.btit(str) + puts result return result end *************** *** 61,64 **** --- 66,70 ---- def bconv(str) result = keggapi.bconv(str) + puts result return result end *************** *** 68,72 **** def keggdbs list = keggapi.list_databases ! result = Bio::Shell.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} --- 74,78 ---- def keggdbs list = keggapi.list_databases ! result = Bio::Shell::Private.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} *************** *** 75,79 **** def keggorgs list = keggapi.list_organisms ! result = Bio::Shell.keggapi_definition2tab(list).sort.join("\n") puts result return list.map {|x| x.entry_id} --- 81,85 ---- def keggorgs list = keggapi.list_organisms ! result = Bio::Shell::Private.keggapi_definition2tab(list).sort.join("\n") puts result return list.map {|x| x.entry_id} *************** *** 82,90 **** def keggpathways(org = "map") list = keggapi.list_pathways(org) ! result = Bio::Shell.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} end def kegggenomeseq(org) result = "" --- 88,97 ---- def keggpathways(org = "map") list = keggapi.list_pathways(org) ! result = Bio::Shell::Private.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} end + # use KEGG DAS insetad def kegggenomeseq(org) result = "" From k at dev.open-bio.org Sun Dec 24 03:50:20 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:50:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin entry.rb, 1.8, 1.9 seq.rb, 1.18, 1.19 blast.rb, 1.1, 1.2 psort.rb, 1.1, 1.2 Message-ID: <200612240850.kBO8oKMw009976@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv9972 Modified Files: entry.rb seq.rb blast.rb psort.rb Log Message: * seq, ent, obj commands are changed to getseq, getent, getobj respectively Index: blast.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/blast.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blast.rb 25 Jul 2006 18:43:17 -0000 1.1 --- blast.rb 24 Dec 2006 08:50:18 -0000 1.2 *************** *** 21,28 **** data = Bio::FastaFormat.new(query) desc = data.definition ! tmp = seq(data.seq) else desc = "query" ! tmp = seq(query) end --- 21,28 ---- data = Bio::FastaFormat.new(query) desc = data.definition ! tmp = getseq(data.seq) else desc = "query" ! tmp = getseq(query) end Index: entry.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/entry.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** entry.rb 27 Feb 2006 09:37:14 -0000 1.8 --- entry.rb 24 Dec 2006 08:50:18 -0000 1.9 *************** *** 13,16 **** --- 13,25 ---- private + # Read a text file and collect the first word of each line in array + def readlist(filename) + list = [] + File.open(filename).each do |line| + list << line[/^\S+/] + end + return list + end + # Obtain a Bio::Sequence::NA (DNA) or a Bio::Sequence::AA (Amino Acid) # sequence from *************** *** 19,23 **** # * "filename" -- "gbvrl.gbk" (first entry only) # * "db:entry" -- "embl:BUM" (entry is retrieved by the ent method) ! def seq(arg) seq = "" if arg.kind_of?(Bio::Sequence) --- 28,32 ---- # * "filename" -- "gbvrl.gbk" (first entry only) # * "db:entry" -- "embl:BUM" (entry is retrieved by the ent method) ! def getseq(arg) seq = "" if arg.kind_of?(Bio::Sequence) *************** *** 26,31 **** ent = flatauto(arg) elsif arg[/:/] ! str = ent(arg) ! ent = flatparse(str) else tmp = arg --- 35,39 ---- ent = flatauto(arg) elsif arg[/:/] ! ent = getobj(arg) else tmp = arg *************** *** 35,45 **** tmp = ent.seq elsif ent.respond_to?(:naseq) ! seq = ent.naseq elsif ent.respond_to?(:aaseq) ! seq = ent.aaseq end if tmp and tmp.is_a?(String) and not tmp.empty? ! seq = Bio::Sequence.auto(tmp).seq end return seq --- 43,56 ---- tmp = ent.seq elsif ent.respond_to?(:naseq) ! #seq = ent.naseq ! tmp = ent.naseq elsif ent.respond_to?(:aaseq) ! #seq = ent.aaseq ! tmp = ent.aaseq end if tmp and tmp.is_a?(String) and not tmp.empty? ! #seq = Bio::Sequence.auto(tmp).seq ! seq = Bio::Sequence.auto(tmp) end return seq *************** *** 50,54 **** # * "filename" -- local file (first entry only) # * "db:entry" -- local BioFlat, OBDA, EMBOSS, KEGG API ! def ent(arg) entry = "" db, entry_id = arg.to_s.strip.split(/:/) --- 61,65 ---- # * "filename" -- local file (first entry only) # * "db:entry" -- local BioFlat, OBDA, EMBOSS, KEGG API ! def getent(arg) entry = "" db, entry_id = arg.to_s.strip.split(/:/) *************** *** 87,92 **** # Obtain a parsed object from sources that ent() supports. ! def obj(arg) ! str = ent(arg) flatparse(str) end --- 98,103 ---- # Obtain a parsed object from sources that ent() supports. ! def getobj(arg) ! str = getent(arg) flatparse(str) end Index: psort.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/psort.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** psort.rb 25 Jul 2006 18:42:09 -0000 1.1 --- psort.rb 24 Dec 2006 08:50:18 -0000 1.2 *************** *** 14,18 **** def psort1(str) ! seq = seq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate --- 14,18 ---- def psort1(str) ! seq = getseq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate *************** *** 30,34 **** def psort2(str) ! seq = seq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate --- 30,34 ---- def psort2(str) ! seq = getseq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate Index: seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/seq.rb,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** seq.rb 19 Sep 2006 06:20:38 -0000 1.18 --- seq.rb 24 Dec 2006 08:50:18 -0000 1.19 *************** *** 18,22 **** seq = str else ! seq = seq(str) end --- 18,22 ---- seq = str else ! seq = getseq(str) end *************** *** 43,47 **** def sixtrans(str) ! seq = seq(str) [ 1, 2, 3, -1, -2, -3 ].each do |frame| title = "Translation #{frame.to_s.rjust(2)}" --- 43,47 ---- def sixtrans(str) ! seq = getseq(str) [ 1, 2, 3, -1, -2, -3 ].each do |frame| title = "Translation #{frame.to_s.rjust(2)}" *************** *** 54,58 **** def seqstat(str) max = 150 ! seq = seq(str) rep = "\n* * * Sequence statistics * * *\n\n" if seq.respond_to?(:complement) --- 54,58 ---- def seqstat(str) max = 150 ! seq = getseq(str) rep = "\n* * * Sequence statistics * * *\n\n" if seq.respond_to?(:complement) *************** *** 133,142 **** # Argument need to be at least 16 bases in length. def doublehelix(str) ! seq = seq(str) ! if str.length < 16 warn "Error: Sequence must be longer than 16 bases." return end ! if ! seq.respond_to?(:complement) warn "Error: Sequence must be a DNA sequence." return --- 133,142 ---- # Argument need to be at least 16 bases in length. def doublehelix(str) ! seq = getseq(str) ! if seq.length < 16 warn "Error: Sequence must be longer than 16 bases." return end ! if seq.moltype != Bio::Sequence::NA warn "Error: Sequence must be a DNA sequence." return From k at dev.open-bio.org Sun Dec 24 03:50:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:50:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin midi.rb,1.7,1.8 Message-ID: <200612240850.kBO8odJA010004@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv10000 Modified Files: midi.rb Log Message: * fix in sample code Index: midi.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/midi.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** midi.rb 9 Feb 2006 20:48:53 -0000 1.7 --- midi.rb 24 Dec 2006 08:50:37 -0000 1.8 *************** *** 421,430 **** seq_file = ARGV.shift mid_file = ARGV.shift - style = ARGV.shift Bio::FlatFile.auto(seq_file) do |ff| ff.each do |f| ! midi(f.naseq[0..1000], mid_file, style) end end end --- 421,430 ---- seq_file = ARGV.shift mid_file = ARGV.shift Bio::FlatFile.auto(seq_file) do |ff| ff.each do |f| ! midifile(mid_file, f.naseq[0..1000]) end end end + From k at dev.open-bio.org Sun Dec 24 04:18:45 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 09:18:45 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db/kegg kgml.rb,1.5,1.6 Message-ID: <200612240918.kBO9Ijew010657@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db/kegg In directory dev.open-bio.org:/tmp/cvs-serv10653/db/kegg Modified Files: kgml.rb Log Message: some methods are renamed to avoid confusion * :type -> :entry_type * :type -> :category * :map -> :pathway Index: kgml.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/kegg/kgml.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kgml.rb 19 Sep 2006 05:55:38 -0000 1.5 --- kgml.rb 24 Dec 2006 09:18:43 -0000 1.6 *************** *** 22,26 **** # # :id -> :entry_id ! # :type -> :entry_type # names() # --- 22,27 ---- # # :id -> :entry_id ! # :type -> :category ! # :map -> :pathway # names() # *************** *** 39,43 **** # === Examples # ! # file = ARGF.read("kgml/hsa/hsa00010.xml") # kgml = Bio::KEGG::KGML.new(file) # --- 40,44 ---- # === Examples # ! # file = File.read("kgml/hsa/hsa00010.xml") # kgml = Bio::KEGG::KGML.new(file) # *************** *** 54,61 **** # puts entry.entry_id # puts entry.name ! # puts entry.entry_type # puts entry.link # puts entry.reaction ! # puts entry.map # # attributes # puts entry.label # name --- 55,62 ---- # puts entry.entry_id # puts entry.name ! # puts entry.category # puts entry.link # puts entry.reaction ! # puts entry.pathway # # attributes # puts entry.label # name *************** *** 122,126 **** class Entry ! attr_accessor :entry_id, :name, :entry_type, :link, :reaction, :map attr_accessor :label, :shape, :x, :y, :width, :height, :fgcolor, :bgcolor attr_accessor :components --- 123,127 ---- class Entry ! attr_accessor :entry_id, :name, :category, :link, :reaction, :pathway attr_accessor :label, :shape, :x, :y, :width, :height, :fgcolor, :bgcolor attr_accessor :components *************** *** 162,172 **** attr = node.attributes entry = Entry.new ! entry.entry_id = attr["id"].to_i ! entry.name = attr["name"] ! entry.entry_type = attr["type"] # implied ! entry.link = attr["link"] ! entry.reaction = attr["reaction"] ! entry.map = attr["map"] node.elements.each("graphics") { |graphics| --- 163,173 ---- attr = node.attributes entry = Entry.new ! entry.entry_id = attr["id"].to_i ! entry.name = attr["name"] ! entry.category = attr["type"] # implied ! entry.link = attr["link"] ! entry.reaction = attr["reaction"] ! entry.pathway = attr["map"] node.elements.each("graphics") { |graphics| From k at dev.open-bio.org Sun Dec 24 04:30:24 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 09:30:24 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin seq.rb,1.19,1.20 Message-ID: <200612240930.kBO9UOru000615@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv609/lib/bio/shell/plugin Modified Files: seq.rb Log Message: * seq command is changed to getseq, and the returned object is changed from Bio::Sequence::NA to Bio::Sequence with @moltype = Bio::Sequence::NA Index: seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/seq.rb,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** seq.rb 24 Dec 2006 08:50:18 -0000 1.19 --- seq.rb 24 Dec 2006 09:30:22 -0000 1.20 *************** *** 56,60 **** seq = getseq(str) rep = "\n* * * Sequence statistics * * *\n\n" ! if seq.respond_to?(:complement) fwd = seq rev = seq.complement --- 56,60 ---- seq = getseq(str) rep = "\n* * * Sequence statistics * * *\n\n" ! if seq.moltype == Bio::Sequence::NA fwd = seq rev = seq.complement From k at dev.open-bio.org Sun Dec 24 04:30:25 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 09:30:25 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/shell/plugin test_seq.rb, 1.7, 1.8 Message-ID: <200612240930.kBO9UPoo000620@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv609/test/unit/bio/shell/plugin Modified Files: test_seq.rb Log Message: * seq command is changed to getseq, and the returned object is changed from Bio::Sequence::NA to Bio::Sequence with @moltype = Bio::Sequence::NA Index: test_seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/shell/plugin/test_seq.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_seq.rb 27 Feb 2006 09:40:13 -0000 1.7 --- test_seq.rb 24 Dec 2006 09:30:23 -0000 1.8 *************** *** 41,47 **** def test_naseq str = 'ACGT' ! assert_equal(Bio::Sequence::NA, seq(str).class) ! assert_equal(Bio::Sequence::NA.new(str), seq(str)) ! assert_equal('acgt', seq(str)) end --- 41,47 ---- def test_naseq str = 'ACGT' ! assert_equal(Bio::Sequence, getseq(str).class) ! assert_equal(Bio::Sequence::NA, getseq(str).moltype) ! assert_equal('acgt', getseq(str).seq) end *************** *** 49,55 **** def test_aaseq str = 'WD' ! assert_equal(Bio::Sequence::AA, seq(str).class) ! assert_equal(Bio::Sequence::AA.new('WD'), seq(str)) ! assert_equal('WD', seq(str)) end --- 49,55 ---- def test_aaseq str = 'WD' ! assert_equal(Bio::Sequence, getseq(str).class) ! assert_equal(Bio::Sequence::AA, getseq(str).moltype) ! assert_equal('WD', getseq(str).seq) end From k at dev.open-bio.org Sun Dec 24 05:04:53 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:04:53 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.75,1.76 Message-ID: <200612241004.kBOA4rvY001599@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv1525/lib Modified Files: bio.rb Log Message: * autoload for Bio::Nexus * added Bio.command module functions (where 'command' can be any of the BioRuby shell commands) Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** bio.rb 15 Dec 2006 15:02:27 -0000 1.75 --- bio.rb 24 Dec 2006 10:04:51 -0000 1.76 *************** *** 11,15 **** module Bio ! BIORUBY_VERSION = [1, 0, 0].extend(Comparable) ### Basic data types --- 11,15 ---- module Bio ! BIORUBY_VERSION = [1, 1, 0].extend(Comparable) ### Basic data types *************** *** 118,121 **** --- 118,122 ---- autoload :Newick, 'bio/db/newick' + autoload :Nexus, 'bio/db/nexus' ### IO interface modules *************** *** 251,254 **** --- 252,268 ---- autoload :Command, 'bio/command' + ### Provide BioRuby shell 'command' also as 'Bio.command' (like ChemRuby) + + def self.method_missing(*args) + require 'bio/shell' + extend Bio::Shell + public_class_method(*Bio::Shell.private_instance_methods) + if Bio.respond_to?(args.first) + Bio.send(*args) + else + raise NameError + end + end + end From k at dev.open-bio.org Sun Dec 24 05:06:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:06:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/data aa.rb,0.18,0.19 Message-ID: <200612241006.kBOA6Amp001676@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/data In directory dev.open-bio.org:/tmp/cvs-serv1660/lib/bio/data Modified Files: aa.rb Log Message: * small change on amino acids description Index: aa.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/data/aa.rb,v retrieving revision 0.18 retrieving revision 0.19 diff -C2 -d -r0.18 -r0.19 *** aa.rb 25 Jul 2006 18:50:01 -0000 0.18 --- aa.rb 24 Dec 2006 10:06:07 -0000 0.19 *************** *** 69,78 **** 'Trp' => 'tryptophan', 'Tyr' => 'tyrosine', ! 'Asx' => 'asparagine/aspartic acid', ! 'Glx' => 'glutamine/glutamic acid', ! 'Xle' => 'isoleucine/leucine', 'Sec' => 'selenocysteine', 'Pyl' => 'pyrrolysine', ! 'Xaa' => 'unknown', } --- 69,78 ---- 'Trp' => 'tryptophan', 'Tyr' => 'tyrosine', ! 'Asx' => 'asparagine/aspartic acid [DN]', ! 'Glx' => 'glutamine/glutamic acid [EQ]', ! 'Xle' => 'isoleucine/leucine [IL]', 'Sec' => 'selenocysteine', 'Pyl' => 'pyrrolysine', ! 'Xaa' => 'unknown [A-Z]', } From k at dev.open-bio.org Sun Dec 24 05:11:13 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:11:13 +0000 Subject: [BioRuby-cvs] bioruby README.DEV,1.11,1.12 Message-ID: <200612241011.kBOABDpg002068@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv2058 Modified Files: README.DEV Log Message: * trivial Index: README.DEV =================================================================== RCS file: /home/repository/bioruby/bioruby/README.DEV,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** README.DEV 19 Sep 2006 05:39:05 -0000 1.11 --- README.DEV 24 Dec 2006 10:11:11 -0000 1.12 *************** *** 78,82 **** # # Copyright:: Copyright (C) 2001, 2003-2005 Bio R. Hacker , ! # Copyright:: Copyright (C) 2006 Chem R. Hacker # # License:: Ruby's --- 78,82 ---- # # Copyright:: Copyright (C) 2001, 2003-2005 Bio R. Hacker , ! # Copyright:: Copyright (C) 2006 Chem R. Hacker # # License:: Ruby's *************** *** 150,159 **** # # s = Bio::Sequence.new('atgc') ! # puts s #=> 'atgc' # # Note that this method does not intialize the contained sequence # as any kind of bioruby object, only as a simple string # ! # puts s.seq.class #=> String # # See Bio::Sequence#na, Bio::Sequence#aa, and Bio::Sequence#auto --- 150,159 ---- # # s = Bio::Sequence.new('atgc') ! # puts s # => 'atgc' # # Note that this method does not intialize the contained sequence # as any kind of bioruby object, only as a simple string # ! # puts s.seq.class # => String # # See Bio::Sequence#na, Bio::Sequence#aa, and Bio::Sequence#auto From k at dev.open-bio.org Sun Dec 24 05:14:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:14:21 +0000 Subject: [BioRuby-cvs] bioruby/doc KEGG_API.rd, 1.2, 1.3 KEGG_API.rd.ja, 1.8, 1.9 Message-ID: <200612241014.kBOAEL1e002250@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv2234 Modified Files: KEGG_API.rd KEGG_API.rd.ja Log Message: * updated to KEGG API v6.0 Index: KEGG_API.rd.ja =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd.ja,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** KEGG_API.rd.ja 23 Feb 2006 04:51:23 -0000 1.8 --- KEGG_API.rd.ja 24 Dec 2006 10:14:19 -0000 1.9 *************** *** 20,23 **** --- 20,24 ---- * (()) * (()) + * (()) * (()) * (()) *************** *** 31,98 **** * (()), (()) * (()), (()) [...1530 lines suppressed...] + ?????????????????????????????????????????????????????????????? + ???????????????????????????????? bget ?????????? "-f k" + ?????????????????? KCF ???????????????????????????????????????? + + ?????? + ArrayOfStructureAlignment + + ???? + kcf = bget("-f k gl:G12922") + search_glycans_by_kcam(kcf, "gapped", "local", 1, 5) + + ???? URL?? + * (()) + * (()) == Notes ! Last updated: November 20, 2006 =end Index: KEGG_API.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KEGG_API.rd 23 Feb 2006 04:51:23 -0000 1.2 --- KEGG_API.rd 24 Dec 2006 10:14:19 -0000 1.3 *************** *** 81,148 **** * (()), (()) * (()), (()) * (()) * (()) ! * (()), ! (()), ! (()) * (()) ! * (()), ! (()), [...1502 lines suppressed...] + + You can obtain a KCF formatted structural data of matched glycans + using bget method with the "-f k" option to confirm the alignment. + + Return value: + ArrayOfStructureAlignment + + Example: + kcf = bget("-f k gl:G12922") + search_glycans_by_kcam(kcf, "gapped", "local", 1, 5) + + Related site: + * (()) + * (()) == Notes ! Last updated: November 20, 2006 =end From k at dev.open-bio.org Sun Dec 24 09:55:55 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 14:55:55 +0000 Subject: [BioRuby-cvs] bioruby/bin bioruby,1.17,1.18 Message-ID: <200612241455.kBOEttSM003821@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/bin In directory dev.open-bio.org:/tmp/cvs-serv3812/bin Modified Files: bioruby Log Message: * updated for version 1.1.0 (need to use 'gem install bio --no-wrappers' to avoid modification of bin/* files by RubyGems) Index: bioruby =================================================================== RCS file: /home/repository/bioruby/bioruby/bin/bioruby,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** bioruby 24 Dec 2006 08:32:08 -0000 1.17 --- bioruby 24 Dec 2006 14:55:53 -0000 1.18 *************** *** 12,16 **** begin require 'rubygems' ! require_gem 'bio', '~> 0.7' rescue LoadError end --- 12,16 ---- begin require 'rubygems' ! require_gem 'bio', '>= 1.1.0' rescue LoadError end From k at dev.open-bio.org Sun Dec 24 09:55:55 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 14:55:55 +0000 Subject: [BioRuby-cvs] bioruby gemspec.rb,1.7,1.8 Message-ID: <200612241455.kBOEttvT003818@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv3812 Modified Files: gemspec.rb Log Message: * updated for version 1.1.0 (need to use 'gem install bio --no-wrappers' to avoid modification of bin/* files by RubyGems) Index: gemspec.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/gemspec.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gemspec.rb 27 Feb 2006 12:13:54 -0000 1.7 --- gemspec.rb 24 Dec 2006 14:55:53 -0000 1.8 *************** *** 1,8 **** - $:.unshift '../lib' require 'rubygems' spec = Gem::Specification.new do |s| s.name = 'bio' ! s.version = "1.0.0" s.author = "BioRuby project" --- 1,7 ---- require 'rubygems' spec = Gem::Specification.new do |s| s.name = 'bio' ! s.version = "1.1.0" s.author = "BioRuby project" From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/blast test_report.rb, 1.3, 1.4 test_xmlparser.rb, 1.4, 1.5 Message-ID: <200612241719.kBOHJ6VO004072@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/blast In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/blast Modified Files: test_report.rb test_xmlparser.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_xmlparser.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/blast/test_xmlparser.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_xmlparser.rb 3 Feb 2006 17:21:51 -0000 1.4 --- test_xmlparser.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/appl/blast/test_xmlparser.rb - Unit test for Bio::Blast::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/blast/test_xmlparser.rb - Unit test for Bio::Blast::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ *************** *** 39,43 **** def self.output ! File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read end end --- 26,31 ---- def self.output ! # File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read ! File.open(File.join(TestDataBlast, '2.2.15.blastp.m7')).read end end Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/blast/test_report.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_report.rb 3 Feb 2006 17:21:51 -0000 1.3 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/blast/test_report.rb - Unit test for Bio::Blast::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/blast/test_report.rb - Unit test for Bio::Blast::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_alignment.rb, 1.8, 1.9 test_db.rb, 1.2, 1.3 test_feature.rb, 1.2, 1.3 test_shell.rb, 1.5, 1.6 Message-ID: <200612241719.kBOHJ69d004063@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio Modified Files: test_alignment.rb test_db.rb test_feature.rb test_shell.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_feature.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_feature.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_feature.rb 23 Nov 2005 11:47:12 -0000 1.2 --- test_feature.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/test_feature.rb - Unit test for Features/Feature classes # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/test_feature.rb - Unit test for Features/Feature classes # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_alignment.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_alignment.rb 14 Dec 2006 14:10:57 -0000 1.8 --- test_alignment.rb 24 Dec 2006 17:19:04 -0000 1.9 *************** *** 2,7 **** # test/unit/bio/test_alignment.rb - Unit test for Bio::Alignment # ! # Copyright (C) 2004 Moses Hohman ! # 2005 Naohisa Goto # # This library is free software; you can redistribute it and/or --- 2,7 ---- # test/unit/bio/test_alignment.rb - Unit test for Bio::Alignment # ! # Copyright:: Copyright (C) 2004 Moses Hohman ! # Copyright (C) 2005 Naohisa Goto # # This library is free software; you can redistribute it and/or Index: test_db.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_db.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_db.rb 23 Nov 2005 11:44:12 -0000 1.2 --- test_db.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/test_db.rb - Unit test for Bio::DB # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/test_db.rb - Unit test for Bio::DB # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_shell.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_shell.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_shell.rb 21 Feb 2006 17:40:37 -0000 1.5 --- test_shell.rb 24 Dec 2006 17:19:04 -0000 1.6 *************** *** 2,20 **** # test/unit/bio/test_shell.rb - Unit test for Bio::Shell # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/test_shell.rb - Unit test for Bio::Shell # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/targetp test_report.rb, 1.3, 1.4 Message-ID: <200612241719.kBOHJ6nE004097@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/targetp In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/targetp Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/targetp/test_report.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_report.rb 23 Nov 2005 01:42:38 -0000 1.3 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/targetp/test_report.rb - Unit test for Bio::TargetP::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/targetp/test_report.rb - Unit test for Bio::TargetP::Report # ! # Copyright: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/tmhmm test_report.rb, 1.2, 1.3 Message-ID: <200612241719.kBOHJ6O4004102@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/tmhmm In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/tmhmm Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/tmhmm/test_report.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_report.rb 23 Nov 2005 05:10:34 -0000 1.2 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/appl/tmhmm/test_report.rb - Unit test for Bio::TMHMM::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/tmhmm/test_report.rb - Unit test for Bio::TMHMM::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/sosui test_report.rb, 1.3, 1.4 Message-ID: <200612241719.kBOHJ6hb004092@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/sosui In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/sosui Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/sosui/test_report.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_report.rb 22 Nov 2005 08:31:48 -0000 1.3 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/sosui/test_report.rb - Unit test for Bio::SOSUI::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/sosui/test_report.rb - Unit test for Bio::SOSUI::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/data test_aa.rb, 1.4, 1.5 test_codontable.rb, 1.4, 1.5 Message-ID: <200612241719.kBOHJ6u1004107@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/data In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/data Modified Files: test_aa.rb test_codontable.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_codontable.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_codontable.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_codontable.rb 23 Nov 2005 05:25:10 -0000 1.4 --- test_codontable.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/data/test_codontable.rb - Unit test for Bio::CodonTable # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/data/test_codontable.rb - Unit test for Bio::CodonTable # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_aa.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_aa.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_aa.rb 23 Nov 2005 05:25:10 -0000 1.4 --- test_aa.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/data/test_aa.rb - Unit test for Bio::AminoAcid # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/data/test_aa.rb - Unit test for Bio::AminoAcid # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_fasta.rb, 1.3, 1.4 test_gff.rb, 1.4, 1.5 test_prosite.rb, 1.4, 1.5 Message-ID: <200612241719.kBOHJ6Lv004113@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/db Modified Files: test_fasta.rb test_gff.rb test_prosite.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_fasta.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_fasta.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_fasta.rb 18 Dec 2005 17:55:13 -0000 1.3 --- test_fasta.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/test_fasta.rb - Unit test for Bio::FastaFormat # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/test_fasta.rb - Unit test for Bio::FastaFormat # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_prosite.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_prosite.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_prosite.rb 26 Jul 2006 08:15:28 -0000 1.4 --- test_prosite.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/db/test_prosite.rb - Unit test for Bio::PROSITE # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/test_prosite.rb - Unit test for Bio::PROSITE # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_gff.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_gff.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_gff.rb 19 Dec 2005 01:21:42 -0000 1.4 --- test_gff.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/db/test_gff.rb - Unit test for Bio::GFF # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/test_gff.rb - Unit test for Bio::GFF # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/genscan test_report.rb, 1.2, 1.3 Message-ID: <200612241719.kBOHJ6X0004078@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/genscan In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/genscan Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/genscan/test_report.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_report.rb 22 Nov 2005 08:31:47 -0000 1.2 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/appl/genscan/test_report.rb - Unit test for Bio::Genscan::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/genscan/test_report.rb - Unit test for Bio::Genscan::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl test_blast.rb,1.3,1.4 Message-ID: <200612241719.kBOHJ64Z004069@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl Modified Files: test_blast.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_blast.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/test_blast.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_blast.rb 3 Feb 2006 17:39:13 -0000 1.3 --- test_blast.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/test_blast.rb - Unit test for Bio::Blast # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/test_blast.rb - Unit test for Bio::Blast # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/hmmer test_report.rb, 1.1, 1.2 Message-ID: <200612241719.kBOHJ6sW004087@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/hmmer In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/hmmer Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/hmmer/test_report.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_report.rb 2 Feb 2006 17:10:08 -0000 1.1 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/appl/hmmer/test_report.rb - Unit test for Bio::HMMER::Report # ! # Copyright (C) 2006 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/hmmer/test_report.rb - Unit test for Bio::HMMER::Report # ! # Copyright:: Copyright (C) 2006 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util test_sirna.rb,1.2,1.3 Message-ID: <200612241719.kBOHJ7Vf004144@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/util Modified Files: test_sirna.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_sirna.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_sirna.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_sirna.rb 27 Dec 2005 17:27:38 -0000 1.2 --- test_sirna.rb 24 Dec 2006 17:19:05 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/util/test_sirna.rb - Unit test for Bio::SiRNA. # ! # Copyright (C) 2005 Mitsuteru C. Nakap ! # ! # 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$ --- 2,7 ---- # test/unit/bio/util/test_sirna.rb - Unit test for Bio::SiRNA. # ! # Copyright:: Copyright (C) 2005 Mitsuteru C. Nakap ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db/kegg test_genes.rb,1.3,1.4 Message-ID: <200612241719.kBOHJ74p004127@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db/kegg In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/db/kegg Modified Files: test_genes.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_genes.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/kegg/test_genes.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_genes.rb 9 Nov 2005 13:20:09 -0000 1.3 --- test_genes.rb 24 Dec 2006 17:19:05 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/kegg/test_genes.rb - Unit test for Bio::KEGG::GENES # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/kegg/test_genes.rb - Unit test for Bio::KEGG::GENES # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/io test_ddbjxml.rb, 1.1, 1.2 test_fastacmd.rb, 1.1, 1.2 Message-ID: <200612241719.kBOHJ7f7004132@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/io In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/io Modified Files: test_ddbjxml.rb test_fastacmd.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_fastacmd.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/io/test_fastacmd.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_fastacmd.rb 28 Jan 2006 08:05:52 -0000 1.1 --- test_fastacmd.rb 24 Dec 2006 17:19:05 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/io/test_fastacmd.rb - Unit test for Bio::Blast::Fastacmd. # ! # Copyright (C) 2006 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/io/test_fastacmd.rb - Unit test for Bio::Blast::Fastacmd. # ! # Copyright:: Copyright (C) 2006 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_ddbjxml.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/io/test_ddbjxml.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_ddbjxml.rb 11 Dec 2005 14:59:25 -0000 1.1 --- test_ddbjxml.rb 24 Dec 2006 17:19:05 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/io/test_ddbjxml.rb - Unit test for DDBJ XML. # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/io/test_ddbjxml.rb - Unit test for DDBJ XML. # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/sequence test_common.rb, 1.2, 1.3 test_compat.rb, 1.1, 1.2 Message-ID: <200612241719.kBOHJ7co004138@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/sequence In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/sequence Modified Files: test_common.rb test_compat.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_compat.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_compat.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_compat.rb 5 Feb 2006 17:39:27 -0000 1.1 --- test_compat.rb 24 Dec 2006 17:19:05 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/sequence/test_compat.rb - Unit test for Bio::Sequencce::Compat # ! # Copyright (C) 2006 Mitsuteru C. Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/sequence/test_compat.rb - Unit test for Bio::Sequencce::Compat # ! # Copyright:: Copyright (C) 2006 Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ Index: test_common.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_common.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_common.rb 7 Feb 2006 16:53:08 -0000 1.2 --- test_common.rb 24 Dec 2006 17:19:05 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/sequence/test_common.rb - Unit test for Bio::Sequencce::Common # ! # Copyright (C) 2006 Mitsuteru C. Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/sequence/test_common.rb - Unit test for Bio::Sequencce::Common # ! # Copyright:: Copyright (C) 2006 Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 12:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db/embl test_common.rb, 1.2, 1.3 test_embl.rb, 1.3, 1.4 test_uniprot.rb, 1.3, 1.4 Message-ID: <200612241719.kBOHJ7KC004120@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db/embl In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/db/embl Modified Files: test_common.rb test_embl.rb test_uniprot.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_uniprot.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_uniprot.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_uniprot.rb 18 Dec 2005 17:43:51 -0000 1.3 --- test_uniprot.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/embl/test_uniprot.rb - Unit test for Bio::UniProt # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/embl/test_uniprot.rb - Unit test for Bio::UniProt # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_common.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_common.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_common.rb 23 Nov 2005 10:00:54 -0000 1.2 --- test_common.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/db/embl/common.rb - Unit test for Bio::EMBL::COMMON module # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/embl/common.rb - Unit test for Bio::EMBL::COMMON module # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_embl.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_embl.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_embl.rb 23 Nov 2005 10:02:42 -0000 1.3 --- test_embl.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/embl/test_embl.rb - Unit test for Bio::EMBL # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/embl/test_embl.rb - Unit test for Bio::EMBL # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From k at dev.open-bio.org Sun Dec 24 13:32:57 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 18:32:57 +0000 Subject: [BioRuby-cvs] bioruby ChangeLog,1.55,1.56 Message-ID: <200612241832.kBOIWvF8004345@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv4341 Modified Files: ChangeLog Log Message: * some additional notes before the 1.1 release Index: ChangeLog =================================================================== RCS file: /home/repository/bioruby/bioruby/ChangeLog,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** ChangeLog 14 Dec 2006 16:42:36 -0000 1.55 --- ChangeLog 24 Dec 2006 18:32:55 -0000 1.56 *************** *** 1,2 **** --- 1,28 ---- + 2006-12-24 Toshiaki Katayama + + * bin/bioruby, lib/bio/shell/, lib/bio/shell/rails/ + + Web functionallity of the BioRuby shell is completely rewrited + to utilize generator of the Ruby on Rails. This means we don't + need to have a copy of the rails installation in our code base + any more. The shell now run in threads so user does not need + to run 2 processes as before (drb and webrick). Most importantly, + the shell is extended to have textarea to input any code and + the evaluated result is returned with AJAX having various neat + visual effects. + + 2006-12-19 Christian Zmasek + + * lib/bio/db/nexus.rb + + Bio::Nexus is newly developed during the Phyloinformatics hackathon. + + 2006-12-16 Toshiaki Katayama + + * lib/bio/io/sql.rb + + Updated to follow recent BioSQL schema contributed by + Raoul Jean Pierre Bonnal. + 2006-12-15 Mitsuteru Nakao From k at dev.open-bio.org Wed Dec 27 08:32:42 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Wed, 27 Dec 2006 13:32:42 +0000 Subject: [BioRuby-cvs] bioruby/doc KEGG_API.rd, 1.3, 1.4 KEGG_API.rd.ja, 1.9, 1.10 Message-ID: <200612271332.kBRDWgXV010808@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv10804/doc Modified Files: KEGG_API.rd KEGG_API.rd.ja Log Message: * updated from KEGG API v6.0 to v6.1 Index: KEGG_API.rd.ja =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd.ja,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** KEGG_API.rd.ja 24 Dec 2006 10:14:19 -0000 1.9 --- KEGG_API.rd.ja 27 Dec 2006 13:32:40 -0000 1.10 *************** *** 69,75 **** --- 69,78 ---- * (()) * (()) + # * (()) + # * (()) * (()) * (()) * (()) + # * (()) * (()) * (()) *************** *** 77,80 **** --- 80,86 ---- * (()) * (()) + # * (()) + # * (()) + # * (()) * (()) * (()) *************** *** 111,120 **** --- 117,130 ---- * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) *************** *** 604,608 **** ?????????? ID ?????????????? embl:J00231 ?? EMBL ?????????? J00231 ?? ??????????entry_id ?????????? genes_id, enzyme_id, compound_id, ! glycan_id, reaction_id, pathway_id, motif_id ???????????????? * genes_id ?? keggorg ???????????? ':' ?????????? KEGG ???????? ID ?????? --- 614,618 ---- ?????????? ID ?????????????? embl:J00231 ?? EMBL ?????????? J00231 ?? ??????????entry_id ?????????? genes_id, enzyme_id, compound_id, ! drug_id, glycan_id, reaction_id, pathway_id, motif_id ???????????????? * genes_id ?? keggorg ???????????? ':' ?????????? KEGG ???????? ID ?????? *************** *** 615,618 **** --- 625,631 ---- C00158 ?????????????????????????????????? + * drug_id ?? dr: ???????????????? ID ??????dr:D00201 ?????????????? + D00201 ???????????????????????????????????????????? + * glycan_id ?? gl: ???????????????? ID ??????gl:G00050 ?????????? G00050 ???????????? Paragloboside ???????????? *************** *** 1123,1126 **** --- 1136,1153 ---- * (()) + #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) + # + #???????? genes_id ???????????????????????????????????????????????????? + #???????????????? org ?? 'all' ???????????????????????????????????? + # + #?????? + # ArrayOfSSDBRelation + # + #???? + # # ?????????????? b0002 ?????????????????????????????????????????????? + # # ?????????????????????????? + # get_neighbors_by_gene('eco:b0002', 'all' 1, 10) + # # ???????????? offset = offset + limit ?????????????? + # get_neighbors_by_gene('eco:b0002', 'all' 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) *************** *** 1172,1175 **** --- 1199,1212 ---- get_paralogs_by_gene('eco:b0002', 11, 10) + #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) + # + #???????????????????????? Smith-Waterman ?????????????????????????????? + # + #?????? + # SSDBRelation + # + #???? + # # ???????? b0002 ???????? b3940 ???????????????????????????????????????? + # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif *************** *** 1218,1221 **** --- 1255,1268 ---- get_ko_by_gene('eco:b0002') + #--- get_ko_members(string:ko_id) + # + #???????? ko_id ?? KO ???????????????????????????????????????????? + # + #?????? + # ArrayOfstring (genes_id) + # + #???? + # # KO ???? K02208 ?????????????????????????????????? + # get_ko_by_gene('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) *************** *** 1256,1260 **** --- 1303,1329 ---- get_genes_by_ko('ko:K00010', 'all') + #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #???????????????????? OC ?????????????????????????????????? + # + #?????? + # ArrayOfstring (genes_id) + # + #???? + # # eco:b0002 ???????????????????????????????????????????????????????? + # get_oc_members_by_gene('eco:b0002', 1, 10) + # get_oc_members_by_gene('eco:b0002', 11, 10) + #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #???????????????????? PC ?????????????????????????????????? + # + #?????? + # ArrayOfstring (genes_id) + # + #???? + # # eco:b0002 ?????????????????????????????????????????????????????? + # get_pc_members_by_gene('eco:b0002', 1, 10) + # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY *************** *** 1672,1675 **** --- 1741,1754 ---- search_compounds_by_name("shikimic acid") + --- search_drugs_by_name(string:name) + + ???????????????????????????? + + ?????? + ArrayOfstring (drug_id) + + ???? + search_drugs_by_name("tetracyclin") + --- search_glycans_by_name(string:name) *************** *** 1694,1697 **** --- 1773,1788 ---- search_compounds_by_composition("C7H10O5") + --- search_drugs_by_composition(string:composition) + + ???????????????????????????? + ?????????????????????????????????????????????? + ???????????????????????? + + ?????? + ArrayOfstring (drug_id) + + ???? + search_drugs_by_composition("HCl") + --- search_glycans_by_composition(string:composition) *************** *** 1717,1720 **** --- 1808,1822 ---- search_compounds_by_mass(174.05, 0.1) + --- search_drugs_by_mass(float:mass, float:range) + + ?????????????????????????????? + mass ???????????? ??range ???????????????????????????????? + + ?????? + ArrayOfstring (drug_id) + + ???? + search_drugs_by_mass(150, 1.0) + --- search_glycans_by_mass(float:mass, float:range) *************** *** 1746,1749 **** --- 1848,1869 ---- * (()) + --- search_drugs_by_subcomp(string:mol, int:offset, int:limit) + + ???????????????????????????? subcomp ?????????????????????????????? + + ?????????????????????????????????????????????????????????????? + ???????????????????????????????????? bget ?????????? "-f m" + ?????????????????? MOL ???????????????????????????????????????? + + ?????? + ArrayOfStructureAlignment + + ???? + mol = bget("-f m dr:D00201") + search_drugs_by_subcomp(mol, 1, 5) + + ???? URL?? + * (()) + --- search_glycans_by_kcam(string:kcf, string:program, string:option, int:offset, int:limit) *************** *** 1771,1775 **** == Notes ! Last updated: November 20, 2006 =end --- 1891,1895 ---- == Notes ! Last updated: December 27, 2006 =end Index: KEGG_API.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KEGG_API.rd 24 Dec 2006 10:14:19 -0000 1.3 --- KEGG_API.rd 27 Dec 2006 13:32:39 -0000 1.4 *************** *** 118,124 **** --- 118,127 ---- * (()) * (()) + # * (()) + # * (()) * (()) * (()) * (()) + # * (()) * (()) * (()) *************** *** 126,129 **** --- 129,135 ---- * (()) * (()) + # * (()) + # * (()) + # * (()) * (()) * (()) *************** *** 160,169 **** --- 166,179 ---- * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) *************** *** 599,604 **** the database name and the identifier of an entry joined by a colon sign as 'database:entry' (e.g. 'embl:J00231' means an EMBL entry 'J00231'). ! 'entry_id' includes 'genes_id', 'enzyme_id', 'compound_id', 'glycan_id', ! 'reaction_id', 'pathway_id' and 'motif_id' described in below. * 'genes_id' is a gene identifier used in KEGG/GENES which consists of --- 609,614 ---- the database name and the identifier of an entry joined by a colon sign as 'database:entry' (e.g. 'embl:J00231' means an EMBL entry 'J00231'). ! 'entry_id' includes 'genes_id', 'enzyme_id', 'compound_id', 'drug_id', ! 'glycan_id', 'reaction_id', 'pathway_id' and 'motif_id' described in below. * 'genes_id' is a gene identifier used in KEGG/GENES which consists of *************** *** 606,622 **** * 'enzyme_id' is an enzyme identifier consisting of database name 'ec' ! and an enzyme code used in KEGG/LIGAND (e.g. 'ec:1.1.1.1' means an ! alcohol dehydrogenase enzyme) ! * 'compound_id' is a compound identifier consisting of database name 'cpd' ! and a compound number used in KEGG/LIGAND (e.g. 'cpd:C00158' means a ! citric acid). Note that some compounds also have 'glycan_id' and ! both IDs are accepted and converted internally by the corresponding ! methods. * 'glycan_id' is a glycan identifier consisting of database name 'gl' ! and a glycan number used in KEGG/GLYCAN (e.g. 'gl:G00050' means a ! Paragloboside). Note that some glycans also have 'compound_id' and ! both IDs are accepted and converted internally by the corresponding methods. --- 616,636 ---- * 'enzyme_id' is an enzyme identifier consisting of database name 'ec' ! and an enzyme code used in KEGG/LIGAND ENZYME database. ! (e.g. 'ec:1.1.1.1' means an alcohol dehydrogenase enzyme) ! * 'compound_id' is a compound identifier consisting of database name ! 'cpd' and a compound number used in KEGG COMPOUND / LIGAND database ! (e.g. 'cpd:C00158' means a citric acid). Note that some compounds ! also have 'glycan_id' and both IDs are accepted and converted internally ! by the corresponding methods. ! ! * 'drug_id' is a drug identifier consisting of database name 'dr' ! and a compound number used in KEGG DRUG / LIGAND database ! (e.g. 'dr:D00201' means a tetracycline). * 'glycan_id' is a glycan identifier consisting of database name 'gl' ! and a glycan number used in KEGG GLYCAN database (e.g. 'gl:G00050' ! means a Paragloboside). Note that some glycans also have 'compound_id' ! and both IDs are accepted and converted internally by the corresponding methods. *************** *** 692,695 **** --- 706,724 ---- length2 amino acid length of the genes_id2 (int) + #Notice (26 Nov, 2004): + # + #We found a serious bug with the 'best_flag_1to2' and 'best_flag_2to1' + #fields in the SSDBRelation data type. The methods returning the + #SSDBRelation (and ArrayOfSSDBRelation) data type had returned the + #opposite values of the intended results with the both fields. + #The following methods had been affected by this bug: + # + ## * get_neighbors_by_gene + # * get_best_neighbors_by_gene + # * get_reverse_best_neighbors_by_gene + # * get_paralogs_by_gene + ## * get_similarity_between_genes + # + #This problem is fixed in the KEGG API version 3.2. + ArrayOfSSDBRelation *************** *** 1136,1139 **** --- 1165,1182 ---- * (()) + #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) + # + #Search homologous genes of the user specified 'genes_id' from specified + #organism (or from all organisms if 'all' is given as org). + # + #Return value: + # ArrayOfSSDBRelation + # + #Examples: + # # This will search all homologous genes of E. coli gene 'b0002' + # # in the SSDB and returns the first ten results. + # get_neighbors_by_gene('eco:b0002', 'all', 1, 10) + # # Next ten results. + # get_neighbors_by_gene('eco:b0002', 'all', 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) *************** *** 1185,1188 **** --- 1228,1242 ---- get_paralogs_by_gene('eco:b0002', 11, 10) + #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) + # + #Returns data containing Smith-Waterman score and alignment positions + #between the two genes. + # + #Return value: + # SSDBRelation + # + #Example: + # # Returns a 'sw_score' between two E. coli genes 'b0002' and 'b3940' + # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif *************** *** 1228,1231 **** --- 1282,1295 ---- get_ko_by_gene('eco:b0002') + #--- get_ko_members(string:ko_id) + # + #Returns all genes assigned to the given KO entry. + # + #Return value: + # ArrayOfstring (genes_id) + # + #Example + # # Returns genes_ids those which belong to KO entry 'ko:K02598'. + # get_ko_members('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) *************** *** 1267,1271 **** --- 1331,1359 ---- get_genes_by_ko('ko:K00010', 'all') + #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #Search all members of the same OC (KEGG Ortholog Cluster) to which given + #genes_id belongs. + # + #Return value: + # ArrayOfstring (genes_id) + # + #Example + # # Returns genes belonging to the same OC with eco:b0002 gene. + # get_oc_members_by_gene('eco:b0002', 1, 10) + # get_oc_members_by_gene('eco:b0002', 11, 10) + #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #Search all members of the same PC (KEGG Paralog Cluster) to which given + #genes_id belongs. + # + #Return value: + # ArrayOfstring (genes_id) + # + #Example + # # Returns genes belonging to the same PC with eco:b0002 gene. + # get_pc_members_by_gene('eco:b0002', 1, 10) + # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY *************** *** 1684,1687 **** --- 1772,1785 ---- search_compounds_by_name("shikimic acid") + --- search_drugs_by_name(string:name) + + Returns a list of drugs having the specified name. + + Return value: + ArrayOfstring (drug_id) + + Example: + search_drugs_by_name("tetracyclin") + --- search_glycans_by_name(string:name) *************** *** 1705,1708 **** --- 1803,1817 ---- search_compounds_by_composition("C7H10O5") + --- search_drugs_by_composition(string:composition) + + Returns a list of drugs containing elements indicated by the composition. + Order of the elements is insensitive. + + Return value: + ArrayOfstring (drug_id) + + Example: + search_drugs_by_composition("HCl") + --- search_glycans_by_composition(string:composition) *************** *** 1727,1730 **** --- 1836,1850 ---- search_compounds_by_mass(174.05, 0.1) + --- search_drugs_by_mass(float:mass, float:range) + + Returns a list of drugs having the molecular weight around 'mass' + with some ambiguity (range). + + Return value: + ArrayOfstring (drug_id) + + Example: + search_drugs_by_mass(150, 1.0) + --- search_glycans_by_mass(float:mass, float:range) *************** *** 1756,1759 **** --- 1876,1897 ---- * (()) + --- search_drugs_by_subcomp(string:mol, int:offset, int:limit) + + Returns a list of drugs with the alignment having common sub-structure + calculated by the subcomp program. + + You can obtain a MOL formatted structural data of matched drugs + using bget method with the "-f m" option to confirm the alignment. + + Return value: + ArrayOfStructureAlignment + + Example: + mol = bget("-f m dr:D00201") + search_drugs_by_subcomp(mol, 1, 5) + + Related site: + * (()) + --- search_glycans_by_kcam(string:kcf, string:program, string:option, int:offset, int:limit) *************** *** 1780,1784 **** == Notes ! Last updated: November 20, 2006 =end --- 1918,1923 ---- == Notes ! Last updated: December 27, 2006 =end + From k at dev.open-bio.org Wed Dec 27 08:40:47 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Wed, 27 Dec 2006 13:40:47 +0000 Subject: [BioRuby-cvs] bioruby/doc KEGG_API.rd, 1.4, 1.5 KEGG_API.rd.ja, 1.10, 1.11 Message-ID: <200612271340.kBRDelOv010854@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv10850 Modified Files: KEGG_API.rd KEGG_API.rd.ja Log Message: * obsoleted comments are removed Index: KEGG_API.rd.ja =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd.ja,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** KEGG_API.rd.ja 27 Dec 2006 13:32:40 -0000 1.10 --- KEGG_API.rd.ja 27 Dec 2006 13:40:45 -0000 1.11 *************** *** 69,78 **** * (()) * (()) - # * (()) - # * (()) * (()) * (()) * (()) - # * (()) * (()) * (()) --- 69,75 ---- *************** *** 80,86 **** * (()) * (()) - # * (()) - # * (()) - # * (()) * (()) * (()) --- 77,80 ---- *************** *** 1136,1153 **** * (()) - #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) - # - #???????? genes_id ???????????????????????????????????????????????????? - #???????????????? org ?? 'all' ???????????????????????????????????? - # - #?????? - # ArrayOfSSDBRelation - # - #???? - # # ?????????????? b0002 ?????????????????????????????????????????????? - # # ?????????????????????????? - # get_neighbors_by_gene('eco:b0002', 'all' 1, 10) - # # ???????????? offset = offset + limit ?????????????? - # get_neighbors_by_gene('eco:b0002', 'all' 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) --- 1130,1133 ---- *************** *** 1199,1212 **** get_paralogs_by_gene('eco:b0002', 11, 10) - #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) - # - #???????????????????????? Smith-Waterman ?????????????????????????????? - # - #?????? - # SSDBRelation - # - #???? - # # ???????? b0002 ???????? b3940 ???????????????????????????????????????? - # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif --- 1179,1182 ---- *************** *** 1255,1268 **** get_ko_by_gene('eco:b0002') - #--- get_ko_members(string:ko_id) - # - #???????? ko_id ?? KO ???????????????????????????????????????????? - # - #?????? - # ArrayOfstring (genes_id) - # - #???? - # # KO ???? K02208 ?????????????????????????????????? - # get_ko_by_gene('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) --- 1225,1228 ---- *************** *** 1303,1329 **** get_genes_by_ko('ko:K00010', 'all') - #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #???????????????????? OC ?????????????????????????????????? - # - #?????? - # ArrayOfstring (genes_id) - # - #???? - # # eco:b0002 ???????????????????????????????????????????????????????? - # get_oc_members_by_gene('eco:b0002', 1, 10) - # get_oc_members_by_gene('eco:b0002', 11, 10) - #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #???????????????????? PC ?????????????????????????????????? - # - #?????? - # ArrayOfstring (genes_id) - # - #???? - # # eco:b0002 ?????????????????????????????????????????????????????? - # get_pc_members_by_gene('eco:b0002', 1, 10) - # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY --- 1263,1267 ---- Index: KEGG_API.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** KEGG_API.rd 27 Dec 2006 13:32:39 -0000 1.4 --- KEGG_API.rd 27 Dec 2006 13:40:45 -0000 1.5 *************** *** 118,127 **** * (()) * (()) - # * (()) - # * (()) * (()) * (()) * (()) - # * (()) * (()) * (()) --- 118,124 ---- *************** *** 129,135 **** * (()) * (()) - # * (()) - # * (()) - # * (()) * (()) * (()) --- 126,129 ---- *************** *** 706,724 **** length2 amino acid length of the genes_id2 (int) - #Notice (26 Nov, 2004): - # - #We found a serious bug with the 'best_flag_1to2' and 'best_flag_2to1' - #fields in the SSDBRelation data type. The methods returning the - #SSDBRelation (and ArrayOfSSDBRelation) data type had returned the - #opposite values of the intended results with the both fields. - #The following methods had been affected by this bug: - # - ## * get_neighbors_by_gene - # * get_best_neighbors_by_gene - # * get_reverse_best_neighbors_by_gene - # * get_paralogs_by_gene - ## * get_similarity_between_genes - # - #This problem is fixed in the KEGG API version 3.2. + ArrayOfSSDBRelation --- 700,703 ---- *************** *** 1165,1182 **** * (()) - #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) - # - #Search homologous genes of the user specified 'genes_id' from specified - #organism (or from all organisms if 'all' is given as org). - # - #Return value: - # ArrayOfSSDBRelation - # - #Examples: - # # This will search all homologous genes of E. coli gene 'b0002' - # # in the SSDB and returns the first ten results. - # get_neighbors_by_gene('eco:b0002', 'all', 1, 10) - # # Next ten results. - # get_neighbors_by_gene('eco:b0002', 'all', 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) --- 1144,1147 ---- *************** *** 1228,1242 **** get_paralogs_by_gene('eco:b0002', 11, 10) - #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) - # - #Returns data containing Smith-Waterman score and alignment positions - #between the two genes. - # - #Return value: - # SSDBRelation - # - #Example: - # # Returns a 'sw_score' between two E. coli genes 'b0002' and 'b3940' - # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif --- 1193,1196 ---- *************** *** 1282,1295 **** get_ko_by_gene('eco:b0002') - #--- get_ko_members(string:ko_id) - # - #Returns all genes assigned to the given KO entry. - # - #Return value: - # ArrayOfstring (genes_id) - # - #Example - # # Returns genes_ids those which belong to KO entry 'ko:K02598'. - # get_ko_members('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) --- 1236,1239 ---- *************** *** 1331,1359 **** get_genes_by_ko('ko:K00010', 'all') - #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #Search all members of the same OC (KEGG Ortholog Cluster) to which given - #genes_id belongs. - # - #Return value: - # ArrayOfstring (genes_id) - # - #Example - # # Returns genes belonging to the same OC with eco:b0002 gene. - # get_oc_members_by_gene('eco:b0002', 1, 10) - # get_oc_members_by_gene('eco:b0002', 11, 10) - #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #Search all members of the same PC (KEGG Paralog Cluster) to which given - #genes_id belongs. - # - #Return value: - # ArrayOfstring (genes_id) - # - #Example - # # Returns genes belonging to the same PC with eco:b0002 gene. - # get_pc_members_by_gene('eco:b0002', 1, 10) - # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY --- 1275,1279 ---- From nakao at dev.open-bio.org Thu Dec 28 01:25:24 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 28 Dec 2006 06:25:24 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/blast test_xmlparser.rb, 1.5, 1.6 Message-ID: <200612280625.kBS6POX4013884@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/blast In directory dev.open-bio.org:/tmp/cvs-serv13864/test/unit/bio/appl/blast Modified Files: test_xmlparser.rb Log Message: * Fixed a bug to read a data file. Index: test_xmlparser.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/blast/test_xmlparser.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_xmlparser.rb 24 Dec 2006 17:19:04 -0000 1.5 --- test_xmlparser.rb 28 Dec 2006 06:25:21 -0000 1.6 *************** *** 26,31 **** def self.output ! # File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read ! File.open(File.join(TestDataBlast, '2.2.15.blastp.m7')).read end end --- 26,31 ---- def self.output ! File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read ! # File.open(File.join(TestDataBlast, '2.2.15.blastp.m7')).read end end From ngoto at dev.open-bio.org Thu Dec 28 10:35:52 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 28 Dec 2006 15:35:52 +0000 Subject: [BioRuby-cvs] bioruby/doc Changes-0.7.rd,1.17,1.18 Message-ID: <200612281535.kBSFZqer015141@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv15096/doc Modified Files: Changes-0.7.rd Log Message: Changes by ngoto during Phyloinformatics Hackathon are written in the ChangeLog and incompatible changes after 1.0.0 are written in Changes-0.7.rd. Index: Changes-0.7.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/Changes-0.7.rd,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Changes-0.7.rd 22 Mar 2006 10:19:22 -0000 1.17 --- Changes-0.7.rd 28 Dec 2006 15:35:50 -0000 1.18 *************** *** 184,187 **** --- 184,189 ---- --- Bio::Alignment + In 0.7.0: + * Old Bio::Alignment class is renamed to Bio::Alignment::OriginalAlignment. Now, new Bio::Alignment is a module. However, you don't mind so much *************** *** 200,203 **** --- 202,210 ---- * There are more and more changes to be written... + In 1.1.0: + + * Bio::Alignment::ClustalWFormatter is removed and methods in this module + are renemed and moved to Bio::Alignment::Output. + --- Bio::PDB *************** *** 240,243 **** --- 247,260 ---- * There are more and more changes to be written... + In 1.1.0: + + * In Bio::PDB::ATOM#name, #resName, #iCode, and #charge, whitespaces are + stripped during initializing. + * In Bio::PDB::ATOM#segID, whitespaces are right-stripped during initializing. + * In Bio::PDB::ATOM#element, whitespaces are left-stripped during initializing. + * Bio::PDB::HETATM#name, #resName, #iCode, #charge, #segID, and #element + are also subject to the above changes, because Bio::PDB::HETATM inherits + Bio::PDB::ATOM. + --- Bio::FlatFile *************** *** 262,270 **** structure (which is not recommended) would not work. ! In 1.0.1: * Bio::FlatFile#entry_start_pos and #entry_ended_pos are enabled only when Bio::FlatFile#entry_pos_flag is true. === Deleted files --- 279,302 ---- structure (which is not recommended) would not work. ! In 1.1.0: * Bio::FlatFile#entry_start_pos and #entry_ended_pos are enabled only when Bio::FlatFile#entry_pos_flag is true. + --- Bio::ClustalW, Bio::MAFFT, Bio::Sim4 + + In 1.1.0: + + * Bio::(ClustalW|MAFFT|Sim4)#option is changed to #options. + * Bio::ClustalW::errorlog and Bio::(MAFFT|Sim4)#log are removed. + No replacements/alternatives are available. + + --- Bio::MAFFT::Report + + In 1.1.0: + + * Bio::MAFFT::Report#initialize is changed to get a string of multi-fasta + formmatted text instead of Array. + === Deleted files From ngoto at dev.open-bio.org Thu Dec 28 10:35:52 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 28 Dec 2006 15:35:52 +0000 Subject: [BioRuby-cvs] bioruby ChangeLog,1.56,1.57 Message-ID: <200612281535.kBSFZqGI015138@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv15096 Modified Files: ChangeLog Log Message: Changes by ngoto during Phyloinformatics Hackathon are written in the ChangeLog and incompatible changes after 1.0.0 are written in Changes-0.7.rd. Index: ChangeLog =================================================================== RCS file: /home/repository/bioruby/bioruby/ChangeLog,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** ChangeLog 24 Dec 2006 18:32:55 -0000 1.56 --- ChangeLog 28 Dec 2006 15:35:50 -0000 1.57 *************** *** 30,33 **** --- 30,78 ---- Bio::Iprscan::Report for InterProScan output is newly added. + 2006-12-15 Naohisa Goto + + * lib/bio/appl/mafft/report.rb + + Bio::MAFFT::Report#initialize is changed to get a string of + multi-fasta formmatted text instead of Array. + + 2006-12-14 Naohisa Goto + + * lib/bio/appl/phylip/alignment.rb + + Phylip format multiple sequence alignment parser class + Bio::Phylip::PhylipFormat is newly added. + + * lib/bio/appl/phylip/distance_matrix.rb + + Bio::Phylip::DistanceMatrix, a parser for phylip distance matrix + (generated by dnadist/protdist/restdist programs) is newly added. + + * lib/bio/appl/gcg/msf.rb, lib/bio/appl/gcg/seq.rb + + Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG MSF multiple + sequence alignment format parser, and Bio::GCG::Seq in + lib/bio/appl/gcg/seq.rb for GCG sequence format parser are + newly added. + + * lib/bio/alignment.rb + + Output of Phylip interleaved/non-interleaved format (.phy), + Molphy alignment format (.mol), and GCG MSF format (.msf) + are supported. Bio::Alignment::ClustalWFormatter is removed + and methods in the module are renamed and moved to + Bio::Alignment::Output. + + * lib/bio/appl/clustalw.rb, lib/bio/appl/mafft.rb, lib/bio/appl/sim4.rb + + Changed to use Bio::Command instead of Open3.popen3. + + 2006-12-13 Naohisa Goto + + * lib/bio/tree.rb, lib/bio/db/newick.rb + + Bio::PhylogeneticTree is renamed to Bio::Tree, and + lib/bio/phylogenetictree.rb is renamed to lib/bio/tree.rb. + NHX (New Hampshire eXtended) parser/writer support are added. 2006-10-05 Naohisa Goto From czmasek at dev.open-bio.org Tue Dec 19 00:09:49 2006 From: czmasek at dev.open-bio.org (Chris Zmasek) Date: Tue, 19 Dec 2006 05:09:49 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db nexus.rb,NONE,1.1 Message-ID: <200612190509.kBJ59nf9028498@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv28474 Added Files: nexus.rb Log Message: Initial commit of nexus.rb - a parser for nexus formatted data (developed at first phyloinformatics hackathon at nescent in durham, nc, usa) --- NEW FILE: nexus.rb --- # # = bio/db/nexus.rb - Nexus Standard phylogenetic tree parser / formatter # # Copyright:: Copyright (C) 2006 Christian M Zmasek # # License:: Ruby's # # $Id: nexus.rb,v 1.1 2006/12/19 05:09:46 czmasek Exp $ # # == Description # # This file contains classes that implement a parser for NEXUS formatted # data as well as objects to store, access, and write the parsed data. # # The following five blocks: # taxa, characters, distances, trees, data # are recognizable and parsable. # # The parser can deal with (nested) comments (indicated by square brackets), [...1817 lines suppressed...] def Util::larger_than_zero( i ) return ( i != nil && i.to_i > 0 ) end # Returns true if String str is not nil and longer than 0. # --- # *Arguments*: # * (required) _str_: String # *Returns*:: true or false def Util::longer_than_zero( str ) return ( str != nil && str.length > 0 ) end end # class Util end # class Nexus end #module Bio From czmasek at dev.open-bio.org Tue Dec 19 00:17:29 2006 From: czmasek at dev.open-bio.org (Chris Zmasek) Date: Tue, 19 Dec 2006 05:17:29 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_nexus.rb,NONE,1.1 Message-ID: <200612190517.kBJ5HTVV028567@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv28563 Added Files: test_nexus.rb Log Message: Initial commit for test_nexus.rb. --- NEW FILE: test_nexus.rb --- # # = test/bio/db/nexus.rb - Unit test for Bio::Nexus # # Copyright:: Copyright (C) 2006 Christian M Zmasek # # License:: Ruby's # # $Id: test_nexus.rb,v 1.1 2006/12/19 05:17:27 czmasek Exp $ # # == Description # # This file contains unit tests for Bio::Nexus. # require 'test/unit' require 'bio/db/nexus' module Bio class TestNexus < Test::Unit::TestCase NEXUS_STRING_1 = <<-END_OF_NEXUS_STRING #NEXUS Begin Taxa; Dimensions [[comment]] ntax=4; TaxLabels "hag fish" [comment] 'african frog' [lots of different comment follow] [] [a] [[a]] [ a ] [[ a ]] [ [ a ] ] [a ] [[a ]] [ [a ] ] [ a] [[ a]] [ [ a] ] [ ] [[ ]] [ [ ] ] [ a b ] [[ a b ]] [ [ a b ] ] [x[ x [x[ x[[x[[xx[x[ x]] ]x ] []]][x]]x]]] [comment_1 comment_3] "rat snake" 'red mouse'; End; [yet another comment End; ] Begin Characters; Dimensions nchar=20 ntax=4; [ ntax=1000; ] Format DataType=DNA Missing=x Gap=- MatchChar=.; Matrix [comment] fish ACATA GAGGG TACCT CTAAG frog ACTTA GAGGC TACCT CTAGC snake ACTCA CTGGG TACCT TTGCG mouse ACTCA GACGG TACCT TTGCG; End; Begin Trees; [comment] Tree best=(fish,(frog,(snake,mo use))); [some long comment] Tree other=(snake, (frog,(fish,mo use ))); End; Begin Trees; [comment] Tree worst=(A,(B,(C,D ))); Tree bad=(a, (b,(c , d ) ) ); End; Begin Distances; Dimensions nchar=20 ntax=5; Format Triangle=Both; Matrix taxon_1 0.0 1.0 2.0 4.0 7.0 taxon_2 1.0 0.0 3.0 5.0 8.0 taxon_3 3.0 4.0 0.0 6.0 9.0 taxon_4 7.0 3.0 2.0 0.0 9.5 taxon_5 1.2 1.3 1.4 1.5 0.0; End; Begin Data; Dimensions ntax=5 nchar=14; Format Datatype=RNA gap=# MISSING=x MatchChar=^; TaxLabels ciona cow [comment1 commentX] ape 'purple urchin' "green lizard"; Matrix [ comment [old comment] ] taxon_1 A- CCGTCGA-GTTA taxon_2 T- CCG-CGA-GATC taxon_3 A- C-GTCGA-GATG taxon_4 A- C C TC G A - -G T T T taxon_5 T-CGGTCGT-CTTA; End; Begin Private1; Something foo=5 bar=20; Format Datatype=DNA; Matrix taxon_1 1111 1111111111 taxon_2 2222 2222222222 taxon_3 3333 3333333333 taxon_4 4444 4444444444 taxon_5 5555 5555555555; End; Begin Private1; some [boring] interesting [ outdated ] data be here End; END_OF_NEXUS_STRING DATA_BLOCK_OUTPUT_STRING = <<-DATA_BLOCK_OUTPUT_STRING Begin Data; Dimensions NTax=5 NChar=14; Format DataType=RNA Missing=x Gap=# MatchChar=^; TaxLabels ciona cow ape purple_urchin green_lizard; Matrix taxon_1 A-CCGTCGA-GTTA taxon_2 T-CCG-CGA-GATC taxon_3 A-C-GTCGA-GATG taxon_4 A-CCTCGA--GTTT taxon_5 T-CGGTCGT-CTTA; End; DATA_BLOCK_OUTPUT_STRING def test_nexus nexus = Bio::Nexus.new( NEXUS_STRING_1 ) blocks = nexus.get_blocks assert_equal( 8, blocks.size ) private_blocks = nexus.get_blocks_by_name( "private1" ) data_blocks = nexus.get_data_blocks character_blocks = nexus.get_characters_blocks trees_blocks = nexus.get_trees_blocks distances_blocks = nexus.get_distances_blocks taxa_blocks = nexus.get_taxa_blocks assert_equal( 2, private_blocks.size ) assert_equal( 1, data_blocks.size ) assert_equal( 1, character_blocks.size ) assert_equal( 2, trees_blocks.size ) assert_equal( 1, distances_blocks.size ) assert_equal( 1, taxa_blocks.size ) taxa_block = taxa_blocks[ 0 ] assert_equal( taxa_block.get_number_of_taxa.to_i , 4 ) assert_equal( taxa_block.get_taxa[ 0 ], "hag_fish" ) assert_equal( taxa_block.get_taxa[ 1 ], "african_frog" ) assert_equal( taxa_block.get_taxa[ 2 ], "rat_snake" ) assert_equal( taxa_block.get_taxa[ 3 ], "red_mouse" ) chars_block = character_blocks[ 0 ] assert_equal( chars_block.get_number_of_taxa.to_i, 4 ) assert_equal( chars_block.get_number_of_characters.to_i, 20 ) assert_equal( chars_block.get_datatype, "DNA" ) assert_equal( chars_block.get_match_character, "." ) assert_equal( chars_block.get_missing, "x" ) assert_equal( chars_block.get_gap_character, "-" ) assert_equal( chars_block.get_matrix.get_value( 0, 0 ), "fish" ) assert_equal( chars_block.get_matrix.get_value( 1, 0 ), "frog" ) assert_equal( chars_block.get_matrix.get_value( 2, 0 ), "snake" ) assert_equal( chars_block.get_matrix.get_value( 3, 0 ), "mouse" ) assert_equal( chars_block.get_matrix.get_value( 0, 20 ), "G" ) assert_equal( chars_block.get_matrix.get_value( 1, 20 ), "C" ) assert_equal( chars_block.get_matrix.get_value( 2, 20 ), "G" ) assert_equal( chars_block.get_matrix.get_value( 3, 20 ), "G" ) assert_equal( chars_block.get_characters_strings_by_name( "fish" )[ 0 ], "ACATAGAGGGTACCTCTAAG" ) assert_equal( chars_block.get_characters_strings_by_name( "frog" )[ 0 ], "ACTTAGAGGCTACCTCTAGC" ) assert_equal( chars_block.get_characters_strings_by_name( "snake" )[ 0 ], "ACTCACTGGGTACCTTTGCG" ) assert_equal( chars_block.get_characters_strings_by_name( "mouse" )[ 0 ], "ACTCAGACGGTACCTTTGCG" ) assert_equal( chars_block.get_characters_string( 0 ), "ACATAGAGGGTACCTCTAAG" ) assert_equal( chars_block.get_characters_string( 1 ), "ACTTAGAGGCTACCTCTAGC" ) assert_equal( chars_block.get_characters_string( 2 ), "ACTCACTGGGTACCTTTGCG" ) assert_equal( chars_block.get_characters_string( 3 ), "ACTCAGACGGTACCTTTGCG" ) assert_equal( chars_block.get_row_name( 1 ), "frog" ) assert_equal( chars_block.get_sequences_by_name( "fish" )[ 0 ].seq.to_s.downcase, "ACATAGAGGGTACCTCTAAG".downcase ) assert_equal( chars_block.get_sequences_by_name( "frog" )[ 0 ].seq.to_s.downcase, "ACTTAGAGGCTACCTCTAGC".downcase ) assert_equal( chars_block.get_sequences_by_name( "snake" )[ 0 ].seq.to_s.downcase, "ACTCACTGGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequences_by_name( "mouse" )[ 0 ].seq.to_s.downcase, "ACTCAGACGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequences_by_name( "fish" )[ 0 ].definition, "fish" ) assert_equal( chars_block.get_sequences_by_name( "frog" )[ 0 ].definition, "frog" ) assert_equal( chars_block.get_sequences_by_name( "snake" )[ 0 ].definition, "snake" ) assert_equal( chars_block.get_sequences_by_name( "mouse" )[ 0 ].definition, "mouse" ) assert_equal( chars_block.get_sequence( 0 ).seq.to_s.downcase, "ACATAGAGGGTACCTCTAAG".downcase ) assert_equal( chars_block.get_sequence( 1 ).seq.to_s.downcase, "ACTTAGAGGCTACCTCTAGC".downcase ) assert_equal( chars_block.get_sequence( 2 ).seq.to_s.downcase, "ACTCACTGGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequence( 3 ).seq.to_s.downcase, "ACTCAGACGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequence( 0 ).definition, "fish" ) assert_equal( chars_block.get_sequence( 1 ).definition, "frog" ) assert_equal( chars_block.get_sequence( 2 ).definition, "snake" ) assert_equal( chars_block.get_sequence( 3 ).definition, "mouse" ) tree_block_0 = trees_blocks[ 0 ] tree_block_1 = trees_blocks[ 1 ] assert_equal( tree_block_0.get_tree_names[ 0 ], "best" ) assert_equal( tree_block_0.get_tree_names[ 1 ], "other" ) assert_equal( tree_block_0.get_tree_strings_by_name( "best" )[ 0 ], "(fish,(frog,(snake,mouse)));" ) assert_equal( tree_block_0.get_tree_strings_by_name( "other" )[ 0 ], "(snake,(frog,(fish,mouse)));" ) best_tree = tree_block_0.get_trees_by_name( "best" )[ 0 ] other_tree = tree_block_0.get_trees_by_name( "other" )[ 0 ] worst_tree = tree_block_1.get_tree( 0 ) bad_tree = tree_block_1.get_tree( 1 ) assert_equal( 6, best_tree.descendents( best_tree.root ).size ) assert_equal( 4, best_tree.leaves.size) assert_equal( 6, other_tree.descendents( other_tree.root ).size ) assert_equal( 4, other_tree.leaves.size) fish_leaf_best = best_tree.nodes.find { |x| x.name == 'fish' } assert_equal( 1, best_tree.ancestors( fish_leaf_best ).size ) fish_leaf_other = other_tree.nodes.find { |x| x.name == 'fish' } assert_equal( 3, other_tree.ancestors( fish_leaf_other ).size ) a_leaf_worst = worst_tree.nodes.find { |x| x.name == 'A' } assert_equal( 1, worst_tree.ancestors( a_leaf_worst ).size ) c_leaf_bad = bad_tree.nodes.find { |x| x.name == 'c' } assert_equal( 3, bad_tree.ancestors( c_leaf_bad ).size ) dist_block = distances_blocks[ 0 ] assert_equal( dist_block.get_number_of_taxa.to_i, 5 ) assert_equal( dist_block.get_number_of_characters.to_i, 20 ) assert_equal( dist_block.get_triangle, "Both" ) assert_equal( dist_block.get_matrix.get_value( 0, 0 ), "taxon_1" ) assert_equal( dist_block.get_matrix.get_value( 1, 0 ), "taxon_2" ) assert_equal( dist_block.get_matrix.get_value( 2, 0 ), "taxon_3" ) assert_equal( dist_block.get_matrix.get_value( 3, 0 ), "taxon_4" ) assert_equal( dist_block.get_matrix.get_value( 4, 0 ), "taxon_5" ) assert_equal( dist_block.get_matrix.get_value( 0, 5 ).to_f, 7.0 ) assert_equal( dist_block.get_matrix.get_value( 1, 5 ).to_f, 8.0 ) assert_equal( dist_block.get_matrix.get_value( 2, 5 ).to_f, 9.0 ) assert_equal( dist_block.get_matrix.get_value( 3, 5 ).to_f, 9.5 ) assert_equal( dist_block.get_matrix.get_value( 4, 5 ).to_f, 0.0 ) data_block = data_blocks[ 0 ] assert_equal( data_block.get_number_of_taxa.to_i, 5 ) assert_equal( data_block.get_number_of_characters.to_i, 14 ) assert_equal( data_block.get_datatype, "RNA" ) assert_equal( data_block.get_match_character, "^" ) assert_equal( data_block.get_missing, "x" ) assert_equal( data_block.get_gap_character, "#" ) assert_equal( data_block.get_matrix.get_value( 0, 0 ), "taxon_1" ) assert_equal( data_block.get_matrix.get_value( 1, 0 ), "taxon_2" ) assert_equal( data_block.get_matrix.get_value( 2, 0 ), "taxon_3" ) assert_equal( data_block.get_matrix.get_value( 3, 0 ), "taxon_4" ) assert_equal( data_block.get_matrix.get_value( 4, 0 ), "taxon_5" ) assert_equal( data_block.get_matrix.get_value( 0, 14 ), "A" ) assert_equal( data_block.get_matrix.get_value( 1, 14 ), "C" ) assert_equal( data_block.get_matrix.get_value( 2, 14 ), "G" ) assert_equal( data_block.get_matrix.get_value( 3, 14 ), "T" ) assert_equal( data_block.get_matrix.get_value( 4, 14 ), "A" ) assert_equal( data_block.get_taxa[ 0 ], "ciona" ) assert_equal( data_block.get_taxa[ 1 ], "cow" ) assert_equal( data_block.get_taxa[ 2 ], "ape" ) assert_equal( data_block.get_taxa[ 3 ], "purple_urchin" ) assert_equal( data_block.get_taxa[ 4 ], "green_lizard" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_1" )[ 0 ], "A-CCGTCGA-GTTA" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_2" )[ 0 ], "T-CCG-CGA-GATC" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_3" )[ 0 ], "A-C-GTCGA-GATG" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_4" )[ 0 ], "A-CCTCGA--GTTT" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_5" )[ 0 ], "T-CGGTCGT-CTTA" ) assert_equal( data_block.get_characters_string( 0 ), "A-CCGTCGA-GTTA" ) assert_equal( data_block.get_characters_string( 1 ), "T-CCG-CGA-GATC" ) assert_equal( data_block.get_characters_string( 2 ), "A-C-GTCGA-GATG" ) assert_equal( data_block.get_characters_string( 3 ), "A-CCTCGA--GTTT" ) assert_equal( data_block.get_characters_string( 4 ), "T-CGGTCGT-CTTA" ) assert_equal( data_block.get_row_name( 0 ), "taxon_1" ) assert_equal( data_block.get_row_name( 1 ), "taxon_2" ) assert_equal( data_block.get_row_name( 2 ), "taxon_3" ) assert_equal( data_block.get_row_name( 3 ), "taxon_4" ) assert_equal( data_block.get_row_name( 4 ), "taxon_5" ) assert_equal( data_block.get_sequences_by_name( "taxon_1" )[ 0 ].seq.to_s.downcase, "A-CCGTCGA-GTTA".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_2" )[ 0 ].seq.to_s.downcase, "T-CCG-CGA-GATC".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_3" )[ 0 ].seq.to_s.downcase, "A-C-GTCGA-GATG".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_4" )[ 0 ].seq.to_s.downcase, "A-CCTCGA--GTTT".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_5" )[ 0 ].seq.to_s.downcase, "T-CGGTCGT-CTTA".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_1" )[ 0 ].definition, "taxon_1" ) assert_equal( data_block.get_sequences_by_name( "taxon_2" )[ 0 ].definition, "taxon_2" ) assert_equal( data_block.get_sequences_by_name( "taxon_3" )[ 0 ].definition, "taxon_3" ) assert_equal( data_block.get_sequences_by_name( "taxon_4" )[ 0 ].definition, "taxon_4" ) assert_equal( data_block.get_sequences_by_name( "taxon_5" )[ 0 ].definition, "taxon_5" ) assert_equal( data_block.get_sequence( 0 ).seq.to_s.downcase, "A-CCGTCGA-GTTA".downcase ) assert_equal( data_block.get_sequence( 1 ).seq.to_s.downcase, "T-CCG-CGA-GATC".downcase ) assert_equal( data_block.get_sequence( 2 ).seq.to_s.downcase, "A-C-GTCGA-GATG".downcase ) assert_equal( data_block.get_sequence( 3 ).seq.to_s.downcase, "A-CCTCGA--GTTT".downcase ) assert_equal( data_block.get_sequence( 4 ).seq.to_s.downcase, "T-CGGTCGT-CTTA".downcase ) assert_equal( data_block.get_sequence( 0 ).definition, "taxon_1" ) assert_equal( data_block.get_sequence( 1 ).definition, "taxon_2" ) assert_equal( data_block.get_sequence( 2 ).definition, "taxon_3" ) assert_equal( data_block.get_sequence( 3 ).definition, "taxon_4" ) assert_equal( data_block.get_sequence( 4 ).definition, "taxon_5" ) assert_equal( DATA_BLOCK_OUTPUT_STRING, data_block.to_nexus() ) generic_0 = private_blocks[ 0 ] generic_1 = private_blocks[ 1 ] assert_equal( generic_0.get_tokens[ 0 ], "Something" ) assert_equal( generic_0.get_tokens[ 1 ], "foo" ) assert_equal( generic_0.get_tokens[ 2 ], "5" ) assert_equal( generic_0.get_tokens[ 3 ], "bar" ) assert_equal( generic_0.get_tokens[ 4 ], "20" ) assert_equal( generic_0.get_tokens[ 5 ], "Format" ) assert_equal( generic_0.get_tokens[ 6 ], "Datatype" ) assert_equal( generic_0.get_tokens[ 7 ], "DNA" ) assert_equal( generic_0.get_tokens[ 8 ], "Matrix" ) assert_equal( generic_0.get_tokens[ 9 ], "taxon_1" ) assert_equal( generic_0.get_tokens[10 ], "1111" ) assert_equal( generic_1.get_tokens[ 0 ], "some" ) assert_equal( generic_1.get_tokens[ 1 ], "interesting" ) assert_equal( generic_1.get_tokens[ 2 ], "data" ) assert_equal( generic_1.get_tokens[ 3 ], "be" ) assert_equal( generic_1.get_tokens[ 4 ], "here" ) end # test_nexus end # class TestNexus end # module Bio From czmasek at dev.open-bio.org Tue Dec 19 00:37:52 2006 From: czmasek at dev.open-bio.org (Chris Zmasek) Date: Tue, 19 Dec 2006 05:37:52 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db nexus.rb,1.1,1.2 Message-ID: <200612190537.kBJ5bqCG028671@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv28667 Modified Files: nexus.rb Log Message: minor change: phylogenetictree was renamed into tree. Index: nexus.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/nexus.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nexus.rb 19 Dec 2006 05:09:46 -0000 1.1 --- nexus.rb 19 Dec 2006 05:37:50 -0000 1.2 *************** *** 90,96 **** require 'bio/sequence' ! require 'bio/sequence/aa' ! require 'bio/sequence/na' ! require 'bio/phylogenetictree' require 'bio/db/newick' --- 90,94 ---- require 'bio/sequence' ! require 'bio/tree' require 'bio/db/newick' From k at dev.open-bio.org Sun Dec 24 05:10:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:10:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio map.rb, 1.8, 1.9 location.rb, 0.26, 0.27 Message-ID: <200612241010.kBOAAAPb001957@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv1876/lib/bio Modified Files: map.rb location.rb Log Message: * Bio::Locations#equals? method is moved from bio/map.rb to bio/location.rb * RDoc documents are reformatted to fit within 80 columns on terminal Index: location.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/location.rb,v retrieving revision 0.26 retrieving revision 0.27 diff -C2 -d -r0.26 -r0.27 *** location.rb 19 Sep 2006 06:13:54 -0000 0.26 --- location.rb 24 Dec 2006 10:10:08 -0000 0.27 *************** *** 3,7 **** # # Copyright:: Copyright (C) 2001, 2005 Toshiaki Katayama ! # 2006 Jan Aerts # License:: Ruby's # --- 3,7 ---- # # Copyright:: Copyright (C) 2001, 2005 Toshiaki Katayama ! # Copyright:: Copyright (C) 2006 Jan Aerts # License:: Ruby's # *************** *** 13,19 **** # == 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 --- 13,19 ---- # == 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 *************** *** 29,42 **** # class Location include Comparable # Parses a'location' segment, which can be 'ID:' + ('n' or 'n..m' or 'n^m' # or "seq") with '<' or '>', and returns a Bio::Location object. # location = Bio::Location.new('500..550') # # --- # *Arguments*: ! # * (required) _str_: GenBank style position string (see Bio::Locations documentation) ! # *Returns*:: Bio::Location object def initialize(location = nil) --- 29,45 ---- # class Location + include Comparable # Parses a'location' segment, which can be 'ID:' + ('n' or 'n..m' or 'n^m' # or "seq") with '<' or '>', and returns a Bio::Location object. + # # location = Bio::Location.new('500..550') # # --- # *Arguments*: ! # * (required) _str_: GenBank style position string (see Bio::Locations ! # documentation) ! # *Returns*:: the Bio::Location object def initialize(location = nil) *************** *** 55,59 **** # s : start base, e : end base => from, to case location ! when /^[<>]?(\d+)$/ # (A, I) n s = e = $1.to_i when /^[<>]?(\d+)\.\.[<>]?(\d+)$/ # (B, I) n..m --- 58,62 ---- # s : start base, e : end base => from, to case location ! when /^[<>]?(\d+)$/ # (A, I) n s = e = $1.to_i when /^[<>]?(\d+)\.\.[<>]?(\d+)$/ # (B, I) n..m *************** *** 103,107 **** # --- # *Arguments*: ! # * (required) _sequence_: sequence to be used to replace the sequence at the location # *Returns*:: the Bio::Location object def replace(sequence) --- 106,111 ---- # --- # *Arguments*: ! # * (required) _sequence_: sequence to be used to replace the sequence ! # at the location # *Returns*:: the Bio::Location object def replace(sequence) *************** *** 117,123 **** # Check where a Bio::Location object is located compared to another # Bio::Location object (mainly to facilitate the use of Comparable). ! # A location A is upstream of location B if the start position of location A ! # is smaller than the start position of location B. If they're the same, the ! # end positions are checked. # --- # *Arguments*: --- 121,127 ---- # Check where a Bio::Location object is located compared to another # Bio::Location object (mainly to facilitate the use of Comparable). ! # A location A is upstream of location B if the start position of ! # location A is smaller than the start position of location B. If ! # they're the same, the end positions are checked. # --- # *Arguments*: *************** *** 147,151 **** end ! end # class location # == Description --- 151,155 ---- end ! end # Location # == Description *************** *** 158,171 **** # # locations = Bio::Locations.new('join(complement(500..550), 600..625)') ! # locations.each do |location| ! # puts "class=" + location.class.to_s ! # puts "start=" + location.from.to_s + ";end=" + location.to.to_s \ ! # + ";strand=" + location.strand.to_s # end ! # # Output would be: ! # # class=Bio::Location ! # # start=500;end=550;strand=-1 ! # # class=Bio::Location ! # # start=600;end=625;strand=1 # # # For the following three location strings, print the span and range --- 162,174 ---- # # locations = Bio::Locations.new('join(complement(500..550), 600..625)') ! # locations.each do |loc| ! # puts "class = " + loc.class.to_s ! # puts "range = #{loc.from}..#{loc.to} (strand = #{loc.strand})" # end ! # # Output would be: ! # # class = Bio::Location ! # # range = 500..550 (strand = -1) ! # # class = Bio::Location ! # # range = 600..625 (strand = 1) # # # For the following three location strings, print the span and range *************** *** 178,229 **** # 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 ! # ! # The second column of the feature descriptor line designates the ! # location of the feature in the sequence. The location descriptor ! # begins at position 22. Several conventions are used to indicate ! # sequence location. ! # ! # Base numbers in location descriptors refer to numbering in the entry, ! # which is not necessarily the same as the numbering scheme used in the ! # published report. The first base in the presented sequence is numbered ! # base 1. Sequences are presented in the 5 to 3 direction. ! # ! # Location descriptors can be one of the following: # # (A) 1. A single base; ! # # (B) 2. A contiguous span of bases; ! # # (C) 3. A site between two bases; ! # # (D) 4. A single base chosen from a range of bases; ! # # (E) 5. A single base chosen from among two or more specified bases; ! # # (F) 6. A joining of sequence spans; ! # # (G) 7. A reference to an entry other than the one to which the feature ! # belongs (i.e., a remote entry), followed by a location descriptor ! # referring to the remote sequence; ! # # (H) 8. A literal sequence (a string of bases enclosed in quotation marks). # ! # # (C) A site between two residues, such as an endonuclease cleavage site, is # indicated by listing the two bases separated by a carat (e.g., 23^24). ! # # (D) A single residue chosen from a range of residues is indicated by the # number of the first and last bases in the range separated by a single # period (e.g., 23.79). The symbols < and > indicate that the end point # (I) of the range is beyond the specified base number. ! # # (B) A contiguous span of bases is indicated by the number of the first and # last bases in the range separated by two periods (e.g., 23..79). The --- 181,233 ---- # 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 ! # ! # The second column of the feature descriptor line designates the ! # location of the feature in the sequence. The location descriptor ! # begins at position 22. Several conventions are used to indicate ! # sequence location. ! # ! # Base numbers in location descriptors refer to numbering in the entry, ! # which is not necessarily the same as the numbering scheme used in the ! # published report. The first base in the presented sequence is numbered ! # base 1. Sequences are presented in the 5 to 3 direction. ! # ! # Location descriptors can be one of the following: # # (A) 1. A single base; ! # # (B) 2. A contiguous span of bases; ! # # (C) 3. A site between two bases; ! # # (D) 4. A single base chosen from a range of bases; ! # # (E) 5. A single base chosen from among two or more specified bases; ! # # (F) 6. A joining of sequence spans; ! # # (G) 7. A reference to an entry other than the one to which the feature ! # belongs (i.e., a remote entry), followed by a location descriptor ! # referring to the remote sequence; ! # # (H) 8. A literal sequence (a string of bases enclosed in quotation marks). # ! # ==== Description commented with pattern IDs. ! # # (C) A site between two residues, such as an endonuclease cleavage site, is # indicated by listing the two bases separated by a carat (e.g., 23^24). ! # # (D) A single residue chosen from a range of residues is indicated by the # number of the first and last bases in the range separated by a single # period (e.g., 23.79). The symbols < and > indicate that the end point # (I) of the range is beyond the specified base number. ! # # (B) A contiguous span of bases is indicated by the number of the first and # last bases in the range separated by two periods (e.g., 23..79). The *************** *** 231,254 **** # specified base number. Starting and ending positions can be indicated # by base number or by one of the operators described below. ! # # Operators are prefixes that specify what must be done to the indicated # sequence to locate the feature. The following are the operators # available, along with their most common format and a description. ! # # (J) complement (location): The feature is complementary to the location # indicated. Complementary strands are read 5 to 3. ! # # (F) join (location, location, .. location): The indicated elements should # be placed end to end to form one contiguous sequence. ! # # (F) order (location, location, .. location): The elements are found in the # specified order in the 5 to 3 direction, but nothing is implied about # the rationality of joining them. ! # # (F) group (location, location, .. location): The elements are related and # should be grouped together, but no order is implied. ! # # (E) one-of (location, location, .. location): The element can be any one, ! # but only one, of the items listed. # # === Reduction strategy of the position notations --- 235,258 ---- # specified base number. Starting and ending positions can be indicated # by base number or by one of the operators described below. ! # # Operators are prefixes that specify what must be done to the indicated # sequence to locate the feature. The following are the operators # available, along with their most common format and a description. ! # # (J) complement (location): The feature is complementary to the location # indicated. Complementary strands are read 5 to 3. ! # # (F) join (location, location, .. location): The indicated elements should # be placed end to end to form one contiguous sequence. ! # # (F) order (location, location, .. location): The elements are found in the # specified order in the 5 to 3 direction, but nothing is implied about # the rationality of joining them. ! # # (F) group (location, location, .. location): The elements are related and # should be grouped together, but no order is implied. ! # # (E) one-of (location, location, .. location): The element can be any one, ! # but only one, of the items listed. # # === Reduction strategy of the position notations *************** *** 257,404 **** # * (B) Location n..m # * (C) Location n^m ! # * (D) (n.m) => Location n # * (E) ! # * one-of(n,m,..) => Location n ! # * one-of(n..m,..) => Location n..m # * (F) ! # * order(loc,loc,..) => join(loc, loc,..) ! # * group(loc,loc,..) => join(loc, loc,..) ! # * join(loc,loc,..) => Sequence ! # * (G) ID:loc => Location with ID ! # * (H) "atgc" => Location only with Sequence # * (I) # * Location n with lt flag # * >n => Location n with gt flag ! # * Location n..m with lt flag ! # * n..>m => Location n..m with gt flag ! # * m => Location n..m with lt, gt flag ! # * (J) complement(loc) => Sequence # * (K) replace(loc, str) => Location with replacement Sequence # - # === GenBank location examples - # - # (C) n^m - # - # * [AB015179] 754^755 - # * [AF179299] complement(53^54) - # * [CELXOL1ES] replace(4480^4481,"") - # * [ECOUW87] replace(4792^4793,"a") - # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") - # - # (D) (n.m) - # - # * [HACSODA] 157..(800.806) - # * [HALSODB] (67.68)..(699.703) - # * [AP001918] (45934.45974)..46135 - # * [BACSPOJ] <180..(731.761) - # * [BBU17998] (88.89)..>1122 - # * [ECHTGA] complement((1700.1708)..(1715.1721)) - # * [ECPAP17] complement(<22..(255.275)) - # * [LPATOVGNS] complement((64.74)..1525) - # * [PIP404CG] join((8298.8300)..10206,1..855) - # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) - # * [HUMMIC2A] replace((651.655)..(651.655),"") - # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) - # - # (E) one-of - # - # * [ECU17136] one-of(898,900)..983 - # * [CELCYT1A] one-of(5971..6308,5971..6309) - # * [DMU17742] 8050..one-of(10731,10758,10905,11242) - # * [PFU27807] one-of(623,627,632)..one-of(628,633,637) - # * [BTBAINH1] one-of(845,953,963,1078,1104)..1354 - # * [ATU39449] join(one-of(969..1094,970..1094,995..1094,1018..1094),1518..1587,1726..2119,2220..2833,2945..3215) - # - # (F) join, order, group - # - # * [AB037374S2] join(AB037374.1:1..177,1..807) - # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) - # * [ASNOS11] join(AF130124.1:<2563..2964,AF130125.1:21..157,AF130126.1:12..174,AF130127.1:21..112,AF130128.1:21..162,AF130128.1:281..595,AF130128.1:661..842,AF130128.1:916..1030,AF130129.1:21..115,AF130130.1:21..165,AF130131.1:21..125,AF130132.1:21..428,AF130132.1:492..746,AF130133.1:21..168,AF130133.1:232..401,AF130133.1:475..906,AF130133.1:970..1107,AF130133.1:1176..1367,21..>128) - # - # * [AARPOB2] order(AF194507.1:<1..510,1..>871) - # * [AF006691] order(912..1918,20410..21416) - # * [AF024666] order(complement(18919..19224),complement(13965..14892)) - # * [AF264948] order(27066..27076,27089..27099,27283..27314,27330..27352) - # * [D63363] order(3..26,complement(964..987)) - # * [ECOCURLI2] order(complement(1009..>1260),complement(AF081827.1:<1..177)) - # * [S72388S2] order(join(S72388.1:757..911,S72388.1:609..1542),1..>139) - # * [HEYRRE07] order(complement(1..38),complement(M82666.1:1..140),complement(M82665.1:1..176),complement(M82664.1:1..215),complement(M82663.1:1..185),complement(M82662.1:1..49),complement(M82661.1:1..133)) - # * [COL11A1G34] order(AF101079.1:558..1307,AF101080.1:1..749,AF101081.1:1..898,AF101082.1:1..486,AF101083.1:1..942,AF101084.1:1..1734,AF101085.1:1..2385,AF101086.1:1..1813,AF101087.1:1..2287,AF101088.1:1..1073,AF101089.1:1..989,AF101090.1:1..5017,AF101091.1:1..3401,AF101092.1:1..1225,AF101093.1:1..1072,AF101094.1:1..989,AF101095.1:1..1669,AF101096.1:1..918,AF101097.1:1..1114,AF101098.1:1..1074,AF101099.1:1..1709,AF101100.1:1..986,AF101101.1:1..1934,AF101102.1:1..1699,AF101103.1:1..940,AF101104.1:1..2330,AF101105.1:1..4467,AF101106.1:1..1876,AF101107.1:1..2465,AF101108.1:1..1150,AF101109.1:1..1170,AF101110.1:1..1158,AF101111.1:1..1193,1..611) - # - # group() are found in the COMMENT field only (in GenBank 122.0) - # - # gbpat2.seq: FT repeat_region group(598..606,611..619) - # gbpat2.seq: FT repeat_region group(8..16,1457..1464). - # gbpat2.seq: FT variation group(t1,t2) - # gbpat2.seq: FT variation group(t1,t3) - # gbpat2.seq: FT variation group(t1,t2,t3) - # gbpat2.seq: FT repeat_region group(11..202,203..394) - # gbpri9.seq:COMMENT Residues reported = 'group(1..2145);'. - # - # (G) ID:location - # - # * [AARPOB2] order(AF194507.1:<1..510,1..>871) - # * [AF178221S4] join(AF178221.1:<1..60,AF178222.1:1..63,AF178223.1:1..42,1..>90) - # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) - # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) - # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) - # - # (I) <, > - # - # * [A5U48871] <1..>318 - # * [AA23SRRNP] <1..388 - # * [AA23SRRNP] 503..>1010 - # * [AAM5961] complement(<1..229) - # * [AAM5961] complement(5231..>5598) - # * [AF043934] join(<1,60..99,161..241,302..370,436..594,676..887,993..1141,1209..1329,1387..1559,1626..1646,1708..>1843) - # * [BACSPOJ] <180..(731.761) - # * [BBU17998] (88.89)..>1122 - # * [AARPOB2] order(AF194507.1:<1..510,1..>871) - # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) - # - # (J) complement - # - # * [AF179299] complement(53^54) <= hoge insertion site etc. - # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) - # * [AF209868S2] order(complement(1..>308),complement(AF209868.1:75..336)) - # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) - # * [CPPLCG] complement(<1..(1093.1098)) - # * [D63363] order(3..26,complement(964..987)) - # * [ECHTGA] complement((1700.1708)..(1715.1721)) - # * [ECOUXW] order(complement(1658..1663),complement(1636..1641)) - # * [LPATOVGNS] complement((64.74)..1525) - # * [AF129075] complement(join(71606..71829,75327..75446,76039..76203,76282..76353,76914..77029,77114..77201,77276..77342,78138..78316,79755..79892,81501..81562,81676..81856,82341..82490,84208..84287,85032..85122,88316..88403)) - # * [ZFDYST2] join(AF137145.1:<1..18,complement(<1..99)) - # - # (K) replace - # - # * [CSU27710] replace(64,"A") - # * [CELXOL1ES] replace(5256,"t") - # * [ANICPC] replace(1..468,"") - # * [CSU27710] replace(67..68,"GC") - # * [CELXOL1ES] replace(4480^4481,"") <= ? only one case in GenBank 122.0 - # * [ECOUW87] replace(4792^4793,"a") - # * [CEU34893] replace(1..22,"ggttttaacccagttactcaag") - # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") - # * [MBDR3S1] replace(1400..>9281,"") - # * [HUMMHDPB1F] replace(complement(36..37),"ttc") - # * [HUMMIC2A] replace((651.655)..(651.655),"") - # * [LEIMDRPGP] replace(1..1554,"L01572") - # * [TRBND3] replace(376..395,"atttgtgtgtggtaatta") - # * [TRBND3] replace(376..395,"atttgtgtgggtaatttta") - # * [TRBND3] replace(376..395,"attttgttgttgttttgttttgaatta") - # * [TRBND3] replace(376..395,"atgtgtggtgaatta") - # * [TRBND3] replace(376..395,"atgtgtgtggtaatta") - # * [TRBND3] replace(376..395,"gatttgttgtggtaatttta") - # * [MSU09460] replace(193, <= replace(193, "t") - # * [HUMMAGE12X] replace(3002..3003, <= replace(3002..3003, "GC") - # * [ADR40FIB] replace(510..520, <= replace(510..520, "taatcctaccg") - # * [RATDYIIAAB] replace(1306..1443,"aagaacatccacggagtcagaactgggctcttcacgccggatttggcgttcgaggccattgtgaaaaagcaggcaatgcaccagcaagctcagttcctacccctgcgtggacctggttatccaggagctaatcagtacagttaggtggtcaagctgaaagagccctgtctgaaa") - # class Locations include Enumerable ! # Parses a GenBank style position string and returns a Bio::Locations object, ! # which contains a list of Bio::Location objects. # locations = Bio::Locations.new('join(complement(500..550), 600..625)') # --- 261,290 ---- # * (B) Location n..m # * (C) Location n^m ! # * (D) (n.m) => Location n # * (E) ! # * one-of(n,m,..) => Location n ! # * one-of(n..m,..) => Location n..m # * (F) ! # * order(loc,loc,..) => join(loc, loc,..) ! # * group(loc,loc,..) => join(loc, loc,..) ! # * join(loc,loc,..) => Sequence ! # * (G) ID:loc => Location with ID ! # * (H) "atgc" => Location only with Sequence # * (I) # * Location n with lt flag # * >n => Location n with gt flag ! # * Location n..m with lt flag ! # * n..>m => Location n..m with gt flag ! # * m => Location n..m with lt, gt flag ! # * (J) complement(loc) => Sequence # * (K) replace(loc, str) => Location with replacement Sequence # class Locations + include Enumerable ! # Parses a GenBank style position string and returns a Bio::Locations ! # object, which contains a list of Bio::Location objects. ! # # locations = Bio::Locations.new('join(complement(500..550), 600..625)') # *************** *** 419,422 **** --- 305,320 ---- attr_accessor :locations + # Evaluate equality of Bio::Locations object. + def equals?(other) + if ! other.kind_of?(Bio::Locations) + return nil + end + if self.sort == other.sort + return true + else + return false + end + end + # Iterates on each Bio::Location object. def each *************** *** 479,482 **** --- 377,381 ---- # puts loc.relative(13524) # => 10 # puts loc.relative(13506, :aa) # => 3 + # # --- # *Arguments*: *************** *** 509,516 **** # puts loc.absolute(10) # => 13524 # puts loc.absolute(10, :aa) # => 13506 # --- # *Arguments*: # * (required) _position_: nucleotide position within locus ! # * _:aa_: flag to be used if _position_ is a aminoacid position rather than a nucleotide position # *Returns*:: position within the whole of the sequence def absolute(n, type = nil) --- 408,417 ---- # puts loc.absolute(10) # => 13524 # puts loc.absolute(10, :aa) # => 13506 + # # --- # *Arguments*: # * (required) _position_: nucleotide position within locus ! # * _:aa_: flag to be used if _position_ is a aminoacid position rather than ! # a nucleotide position # *Returns*:: position within the whole of the sequence def absolute(n, type = nil) *************** *** 540,546 **** position.gsub!(/(\.{2})?\(?([<>\d]+)\.([<>\d]+)(?!:)\)?/) do |match| if $1 ! $1 + $3 # ..(n.m) => ..m else ! $2 # (?n.m)? => n end end --- 441,447 ---- position.gsub!(/(\.{2})?\(?([<>\d]+)\.([<>\d]+)(?!:)\)?/) do |match| if $1 ! $1 + $3 # ..(n.m) => ..m else ! $2 # (?n.m)? => n end end *************** *** 550,556 **** position.gsub!(/(\.{2})?one-of\(([^,]+),([^)]+)\)/) do |match| if $1 ! $1 + $3.gsub(/.*,(.*)/, '\1') # ..one-of(n,m) => ..m else ! $2 # one-of(n,m) => n end end --- 451,457 ---- position.gsub!(/(\.{2})?one-of\(([^,]+),([^)]+)\)/) do |match| if $1 ! $1 + $3.gsub(/.*,(.*)/, '\1') # ..one-of(n,m) => ..m else ! $2 # one-of(n,m) => n end end *************** *** 670,678 **** end ! end # class Locations ! end # module Bio if __FILE__ == $0 puts "Test new & span methods" --- 571,701 ---- end ! end # Locations ! end # Bio + + # === GenBank location examples + # + # (C) n^m + # + # * [AB015179] 754^755 + # * [AF179299] complement(53^54) + # * [CELXOL1ES] replace(4480^4481,"") + # * [ECOUW87] replace(4792^4793,"a") + # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") + # + # (D) (n.m) + # + # * [HACSODA] 157..(800.806) + # * [HALSODB] (67.68)..(699.703) + # * [AP001918] (45934.45974)..46135 + # * [BACSPOJ] <180..(731.761) + # * [BBU17998] (88.89)..>1122 + # * [ECHTGA] complement((1700.1708)..(1715.1721)) + # * [ECPAP17] complement(<22..(255.275)) + # * [LPATOVGNS] complement((64.74)..1525) + # * [PIP404CG] join((8298.8300)..10206,1..855) + # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) + # * [HUMMIC2A] replace((651.655)..(651.655),"") + # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) + # + # (E) one-of + # + # * [ECU17136] one-of(898,900)..983 + # * [CELCYT1A] one-of(5971..6308,5971..6309) + # * [DMU17742] 8050..one-of(10731,10758,10905,11242) + # * [PFU27807] one-of(623,627,632)..one-of(628,633,637) + # * [BTBAINH1] one-of(845,953,963,1078,1104)..1354 + # * [ATU39449] join(one-of(969..1094,970..1094,995..1094,1018..1094),1518..1587,1726..2119,2220..2833,2945..3215) + # + # (F) join, order, group + # + # * [AB037374S2] join(AB037374.1:1..177,1..807) + # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) + # * [ASNOS11] join(AF130124.1:<2563..2964,AF130125.1:21..157,AF130126.1:12..174,AF130127.1:21..112,AF130128.1:21..162,AF130128.1:281..595,AF130128.1:661..842,AF130128.1:916..1030,AF130129.1:21..115,AF130130.1:21..165,AF130131.1:21..125,AF130132.1:21..428,AF130132.1:492..746,AF130133.1:21..168,AF130133.1:232..401,AF130133.1:475..906,AF130133.1:970..1107,AF130133.1:1176..1367,21..>128) + # + # * [AARPOB2] order(AF194507.1:<1..510,1..>871) + # * [AF006691] order(912..1918,20410..21416) + # * [AF024666] order(complement(18919..19224),complement(13965..14892)) + # * [AF264948] order(27066..27076,27089..27099,27283..27314,27330..27352) + # * [D63363] order(3..26,complement(964..987)) + # * [ECOCURLI2] order(complement(1009..>1260),complement(AF081827.1:<1..177)) + # * [S72388S2] order(join(S72388.1:757..911,S72388.1:609..1542),1..>139) + # * [HEYRRE07] order(complement(1..38),complement(M82666.1:1..140),complement(M82665.1:1..176),complement(M82664.1:1..215),complement(M82663.1:1..185),complement(M82662.1:1..49),complement(M82661.1:1..133)) + # * [COL11A1G34] order(AF101079.1:558..1307,AF101080.1:1..749,AF101081.1:1..898,AF101082.1:1..486,AF101083.1:1..942,AF101084.1:1..1734,AF101085.1:1..2385,AF101086.1:1..1813,AF101087.1:1..2287,AF101088.1:1..1073,AF101089.1:1..989,AF101090.1:1..5017,AF101091.1:1..3401,AF101092.1:1..1225,AF101093.1:1..1072,AF101094.1:1..989,AF101095.1:1..1669,AF101096.1:1..918,AF101097.1:1..1114,AF101098.1:1..1074,AF101099.1:1..1709,AF101100.1:1..986,AF101101.1:1..1934,AF101102.1:1..1699,AF101103.1:1..940,AF101104.1:1..2330,AF101105.1:1..4467,AF101106.1:1..1876,AF101107.1:1..2465,AF101108.1:1..1150,AF101109.1:1..1170,AF101110.1:1..1158,AF101111.1:1..1193,1..611) + # + # group() are found in the COMMENT field only (in GenBank 122.0) + # + # gbpat2.seq: FT repeat_region group(598..606,611..619) + # gbpat2.seq: FT repeat_region group(8..16,1457..1464). + # gbpat2.seq: FT variation group(t1,t2) + # gbpat2.seq: FT variation group(t1,t3) + # gbpat2.seq: FT variation group(t1,t2,t3) + # gbpat2.seq: FT repeat_region group(11..202,203..394) + # gbpri9.seq:COMMENT Residues reported = 'group(1..2145);'. + # + # (G) ID:location + # + # * [AARPOB2] order(AF194507.1:<1..510,1..>871) + # * [AF178221S4] join(AF178221.1:<1..60,AF178222.1:1..63,AF178223.1:1..42,1..>90) + # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) + # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) + # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) + # + # (I) <, > + # + # * [A5U48871] <1..>318 + # * [AA23SRRNP] <1..388 + # * [AA23SRRNP] 503..>1010 + # * [AAM5961] complement(<1..229) + # * [AAM5961] complement(5231..>5598) + # * [AF043934] join(<1,60..99,161..241,302..370,436..594,676..887,993..1141,1209..1329,1387..1559,1626..1646,1708..>1843) + # * [BACSPOJ] <180..(731.761) + # * [BBU17998] (88.89)..>1122 + # * [AARPOB2] order(AF194507.1:<1..510,1..>871) + # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) + # + # (J) complement + # + # * [AF179299] complement(53^54) <= hoge insertion site etc. + # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) + # * [AF209868S2] order(complement(1..>308),complement(AF209868.1:75..336)) + # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) + # * [CPPLCG] complement(<1..(1093.1098)) + # * [D63363] order(3..26,complement(964..987)) + # * [ECHTGA] complement((1700.1708)..(1715.1721)) + # * [ECOUXW] order(complement(1658..1663),complement(1636..1641)) + # * [LPATOVGNS] complement((64.74)..1525) + # * [AF129075] complement(join(71606..71829,75327..75446,76039..76203,76282..76353,76914..77029,77114..77201,77276..77342,78138..78316,79755..79892,81501..81562,81676..81856,82341..82490,84208..84287,85032..85122,88316..88403)) + # * [ZFDYST2] join(AF137145.1:<1..18,complement(<1..99)) + # + # (K) replace + # + # * [CSU27710] replace(64,"A") + # * [CELXOL1ES] replace(5256,"t") + # * [ANICPC] replace(1..468,"") + # * [CSU27710] replace(67..68,"GC") + # * [CELXOL1ES] replace(4480^4481,"") <= ? only one case in GenBank 122.0 + # * [ECOUW87] replace(4792^4793,"a") + # * [CEU34893] replace(1..22,"ggttttaacccagttactcaag") + # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") + # * [MBDR3S1] replace(1400..>9281,"") + # * [HUMMHDPB1F] replace(complement(36..37),"ttc") + # * [HUMMIC2A] replace((651.655)..(651.655),"") + # * [LEIMDRPGP] replace(1..1554,"L01572") + # * [TRBND3] replace(376..395,"atttgtgtgtggtaatta") + # * [TRBND3] replace(376..395,"atttgtgtgggtaatttta") + # * [TRBND3] replace(376..395,"attttgttgttgttttgttttgaatta") + # * [TRBND3] replace(376..395,"atgtgtggtgaatta") + # * [TRBND3] replace(376..395,"atgtgtgtggtaatta") + # * [TRBND3] replace(376..395,"gatttgttgtggtaatttta") + # * [MSU09460] replace(193, <= replace(193, "t") + # * [HUMMAGE12X] replace(3002..3003, <= replace(3002..3003, "GC") + # * [ADR40FIB] replace(510..520, <= replace(510..520, "taatcctaccg") + # * [RATDYIIAAB] replace(1306..1443,"aagaacatccacggagtcagaactgggctcttcacgccggatttggcgttcgaggccattgtgaaaaagcaggcaatgcaccagcaagctcagttcctacccctgcgtggacctggttatccaggagctaatcagtacagttaggtggtcaagctgaaagagccctgtctgaaa") + # + if __FILE__ == $0 puts "Test new & span methods" Index: map.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/map.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** map.rb 27 Jun 2006 12:40:15 -0000 1.8 --- map.rb 24 Dec 2006 10:10:08 -0000 1.9 *************** *** 2,54 **** # = bio/map.rb - biological mapping class # ! # Copyright:: Copyright (C) 2006 ! # Jan Aerts # Licence:: Ruby's # # $Id$ require 'bio/location' module Bio ! # Add a method to Bio::Locations class ! class Locations ! def equals?(other) ! if ! other.kind_of?(Bio::Locations) ! return nil ! end ! if self.sort == other.sort ! return true ! else ! return false ! end ! end ! end ! ! # = DESCRIPTION ! # The Bio::Module contains classes that describe mapping information and can ! # be used to contain linkage maps, radiation-hybrid maps, etc. ! # As the same marker can be mapped to more than one map, and a single map ! # typically contains more than one marker, the link between the markers and ! # maps is handled by Bio::Map::Mapping objects. Therefore, to link a map to ! # a marker, a Bio::Mapping object is added to that Bio::Map. See usage below. # ! # Not only maps in the strict sense have map-like features (and similarly ! # not only markers in the strict sense have marker-like features). For example, ! # a microsatellite is something that can be mapped on a linkage map (and ! # hence becomes a 'marker'), but a clone can also be mapped to a cytogenetic ! # map. In that case, the clone acts as a marker and has marker-like properties. ! # That same clone can also be considered a 'map' when BAC-end sequences are ! # mapped to it. To reflect this flexibility, the modules Bio::Map::ActsLikeMap ! # and Bio::Map::ActsLikeMarker define methods that are typical for maps and ! # markers. # #-- ! # In a certain sense, a biological sequence also has map- and marker-like ! # properties: things can be mapped to it at certain locations, and the sequence ! # itself can be mapped to something else (e.g. the BAC-end sequence example ! # above, or a BLAST-result). #++ # ! # = USAGE # my_marker1 = Bio::Map::Marker.new('marker1') # my_marker2 = Bio::Map::Marker.new('marker2') --- 2,44 ---- # = bio/map.rb - biological mapping class # ! # Copyright:: Copyright (C) 2006 Jan Aerts # Licence:: Ruby's # # $Id$ + require 'bio/location' module Bio ! # == Description # ! # The Bio::Map contains classes that describe mapping information ! # and can be used to contain linkage maps, radiation-hybrid maps, ! # etc. As the same marker can be mapped to more than one map, and a ! # single map typically contains more than one marker, the link ! # between the markers and maps is handled by Bio::Map::Mapping ! # objects. Therefore, to link a map to a marker, a Bio::Map::Mapping ! # object is added to that Bio::Map. See usage below. ! # ! # Not only maps in the strict sense have map-like features (and ! # similarly not only markers in the strict sense have marker-like ! # features). For example, a microsatellite is something that can be ! # mapped on a linkage map (and hence becomes a 'marker'), but a ! # clone can also be mapped to a cytogenetic map. In that case, the ! # clone acts as a marker and has marker-like properties. That same ! # clone can also be considered a 'map' when BAC-end sequences are ! # mapped to it. To reflect this flexibility, the modules ! # Bio::Map::ActsLikeMap and Bio::Map::ActsLikeMarker define methods ! # that are typical for maps and markers. # #-- ! # In a certain sense, a biological sequence also has map- and ! # marker-like properties: things can be mapped to it at certain ! # locations, and the sequence itself can be mapped to something else ! # (e.g. the BAC-end sequence example above, or a BLAST-result). #++ # ! # == Usage ! # # my_marker1 = Bio::Map::Marker.new('marker1') # my_marker2 = Bio::Map::Marker.new('marker2') *************** *** 62,101 **** # my_marker3.add_mapping_as_marker(my_map1, '9') # ! # puts "Does my_map1 contain marker3? => " + my_map1.contains_marker?(my_marker3).to_s ! # puts "Does my_map2 contain marker3? => " + my_map2.contains_marker?(my_marker3).to_s # # my_map1.mappings_as_map.sort.each do |mapping| ! # puts mapping.map.name + "\t" + mapping.marker.name + "\t" + mapping.location.from.to_s + ".." + mapping.location.to.to_s # end # puts my_map1.mappings_as_map.min.marker.name # my_map2.mappings_as_map.each do |mapping| ! # puts mapping.map.name + "\t" + mapping.marker.name + "\t" + mapping.location.from.to_s + ".." + mapping.location.to.to_s # end module Map ! # = DESCRIPTION ! # The Bio::Map::ActsLikeMap module contains methods that are typical for ! # map-like things: ! # * add markers with their locations (through Bio::Map::Mappings) ! # * check if a given marker is mapped to it ! # , and can be mixed into other classes (e.g. Bio::Map::SimpleMap) ! # ! # Classes that include this mixin should provide an array property called mappings_as_map. ! # For example: ! # class MyMapThing ! # include Bio::Map::ActsLikeMap ! # ! # def initialize (name) ! # @name = name ! # @mappings_as_maps = Array.new ! # end ! # attr_accessor :name, :mappings_as_map ! # end module ActsLikeMap ! # = DESCRIPTION # Adds a Bio::Map::Mappings object to its array of mappings. # ! # = USAGE # # suppose we have a Bio::Map::SimpleMap object called my_map # my_map.add_mapping_as_map(Bio::Map::Marker.new('marker_a'), '5') # --- # *Arguments*: --- 52,112 ---- # my_marker3.add_mapping_as_marker(my_map1, '9') # ! # print "Does my_map1 contain marker3? => " ! # puts my_map1.contains_marker?(my_marker3).to_s ! # print "Does my_map2 contain marker3? => " ! # puts my_map2.contains_marker?(my_marker3).to_s # # my_map1.mappings_as_map.sort.each do |mapping| ! # puts [ mapping.map.name, ! # mapping.marker.name, ! # mapping.location.from.to_s, ! # mapping.location.to.to_s ].join("\t") # end # puts my_map1.mappings_as_map.min.marker.name + # # my_map2.mappings_as_map.each do |mapping| ! # puts [ mapping.map.name, ! # mapping.marker.name, ! # mapping.location.from.to_s, ! # mapping.location.to.to_s ].join("\t") # end + # module Map ! ! # == Description ! # ! # The Bio::Map::ActsLikeMap module contains methods that are typical for ! # map-like things: ! # ! # * add markers with their locations (through Bio::Map::Mappings) ! # * check if a given marker is mapped to it, ! # and can be mixed into other classes (e.g. Bio::Map::SimpleMap) ! # ! # Classes that include this mixin should provide an array property ! # called mappings_as_map. ! # ! # For example: ! # ! # class MyMapThing ! # include Bio::Map::ActsLikeMap ! # ! # def initialize (name) ! # @name = name ! # @mappings_as_maps = Array.new ! # end ! # attr_accessor :name, :mappings_as_map ! # end ! # module ActsLikeMap ! ! # == Description ! # # Adds a Bio::Map::Mappings object to its array of mappings. # ! # == Usage ! # # # suppose we have a Bio::Map::SimpleMap object called my_map # my_map.add_mapping_as_map(Bio::Map::Marker.new('marker_a'), '5') + # # --- # *Arguments*: *************** *** 126,131 **** return self end ! ! # Checks whether a Bio::Map::Marker is mapped to this Bio::Map::SimpleMap. # --- # *Arguments*: --- 137,144 ---- return self end ! ! # Checks whether a Bio::Map::Marker is mapped to this ! # Bio::Map::SimpleMap. ! # # --- # *Arguments*: *************** *** 146,160 **** end ! end #ActsLikeMap ! # = DESCRIPTION ! # The Bio::Map::ActsLikeMarker module contains methods that are typical for ! # marker-like things: # * map it to one or more maps # * check if it's mapped to a given map ! # , and can be mixed into other classes (e.g. Bio::Map::Marker) # ! # Classes that include this mixin should provide an array property called mappings_as_marker. # For example: # class MyMarkerThing # include Bio::Map::ActsLikeMarker --- 159,178 ---- end ! end # ActsLikeMap ! # == Description ! # ! # The Bio::Map::ActsLikeMarker module contains methods that are ! # typical for marker-like things: ! # # * map it to one or more maps # * check if it's mapped to a given map ! # and can be mixed into other classes (e.g. Bio::Map::Marker) # ! # Classes that include this mixin should provide an array property ! # called mappings_as_marker. ! # # For example: + # # class MyMarkerThing # include Bio::Map::ActsLikeMarker *************** *** 166,176 **** # attr_accessor :name, :mappings_as_marker # end module ActsLikeMarker ! # = DESCRIPTION # Adds a Bio::Map::Mappings object to its array of mappings. # ! # = USAGE # # suppose we have a Bio::Map::Marker object called marker_a # marker_a.add_mapping_as_marker(Bio::Map::SimpleMap.new('my_map'), '5') # --- # *Arguments*: --- 184,199 ---- # attr_accessor :name, :mappings_as_marker # end + # module ActsLikeMarker ! ! # == Description ! # # Adds a Bio::Map::Mappings object to its array of mappings. # ! # == Usage ! # # # suppose we have a Bio::Map::Marker object called marker_a # marker_a.add_mapping_as_marker(Bio::Map::SimpleMap.new('my_map'), '5') + # # --- # *Arguments*: *************** *** 242,252 **** ! end #ActsLikeMarker ! # = DESCRIPTION # Creates a new Bio::Map::Mapping object, which links Bio::Map::ActsAsMap- # and Bio::Map::ActsAsMarker-like objects. This class is typically not # accessed directly, but through map- or marker-like objects. class Mapping include Comparable --- 265,277 ---- ! end # ActsLikeMarker ! # == Description ! # # Creates a new Bio::Map::Mapping object, which links Bio::Map::ActsAsMap- # and Bio::Map::ActsAsMarker-like objects. This class is typically not # accessed directly, but through map- or marker-like objects. class Mapping + include Comparable *************** *** 283,296 **** end # Mapping ! # = DESCRIPTION ! # This class handles the essential storage of name, type and units of a map. ! # It includes Bio::Map::ActsLikeMap, and therefore supports the methods of ! # that module. # ! # = USAGE # my_map1 = Bio::Map::SimpleMap.new('RH_map_ABC (2006)', 'RH', 'cR') # my_map1.add_marker(Bio::Map::Marker.new('marker_a', '17') # my_map1.add_marker(Bio::Map::Marker.new('marker_b', '5') class SimpleMap include Bio::Map::ActsLikeMap --- 308,325 ---- end # Mapping ! # == Description ! # ! # This class handles the essential storage of name, type and units ! # of a map. It includes Bio::Map::ActsLikeMap, and therefore ! # supports the methods of that module. # ! # == Usage ! # # my_map1 = Bio::Map::SimpleMap.new('RH_map_ABC (2006)', 'RH', 'cR') # my_map1.add_marker(Bio::Map::Marker.new('marker_a', '17') # my_map1.add_marker(Bio::Map::Marker.new('marker_b', '5') + # class SimpleMap + include Bio::Map::ActsLikeMap *************** *** 324,336 **** end # SimpleMap ! # = DESCRIPTION ! # This class handles markers that are anchored to a Bio::Map::SimpleMap. It ! # includes Bio::Map::ActsLikeMarker, and therefore supports the methods of ! # that module. # ! # = USAGE # marker_a = Bio::Map::Marker.new('marker_a') # marker_b = Bio::Map::Marker.new('marker_b') class Marker include Bio::Map::ActsLikeMarker --- 353,369 ---- end # SimpleMap ! # == Description ! # ! # This class handles markers that are anchored to a Bio::Map::SimpleMap. ! # It includes Bio::Map::ActsLikeMarker, and therefore supports the ! # methods of that module. # ! # == Usage ! # # marker_a = Bio::Map::Marker.new('marker_a') # marker_b = Bio::Map::Marker.new('marker_b') + # class Marker + include Bio::Map::ActsLikeMarker *************** *** 352,355 **** --- 385,390 ---- end # Marker + end # Map + end # Bio From nakao at dev.open-bio.org Wed Dec 27 20:00:26 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 28 Dec 2006 01:00:26 +0000 Subject: [BioRuby-cvs] bioruby/test/data/blast 2.2.15.blastp.m7,NONE,1.1 Message-ID: <200612280100.kBS10QUI013565@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/data/blast In directory dev.open-bio.org:/tmp/cvs-serv13545/test/data/blast Added Files: 2.2.15.blastp.m7 Log Message: * Test data for blast 2.2.15. --- NEW FILE: 2.2.15.blastp.m7 --- blastp blastp 2.2.15 [Oct-15-2006] ~Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, ~Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), ~"Gapped BLAST and PSI-BLAST: a new generation of protein database search~programs", Nucleic Acids Res. 25:3389-3402. p53_barbu.fasta lcl|1_0 P53_HUMAN P04637 Cellular tumor antigen p53 (Tumor suppressor p53) (Phosphoprotein p53) (Antigen NY-CO-13). 393 BLOSUM62 10 11 1 F 1 lcl|1_0 P53_HUMAN P04637 Cellular tumor antigen p53 (Tumor suppressor p53) (Phosphoprotein p53) (Antigen NY-CO-13). 393 1 gnl|BL_ORD_ID|13 P53_HUMAN P04637 Cellular tumor antigen p53 (Tumor suppressor p53) (Phosphoprotein p53) (Antigen NY-CO-13). 13 393 1 755.362 1949 0 1 393 1 393 1 1 366 366 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPPVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDE SWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD 2 gnl|BL_ORD_ID|6 P53_CERAE P13481 Cellular tumor antigen p53 (Tumor suppressor p53). 6 393 1 730.324 1884 0 1 393 1 393 1 1 353 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPHMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP HELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 3 gnl|BL_ORD_ID|17 P53_MACMU P56424 Cellular tumor antigen p53 (Tumor suppressor p53). 17 393 1 729.169 1881 0 1 393 1 393 1 1 352 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPPMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHQLPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP H+LPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 4 gnl|BL_ORD_ID|16 P53_MACFU P61260 Cellular tumor antigen p53 (Tumor suppressor p53). 16 393 1 729.169 1881 0 1 393 1 393 1 1 352 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPPMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHQLPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP H+LPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 5 gnl|BL_ORD_ID|15 P53_MACFA P56423 Cellular tumor antigen p53 (Tumor suppressor p53). 15 393 1 729.169 1881 0 1 393 1 393 1 1 352 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPPMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHQLPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP H+LPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 6 gnl|BL_ORD_ID|18 P53_MARMO O36006 Cellular tumor antigen p53 (Tumor suppressor p53). 18 391 1 659.448 1700 0 1 393 1 391 1 1 323 338 2 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEAQSDLSIEPPLSQETFSDLWNLLPENNVLSPVLSPPMDDLLLSSEDVENWF--DKGPDEALQMSAAPAPKAPTPAASTLAAPSPATSWPLSSSVPSQNTYPGVYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSECTTIHYNYMCNSSCMGGMNRRPILTIITLEGSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKRGEPCPEPPPRSTKRALPNGTSSSPQPKKKPLDGEYFTLKIRGRARFEMFQELNEALELKDAQAEKEPGESRPHPSYLKSKKGQSTSRHKKIIFKREGPDSD MEE QSD S+EPPLSQETFSDLW LLPENNVLSP+ S MDDL+LS +D+E WF D GPDE SWPLSSSVPSQ TY G YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDSTPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGS+CTTIHYNYMCNSSCMGGMNRRPILTIITLE SSGNLLGRNSFEVRVCACPGRDRRTEEEN RK+GEP E PP STKRALPN TSSSPQPKKKPLDGEYFTL+IRGR RFEMF+ELNEALELKDAQA KEPG SR H S+LKSKKGQSTSRHKK++FK EGPDSD 7 gnl|BL_ORD_ID|25 P53_RABIT Q95330 Cellular tumor antigen p53 (Tumor suppressor p53). 25 391 1 648.277 1671 0 1 393 1 391 1 1 322 338 4 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTS-SSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSDLSLEPPLSQETFSDLWKLLPENNLLTTSLNPPVDDL-LSAEDVANWLNEDP--EEGLRVPAAPAPEAPAPAAPALAAPAPATSWPLSSSVPSQKTYHGNYGFRLGFLHSGTAKSVTCTYSPCLNKLFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCPELPPGSSKRALPTTTTDSSPQTKKKPLDGEYFILKIRGRERFEMFRELNEALELKDAQAEKEPGGSRAHSSYLKAKKGQSTSRHKKPMFKREGPDSD MEE QSD S+EPPLSQETFSDLWKLLPENN+L+ + +DDL LS +D+ W EDP +E SWPLSSSVPSQKTY G+YGFRLGFLHSGTAKSVTCTYSP LNK+FCQLAKTCPVQLWVDSTPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP ELPPGS+KRALP T+ SSPQ KKKPLDGEYF L+IRGRERFEMFRELNEALELKDAQA KEPGGSRAHSS+LK+KKGQSTSRHKK MFK EGPDSD 8 gnl|BL_ORD_ID|9 P53_DELLE Q8SPZ3 Cellular tumor antigen p53 (Tumor suppressor p53). 9 387 1 635.95 1639 0 1 393 1 387 1 1 318 332 8 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELGVEPPLSQETFSDLWKLLPENNLLSSELSPAVDDLLLSPEDVANWL--DERPDEAPQMPEPPAPAAPTPAAPAPAT-----SWPLSSFVPSQKTYPGSYGFHLGFLHSGTAKSVTCTYSPALNKLFCQLAKTCPVQLWVSSPPPPGTRVRAMAIYKKSEYMTEVVRRCPHHERCSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDSNGNLLGRNSFEVRVCACPGRDRRTEEENFHKKGQSCPELPTGSAKRALPTGTSSSPPQKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGESRAHSSHLKSKKGQSPSRHKKLMFKREGPDSD MEE Q++ VEPPLSQETFSDLWKLLPENN+LS S A+DDL+LSP+D+ W D PDE SWPLSS VPSQKTY GSYGF LGFLHSGTAKSVTCTYSPALNK+FCQLAKTCPVQLWV S PPPGTRVRAMAIYK+S++MTEVVRRCPHHERCSD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLEDS+GNLLGRNSFEVRVCACPGRDRRTEEEN KKG+ ELP GS KRALP TSSSP KKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPG SRAHSSHLKSKKGQS SRHKKLMFK EGPDSD 9 gnl|BL_ORD_ID|23 P53_PIG Q9TUB2 Cellular tumor antigen p53 (Tumor suppressor p53). 23 386 1 607.446 1565 4.50259e-177 1 393 1 386 1 1 308 326 11 395 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSP-LPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSELGVEPPLSQETFSDLWKLLPENNLLSSELSLAAVNDLLLSP--VTNWLDENPDDASRVPAPPAATAPAPAAPAPAT-------SWPLSSFVPSQKTYPGSYDFRLGFLHSGTAKSVTCTYSPALNKLFCQLAKTCPVQLWVSSPPPPGTRVRAMAIYKKSEYMTEVVRRCPHHERSSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDASGNLLGRNSFEVRVCACPGRDRRTEEENFLKKGQSCPEPPPGSTKRALPTSTSSSPVQKKKPLDGEYFTLQIRGRERFEMFRELNDALELKDAQTARESGENRAHSSHLKSKKGQSPSRHKKPMFKREGPDSD MEE QS+ VEPPLSQETFSDLWKLLPENN+LS L A++DL+LSP + W E+P SWPLSS VPSQKTY GSY FRLGFLHSGTAKSVTCTYSPALNK+FCQLAKTCPVQLWV S PPPGTRVRAMAIYK+S++MTEVVRRCPHHER SD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLED+SGNLLGRNSFEVRVCACPGRDRRTEEEN KKG+ E PPGSTKRALP +TSSSP KKKPLDGEYFTLQIRGRERFEMFRELN+ALELKDAQ +E G +RAHSSHLKSKKGQS SRHKK MFK EGPDSD 10 gnl|BL_ORD_ID|4 P53_CANFA Q29537 Cellular tumor antigen p53 (Tumor suppressor p53). 4 381 1 604.749 1558 2.91849e-176 1 393 1 381 1 1 304 325 14 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSELNIDPPLSQETFSELWNLLPENNVLSSELCPAVDELLL-PESVVNWLDEDSDD------------APRMPATSAPTAPGPAPSWPLSSSVPSPKTYPGTYGFRLGFLHSGTAKSVTWTYSPLLNKLFCQLAKTCPVQLWVSSPPPPNTCVRAMAIYKKSEFVTEVVRRCPHHERCSDSSDGLAPPQHLIRVEGNLRAKYLDDRNTFRHSVVVPYEPPEVGSDYTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNVLGRNSFEVRVCACPGRDRRTEEENFHKKGEPCPEPPPGSTKRALPPSTSSSPPQKKKPLDGEYFTLQIRGRERYEMFRNLNEALELKDAQSGKEPGGSRAHSSHLKAKKGQSTSRHKKLMFKREGLDSD MEE QS+ +++PPLSQETFS+LW LLPENNVLS A+D+L+L P+ + W ED SWPLSSSVPS KTY G+YGFRLGFLHSGTAKSVT TYSP LNK+FCQLAKTCPVQLWV S PPP T VRAMAIYK+S+ +TEVVRRCPHHERCSDS DGLAPPQHLIRVEGNLR +YLDDRNTFRHSVVVPYEPPEVGSD TTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGN+LGRNSFEVRVCACPGRDRRTEEEN KKGEP E PPGSTKRALP +TSSSP KKKPLDGEYFTLQIRGRER+EMFR LNEALELKDAQ+GKEPGGSRAHSSHLK+KKGQSTSRHKKLMFK EG DSD 11 gnl|BL_ORD_ID|11 P53_FELCA P41685 Cellular tumor antigen p53 (Tumor suppressor p53). 11 386 1 602.823 1553 1.10903e-175 1 393 1 386 1 1 303 325 9 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MQEPPLELTIEPPLSQETFSELWNLLPENNVLSSELSSAMNELPLS-EDVANWL--DEAPDDASGMSAVPAPAAPAPATPAPAI-----SWPLSSFVPSQKTYPGAYGFHLGFLQSGTAKSVTCTYSPPLNKLFCQLAKTCPVQLWVRSPPPPGTCVRAMAIYKKSEFMTEVVRRCPHHERCPDSSDGLAPPQHLIRVEGNLHAKYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPIITIITLEDSNGKLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCPEPPPGSTKRALPPSTSSTPPQKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQSGKEPGGSRAHSSHLKAKKGQSTSRHKKPMLKREGLDSD M+EP + ++EPPLSQETFS+LW LLPENNVLS S AM++L LS +D+ W D PD+ SWPLSS VPSQKTY G+YGF LGFL SGTAKSVTCTYSP LNK+FCQLAKTCPVQLWV S PPPGT VRAMAIYK+S+ MTEVVRRCPHHERC DS DGLAPPQHLIRVEGNL +YLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPI+TIITLEDS+G LLGRNSFEVRVCACPGRDRRTEEEN RKKGEP E PPGSTKRALP +TSS+P KKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQ+GKEPGGSRAHSSHLK+KKGQSTSRHKK M K EG DSD 12 gnl|BL_ORD_ID|5 P53_CAVPO Q9WUR6 Cellular tumor antigen p53 (Tumor suppressor p53). 5 391 1 600.512 1547 5.50404e-175 1 393 1 391 1 1 297 319 2 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPHSDLSIEPPLSQETFSDLWKLLPENNVLSDSLSPPMDHLLLSPEEVASWLGENPDGD--GHVSAAPVSEAPTSAGPALVAPAPATSWPLSSSVPSHKPYRGSYGFEVHFLKSGTAKSVTCTYSPGLNKLFCQLAKTCPVQVWVESPPPPGTRVRALAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLHAEYVDDRTTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGKLLGRDSFEVRVCACPGRDRRTEEENFRKKGGLCPEPTPGNIKRALPTSTSSSPQPKKKPLDAEYFTLKIRGRKNFEILREINEALEFKDAQTEKEPGESRPHSSYPKSKKGQSTSCHKKLMFKREGLDSD MEEP SD S+EPPLSQETFSDLWKLLPENNVLS S MD L+LSP+++ W E+P D SWPLSSSVPS K Y+GSYGF + FL SGTAKSVTCTYSP LNK+FCQLAKTCPVQ+WV+S PPPGTRVRA+AIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNL EY+DDR TFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSG LLGR+SFEVRVCACPGRDRRTEEEN RKKG E PG+ KRALP +TSSSPQPKKKPLD EYFTL+IRGR+ FE+ RE+NEALE KDAQ KEPG SR HSS+ KSKKGQSTS HKKLMFK EG DSD 13 gnl|BL_ORD_ID|27 P53_SHEEP P51664 Cellular tumor antigen p53 (Tumor suppressor p53). 27 382 1 595.89 1535 1.35569e-173 1 393 1 382 1 1 299 320 13 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELGVEPPLSQETFSDLWNLLPENNLLSSELSAPVDDLLPYSEDVVTWLDECPNE------------APQMPEPPAQAALAPATSWPLSSFVPSQKTYPGNYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSPPPPGTRVRAMAIYKKLEHMTEVVRRSPHHERSSDYSDGLAPPQHLIRVEGNLRAEYFDDRNTFRHSVVVPYESPEIESECTTIHYNFMCNSSCMGGMNRRPILTIITLEDSRGNLLGRSSFEVRVCACPGRDRRTEEENFRKKGQSCPEPPPGSTKRALPSSTSSSPQQKKKPLDGEYFTLQIRGRKRFEMFRELNEALELMDAQAGREPGESRAHSSHLKSKKGPSPSCHKKPMLKREGPDSD MEE Q++ VEPPLSQETFSDLW LLPENN+LS S +DDL+ +D+ W E P SWPLSS VPSQKTY G+YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDS PPPGTRVRAMAIYK+ +HMTEVVRR PHHER SD SDGLAPPQHLIRVEGNLR EY DDRNTFRHSVVVPYE PE+ S+CTTIHYN+MCNSSCMGGMNRRPILTIITLEDS GNLLGR+SFEVRVCACPGRDRRTEEEN RKKG+ E PPGSTKRALP++TSSSPQ KKKPLDGEYFTLQIRGR+RFEMFRELNEALEL DAQAG+EPG SRAHSSHLKSKKG S S HKK M K EGPDSD 14 gnl|BL_ORD_ID|19 P53_MESAU Q00366 Cellular tumor antigen p53 (Tumor suppressor p53). 19 396 1 594.349 1531 3.94446e-173 1 393 1 396 1 1 300 324 7 398 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQ-AMDDLMLSPDDIEQWFTEDPGP----DEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDLSIELPLSQETFSDLWKLLPPNNVLSTLPSSDSIEELFLS-ENVAGWL-EDPGEALQGSAAAAAPAAPAAEDPVAETPAPVASAPATPWPLSSSVPSYKTYQGDYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVSSTPPPGTRVRAMAIYKKLQYMTEVVRRCPHHERSSEGDGLAPPQHLIRVEGNMHAEYLDDKQTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDPSGNLLGRNSFEVRICACPGRDRRTEEKNFQKKGEPCPELPPKSAKRALPTNTSSSPQPKRKTLDGEYFTLKIRGQERFKMFQELNEALELKDAQALKASEDSGAHSSYLKSKKGQSASRLKKLMIKREGPDSD MEEPQSD S+E PLSQETFSDLWKLLP NNVLS LPS ++++L LS +++ W EDPG WPLSSSVPS KTYQG YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWV STPPPGTRVRAMAIYK+ Q+MTEVVRRCPHHER S+ DGLAPPQHLIRVEGN+ EYLDD+ TFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLED SGNLLGRNSFEVR+CACPGRDRRTEE+N +KKGEP ELPP S KRALP NTSSSPQPK+K LDGEYFTL+IRG+ERF+MF+ELNEALELKDAQA K S AHSS+LKSKKGQS SR KKLM K EGPDSD 15 gnl|BL_ORD_ID|8 P53_CRIGR O09185 Cellular tumor antigen p53 (Tumor suppressor p53). 8 393 1 594.349 1531 3.94446e-173 1 393 1 393 1 1 296 321 2 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQ-AMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDLSIELPLSQETFSDLWKLLPPNNVLSTLPSSDSIEELFLS-ENVTGWLEDSGGALQGVAAAAASTAEDPVTETPAPVASAPATPWPLSSSVPSYKTYQGDYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVNSTPPPGTRVRAMAIYKKLQYMTEVVRRCPHHERSSEGDSLAPPQHLIRVEGNLHAEYLDDKQTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDPSGNLLGRNSFEVRICACPGRDRRTEEKNFQKKGEPCPELPPKSAKRALPTNTSSSPPPKKKTLDGEYFTLKIRGHERFKMFQELNEALELKDAQASKGSEDNGAHSSYLKSKKGQSASRLKKLMIKREGPDSD MEEPQSD S+E PLSQETFSDLWKLLP NNVLS LPS ++++L LS +++ W + G + WPLSSSVPS KTYQG YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWV+STPPPGTRVRAMAIYK+ Q+MTEVVRRCPHHER S+ D LAPPQHLIRVEGNL EYLDD+ TFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLED SGNLLGRNSFEVR+CACPGRDRRTEE+N +KKGEP ELPP S KRALP NTSSSP PKKK LDGEYFTL+IRG ERF+MF+ELNEALELKDAQA K + AHSS+LKSKKGQS SR KKLM K EGPDSD 16 gnl|BL_ORD_ID|2 P53_BOVIN P67939 Cellular tumor antigen p53 (Tumor suppressor p53). 2 386 1 588.956 1517 1.65722e-171 1 393 1 386 1 1 299 318 9 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELNVEPPLSQETFSDLWNLLPENNLLSSELSAPVDDL-LPYTDVATWLDECPNE-------APQMPEPSAPAAPPPATPAPATSWPLSSFVPSQKTYPGNYGFRLGFLQSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSPPPPGTRVRAMAIYKKLEHMTEVVRRCPHHERSSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYESPEIDSECTTIHYNFMCNSSCMGGMNRRPILTIITLEDSCGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGQSCPEPPPRSTKRALPTNTSSSPQPKKKPLDGEYFTLQIRGFKRYEMFRELNDALELKDALDGREPGESRAHSSHLKSKKRPSPSCHKKPMLKREGPDSD MEE Q++ +VEPPLSQETFSDLW LLPENN+LS S +DDL L D+ W E P SWPLSS VPSQKTY G+YGFRLGFL SGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDS PPPGTRVRAMAIYK+ +HMTEVVRRCPHHER SD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYE PE+ S+CTTIHYN+MCNSSCMGGMNRRPILTIITLEDS GNLLGRNSFEVRVCACPGRDRRTEEENLRKKG+ E PP STKRALP NTSSSPQPKKKPLDGEYFTLQIRG +R+EMFRELN+ALELKDA G+EPG SRAHSSHLKSKK S S HKK M K EGPDSD 17 gnl|BL_ORD_ID|1 P53_BOSIN P67938 Cellular tumor antigen p53 (Tumor suppressor p53). 1 386 1 588.956 1517 1.65722e-171 1 393 1 386 1 1 299 318 9 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELNVEPPLSQETFSDLWNLLPENNLLSSELSAPVDDL-LPYTDVATWLDECPNE-------APQMPEPSAPAAPPPATPAPATSWPLSSFVPSQKTYPGNYGFRLGFLQSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSPPPPGTRVRAMAIYKKLEHMTEVVRRCPHHERSSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYESPEIDSECTTIHYNFMCNSSCMGGMNRRPILTIITLEDSCGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGQSCPEPPPRSTKRALPTNTSSSPQPKKKPLDGEYFTLQIRGFKRYEMFRELNDALELKDALDGREPGESRAHSSHLKSKKRPSPSCHKKPMLKREGPDSD MEE Q++ +VEPPLSQETFSDLW LLPENN+LS S +DDL L D+ W E P SWPLSS VPSQKTY G+YGFRLGFL SGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDS PPPGTRVRAMAIYK+ +HMTEVVRRCPHHER SD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYE PE+ S+CTTIHYN+MCNSSCMGGMNRRPILTIITLEDS GNLLGRNSFEVRVCACPGRDRRTEEENLRKKG+ E PP STKRALP NTSSSPQPKKKPLDGEYFTLQIRG +R+EMFRELN+ALELKDA G+EPG SRAHSSHLKSKK S S HKK M K EGPDSD 18 gnl|BL_ORD_ID|26 P53_RAT P10361 Cellular tumor antigen p53 (Tumor suppressor p53). 26 391 1 575.859 1483 1.4518e-167 1 393 1 391 1 1 295 317 8 396 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPS---QAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEDSQSDMSIELPLSQETFSCLWKLLPPDDILPTTATGSPNSMEDLFL-PQDVAELLE---GPEEALQVSAPAAQEPGTEAPAPVAPASATP-WPLSSSVPSQKTYQGNYGFHLGFLQSGTAKSVMCTYSISLNKLFCQLAKTCPVQLWVTSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDGDGLAPPQHLIRVEGNPYAEYLDDRQTFRHSVVVPYEPPEVGSDYTTIHYKYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRDSFEVRVCACPGRDRRTEEENFRKKEEHCPELPPGSAKRALPTSTSSSPQQKKKPLDGEYFTLKIRGRERFEMFRELNEALELKDARAAEESGDSRAHSSYPKTKKGQSTSRHKKPMIKKVGPDSD ME+ QSD S+E PLSQETFS LWKLLP +++L + +M+DL L P D+ + GP+E WPLSSSVPSQKTYQG+YGF LGFL SGTAKSV CTYS +LNK+FCQLAKTCPVQLWV STPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSD DGLAPPQHLIRVEGN EYLDDR TFRHSVVVPYEPPEVGSD TTIHY YMCNSSCMGGMNRRPILTIITLEDSSGNLLGR+SFEVRVCACPGRDRRTEEEN RKK E ELPPGS KRALP +TSSSPQ KKKPLDGEYFTL+IRGRERFEMFRELNEALELKDA+A +E G SRAHSS+ K+KKGQSTSRHKK M K GPDSD 19 gnl|BL_ORD_ID|20 P53_MOUSE P02340 Cellular tumor antigen p53 (Tumor suppressor p53). 20 390 1 574.318 1479 4.22408e-167 1 393 4 390 1 1 293 314 6 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSDISLELPLSQETFSGLWKLLPPEDIL-PSP-HCMDDLLL-PQDVEEFFE---GPSEALRVSGAPAAQDPVTETPGPVAPAPATPWPLSSFVPSQKTYQGNYGFHLGFLQSGTAKSVMCTYSPPLNKLFCQLAKTCPVQLWVSATPPAGSRVRAMAIYKKSQHMTEVVRRCPHHERCSDGDGLAPPQHLIRVEGNLYPEYLEDRQTFRHSVVVPYEPPEAGSEYTTIHYKYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRDSFEVRVCACPGRDRRTEEENFRKKEVLCPELPPGSAKRALPTCTSASPPQKKKPLDGEYFTLKIRGRKRFEMFRELNEALELKDAHATEESGDSRAHSSYLKTKKGQSTSRHKKTMVKKVGPDSD MEE QSD S+E PLSQETFS LWKLLP ++L P P MDDL+L P D+E++F GP E WPLSS VPSQKTYQG+YGF LGFL SGTAKSV CTYSP LNK+FCQLAKTCPVQLWV +TPP G+RVRAMAIYK+SQHMTEVVRRCPHHERCSD DGLAPPQHLIRVEGNL EYL+DR TFRHSVVVPYEPPE GS+ TTIHY YMCNSSCMGGMNRRPILTIITLEDSSGNLLGR+SFEVRVCACPGRDRRTEEEN RKK ELPPGS KRALP TS+SP KKKPLDGEYFTL+IRGR+RFEMFRELNEALELKDA A +E G SRAHSS+LK+KKGQSTSRHKK M K GPDSD 20 gnl|BL_ORD_ID|28 P53_SPEBE Q64662 Cellular tumor antigen p53 (Tumor suppressor p53) (Fragment). 28 314 1 530.02 1364 9.13575e-154 21 335 1 313 1 1 256 268 2 315 DLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGR DLWNLLPENNVLSPVLSPPMDDLLLSSEDVENWF--DKGPDEALQMSAAPAPKAPTPAASTLAAPTPAISWPLSSSVPSQNTYPGVYGFRLGFIHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSESTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKRGEPCPEPPPGSTKRALPTGTNSSPQPKKKPLDGEYFTLKIRGR DLW LLPENNVLSP+ S MDDL+LS +D+E WF D GPDE SWPLSSSVPSQ TY G YGFRLGF+HSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDSTPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGS+ TTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RK+GEP E PPGSTKRALP T+SSPQPKKKPLDGEYFTL+IRGR 21 gnl|BL_ORD_ID|12 P53_HORSE P79892 Cellular tumor antigen p53 (Tumor suppressor p53) (Fragment). 12 280 1 448.743 1153 2.67666e-129 39 329 2 280 1 1 227 238 14 292 AMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFT AVNNLLLSPD-VVNWL--DEGPDEAPRMPAAPAPLAPAPAT----------SWPLSSFVPSQKTYPGCYGFRLGFLNSGTAKSVTCTYSPTLNKLFCQLAKTCPVQLLVSSPPPPGTRVRAMAIYKKSEFMTEVVRRCPHHERCSDSSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKEEPCPEPPPRSTKRVLSSNTSSSPPQKKKPLDGEYFT A+++L+LSPD + W D GPDE SWPLSS VPSQKTY G YGFRLGFL+SGTAKSVTCTYSP LNK+FCQLAKTCPVQL V S PPPGTRVRAMAIYK+S+ MTEVVRRCPHHERCSDS DGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKK EP E PP STKR L +NTSSSP KKKPLDGEYFT 22 gnl|BL_ORD_ID|10 P53_EQUAS Q29480 Cellular tumor antigen p53 (Tumor suppressor p53) (Fragment). 10 207 1 374.015 959 8.37873e-107 126 330 1 206 1 1 181 187 1 206 YSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTL YSPALNKMFCQLAKTCPVYLRISSPPPPGTRVRAMAIYKKSEFMTEVVRRCPHHERCSDSSDGLAPPQHLIRVEGNLRAEYLDDRNTLRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKEEPCPEPPPRSTKRVLSSNTSSSPPQKEDPLDGEYFTL YSPALNKMFCQLAKTCPV L + S PPPGTRVRAMAIYK+S+ MTEVVRRCPHHERCSDS DGLAPPQHLIRVEGNLR EYLDDRNT RHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKK EP E PP STKR L +NTSSSP K+ PLDGEYFTL 23 gnl|BL_ORD_ID|7 P53_CHICK P10360 Cellular tumor antigen p53 (Tumor suppressor p53). 7 367 1 355.91 912 2.36124e-101 5 386 4 364 1 1 197 240 27 385 QSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPL--DGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFK EMEPLLEPT---EVFMDLWSMLPYSMQQLPLPEDHSNWQELSPLE-----PSDPPPPPPPPPLPLAAAAPPPLNPPTPPRAAP------SPVVPSTEDYGGDFDFRVGFVEAGTAKSVTCTYSPVLNKVYCRLAKPCPVQVRVGVAPPPGSSLRAVAVYKKSEHVAEVVRRCPHHERCGGGTDGLAPAQHLIRVEGNPQARYHDDETTKRHSVVVPYEPPEVGSDCTTVLYNFMCNSSCMGGMNRRPILTILTLEGPGGQLLGRRCFEVRVCACPGRDRKIEEENFRKRGG-----AGGVAKRAMSPPTEAPEPPKKRVLNPDNEIFYLQVRGRRRYEMLKEINEALQL--AEGGSAPRPSKGRRVKV---EGPQPSCGKKLLQK + +P +EP E F DLW +LP + PLP + LSP + DP P S VPS + Y G + FR+GF+ +GTAKSVTCTYSP LNK++C+LAK CPVQ+ V PPPG+ +RA+A+YK+S+H+ EVVRRCPHHERC +DGLAP QHLIRVEGN + Y DD T RHSVVVPYEPPEVGSDCTT+ YN+MCNSSCMGGMNRRPILTI+TLE G LLGR FEVRVCACPGRDR+ EEEN RK+G G KRA+ T + PKK+ L D E F LQ+RGR R+EM +E+NEAL+L A+ G P S+ + +G S KKL+ K 24 gnl|BL_ORD_ID|21 P53_ONCMY P25035 Cellular tumor antigen p53 (Tumor suppressor p53). 21 396 1 343.969 881 9.28528e-98 9 393 7 396 1 1 194 245 33 404 SVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTED----PGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHEL---PPGSTKRALPNNTSSSPQP------KKKPL--DGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKK---GQSTSRHKKLMFKTEGPDSD NVSLPLSQESFEDLWKM-------------NLNLVAVQPPETESWVGYDNFMMEAPLQVEFDPSLFEVSATEPAPQPSISTLDTGS-PPTSTVPTTSDYPGALGFQLRFLQSSTAKSVTCTYSPDLNKLFCQLAKTCPVQIVVDHPPPPGAVVRALAIYKKLSDVADVVRRCPHHQSTSENNEGPAPRGHLVRVEGNQRSEYMEDGNTLRHSVLVPYEPPQVGSECTTVLYNFMCNSSCMGGMNRRPILTIITLETQEGQLLGRRSFEVRVCACPGRDRKTEEINLKKQQETTLETKTKPAQGIKRAMKEASLPAPQPGASKKTKSSPAVSDDEIYTLQIRGKEKYEMLKKFNDSLELSELVPVADADKYRQKCLTKRVAKRDFGVGPKKRKKLLVKEEKSDSD +V PLSQE+F DLWK+ ++ + + P + E W D P + S P +S+VP+ Y G+ GF+L FL S TAKSVTCTYSP LNK+FCQLAKTCPVQ+ VD PPPG VRA+AIYK+ + +VVRRCPHH+ S++ +G AP HL+RVEGN R EY++D NT RHSV+VPYEPP+VGS+CTT+ YN+MCNSSCMGGMNRRPILTIITLE G LLGR SFEVRVCACPGRDR+TEE NL+K+ E E P KRA+ + +PQP K P D E +TLQIRG+E++EM ++ N++LEL + + R + K G + KKL+ K E DSD 25 gnl|BL_ORD_ID|0 P53_BARBU Q9W678 Cellular tumor antigen p53 (Tumor suppressor p53). 0 369 1 341.658 875 4.60823e-97 92 393 56 369 1 1 181 219 12 314 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPH--HELPPGSTKRALPNNTSSSPQP---KKKPLDG----EYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAH-SSHLKSKKGQS--TSRHKKLMFKTEGPDSD PPTASVPVATDYPGEHGFKLGFPQSGTAKSVTCTYSSDLNKLFCQLAKTCPVQMVVNVAPPQGSVIRATAIYKKSEHVAEVVRRCPHHERTPDGDGLAPAAHLIRVEGNSRALYREDDVNSRHSVVVPYEVPQLGSEFTTVLYNFMCNSSCMGGMNRRPILTIISLETHDGQLLGRRSFEVRVCACPGRDRKTEESNFRKDQETKTLDKIPSANKRSLTKDSTSSVPRPEGSKKAKLSGSSDEEIYTLQVRGKERYEMLKKINDSLELSDVVPPSEMDRYRQKLLTKGKKKDGQTPEPKRGKKLMVKDEKSDSD P ++SVP Y G +GF+LGF SGTAKSVTCTYS LNK+FCQLAKTCPVQ+ V+ PP G+ +RA AIYK+S+H+ EVVRRCPHHER D DGLAP HLIRVEGN R Y +D RHSVVVPYE P++GS+ TT+ YN+MCNSSCMGGMNRRPILTII+LE G LLGR SFEVRVCACPGRDR+TEE N RK E ++P + + ++TSS P+P KK L G E +TLQ+RG+ER+EM +++N++LEL D E R + K K GQ+ R KKLM K E DSD 26 gnl|BL_ORD_ID|3 P53_BRARE P79734 Cellular tumor antigen p53 (Tumor suppressor p53). 3 373 1 338.576 867 3.9011e-96 92 393 60 373 1 1 181 215 12 314 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGS-TKRALPNNTSSS---PQPKKK----PLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTS---RHKKLMFKTEG-PDSD PPTSTVPETSDYPGDHGFRLRFPQSGTAKSVTCTYSPDLNKLFCQLAKTCPVQMVVDVAPPQGSVVRATAIYKKSEHVAEVVRRCPHHERTPDGDNLAPAGHLIRVEGNQRANYREDNITLRHSVFVPYEAPQLGAEWTTVLLNYMCNSSCMGGMNRRPILTIITLETQEGQLLGRRSFEVRVCACPGRDRKTEESNFKKDQETKTMAKTTTGTKRSLVKESSSATLRPEGSKKAKGSSSDEEIFTLQVRGRERYEILKKLNDSLELSDVVPASDAEKYRQKFMTKNKKENRESSEPKQGKKLMVKDEGRSDSD P +S+VP Y G +GFRL F SGTAKSVTCTYSP LNK+FCQLAKTCPVQ+ VD PP G+ VRA AIYK+S+H+ EVVRRCPHHER D D LAP HLIRVEGN R Y +D T RHSV VPYE P++G++ TT+ NYMCNSSCMGGMNRRPILTIITLE G LLGR SFEVRVCACPGRDR+TEE N +K E + TKR+L +SS+ P+ KK D E FTLQ+RGRER+E+ ++LN++LEL D + R K+ + +S + KKLM K EG DSD 27 gnl|BL_ORD_ID|14 P53_ICTPU O93379 Cellular tumor antigen p53 (Tumor suppressor p53). 14 376 1 333.183 853 1.63901e-94 10 393 12 376 1 1 192 240 41 395 VEPPLSQETFSDLW--KLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRAL---PNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDA--QAGKEPGGSRAHSSHLKSKKGQST---SRHKKLMFKTEGPDSD VEPPDSQE-FAELWLRNLIVRDNSLWGKEEEIPDDLQEVPCDVLLSDMLQPQSS----------------------------SSPPTSTVPVTSDYPGLLNFTLHFQESSGTKSVTCTYSPDLNKLFCQLAKTCPVLMAVSSSPPPGSVLRATAVYKRSEHVAEVVRRCPHHERSNDSSDGPAPPGHLLRVEGNSRAVYQEDGNTQAHSVVVPYEPPQVGSQSTTVLYNYMCNSSCMGGMNRRPILTIITLETQDGHLLGRRTFEVRVCACPGRDRKTEESNFKKQQEPKTS-GKTLTKRSMKDPPSHPEASKKSKNSSSDDEIYTLQVRGKERYEFLKKINDGLELSDVVPPADQEKYRQKLLSKTCRKERDGAAGEPKRGKKRLVKEEKCDSD VEPP SQE F++LW L+ +N L + DDL P D+ P S P +S+VP Y G F L F S KSVTCTYSP LNK+FCQLAKTCPV + V S+PPPG+ +RA A+YK+S+H+ EVVRRCPHHER +DS DG APP HL+RVEGN R Y +D NT HSVVVPYEPP+VGS TT+ YNYMCNSSCMGGMNRRPILTIITLE G+LLGR +FEVRVCACPGRDR+TEE N +K+ EP TKR++ P++ +S + K D E +TLQ+RG+ER+E +++N+ LEL D A +E + S + ++ + R KK + K E DSD 28 gnl|BL_ORD_ID|29 P53_TETMU Q9W679 Cellular tumor antigen p53 (Tumor suppressor p53). 29 367 1 267.7 683 8.45682e-75 7 393 3 367 1 1 159 220 32 392 DPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKK-----KPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD EENISLPLSQDTFQDLW-----DNVSAP----PISTIQTAALENEAWPAERQMNMMCNFMDSTFNEALFNLLPEPPSRDGANSSSP---TVPVTTDYPGEYGFKLRFQKSGTAKSVTSTYSEILNKLYCQLAKTSLVEVLLGKDPPMGAVLRATAIYKKTEHVAEVVRRCPHHQ---NEDSAEHRSHLIRMEGSERAQYFEHPHTKRQSVTVPYEPPQLGSEFTTILLSFMCNSSCMGGMNRRPILTILTLETQEGIVLGRRCFEVRVCACPGRDRKTEETNSTKM---QNDAKDAKKRKSVPTPDSTTIKKSKTASSAEEDNNEVYTLQIRGRKRYEMLKKINDGLDLLE----NKPKSKATH-----RPDGPIPPSGKRLLHRGEKSDSD + ++ PLSQ+TF DLW +NV +P + + + + E W E S P +VP Y G YGF+L F SGTAKSVT TYS LNK++CQLAKT V++ + PP G +RA AIYK+++H+ EVVRRCPHH+ + D HLIR+EG+ R +Y + +T R SV VPYEPP++GS+ TTI ++MCNSSCMGGMNRRPILTI+TLE G +LGR FEVRVCACPGRDR+TEE N K ++ ++++P S++ + K + + E +TLQIRGR+R+EM +++N+ L+L + +P H G K+L+ + E DSD 29 gnl|BL_ORD_ID|22 P53_ORYLA P79820 Cellular tumor antigen p53 (Tumor suppressor p53). 22 352 1 262.307 669 3.55304e-73 92 371 77 351 1 1 142 190 21 288 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPK-----KKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQA---GKEPGGSRAHSSHLKS PPPTTVPVTTDYPGSYELELRFQKSGTAKSVTSTYSETLNKLYCQLAKTSPIEVRVSKEPPKGAILRATAVYKKTEHVADVVRRCPHHQ---NEDSVEHRSHLIRVEGSQLAQYFEDPYTKRQSVTVPYEPPQPGSEMTTILLSYMCNSSCMGGMNRRPILTILTLE-TEGLVLGRRCFEVRICACPGRDRKTEEES-RQKTQP--------KKRKVTPNTSSSKRKKSHSSGEEEDNREVFHFEVYGRERYEFLKKINDGLELLEKESKSKNKDSGMVPSSGKKLKS P ++VP Y GSY L F SGTAKSVT TYS LNK++CQLAKT P+++ V PP G +RA A+YK+++H+ +VVRRCPHH+ + D + HLIRVEG+ +Y +D T R SV VPYEPP+ GS+ TTI +YMCNSSCMGGMNRRPILTI+TLE + G +LGR FEVR+CACPGRDR+TEEE+ R+K +P KR + NTSSS + K ++ + E F ++ GRER+E +++N+ LEL + ++ K+ G + LKS 30 gnl|BL_ORD_ID|24 P53_PLAFE O12946 Cellular tumor antigen p53 (Tumor suppressor p53). 24 366 1 259.225 661 3.00783e-72 92 393 70 366 1 1 145 197 23 311 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEE------NLRKKGEPHHELPPGS---TKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD PPSSTVPVVTDYPGEYGFQLRFQKSGTAKSVTSTFSELLKKLYCQLAKTSPVEVLLSKEPPQGAVLRATAVYKKTEHVADVVRRCPHHQT---EDTAEHRSHLIRLEGSQRALYFEDPHTKRQSVTVPYEPPQLGSETTAILLSFMCNSSCMGGMNRRQILTILTLETPDGLVLGRRCFEVRVCACPGRDRKTDEESSTKTPNGPKQTKKRKQAPSNSAPHTTTVMKSKSSSSAEEE----DKEVFTVLVKGRERYEIIKKINEAFE---GAAEKE----KAKNKVAVKQELPVPSSGKRLVQRGERSDSD P SS+VP Y G YGF+L F SGTAKSVT T+S L K++CQLAKT PV++ + PP G +RA A+YK+++H+ +VVRRCPHH+ D HLIR+EG+ R Y +D +T R SV VPYEPP++GS+ T I ++MCNSSCMGGMNRR ILTI+TLE G +LGR FEVRVCACPGRDR+T+EE N K+ + + P S T + + +SSS + + D E FT+ ++GRER+E+ +++NEA E A KE +A + ++ S K+L+ + E DSD 30 11169 53 3.25686e+06 0.041 0.267 0.14 From trevor at dev.open-bio.org Sun Dec 31 13:46:16 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:16 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_rebase.rb,1.2,1.3 Message-ID: <200612311846.kBVIkGfx031911@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv31881/db Modified Files: test_rebase.rb Log Message: Relicense of test suites. Index: test_rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_rebase.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_rebase.rb 20 Jan 2006 09:53:24 -0000 1.2 --- test_rebase.rb 31 Dec 2006 18:46:14 -0000 1.3 *************** *** 2,30 **** # test/unit/bio/db/test_rebase.rb - Unit test for Bio::REBASE # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'pathname' --- 2,11 ---- # test/unit/bio/db/test_rebase.rb - Unit test for Bio::REBASE # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'pathname' *************** *** 35,40 **** require 'bio/db/rebase' ! module Bio ! class TestREBASE < Test::Unit::TestCase def setup --- 16,21 ---- require 'bio/db/rebase' ! module Bio #:nodoc: ! class TestREBASE < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 13:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme test_analysis.rb, 1.3, 1.4 test_double_stranded.rb, 1.1, 1.2 test_integer.rb, 1.1, 1.2 test_single_strand.rb, 1.1, 1.2 test_single_strand_complement.rb, 1.1, 1.2 test_string_formatting.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHrw031918@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme Modified Files: test_analysis.rb test_double_stranded.rb test_integer.rb test_single_strand.rb test_single_strand_complement.rb test_string_formatting.rb Log Message: Relicense of test suites. Index: test_analysis.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_analysis.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_analysis.rb 28 Feb 2006 22:22:50 -0000 1.3 --- test_analysis.rb 31 Dec 2006 18:46:14 -0000 1.4 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_analysis.rb - Unit test for Bio::RestrictionEnzyme::Analysis + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/analysis' ! module Bio ! class TestAnalysis < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/analysis' ! module Bio #:nodoc: ! class TestAnalysis < Test::Unit::TestCase #:nodoc: def setup Index: test_double_stranded.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_double_stranded.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_double_stranded.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_double_stranded.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded' ! module Bio ! class TestDoubleStranded < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded' ! module Bio #:nodoc: ! class TestDoubleStranded < Test::Unit::TestCase #:nodoc: def setup Index: test_single_strand.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_single_strand.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_single_strand.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_single_strand.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_single_strand.rb - Unit test for Bio::RestrictionEnzyme::SingleStrand + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/single_strand' ! module Bio ! class TestSingleStrand < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/single_strand' ! module Bio #:nodoc: ! class TestSingleStrand < Test::Unit::TestCase #:nodoc: def setup Index: test_integer.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_integer.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_integer.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_integer.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_integer.rb - Unit test for Bio::RestrictionEnzyme::Integer + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/integer' ! module Bio ! class TestCutLocationsInEnzymeNotation < Test::Unit::TestCase def test_negative? --- 16,22 ---- require 'bio/util/restriction_enzyme/integer' ! module Bio #:nodoc: ! class TestCutLocationsInEnzymeNotation < Test::Unit::TestCase #:nodoc: def test_negative? Index: test_string_formatting.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_string_formatting.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_string_formatting.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_string_formatting.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_string_formatting.rb - Unit test for Bio::RestrictionEnzyme::StringFormatting + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/string_formatting' ! module Bio ! class TestStringFormatting < Test::Unit::TestCase include Bio::RestrictionEnzyme::StringFormatting --- 16,22 ---- require 'bio/util/restriction_enzyme/string_formatting' ! module Bio #:nodoc: ! class TestStringFormatting < Test::Unit::TestCase #:nodoc: include Bio::RestrictionEnzyme::StringFormatting Index: test_single_strand_complement.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_single_strand_complement.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_single_strand_complement.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb - Unit test for Bio::RestrictionEnzyme::SingleStrandComplement + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/single_strand_complement' ! module Bio ! class TestSingleStrandComplement < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/single_strand_complement' ! module Bio #:nodoc: ! class TestSingleStrandComplement < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 13:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme/single_strand test_cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHbl031943@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/single_strand In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme/single_strand Modified Files: test_cut_locations_in_enzyme_notation.rb Log Message: Relicense of test suites. Index: test_cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_locations_in_enzyme_notation.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb - Unit test for Bio::RestrictionEnzyme::SingleStrand::CutLocationsInEnzymeNotation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation' ! module Bio ! class TestSingleStrandCutLocationsInEnzymeNotation < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation' ! module Bio #:nodoc: ! class TestSingleStrandCutLocationsInEnzymeNotation < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 13:46:16 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:16 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util test_color_scheme.rb, 1.1, 1.2 test_contingency_table.rb, 1.2, 1.3 Message-ID: <200612311846.kBVIkGx8031914@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util In directory dev.open-bio.org:/tmp/cvs-serv31881/util Modified Files: test_color_scheme.rb test_contingency_table.rb Log Message: Relicense of test suites. Index: test_contingency_table.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_contingency_table.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_contingency_table.rb 23 Nov 2005 11:55:17 -0000 1.2 --- test_contingency_table.rb 31 Dec 2006 18:46:14 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/util/test_contingency_table.rb - Unit test for Bio::ContingencyTable # ! # Copyright (C) 2005 Trevor Wennblom ! # ! # 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$ --- 2,8 ---- # test/unit/bio/util/test_contingency_table.rb - Unit test for Bio::ContingencyTable # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ *************** *** 28,33 **** require 'bio/util/contingency_table' ! module Bio ! class TestContingencyTable < Test::Unit::TestCase def lite_example(sequences, max_length, characters) --- 16,21 ---- require 'bio/util/contingency_table' ! module Bio #:nodoc: ! class TestContingencyTable < Test::Unit::TestCase #:nodoc: def lite_example(sequences, max_length, characters) Index: test_color_scheme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_color_scheme.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_color_scheme.rb 23 Oct 2005 08:40:41 -0000 1.1 --- test_color_scheme.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/util/test_color_scheme.rb - Unit test for Bio::ColorScheme # ! # Copyright (C) 2005 Trevor Wennblom ! # ! # 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$ --- 2,8 ---- # test/unit/bio/util/test_color_scheme.rb - Unit test for Bio::ColorScheme # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ *************** *** 28,33 **** require 'bio/util/color_scheme' ! module Bio ! class TestColorScheme < Test::Unit::TestCase def test_buried --- 16,21 ---- require 'bio/util/color_scheme' ! module Bio #:nodoc: ! class TestColorScheme < Test::Unit::TestCase #:nodoc: def test_buried From trevor at dev.open-bio.org Sun Dec 31 13:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme/analysis test_calculated_cuts.rb, 1.1, 1.2 test_sequence_range.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHHk031922@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/analysis In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme/analysis Modified Files: test_calculated_cuts.rb test_sequence_range.rb Log Message: Relicense of test suites. Index: test_sequence_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_sequence_range.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_sequence_range.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb - Unit test for Bio::RestrictionEnzyme::Analysis::SequenceRange + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 12,18 **** require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio ! class TestAnalysisSequenceRange < Test::Unit::TestCase def setup --- 22,28 ---- require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio #:nodoc: ! class TestAnalysisSequenceRange < Test::Unit::TestCase #:nodoc: def setup Index: test_calculated_cuts.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_calculated_cuts.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_calculated_cuts.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb - Unit test for Bio::RestrictionEnzyme::Analysis::CalculatedCuts + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 10,16 **** require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio ! class TestAnalysisCalculatedCuts < Test::Unit::TestCase def setup --- 20,26 ---- require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio #:nodoc: ! class TestAnalysisCalculatedCuts < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 13:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme/double_stranded test_aligned_strands.rb, 1.1, 1.2 test_cut_location_pair.rb, 1.1, 1.2 test_cut_location_pair_in_enzyme_notation.rb, 1.1, 1.2 test_cut_locations.rb, 1.1, 1.2 test_cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHnt031934@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme/double_stranded Modified Files: test_aligned_strands.rb test_cut_location_pair.rb test_cut_location_pair_in_enzyme_notation.rb test_cut_locations.rb test_cut_locations_in_enzyme_notation.rb Log Message: Relicense of test suites. Index: test_cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_locations_in_enzyme_notation.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocationsInEnzymeNotation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation' ! module Bio ! class TestDoubleStrandedCutLocationsInEnzymeNotation < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocationsInEnzymeNotation < Test::Unit::TestCase #:nodoc: def setup Index: test_aligned_strands.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_aligned_strands.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_aligned_strands.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::AlignedStrands + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 7,13 **** require 'bio/util/restriction_enzyme/double_stranded' ! module Bio ! class TestDoubleStrandedAlignedStrands < Test::Unit::TestCase def setup --- 17,23 ---- require 'bio/util/restriction_enzyme/double_stranded' ! module Bio #:nodoc: ! class TestDoubleStrandedAlignedStrands < Test::Unit::TestCase #:nodoc: def setup Index: test_cut_locations.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_locations.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_locations.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocations + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_locations' ! module Bio ! class TestDoubleStrandedCutLocations < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_locations' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocations < Test::Unit::TestCase #:nodoc: def setup Index: test_cut_location_pair_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_location_pair_in_enzyme_notation.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_location_pair_in_enzyme_notation.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocationPairInEnzymeNotation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation' ! module Bio ! class TestDoubleStrandedCutLocationPairInEnzymeNotation < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocationPairInEnzymeNotation < Test::Unit::TestCase #:nodoc: def setup Index: test_cut_location_pair.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_location_pair.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_location_pair.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocationPair + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair' ! module Bio ! class TestDoubleStrandedCutLocationPair < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocationPair < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 14:47:37 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 19:47:37 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util color_scheme.rb,1.2,1.3 Message-ID: <200612311947.kBVJlbXV032099@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32077/util Modified Files: color_scheme.rb Log Message: Update license for ColorScheme. Index: color_scheme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** color_scheme.rb 13 Dec 2005 14:58:07 -0000 1.2 --- color_scheme.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 1,120 **** - module Bio - # # bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 # ! #++ # # - =begin rdoc - bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids - - == Synopsis - - The Bio::ColorScheme module contains classes that return popular color codings - for nucleic and amino acids in RGB hex format suitable for HTML code. - - The current schemes supported are: - * Buried - Buried index - * Helix - Helix propensity - * Hydropathy - Hydrophobicity - * Nucleotide - Nucelotide color coding - * Strand - Strand propensity - * Taylor - Taylor color coding - * Turn - Turn propensity - * Zappo - Zappo color coding - - Planned color schemes include: - * BLOSUM62 - * ClustalX - * Percentage Identity (PID) - - Color schemes BLOSUM62, ClustalX, and Percentage Identity are all dependent - on the alignment consensus. - - This data is currently referenced from the JalView alignment editor. - Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), - "The Jalview Java Alignment Editor," Bioinformatics, 12, 426-7 - http://www.jalview.org - - Currently the score data for things such as hydropathy, helix, turn, etc. are contained - here but should be moved to bio/data/aa once a good reference is found for these - values. - - - == Usage - - require 'bio/util/color_scheme' - - seq = 'gattaca' - scheme = Bio::ColorScheme::Zappo - postfix = '' - html = '' - seq.each_byte do |c| - color = scheme[c.chr] - prefix = %Q() - html += prefix + c.chr + postfix - end - - puts html - - - === Accessing colors - - puts Bio::ColorScheme::Buried['A'] # 00DC22 - puts Bio::ColorScheme::Buried[:c] # 00BF3F - puts Bio::ColorScheme::Buried[nil] # nil - puts Bio::ColorScheme::Buried['-'] # FFFFFF - puts Bio::ColorScheme::Buried[7] # FFFFFF - puts Bio::ColorScheme::Buried['junk'] # FFFFFF - puts Bio::ColorScheme::Buried['t'] # 00CC32 - - - == Author - Trevor Wennblom - - - == Copyright - Copyright (C) 2005 Trevor Wennblom - Licensed under the same terms as BioRuby. - - =end module ColorScheme ! cs_location = 'bio/util/color_scheme' # Score sub-classes ! autoload :Buried, "#{cs_location}/buried" ! autoload :Helix, "#{cs_location}/helix" ! autoload :Hydropathy, "#{cs_location}/hydropathy" ! autoload :Strand, "#{cs_location}/strand" ! autoload :Turn, "#{cs_location}/turn" # Simple sub-classes ! autoload :Nucleotide, "#{cs_location}/nucleotide" ! autoload :Taylor, "#{cs_location}/taylor" ! autoload :Zappo, "#{cs_location}/zappo" # Consensus sub-classes --- 1,97 ---- # # bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + module Bio #:nodoc: + # ! # bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # + # = Description + # + # The Bio::ColorScheme module contains classes that return popular color codings + # for nucleic and amino acids in RGB hex format suitable for HTML code. + # + # The current schemes supported are: + # * Buried - Buried index + # * Helix - Helix propensity + # * Hydropathy - Hydrophobicity + # * Nucleotide - Nucelotide color coding + # * Strand - Strand propensity + # * Taylor - Taylor color coding + # * Turn - Turn propensity + # * Zappo - Zappo color coding + # + # Planned color schemes include: + # * BLOSUM62 + # * ClustalX + # * Percentage Identity (PID) + # + # Color schemes BLOSUM62, ClustalX, and Percentage Identity are all dependent + # on the alignment consensus. + # + # This data is currently referenced from the JalView alignment editor. + # Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), + # "The Jalview Java Alignment Editor," Bioinformatics, 12, 426-7 + # http://www.jalview.org + # + # Currently the score data for things such as hydropathy, helix, turn, etc. are contained + # here but should be moved to bio/data/aa once a good reference is found for these + # values. + # + # + # = Usage + # + # require 'bio' + # + # seq = 'gattaca' + # scheme = Bio::ColorScheme::Zappo + # postfix = '' + # html = '' + # seq.each_byte do |c| + # color = scheme[c.chr] + # prefix = %Q() + # html += prefix + c.chr + postfix + # end + # + # puts html + # + # + # == Accessing colors + # + # puts Bio::ColorScheme::Buried['A'] # 00DC22 + # puts Bio::ColorScheme::Buried[:c] # 00BF3F + # puts Bio::ColorScheme::Buried[nil] # nil + # puts Bio::ColorScheme::Buried['-'] # FFFFFF + # puts Bio::ColorScheme::Buried[7] # FFFFFF + # puts Bio::ColorScheme::Buried['junk'] # FFFFFF + # puts Bio::ColorScheme::Buried['t'] # 00CC32 + # module ColorScheme ! cs_location = File.join(File.dirname(File.expand_path(__FILE__)), 'color_scheme') # Score sub-classes ! autoload :Buried, File.join(cs_location, 'buried') ! autoload :Helix, File.join(cs_location, 'helix') ! autoload :Hydropathy, File.join(cs_location, 'hydropathy') ! autoload :Strand, File.join(cs_location, 'strand') ! autoload :Turn, File.join(cs_location, 'turn') # Simple sub-classes ! autoload :Nucleotide, File.join(cs_location, 'nucleotide') ! autoload :Taylor, File.join(cs_location, 'taylor') ! autoload :Zappo, File.join(cs_location, 'zappo') # Consensus sub-classes *************** *** 125,129 **** # A very basic class template for color code referencing. ! class Simple def self.[](x) return if x.nil? --- 102,106 ---- # A very basic class template for color code referencing. ! class Simple #:nodoc: def self.[](x) return if x.nil? *************** *** 149,153 **** # that are score based. This template is expected to change # when the scores are moved into bio/data/aa ! class Score def self.[](x) return if x.nil? --- 126,130 ---- # that are score based. This template is expected to change # when the scores are moved into bio/data/aa ! class Score #:nodoc: def self.[](x) return if x.nil? *************** *** 207,212 **** ! # NOTE todo ! class Consensus end --- 184,189 ---- ! # TODO ! class Consensus #:nodoc: end From trevor at dev.open-bio.org Sun Dec 31 14:47:37 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 19:47:37 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/color_scheme buried.rb, 1.2, 1.3 helix.rb, 1.2, 1.3 hydropathy.rb, 1.2, 1.3 nucleotide.rb, 1.2, 1.3 strand.rb, 1.3, 1.4 taylor.rb, 1.2, 1.3 turn.rb, 1.2, 1.3 zappo.rb, 1.2, 1.3 Message-ID: <200612311947.kBVJlbjS032104@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/color_scheme In directory dev.open-bio.org:/tmp/cvs-serv32077/util/color_scheme Modified Files: buried.rb helix.rb hydropathy.rb nucleotide.rb strand.rb taylor.rb turn.rb zappo.rb Log Message: Update license for ColorScheme. Index: strand.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/strand.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** strand.rb 13 Dec 2005 14:58:07 -0000 1.3 --- strand.rb 31 Dec 2006 19:47:35 -0000 1.4 *************** *** 2,35 **** # bio/util/color_scheme/strand.rb - Color codings for strand propensity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Strand < Score ######### --- 2,16 ---- # bio/util/color_scheme/strand.rb - Color codings for strand propensity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Strand < Score #:nodoc: ######### Index: turn.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/turn.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** turn.rb 13 Dec 2005 14:58:07 -0000 1.2 --- turn.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/turn.rb - Color codings for turn propensity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Turn < Score ######### --- 2,16 ---- # bio/util/color_scheme/turn.rb - Color codings for turn propensity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Turn < Score #:nodoc: ######### Index: hydropathy.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/hydropathy.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hydropathy.rb 13 Dec 2005 14:58:07 -0000 1.2 --- hydropathy.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,30 **** # bio/util/color_scheme/hydropathy.rb - Color codings for hydrophobicity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' --- 2,11 ---- # bio/util/color_scheme/hydropathy.rb - Color codings for hydrophobicity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' *************** *** 36,40 **** # 1157, 105-132, 1982 ! class Hydropathy < Score ######### --- 17,21 ---- # 1157, 105-132, 1982 ! class Hydropathy < Score #:nodoc: ######### Index: nucleotide.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/nucleotide.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nucleotide.rb 13 Dec 2005 14:58:07 -0000 1.2 --- nucleotide.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/nucleotide.rb - Color codings for nucleotides # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Nucleotide < Simple ######### --- 2,16 ---- # bio/util/color_scheme/nucleotide.rb - Color codings for nucleotides # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Nucleotide < Simple #:nodoc: ######### Index: buried.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/buried.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** buried.rb 13 Dec 2005 14:58:07 -0000 1.2 --- buried.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/buried.rb - Color codings for buried amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Buried < Score ######### --- 2,16 ---- # bio/util/color_scheme/buried.rb - Color codings for buried amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Buried < Score #:nodoc: ######### Index: helix.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/helix.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** helix.rb 13 Dec 2005 14:58:07 -0000 1.2 --- helix.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/helix.rb - Color codings for helix propensity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Helix < Score ######### --- 2,16 ---- # bio/util/color_scheme/helix.rb - Color codings for helix propensity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Helix < Score #:nodoc: ######### Index: taylor.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/taylor.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** taylor.rb 13 Dec 2005 14:58:07 -0000 1.2 --- taylor.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/taylor.rb - Taylor color codings for amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Taylor < Simple ######### --- 2,16 ---- # bio/util/color_scheme/taylor.rb - Taylor color codings for amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Taylor < Simple #:nodoc: ######### Index: zappo.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/zappo.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** zappo.rb 13 Dec 2005 14:58:07 -0000 1.2 --- zappo.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/zappo.rb - Zappo color codings for amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Zappo < Simple ######### --- 2,16 ---- # bio/util/color_scheme/zappo.rb - Zappo color codings for amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Zappo < Simple #:nodoc: ######### From trevor at dev.open-bio.org Sun Dec 31 14:57:34 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 19:57:34 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.76,1.77 Message-ID: <200612311957.kBVJvY08032147@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv32127 Modified Files: bio.rb Log Message: Added ContingencyTable to autoload series. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** bio.rb 24 Dec 2006 10:04:51 -0000 1.76 --- bio.rb 31 Dec 2006 19:57:32 -0000 1.77 *************** *** 248,251 **** --- 248,252 ---- autoload :SiRNA, 'bio/util/sirna' autoload :ColorScheme, 'bio/util/color_scheme' + autoload :ContingencyTable, 'bio/util/contingency_table' ### Service libraries From trevor at dev.open-bio.org Sun Dec 31 15:02:22 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:02:22 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util contingency_table.rb,1.4,1.5 Message-ID: <200612312002.kBVK2Mpv032181@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32161 Modified Files: contingency_table.rb Log Message: Updated license for ContingencyTable. Index: contingency_table.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/contingency_table.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** contingency_table.rb 27 Feb 2006 13:23:01 -0000 1.4 --- contingency_table.rb 31 Dec 2006 20:02:20 -0000 1.5 *************** *** 1,11 **** # ! # = bio/util/contingency_table.rb - Statistical contingency table analysis for aligned sequences # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # License:: LGPL # # $Id$ # ! # == Synopsis # # The Bio::ContingencyTable class provides basic statistical contingency table --- 1,22 ---- # ! # bio/util/contingency_table.rb - Statistical contingency table analysis for aligned sequences # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # ! ! module Bio #:nodoc: ! ! # ! # bio/util/contingency_table.rb - Statistical contingency table analysis for aligned sequences ! # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby ! # ! # = Description # # The Bio::ContingencyTable class provides basic statistical contingency table *************** *** 34,44 **** # # ! # == Further Reading # # * http://en.wikipedia.org/wiki/Contingency_table # * http://www.physics.csbsju.edu/stats/exact.details.html # * Numerical Recipes in C by Press, Flannery, Teukolsky, and Vetterling ! # # ! # == Usage # # What follows is an example of ContingencyTable in typical usage --- 45,55 ---- # # ! # = Further Reading # # * http://en.wikipedia.org/wiki/Contingency_table # * http://www.physics.csbsju.edu/stats/exact.details.html # * Numerical Recipes in C by Press, Flannery, Teukolsky, and Vetterling ! # ! # = Usage # # What follows is an example of ContingencyTable in typical usage *************** *** 46,50 **** # # require 'bio' - # require 'bio/contingency_table' # # seqs = {} --- 57,60 ---- *************** *** 79,85 **** # # ! # == Tutorial ! # ! # ContingencyTable returns the statistical significance of change # between two positions in an alignment. If you would like to see how --- 89,94 ---- # # ! # = Tutorial ! # # ContingencyTable returns the statistical significance of change # between two positions in an alignment. If you would like to see how *************** *** 210,216 **** # # ! # == A Note on Efficiency # - # ContingencyTable is slow. It involves many calculations for even a # seemingly small five-string data set. Even worse, it's very --- 219,224 ---- # # ! # = A Note on Efficiency # # ContingencyTable is slow. It involves many calculations for even a # seemingly small five-string data set. Even worse, it's very *************** *** 218,222 **** # hashes which dashes any hope of decent speed. # - # Finally, half of the matrix is redundant and positions could be # summed with their companion position to reduce calculations. For --- 226,229 ---- *************** *** 230,257 **** # BioRuby project moves towards C extensions in the future a # professional caliber version will likely be created. - # - # - #-- - # - # 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 ! class ContingencyTable # Since we're making this math-notation friendly here is the layout of @table: --- 237,242 ---- # BioRuby project moves towards C extensions in the future a # professional caliber version will likely be created. # ! class ContingencyTable # Since we're making this math-notation friendly here is the layout of @table: *************** *** 338,343 **** end ! end ! end # Bio --- 323,327 ---- end ! end # ContingencyTable end # Bio From trevor at dev.open-bio.org Sun Dec 31 15:11:02 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:11:02 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.77,1.78 Message-ID: <200612312011.kBVKB2E2032233@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv32213 Modified Files: bio.rb Log Message: Added REBASE to autoload series. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** bio.rb 31 Dec 2006 19:57:32 -0000 1.77 --- bio.rb 31 Dec 2006 20:11:00 -0000 1.78 *************** *** 116,119 **** --- 116,120 ---- autoload :PDB, 'bio/db/pdb' autoload :NBRF, 'bio/db/nbrf' + autoload :REBASE, 'bio/db/rebase' autoload :Newick, 'bio/db/newick' From trevor at dev.open-bio.org Sun Dec 31 15:44:23 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:44:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db rebase.rb,1.4,1.5 Message-ID: <200612312044.kBVKiNrv032287@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv32267 Modified Files: rebase.rb Log Message: Updated license for REBASE. Index: rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/rebase.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rebase.rb 28 Feb 2006 21:21:03 -0000 1.4 --- rebase.rb 31 Dec 2006 20:44:21 -0000 1.5 *************** *** 1,12 **** # ! # = bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # License:: LGPL # # $Id$ # # ! # == Synopsis # # Bio::REBASE provides utilties for interacting with REBASE data in EMBOSS --- 1,27 ---- # ! # bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + autoload :YAML, 'yaml' + + module Bio #:nodoc: + + autoload :Reference, 'bio/reference' + + # + # bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby ! # ! # ! # = Description # # Bio::REBASE provides utilties for interacting with REBASE data in EMBOSS *************** *** 14,18 **** # can be found here: # - # * http://rebase.neb.com # --- 29,32 ---- *************** *** 31,37 **** # # ! # == Usage # ! # require 'bio/db/rebase' # require 'pp' # --- 45,51 ---- # # ! # = Usage # ! # require 'bio' # require 'pp' # *************** *** 93,127 **** # pp "#{name}: #{info.methylation}" unless info.methylation.empty? # end - # - # - #-- # - # 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 - # - #++ - # - - autoload :YAML, 'yaml' - - module Bio - - autoload :Reference, 'bio/reference' - class REBASE ! class DynamicMethod_Hash < Hash # Define a writer or reader # * Allows hash[:kay]= to be accessed like hash.key= --- 107,115 ---- # pp "#{name}: #{info.methylation}" unless info.methylation.empty? # end # class REBASE ! class DynamicMethod_Hash < Hash #:nodoc: # Define a writer or reader # * Allows hash[:kay]= to be accessed like hash.key= *************** *** 143,147 **** end ! class EnzymeEntry < DynamicMethod_Hash @@supplier_data = {} def self.supplier_data=(d); @@supplier_data = d; end --- 131,135 ---- end ! class EnzymeEntry < DynamicMethod_Hash #:nodoc: @@supplier_data = {} def self.supplier_data=(d); @@supplier_data = d; end *************** *** 154,157 **** --- 142,146 ---- end + # Iterate over each entry def each @data.each { |v| yield v } *************** *** 162,166 **** # def []( key ); @data[ key ]; end # def size; @data.size; end ! def method_missing(method_id, *args) self.class.class_eval do define_method(method_id) { |a| Hash.instance_method(method_id).bind(@data).call(a) } --- 151,155 ---- # def []( key ); @data[ key ]; end # def size; @data.size; end ! def method_missing(method_id, *args) #:nodoc: self.class.class_eval do define_method(method_id) { |a| Hash.instance_method(method_id).bind(@data).call(a) } *************** *** 169,174 **** end ! # All your REBASE are belong to us. def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) if yaml @enzyme_data = enzyme_lines --- 158,168 ---- end ! # [+enzyme_lines+] contents of EMBOSS formatted enzymes file (_required_) ! # [+reference_lines+] contents of EMBOSS formatted references file (_optional_) ! # [+supplier_lines+] contents of EMBOSS formatted suppliers files (_optional_) ! # [+yaml+] enzyme_lines, reference_lines, and supplier_lines are read as YAML if set to true (_default_ +false+) def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) + # All your REBASE are belong to us. + if yaml @enzyme_data = enzyme_lines *************** *** 410,413 **** end # REBASE - end # Bio --- 404,406 ---- From trevor at dev.open-bio.org Sun Dec 31 15:50:45 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:50:45 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme enzymes.yaml, 1.1, 1.2 Message-ID: <200612312050.kBVKojaJ032315@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv32295 Modified Files: enzymes.yaml Log Message: Update REBASE enzymes reference to v701 published Dec 29, 2006 Index: enzymes.yaml =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** enzymes.yaml 1 Feb 2006 07:34:11 -0000 1.1 --- enzymes.yaml 31 Dec 2006 20:50:43 -0000 1.2 *************** *** 1,6731 **** --- TspRI: :c4: "0" :c1: "7" - :len: "5" - :c2: "-3" - :c3: "0" :pattern: CASTG :name: TspRI ! :blunt: "0" [...13703 lines suppressed...] BseMI: + :blunt: "0" + :c2: "6" :c4: "0" :c1: "8" :pattern: GCAATG + :len: "6" :name: BseMI ! :c3: "0" :ncuts: "2" EcoRII: + :blunt: "0" + :c2: "5" :c4: "0" :c1: "-1" :pattern: CCWGG + :len: "5" :name: EcoRII ! :c3: "0" :ncuts: "2" From trevor at dev.open-bio.org Sun Dec 31 15:54:27 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:54:27 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.78,1.79 Message-ID: <200612312054.kBVKsROF032343@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv32323 Modified Files: bio.rb Log Message: Added RestrictionEnzyme to autoload series. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** bio.rb 31 Dec 2006 20:11:00 -0000 1.78 --- bio.rb 31 Dec 2006 20:54:25 -0000 1.79 *************** *** 250,253 **** --- 250,254 ---- autoload :ColorScheme, 'bio/util/color_scheme' autoload :ContingencyTable, 'bio/util/contingency_table' + autoload :RestrictionEnzyme, 'bio/util/restriction_enzyme' ### Service libraries From trevor at dev.open-bio.org Sun Dec 31 16:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/double_stranded aligned_strands.rb, 1.1, 1.2 cut_location_pair.rb, 1.1, 1.2 cut_location_pair_in_enzyme_notation.rb, 1.1, 1.2 cut_locations.rb, 1.1, 1.2 cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoXs8032447@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme/double_stranded Modified Files: aligned_strands.rb cut_location_pair.rb cut_location_pair_in_enzyme_notation.rb cut_locations.rb cut_locations_in_enzyme_notation.rb Log Message: Updated license for RestrictionEnzyme. Index: aligned_strands.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** aligned_strands.rb 1 Feb 2006 07:34:11 -0000 1.1 --- aligned_strands.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/aligned_strands.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 12,48 **** # ! # bio/util/restriction_enzyme/double_stranded/aligned_strands.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/aligned_strands.rb - - - Align two SingleStrand::Pattern objects and return a Result - object with +primary+ and +complement+ accessors. - =end class AlignedStrands extend CutSymbol --- 21,33 ---- # ! # bio/util/restrction_enzyme/double_stranded/aligned_strands.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # Align two SingleStrand::Pattern objects and return a Result ! # object with +primary+ and +complement+ accessors. # class AlignedStrands extend CutSymbol *************** *** 142,148 **** end end ! ! end ! ! end ! end --- 127,131 ---- end end ! end # AlignedStrands ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_locations.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_locations.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_locations.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_locations.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,43 **** # ! # bio/util/restriction_enzyme/double_stranded/cut_locations.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_locations.rb - - =end class CutLocations < Array --- 19,28 ---- # ! # bio/util/restrction_enzyme/double_stranded/cut_locations.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # class CutLocations < Array *************** *** 69,76 **** end end ! ! ! end ! ! end ! end --- 54,58 ---- end end ! end # CutLocations ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_locations_in_enzyme_notation.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 11,44 **** # ! # bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - - =end class CutLocationsInEnzymeNotation < CutLocations --- 20,29 ---- # ! # bio/util/restrction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # class CutLocationsInEnzymeNotation < CutLocations *************** *** 103,109 **** end end ! ! end ! ! end ! end --- 88,92 ---- end end ! end # CutLocationsInEnzymeNotation ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_location_pair_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_location_pair_in_enzyme_notation.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_location_pair_in_enzyme_notation.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 11,46 **** # ! # bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - - - See CutLocationPair - =end class CutLocationPairInEnzymeNotation < CutLocationPair --- 20,31 ---- # ! # bio/util/restrction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # See CutLocationPair # class CutLocationPairInEnzymeNotation < CutLocationPair *************** *** 62,68 **** end end ! ! end ! ! end ! end --- 47,51 ---- end end ! end # CutLocationPair ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_location_pair.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_location_pair.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_location_pair.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_location_pair.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 9,60 **** class Bio::RestrictionEnzyme class DoubleStranded ! ! # ! # bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb - - - Stores a cut location pair in 0-based index notation - - Input: - +pair+:: May be two values represented as an Array, a Range, or a - combination of Integer and nil values. The first value - represents a cut on the primary strand, the second represents - a cut on the complement strand. - - Example: - clp = CutLocationPair.new(3,2) - clp.primary # 3 - clp.complement # 2 - - Notes: - * a value of +nil+ is an explicit representation of 'no cut' - =end class CutLocationPair < Array attr_reader :primary, :complement --- 18,45 ---- class Bio::RestrictionEnzyme class DoubleStranded ! # ! # bio/util/restrction_enzyme/double_stranded/cut_location_pair.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # Stores a cut location pair in 0-based index notation ! # ! # Input: ! # +pair+:: May be two values represented as an Array, a Range, or a ! # combination of Integer and nil values. The first value ! # represents a cut on the primary strand, the second represents ! # a cut on the complement strand. ! # ! # Example: ! # clp = CutLocationPair.new(3,2) ! # clp.primary # 3 ! # clp.complement # 2 ! # ! # Notes: ! # * a value of +nil+ is an explicit representation of 'no cut' # class CutLocationPair < Array attr_reader :primary, :complement *************** *** 112,118 **** end end ! ! end ! ! end ! end --- 97,101 ---- end end ! end # CutLocationPair ! end # DoubleStranded ! end # Bio::RestrictionEnzyme \ No newline at end of file From trevor at dev.open-bio.org Sun Dec 31 16:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/single_strand cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoX4s032456@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme/single_strand Modified Files: cut_locations_in_enzyme_notation.rb Log Message: Updated license for RestrictionEnzyme. Index: cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:34:12 -0000 1.1 --- cut_locations_in_enzyme_notation.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 14,60 **** # bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # ! ! =begin rdoc ! bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation ! ! Stores the cut location in thier enzyme index notation ! ! May be initialized with a series of cuts or an enzyme pattern marked ! with cut symbols. ! ! Enzyme index notation:: 1.._n_, value before 1 is -1 ! ! Notes: ! * 0 is invalid as it does not refer to any index ! * +nil+ is not allowed here as it has no meaning ! * +nil+ values are kept track of in DoubleStranded::CutLocations as they ! need a reference point on the correlating strand. +nil+ represents no ! cut or a partial digestion. ! ! =end class CutLocationsInEnzymeNotation < Array include CutSymbol --- 23,44 ---- # bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # Stores the cut location in thier enzyme index notation ! # ! # May be initialized with a series of cuts or an enzyme pattern marked ! # with cut symbols. ! # ! # Enzyme index notation:: 1.._n_, value before 1 is -1 ! # ! # Notes: ! # * 0 is invalid as it does not refer to any index ! # * +nil+ is not allowed here as it has no meaning ! # * +nil+ values are kept track of in DoubleStranded::CutLocations as they ! # need a reference point on the correlating strand. +nil+ represents no ! # cut or a partial digestion. ! # class CutLocationsInEnzymeNotation < Array include CutSymbol *************** *** 132,138 **** end ! ! end ! ! end ! end --- 116,120 ---- end ! end # CutLocationsInEnzymeNotation ! end # SingleStrand ! end # Bio::RestrictionEnzyme \ No newline at end of file From trevor at dev.open-bio.org Sun Dec 31 16:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme analysis.rb, 1.5, 1.6 cut_symbol.rb, 1.1, 1.2 double_stranded.rb, 1.1, 1.2 integer.rb, 1.1, 1.2 single_strand.rb, 1.1, 1.2 single_strand_complement.rb, 1.1, 1.2 string_formatting.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoXo1032428@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme Modified Files: analysis.rb cut_symbol.rb double_stranded.rb integer.rb single_strand.rb single_strand_complement.rb string_formatting.rb Log Message: Updated license for RestrictionEnzyme. Index: integer.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/integer.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** integer.rb 1 Feb 2006 07:34:11 -0000 1.1 --- integer.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,35 **** # ! # bio/util/restrction_enzyme/integer.rb - # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ ! # ! # ! ! =begin rdoc ! bio/util/restrction_enzyme/integer.rb - ! =end ! class Integer def negative? self < 0 --- 1,12 ---- # ! # bio/util/restrction_enzyme/integer.rb - Adds method to check for negative values # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # ! class Integer #:nodoc: def negative? self < 0 Index: string_formatting.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/string_formatting.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** string_formatting.rb 1 Feb 2006 07:34:11 -0000 1.1 --- string_formatting.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 11,41 **** # bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # - =begin rdoc - bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation - =end module StringFormatting include CutSymbol --- 20,27 ---- # bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # module StringFormatting include CutSymbol *************** *** 103,109 **** ret ? ret : '' # Don't pass nil values end ! ! ! end ! ! end --- 89,92 ---- ret ? ret : '' # Don't pass nil values end ! end # StringFormatting ! end # Bio::RestrictionEnzyme Index: cut_symbol.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/cut_symbol.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_symbol.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_symbol.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,37 **** - module Bio; end - class Bio::RestrictionEnzyme - # # bio/util/restrction_enzyme/cut_symbol.rb - # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restrction_enzyme/cut_symbol.rb - - =end module CutSymbol --- 1,24 ---- # # bio/util/restrction_enzyme/cut_symbol.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + nil # separate file-level rdoc from following statement + + module Bio; end + class Bio::RestrictionEnzyme + # ! # bio/util/restrction_enzyme/cut_symbol.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # module CutSymbol *************** *** 67,70 **** end ! end ! end --- 54,57 ---- end ! end # CutSymbol ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: single_strand_complement.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand_complement.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** single_strand_complement.rb 1 Feb 2006 07:34:11 -0000 1.1 --- single_strand_complement.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 11,47 **** # bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - =begin rdoc - bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation - - A single strand of restriction enzyme sequence pattern with a 3' to 5' orientation. - =end class SingleStrandComplement < SingleStrand # Orientation of the strand, 3' to 5' def orientation; [3, 5]; end ! end ! ! end --- 20,32 ---- # bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # A single strand of restriction enzyme sequence pattern with a 3' to 5' orientation. # class SingleStrandComplement < SingleStrand # Orientation of the strand, 3' to 5' def orientation; [3, 5]; end ! end # SingleStrandComplement ! end # Bio::RestrictionEnzyme Index: double_stranded.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** double_stranded.rb 1 Feb 2006 07:34:11 -0000 1.1 --- double_stranded.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 16,58 **** # ! # bio/util/restriction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # ! ! =begin rdoc ! bio/util/restriction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence ! ! A pair of +SingleStrand+ and +SingleStrandComplement+ objects with methods to ! add utility to their relation. ! ! == Notes ! * This is created by Bio::RestrictionEnzyme.new for convenience. ! * The two strands accessible are +primary+ and +complement+. ! * SingleStrand methods may be used on DoubleStranded and they will be passed to +primary+. ! ! =end class DoubleStranded include CutSymbol --- 25,42 ---- # ! # bio/util/restrction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # A pair of +SingleStrand+ and +SingleStrandComplement+ objects with methods to ! # add utility to their relation. ! # ! # = Notes ! # * This is created by Bio::RestrictionEnzyme.new for convenience. ! # * The two strands accessible are +primary+ and +complement+. ! # * SingleStrand methods may be used on DoubleStranded and they will be passed to +primary+. ! # class DoubleStranded include CutSymbol *************** *** 73,78 **** attr_reader :cut_locations_in_enzyme_notation ! # +erp+:: Enzyme or Rebase or Pattern. One of three: The name of an enzyme. A REBASE::EnzymeEntry object. A nucleotide pattern. ! # +raw_cut_pairs+:: The cut locations in enzyme index notation. # # Enzyme index notation:: 1.._n_, value before 1 is -1 --- 57,62 ---- attr_reader :cut_locations_in_enzyme_notation ! # [+erp+] One of three possible parameters: The name of an enzyme, a REBASE::EnzymeEntry object, or a nucleotide pattern with a cut mark. ! # [+raw_cut_pairs+] The cut locations in enzyme index notation. # # Enzyme index notation:: 1.._n_, value before 1 is -1 *************** *** 94,97 **** --- 78,82 ---- # def initialize(erp, *raw_cut_pairs) + # 'erp' : 'E'nzyme / 'R'ebase / 'P'attern k = erp.class *************** *** 217,221 **** end ! end ! ! end --- 202,205 ---- end ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: single_strand.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** single_strand.rb 1 Feb 2006 07:34:11 -0000 1.1 --- single_strand.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 13,50 **** # bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence - - A single strand of restriction enzyme sequence pattern with a 5' to 3' - orientation. - - DoubleStranded puts the SingleStrand and SingleStrandComplement together to - create the sequence pattern with cuts on both strands. - =end class SingleStrand < Bio::Sequence::NA include CutSymbol --- 22,35 ---- # bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # A single strand of restriction enzyme sequence pattern with a 5' to 3' ! # orientation. ! # ! # DoubleStranded puts the SingleStrand and SingleStrandComplement together to ! # create the sequence pattern with cuts on both strands. # class SingleStrand < Bio::Sequence::NA include CutSymbol *************** *** 142,146 **** end ! # NOTE: BEING WORKED ON, BUG EXISTS IN Bio::NucleicAcid =begin --- 127,131 ---- end ! # FIXME recheck this # NOTE: BEING WORKED ON, BUG EXISTS IN Bio::NucleicAcid =begin *************** *** 198,202 **** once :pattern, :with_cut_symbols, :with_spaces, :to_re ! end ! ! end --- 183,186 ---- once :pattern, :with_cut_symbols, :with_spaces, :to_re ! end # SingleStrand ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: analysis.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** analysis.rb 1 Mar 2006 01:40:00 -0000 1.5 --- analysis.rb 31 Dec 2006 21:50:31 -0000 1.6 *************** *** 1,2 **** --- 1,13 ---- + # + # bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + + #-- #if RUBY_VERSION[0..2] == '1.9' or RUBY_VERSION == '2.0' # err = "This class makes use of 'include' on ranges quite a bit. Possibly unstable in development Ruby. 2005/12/20." *************** *** 4,7 **** --- 15,19 ---- # raise err #end + #++ require 'pathname' *************** *** 10,15 **** require 'bio' - class Bio::Sequence::NA def cut_with_enzyme(*args) Bio::RestrictionEnzyme::Analysis.cut(self, *args) --- 22,27 ---- require 'bio' class Bio::Sequence::NA + # See Bio::RestrictionEnzyme::Analysis.cut def cut_with_enzyme(*args) Bio::RestrictionEnzyme::Analysis.cut(self, *args) *************** *** 24,59 **** class Bio::RestrictionEnzyme # # bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ ! # # - - =begin rdoc - bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes - =end class Analysis --- 36,47 ---- class Bio::RestrictionEnzyme + # # bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # class Analysis *************** *** 375,378 **** end ! end ! end --- 363,366 ---- end ! end # Analysis ! end # Bio::RestrictionEnzyme From trevor at dev.open-bio.org Sun Dec 31 16:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/analysis calculated_cuts.rb, 1.1, 1.2 cut_range.rb, 1.1, 1.2 cut_ranges.rb, 1.1, 1.2 fragment.rb, 1.1, 1.2 fragments.rb, 1.1, 1.2 horizontal_cut_range.rb, 1.1, 1.2 sequence_range.rb, 1.1, 1.2 tags.rb, 1.1, 1.2 vertical_cut_range.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoXKt032436@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme/analysis Modified Files: calculated_cuts.rb cut_range.rb cut_ranges.rb fragment.rb fragments.rb horizontal_cut_range.rb sequence_range.rb tags.rb vertical_cut_range.rb Log Message: Updated license for RestrictionEnzyme. Index: vertical_cut_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/vertical_cut_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vertical_cut_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- vertical_cut_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/vertical_cut_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,44 **** # ! # bio/util/restriction_enzyme/analysis/vertical_cut_range.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/vertical_cut_range.rb - - =end class VerticalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right --- 19,28 ---- # ! # bio/util/restrction_enzyme/analysis/vertical_cut_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class VerticalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right *************** *** 67,73 **** @range.include?(i) end ! ! end ! ! end ! end --- 51,55 ---- @range.include?(i) end ! end # VerticalCutRange ! end # Analysis ! end # Bio::RestrictionEnzyme Index: fragment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/fragment.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fragment.rb 1 Feb 2006 07:34:11 -0000 1.1 --- fragment.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/fragment.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 13,47 **** # ! # bio/util/restriction_enzyme/analysis/fragment.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/fragment.rb - - =end class Fragment --- 22,31 ---- # ! # bio/util/restrction_enzyme/analysis/fragment.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class Fragment *************** *** 74,82 **** df end ! ! ! ! end ! ! end ! end --- 58,62 ---- df end ! end # Fragment ! end # Analysis ! end # Bio::RestrictionEnzyme Index: horizontal_cut_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/horizontal_cut_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** horizontal_cut_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- horizontal_cut_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/horizontal_cut_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,44 **** # ! # bio/util/restriction_enzyme/analysis/horizontal_cut_range.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/horizontal_cut_range.rb - - =end class HorizontalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right --- 19,28 ---- # ! # bio/util/restrction_enzyme/analysis/horizontal_cut_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class HorizontalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right *************** *** 69,75 **** @range.include?(i) end ! ! end ! ! end ! end --- 53,57 ---- @range.include?(i) end ! end # HorizontalCutRange ! end # Analysis ! end # Bio::RestrictionEnzyme Index: fragments.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/fragments.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fragments.rb 1 Feb 2006 07:34:11 -0000 1.1 --- fragments.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/fragments.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 8,42 **** # ! # bio/util/restriction_enzyme/analysis/fragments.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/fragments.rb - - =end class Fragments < Array --- 17,26 ---- # ! # bio/util/restrction_enzyme/analysis/fragments.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class Fragments < Array *************** *** 58,64 **** pretty_fragments end ! ! end ! ! end ! end --- 42,46 ---- pretty_fragments end ! end # Fragments ! end # Analysis ! end # Bio::RestrictionEnzyme Index: tags.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/tags.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tags.rb 1 Feb 2006 07:34:11 -0000 1.1 --- tags.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + # to be removed require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,45 **** class Analysis - # - # bio/util/restriction_enzyme/analysis/tags.rb - - # - # Copyright:: Copyright (C) 2006 Trevor Wennblom - # 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 - # - #++ - # - # - - =begin rdoc - bio/util/restriction_enzyme/analysis/tags.rb - - =end class Tags < Hash end --- 11,14 ---- Index: cut_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/cut_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # bio/util/restrction_enzyme/analysis/cut_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,47 **** # ! # bio/util/restriction_enzyme/analysis/cut_range.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/cut_range.rb - - =end class CutRange ! end ! ! end ! end --- 20,31 ---- # ! # bio/util/restrction_enzyme/analysis/cut_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class CutRange ! end # CutRange ! end # Analysis ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: cut_ranges.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/cut_ranges.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_ranges.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_ranges.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/cut_ranges.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,50 **** # ! # bio/util/restriction_enzyme/analysis/cut_ranges.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/cut_ranges.rb - - =end class CutRanges < Array def min; self.collect{|a| a.min}.flatten.sort.first; end def max; self.collect{|a| a.max}.flatten.sort.last; end def include?(i); self.collect{|a| a.include?(i)}.include?(true); end ! end ! ! end ! end --- 19,33 ---- # ! # bio/util/restrction_enzyme/analysis/cut_ranges.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class CutRanges < Array def min; self.collect{|a| a.min}.flatten.sort.first; end def max; self.collect{|a| a.max}.flatten.sort.last; end def include?(i); self.collect{|a| a.include?(i)}.include?(true); end ! end # CutRanges ! end # Analysis ! end # Bio::RestrictionEnzyme Index: calculated_cuts.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/calculated_cuts.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** calculated_cuts.rb 1 Feb 2006 07:34:11 -0000 1.1 --- calculated_cuts.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # bio/util/restrction_enzyme/analysis/calculated_cuts.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 11,56 **** # ! # bio/util/restriction_enzyme/analysis/calculated_cuts.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/calculated_cuts.rb - - - - 1 2 3 4 5 6 7 - G A|T T A C A - +-----+ - C T A A T|G T - 1 2 3 4 5 6 7 - - Primary cut = 2 - Complement cut = 5 - Horizontal cuts = 3, 4, 5 - =end class CalculatedCuts include CutSymbol --- 21,40 ---- # ! # bio/util/restrction_enzyme/analysis/calculated_cuts.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # 1 2 3 4 5 6 7 + # G A|T T A C A + # +-----+ + # C T A A T|G T + # 1 2 3 4 5 6 7 + # + # Primary cut = 2 + # Complement cut = 5 + # Horizontal cuts = 3, 4, 5 # class CalculatedCuts include CutSymbol *************** *** 214,220 **** end ! ! end ! ! end ! end --- 198,202 ---- end ! end # CalculatedCuts ! end # Analysis ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: sequence_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/sequence_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sequence_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- sequence_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/sequence_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 15,51 **** class Bio::RestrictionEnzyme class Analysis - - # - # bio/util/restriction_enzyme/analysis/sequence_range.rb - - # - # Copyright:: Copyright (C) 2006 Trevor Wennblom - # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/sequence_range.rb - - =end class SequenceRange --- 24,34 ---- class Bio::RestrictionEnzyme class Analysis # ! # bio/util/restrction_enzyme/analysis/sequence_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class SequenceRange *************** *** 224,231 **** @cut_ranges << HorizontalCutRange.new( left, right ) end ! ! ! end ! ! end ! end --- 207,211 ---- @cut_ranges << HorizontalCutRange.new( left, right ) end ! end # SequenceRange ! end # Analysis ! end # Bio::RestrictionEnzyme \ No newline at end of file From trevor at dev.open-bio.org Sun Dec 31 16:53:34 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:53:34 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/hmmer report.rb,1.10,1.11 Message-ID: <200612312153.kBVLrYml032489@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/hmmer In directory dev.open-bio.org:/tmp/cvs-serv32469/lib/bio/appl/hmmer Modified Files: report.rb Log Message: s/Lisence/License Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/hmmer/report.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** report.rb 2 Feb 2006 17:08:36 -0000 1.10 --- report.rb 31 Dec 2006 21:53:32 -0000 1.11 *************** *** 6,10 **** # Copyright:: Copyright (C) 2005 # Masashi Fujita ! # Lisence:: LGPL # # $Id$ --- 6,10 ---- # Copyright:: Copyright (C) 2005 # Masashi Fujita ! # License:: LGPL # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio reference.rb,1.22,1.23 Message-ID: <200612312154.kBVLsprG032533@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio Modified Files: reference.rb Log Message: s/Lisence/License Index: reference.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/reference.rb,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** reference.rb 26 Mar 2006 02:32:56 -0000 1.22 --- reference.rb 31 Dec 2006 21:54:49 -0000 1.23 *************** *** 5,9 **** # Toshiaki Katayama , # Ryan Raaum ! # Lisence:: Ruby's # # $Id$ --- 5,9 ---- # Toshiaki Katayama , # Ryan Raaum ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/blast xmlparser.rb,1.15,1.16 Message-ID: <200612312154.kBVLsp6X032543@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/blast In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/appl/blast Modified Files: xmlparser.rb Log Message: s/Lisence/License Index: xmlparser.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/blast/xmlparser.rb,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** xmlparser.rb 19 Sep 2006 06:12:37 -0000 1.15 --- xmlparser.rb 31 Dec 2006 21:54:49 -0000 1.16 *************** *** 6,10 **** # Copyright:: Copyright (C) 2003 # Toshiaki Katayama ! # Lisence:: Ruby's # # $Id$ --- 6,10 ---- # Copyright:: Copyright (C) 2003 # Toshiaki Katayama ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db fasta.rb,1.26,1.27 Message-ID: <200612312154.kBVLsphC032548@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/db Modified Files: fasta.rb Log Message: s/Lisence/License Index: fasta.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/fasta.rb,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** fasta.rb 19 Sep 2006 06:03:51 -0000 1.26 --- fasta.rb 31 Dec 2006 21:54:49 -0000 1.27 *************** *** 5,9 **** # GOTO Naohisa , # Toshiaki Katayama ! # Lisence:: Ruby's # # $Id$ --- 5,9 ---- # GOTO Naohisa , # Toshiaki Katayama ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl hmmer.rb,1.7,1.8 Message-ID: <200612312154.kBVLspwq032538@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/appl Modified Files: hmmer.rb Log Message: s/Lisence/License Index: hmmer.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/hmmer.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** hmmer.rb 19 Sep 2006 06:29:37 -0000 1.7 --- hmmer.rb 31 Dec 2006 21:54:49 -0000 1.8 *************** *** 4,8 **** # Copyright:: Copyright (C) 2002 # Toshiaki Katayama ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2002 # Toshiaki Katayama ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/data test_na.rb,1.6,1.7 Message-ID: <200612312154.kBVLsprO032563@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/data In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio/data Modified Files: test_na.rb Log Message: s/Lisence/License Index: test_na.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_na.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_na.rb 8 Feb 2006 13:57:01 -0000 1.6 --- test_na.rb 31 Dec 2006 21:54:49 -0000 1.7 *************** *** 3,7 **** # # Copyright:: Copyright (C) 2005,2006 Mitsuteru Nakao ! # Lisence:: Ruby's # # $Id$ --- 3,7 ---- # # Copyright:: Copyright (C) 2005,2006 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io fastacmd.rb,1.13,1.14 Message-ID: <200612312154.kBVLspMV032551@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/io Modified Files: fastacmd.rb Log Message: s/Lisence/License Index: fastacmd.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/fastacmd.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fastacmd.rb 25 Jul 2006 18:18:21 -0000 1.13 --- fastacmd.rb 31 Dec 2006 21:54:49 -0000 1.14 *************** *** 7,11 **** # Mitsuteru C. Nakao , # Jan Aerts ! # Lisence:: LGPL # # $Id$ --- 7,11 ---- # Mitsuteru C. Nakao , # Jan Aerts ! # License:: LGPL # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/sequence test_aa.rb, 1.1, 1.2 test_na.rb, 1.2, 1.3 Message-ID: <200612312154.kBVLsp8m032573@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/sequence In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio/sequence Modified Files: test_aa.rb test_na.rb Log Message: s/Lisence/License Index: test_na.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_na.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_na.rb 27 Jun 2006 05:44:57 -0000 1.2 --- test_na.rb 31 Dec 2006 21:54:49 -0000 1.3 *************** *** 4,8 **** # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ Index: test_aa.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_aa.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_aa.rb 8 Feb 2006 07:20:24 -0000 1.1 --- test_aa.rb 31 Dec 2006 21:54:49 -0000 1.2 *************** *** 4,8 **** # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_reference.rb,1.1,1.2 Message-ID: <200612312154.kBVLspeT032558@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio Modified Files: test_reference.rb Log Message: s/Lisence/License Index: test_reference.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_reference.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_reference.rb 8 Feb 2006 15:06:26 -0000 1.1 --- test_reference.rb 31 Dec 2006 21:54:49 -0000 1.2 *************** *** 4,8 **** # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db/embl test_sptr.rb,1.5,1.6 Message-ID: <200612312154.kBVLspJF032568@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db/embl In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio/db/embl Modified Files: test_sptr.rb Log Message: s/Lisence/License Index: test_sptr.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_sptr.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_sptr.rb 5 Oct 2006 07:39:30 -0000 1.5 --- test_sptr.rb 31 Dec 2006 21:54:49 -0000 1.6 *************** *** 3,7 **** # # Copyright::: Copyright (C) 2005 Mitsuteru Nakao ! # Lisence:: Ruby's # # $Id$ --- 3,7 ---- # # Copyright::: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 16:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util restriction_enzyme.rb,1.4,1.5 Message-ID: <200612312150.kBVLoXSW032423@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32395 Modified Files: restriction_enzyme.rb Log Message: Updated license for RestrictionEnzyme. Index: restriction_enzyme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** restriction_enzyme.rb 28 Feb 2006 21:45:56 -0000 1.4 --- restriction_enzyme.rb 31 Dec 2006 21:50:31 -0000 1.5 *************** *** 1,10 **** # ! # = bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # License:: LGPL # # $Id$ # # # NOTE: This documentation and the module are still very much under --- 1,26 ---- # ! # bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + require 'bio/db/rebase' + require 'bio/util/restriction_enzyme/double_stranded' + require 'bio/util/restriction_enzyme/single_strand' + require 'bio/util/restriction_enzyme/cut_symbol' + require 'bio/util/restriction_enzyme/analysis' + + module Bio #:nodoc: + + # + # bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # # NOTE: This documentation and the module are still very much under *************** *** 12,16 **** # comments would be appreciated. # ! # == Synopsis # # Bio::RestrictionEnzyme allows you to fragment a DNA strand using one --- 28,33 ---- # comments would be appreciated. # ! # ! # = Description # # Bio::RestrictionEnzyme allows you to fragment a DNA strand using one *************** *** 20,30 **** # such circumstances. # ! ! # Using Bio::RestrictionEnzyme you may simply use the name of common ! # enzymes to cut with or you may construct your own unique enzymes to use. # # ! # == Basic Usage # # # EcoRI cut pattern: # # G|A A T T C --- 37,49 ---- # such circumstances. # ! # When using Bio::RestrictionEnzyme you may simply use the name of common ! # enzymes to cut your sequence or you may construct your own unique enzymes ! # to use. # # ! # = Usage # + # == Basic + # # # EcoRI cut pattern: # # G|A A T T C *************** *** 35,39 **** # # G^AATTC # ! # require 'bio/restriction_enzyme' # require 'pp' # --- 54,58 ---- # # G^AATTC # ! # require 'bio' # require 'pp' # *************** *** 66,73 **** # p cuts.complement # ["g", "gcccttaa", "cttaa"] # # ! # == Advanced Usage ! # ! # require 'bio/restriction_enzyme' # require 'pp' # enzyme_1 = Bio::RestrictionEnzyme.new('anna', [1,1], [3,3]) --- 85,91 ---- # p cuts.complement # ["g", "gcccttaa", "cttaa"] # + # == Advanced # ! # require 'bio' # require 'pp' # enzyme_1 = Bio::RestrictionEnzyme.new('anna', [1,1], [3,3]) *************** *** 160,209 **** # # ! # == Todo ! # ! # Currently under development: # - # * Optimizations in restriction_enzyme/analysis.rb to cut down on - # factorial growth of computation space. # * Circular DNA cutting - # * Tagging of sequence data - # * Much more documentation - # - # - #-- - # - # 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 # ! #++ ! # ! # ! ! ! require 'bio/db/rebase' ! require 'bio/util/restriction_enzyme/double_stranded' ! require 'bio/util/restriction_enzyme/single_strand' ! require 'bio/util/restriction_enzyme/cut_symbol' ! require 'bio/util/restriction_enzyme/analysis' ! ! ! module Bio ! class Bio::RestrictionEnzyme include CutSymbol extend CutSymbol # Factory for DoubleStranded def self.new(users_enzyme_or_rebase_or_pattern, *cut_locations) DoubleStranded.new(users_enzyme_or_rebase_or_pattern, *cut_locations) --- 178,198 ---- # # ! # = Currently under development # # * Circular DNA cutting # ! class Bio::RestrictionEnzyme include CutSymbol extend CutSymbol + # [+users_enzyme_or_rebase_or_pattern+] One of three possible parameters: The name of an enzyme, a REBASE::EnzymeEntry object, or a nucleotide pattern with a cut mark. + # [+cut_locations+] The cut locations in enzyme index notation. + # + # See Bio::RestrictionEnzyme::DoubleStranded.new for more information. + # + #-- # Factory for DoubleStranded + #++ def self.new(users_enzyme_or_rebase_or_pattern, *cut_locations) DoubleStranded.new(users_enzyme_or_rebase_or_pattern, *cut_locations) *************** *** 214,219 **** # Returns a Bio::REBASE object loaded with all of the enzyme data on file. # ! #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml') def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml') @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml) @@rebase_enzymes --- 203,212 ---- # Returns a Bio::REBASE object loaded with all of the enzyme data on file. # ! #-- ! # FIXME: Use File.join ! #++ def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml') + #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml') + @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml) @@rebase_enzymes *************** *** 222,230 **** # Primitive way of determining if a string is an enzyme name. # ! # Should work just fine thanks to dumb luck. A nucleotide or nucleotide # set can't ever contain an 'i'. Restriction enzymes always end in 'i'. # #-- ! # Could also look for cut symbols. #++ # --- 215,223 ---- # Primitive way of determining if a string is an enzyme name. # ! # A nucleotide or nucleotide # set can't ever contain an 'i'. Restriction enzymes always end in 'i'. # #-- ! # FIXME: Change this to actually look up the enzyme name to see if it's valid. #++ # *************** *** 238,242 **** end ! end ! end # Bio --- 231,234 ---- end ! end # RestrictionEnzyme end # Bio From trevor at dev.open-bio.org Sun Dec 31 18:04:07 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 23:04:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util contingency_table.rb,1.5,1.6 Message-ID: <200612312304.kBVN475k032648@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32628 Modified Files: contingency_table.rb Log Message: Standardized documentation for ContingencyTable to meet README.DEV Index: contingency_table.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/contingency_table.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** contingency_table.rb 31 Dec 2006 20:02:20 -0000 1.5 --- contingency_table.rb 31 Dec 2006 23:04:04 -0000 1.6 *************** *** 249,252 **** --- 249,257 ---- # Create a ContingencyTable that has characters_in_sequence.size rows and # characters_in_sequence.size columns for each row + # + # --- + # *Arguments* + # * +characters_in_sequences+: (_optional_) The allowable characters that will be present in the aligned sequences. + # *Returns*:: +ContingencyTable+ object to be filled with values and calculated upon def initialize(characters_in_sequences = nil) @characters = ( characters_in_sequences or %w{a c d e f g h i k l m n p q r s t v w y - x u} ) *************** *** 256,259 **** --- 261,269 ---- # Report the sum of all values in a given row + # + # --- + # *Arguments* + # * +i+: Row to sum + # *Returns*:: +Integer+ sum of row def row_sum(i) total = 0 *************** *** 263,266 **** --- 273,281 ---- # Report the sum of all values in a given column + # + # --- + # *Arguments* + # * +j+: Column to sum + # *Returns*:: +Integer+ sum of column def column_sum(j) total = 0 *************** *** 273,276 **** --- 288,295 ---- # * This is the same thing as asking for the sum of all values in the table. # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Integer+ sum of all columns def column_sum_all total = 0 *************** *** 283,286 **** --- 302,309 ---- # * This is the same thing as asking for the sum of all values in the table. # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Integer+ sum of all rows def row_sum_all total = 0 *************** *** 290,296 **** alias table_sum_all row_sum_all # ! # e(sub:ij) = (r(sub:i)/N) * (c(sub:j)) ! # def expected(i, j) (row_sum(i).to_f / table_sum_all) * column_sum(j) --- 313,323 ---- alias table_sum_all row_sum_all + # Calculate _e_, the _expected_ value. # ! # --- ! # *Arguments* ! # * +i+: row ! # * +j+: column ! # *Returns*:: +Float+ e(sub:ij) = (r(sub:i)/N) * (c(sub:j)) def expected(i, j) (row_sum(i).to_f / table_sum_all) * column_sum(j) *************** *** 298,301 **** --- 325,333 ---- # Report the chi square of the entire table + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Float+ chi square value def chi_square total = 0 *************** *** 310,314 **** end ! # Report the chi square relation of two elements in the table def chi_square_element(i, j) eij = expected(i, j) --- 342,352 ---- end ! # Report the chi-square relation of two elements in the table ! # ! # --- ! # *Arguments* ! # * +i+: row ! # * +j+: column ! # *Returns*:: +Float+ chi-square of an intersection def chi_square_element(i, j) eij = expected(i, j) *************** *** 318,321 **** --- 356,364 ---- # Report the contingency coefficient of the table + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Float+ contingency_coefficient of the table def contingency_coefficient c_s = chi_square From trevor at dev.open-bio.org Sun Dec 31 18:22:05 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 23:22:05 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db rebase.rb,1.5,1.6 Message-ID: <200612312322.kBVNM5gh032698@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv32678 Modified Files: rebase.rb Log Message: Updated REBASE to conform to README.DEV Index: rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/rebase.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rebase.rb 31 Dec 2006 20:44:21 -0000 1.5 --- rebase.rb 31 Dec 2006 23:22:03 -0000 1.6 *************** *** 142,148 **** end ! # Iterate over each entry def each ! @data.each { |v| yield v } end --- 142,153 ---- end ! # Calls _block_ once for each element in @data hash, passing that element as a parameter. ! # ! # --- ! # *Arguments* ! # * Accepts a block ! # *Returns*:: results of _block_ operations def each ! @data.each { |item| yield item } end *************** *** 158,165 **** end ! # [+enzyme_lines+] contents of EMBOSS formatted enzymes file (_required_) ! # [+reference_lines+] contents of EMBOSS formatted references file (_optional_) ! # [+supplier_lines+] contents of EMBOSS formatted suppliers files (_optional_) ! # [+yaml+] enzyme_lines, reference_lines, and supplier_lines are read as YAML if set to true (_default_ +false+) def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) # All your REBASE are belong to us. --- 163,175 ---- end ! # Constructor ! # ! # --- ! # *Arguments* ! # * +enzyme_lines+: (_required_) contents of EMBOSS formatted enzymes file ! # * +reference_lines+: (_optional_) contents of EMBOSS formatted references file ! # * +supplier_lines+: (_optional_) contents of EMBOSS formatted suppliers files ! # * +yaml+: (_optional_, _default_ +false+) enzyme_lines, reference_lines, and supplier_lines are read as YAML if set to true ! # *Returns*:: Bio::REBASE def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) # All your REBASE are belong to us. *************** *** 180,183 **** --- 190,198 ---- # List the enzymes available + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Array+ sorted enzyme names def enzymes @data.keys.sort *************** *** 188,195 **** --- 203,218 ---- # rebase.save_yaml( 'enz.yaml', 'ref.yaml' ) # rebase.save_yaml( 'enz.yaml', 'ref.yaml', 'sup.yaml' ) + # + # --- + # *Arguments* + # * +f_enzyme+: (_required_) Filename to save YAML formatted output of enzyme data + # * +f_reference+: (_optional_) Filename to save YAML formatted output of reference data + # * +f_supplier+: (_optional_) Filename to save YAML formatted output of supplier data + # *Returns*:: nothing def save_yaml( f_enzyme, f_reference=nil, f_supplier=nil ) File.open(f_enzyme, 'w') { |f| f.puts YAML.dump(@enzyme_data) } File.open(f_reference, 'w') { |f| f.puts YAML.dump(@reference_data) } if f_reference File.open(f_supplier, 'w') { |f| f.puts YAML.dump(@supplier_data) } if f_supplier + return end *************** *** 198,201 **** --- 221,231 ---- # rebase = Bio::REBASE.read( 'emboss_e', 'emboss_r' ) # rebase = Bio::REBASE.read( 'emboss_e', 'emboss_r', 'emboss_s' ) + # + # --- + # *Arguments* + # * +f_enzyme+: (_required_) Filename to read enzyme data + # * +f_reference+: (_optional_) Filename to read reference data + # * +f_supplier+: (_optional_) Filename to read supplier data + # *Returns*:: Bio::REBASE object def self.read( f_enzyme, f_reference=nil, f_supplier=nil ) e = IO.readlines(f_enzyme) *************** *** 209,212 **** --- 239,249 ---- # rebase = Bio::REBASE.load_yaml( 'enz.yaml', 'ref.yaml' ) # rebase = Bio::REBASE.load_yaml( 'enz.yaml', 'ref.yaml', 'sup.yaml' ) + # + # --- + # *Arguments* + # * +f_enzyme+: (_required_) Filename to read YAML-formatted enzyme data + # * +f_reference+: (_optional_) Filename to read YAML-formatted reference data + # * +f_supplier+: (_optional_) Filename to read YAML-formatted supplier data + # *Returns*:: Bio::REBASE object def self.load_yaml( f_enzyme, f_reference=nil, f_supplier=nil ) e = YAML.load_file(f_enzyme) From trevor at dev.open-bio.org Sun Dec 31 18:50:36 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 23:50:36 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util test_restriction_enzyme.rb, NONE, 1.1 Message-ID: <200612312350.kBVNoaNQ032767@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32747 Added Files: test_restriction_enzyme.rb Log Message: Added TestRestrictionEnzyme --- NEW FILE: test_restriction_enzyme.rb --- # # test/unit/bio/util/restriction_enzyme.rb - Unit test for Bio::RestrictionEnzyme # # Author:: Trevor Wennblom # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) # License:: Distributes under the same terms as Ruby # # $Id: test_restriction_enzyme.rb,v 1.1 2006/12/31 23:50:34 trevor Exp $ # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s $:.unshift(libpath) unless $:.include?(libpath) require 'test/unit' require 'bio/util/restriction_enzyme.rb' module Bio #:nodoc: class TestRestrictionEnzyme < Test::Unit::TestCase #:nodoc: def setup @t = Bio::RestrictionEnzyme end def test_rebase assert_equal(@t.rebase.respond_to?(:enzymes), true) assert_not_nil @t.rebase['AarI'] assert_nil @t.rebase['blah'] end def test_enzyme_name assert_equal(@t.enzyme_name?('AarI'), true) assert_equal(@t.enzyme_name?('atgc'), false) assert_equal(@t.enzyme_name?('aari'), true) assert_equal(@t.enzyme_name?('EcoRI'), true) assert_equal(@t.enzyme_name?('EcoooRI'), true) # FIXME should actually be false end end end From trevor at dev.open-bio.org Sun Dec 31 19:12:56 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 00:12:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db rebase.rb,1.6,1.7 Message-ID: <200701010012.l010CudH000377@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv351/lib/bio/db Modified Files: rebase.rb Log Message: Index: rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/rebase.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rebase.rb 31 Dec 2006 23:22:03 -0000 1.6 --- rebase.rb 1 Jan 2007 00:12:54 -0000 1.7 *************** *** 80,83 **** --- 80,84 ---- # # pp rebase.enzymes[0..4] # ["AarI", "AasI", "AatI", "AatII", "Acc16I"] + # pp rebase.enzyme_name?('aasi') # true # pp rebase['AarI'].pattern # "CACCTGC" # pp rebase['AarI'].blunt? # false *************** *** 198,201 **** --- 199,215 ---- @data.keys.sort end + + # Check if supplied name is the name of an available enzyme + # + # --- + # *Arguments* + # * +name+: Enzyme name + # *Returns*:: +true/false+ + def enzyme_name?(name) + enzymes.each do |e| + return true if e.downcase == name.downcase + end + return false + end # Save the current data From trevor at dev.open-bio.org Sun Dec 31 19:12:56 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 00:12:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util restriction_enzyme.rb,1.5,1.6 Message-ID: <200701010012.l010CuE4000382@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv351/lib/bio/util Modified Files: restriction_enzyme.rb Log Message: Index: restriction_enzyme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** restriction_enzyme.rb 31 Dec 2006 21:50:31 -0000 1.5 --- restriction_enzyme.rb 1 Jan 2007 00:12:54 -0000 1.6 *************** *** 203,227 **** # Returns a Bio::REBASE object loaded with all of the enzyme data on file. # ! #-- ! # FIXME: Use File.join ! #++ ! def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml') ! #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml') ! ! @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml) @@rebase_enzymes end ! # Primitive way of determining if a string is an enzyme name. ! # ! # A nucleotide or nucleotide ! # set can't ever contain an 'i'. Restriction enzymes always end in 'i'. # ! #-- ! # FIXME: Change this to actually look up the enzyme name to see if it's valid. ! #++ # ! def self.enzyme_name?( str ) ! str[-1].chr.downcase == 'i' end --- 203,226 ---- # Returns a Bio::REBASE object loaded with all of the enzyme data on file. # ! # --- ! # *Arguments* ! # * _none_ ! # *Returns*:: Bio::REBASE ! def self.rebase ! enzymes_yaml_file = File.join(File.dirname(File.expand_path(__FILE__)), 'restriction_enzyme', 'enzymes.yaml') ! @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml_file) @@rebase_enzymes end ! # Check if supplied name is the name of an available enzyme # ! # See Bio::REBASE.enzyme_name? # ! # --- ! # *Arguments* ! # * +name+: Enzyme name ! # *Returns*:: +true/false+ ! def self.enzyme_name?( name ) ! self.rebase.enzyme_name?(name) end From trevor at dev.open-bio.org Sun Dec 31 19:12:56 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 00:12:56 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_rebase.rb,1.3,1.4 Message-ID: <200701010012.l010Cu3C000387@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv351/test/unit/bio/db Modified Files: test_rebase.rb Log Message: Index: test_rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_rebase.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_rebase.rb 31 Dec 2006 18:46:14 -0000 1.3 --- test_rebase.rb 1 Jan 2007 00:12:54 -0000 1.4 *************** *** 90,93 **** --- 90,98 ---- assert_equal(a['AatI'].supplier_names, ['Toyobo Biochemicals']) assert_equal(a['AatI'].suppliers, ['O']) + + assert_equal(a.enzyme_name?('aasi'), true) + assert_equal(a.enzyme_name?('AarI'), true) + assert_equal(a.enzyme_name?('Aari'), true) + assert_equal(a.enzyme_name?('AbrI'), false) end From trevor at dev.open-bio.org Sun Dec 31 19:12:56 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 00:12:56 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util test_restriction_enzyme.rb, 1.1, 1.2 Message-ID: <200701010012.l010CubO000392@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util In directory dev.open-bio.org:/tmp/cvs-serv351/test/unit/bio/util Modified Files: test_restriction_enzyme.rb Log Message: Index: test_restriction_enzyme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_restriction_enzyme.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_restriction_enzyme.rb 31 Dec 2006 23:50:34 -0000 1.1 --- test_restriction_enzyme.rb 1 Jan 2007 00:12:54 -0000 1.2 *************** *** 35,39 **** assert_equal(@t.enzyme_name?('aari'), true) assert_equal(@t.enzyme_name?('EcoRI'), true) ! assert_equal(@t.enzyme_name?('EcoooRI'), true) # FIXME should actually be false end --- 35,39 ---- assert_equal(@t.enzyme_name?('aari'), true) assert_equal(@t.enzyme_name?('EcoRI'), true) ! assert_equal(@t.enzyme_name?('EcoooRI'), false) end From trevor at dev.open-bio.org Sun Dec 31 21:16:07 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 02:16:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/analysis cut_ranges.rb, 1.2, 1.3 sequence_range.rb, 1.2, 1.3 tags.rb, 1.2, 1.3 Message-ID: <200701010216.l012G7TL000545@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis In directory dev.open-bio.org:/tmp/cvs-serv512/lib/bio/util/restriction_enzyme/analysis Modified Files: cut_ranges.rb sequence_range.rb tags.rb Log Message: Index: tags.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/tags.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tags.rb 31 Dec 2006 21:50:31 -0000 1.2 --- tags.rb 1 Jan 2007 02:16:05 -0000 1.3 *************** *** 5,9 **** #require 'bio/util/restriction_enzyme/analysis/shared_information' ! require 'bio' module Bio; end --- 5,9 ---- #require 'bio/util/restriction_enzyme/analysis/shared_information' ! #require 'bio' module Bio; end Index: cut_ranges.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/cut_ranges.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cut_ranges.rb 31 Dec 2006 21:50:31 -0000 1.2 --- cut_ranges.rb 1 Jan 2007 02:16:05 -0000 1.3 *************** *** 12,20 **** $:.unshift(libpath) unless $:.include?(libpath) ! require 'bio' module Bio; end class Bio::RestrictionEnzyme class Analysis # --- 12,21 ---- $:.unshift(libpath) unless $:.include?(libpath) ! #require 'bio' module Bio; end class Bio::RestrictionEnzyme class Analysis + #class Analysis # Index: sequence_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/sequence_range.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sequence_range.rb 31 Dec 2006 21:50:31 -0000 1.2 --- sequence_range.rb 1 Jan 2007 02:16:05 -0000 1.3 *************** *** 12,16 **** $:.unshift(libpath) unless $:.include?(libpath) - require 'bio/util/restriction_enzyme/analysis/tags' require 'bio/util/restriction_enzyme/analysis/cut_ranges' require 'bio/util/restriction_enzyme/analysis/horizontal_cut_range' --- 12,15 ---- From trevor at dev.open-bio.org Sun Dec 31 21:16:07 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 02:16:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme test_cut_symbol.rb, NONE, 1.1 test_double_stranded.rb, 1.2, 1.3 Message-ID: <200701010216.l012G7AU000550@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv512/test/unit/bio/util/restriction_enzyme Modified Files: test_double_stranded.rb Added Files: test_cut_symbol.rb Log Message: Index: test_double_stranded.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_double_stranded.rb 31 Dec 2006 18:46:14 -0000 1.2 --- test_double_stranded.rb 1 Jan 2007 02:16:05 -0000 1.3 *************** *** 106,113 **** end - def test_index_error - assert_raise(IndexError) { @t.new('EzzRII') } - end - # NOTE def test_to_re --- 106,109 ---- --- NEW FILE: test_cut_symbol.rb --- # # test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb - Unit test for Bio::RestrictionEnzyme::CutSymbol # # Author:: Trevor Wennblom # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) # License:: Distributes under the same terms as Ruby # # $Id: test_cut_symbol.rb,v 1.1 2007/01/01 02:16:05 trevor Exp $ # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s $:.unshift(libpath) unless $:.include?(libpath) require 'test/unit' require 'bio/util/restriction_enzyme/cut_symbol' module Bio #:nodoc: class TestStringFormatting < Test::Unit::TestCase #:nodoc: include Bio::RestrictionEnzyme::CutSymbol def setup end def test_methods assert_equal('^', cut_symbol) assert_equal('|', set_cut_symbol('|')) assert_equal('|', cut_symbol) assert_equal('\\|', escaped_cut_symbol) assert_equal(/\|/, re_cut_symbol) assert_equal('^', set_cut_symbol('^')) assert_equal(3, "abc^de" =~ re_cut_symbol) assert_equal(nil, "abc^de" =~ re_cut_symbol_adjacent) assert_equal(3, "abc^^de" =~ re_cut_symbol_adjacent) assert_equal(4, "a^bc^^de" =~ re_cut_symbol_adjacent) assert_equal(nil, "a^bc^de" =~ re_cut_symbol_adjacent) end end end From trevor at dev.open-bio.org Sun Dec 31 21:16:07 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 02:16:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util restriction_enzyme.rb,1.6,1.7 Message-ID: <200701010216.l012G7EC000538@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv512/lib/bio/util Modified Files: restriction_enzyme.rb Log Message: Index: restriction_enzyme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** restriction_enzyme.rb 1 Jan 2007 00:12:54 -0000 1.6 --- restriction_enzyme.rb 1 Jan 2007 02:16:05 -0000 1.7 *************** *** 187,195 **** extend CutSymbol - # [+users_enzyme_or_rebase_or_pattern+] One of three possible parameters: The name of an enzyme, a REBASE::EnzymeEntry object, or a nucleotide pattern with a cut mark. - # [+cut_locations+] The cut locations in enzyme index notation. - # # See Bio::RestrictionEnzyme::DoubleStranded.new for more information. # #-- # Factory for DoubleStranded --- 187,197 ---- extend CutSymbol # See Bio::RestrictionEnzyme::DoubleStranded.new for more information. # + # --- + # *Arguments* + # * +users_enzyme_or_rebase_or_pattern+: One of three possible parameters: The name of an enzyme, a REBASE::EnzymeEntry object, or a nucleotide pattern with a cut mark. + # * +cut_locations+: The cut locations in enzyme index notation. + # *Returns*:: Bio::RestrictionEnzyme::DoubleStranded #-- # Factory for DoubleStranded From trevor at dev.open-bio.org Sun Dec 31 21:16:07 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 02:16:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme analysis.rb, 1.6, 1.7 cut_symbol.rb, 1.2, 1.3 Message-ID: <200701010216.l012G79V000541@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv512/lib/bio/util/restriction_enzyme Modified Files: analysis.rb cut_symbol.rb Log Message: Index: cut_symbol.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/cut_symbol.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cut_symbol.rb 31 Dec 2006 21:50:31 -0000 1.2 --- cut_symbol.rb 1 Jan 2007 02:16:05 -0000 1.3 *************** *** 1,4 **** # ! # bio/util/restrction_enzyme/cut_symbol.rb - # # Author:: Trevor Wennblom --- 1,4 ---- # ! # bio/util/restrction_enzyme/cut_symbol.rb - Defines the symbol used to mark a cut in an enzyme sequence # # Author:: Trevor Wennblom *************** *** 9,13 **** # ! nil # separate file-level rdoc from following statement module Bio; end --- 9,13 ---- # ! nil # to separate file-level rdoc from following statement # !> useless use of nil in void context module Bio; end *************** *** 15,19 **** # ! # bio/util/restrction_enzyme/cut_symbol.rb - # # Author:: Trevor Wennblom --- 15,19 ---- # ! # bio/util/restrction_enzyme/cut_symbol.rb - Defines the symbol used to mark a cut in an enzyme sequence # # Author:: Trevor Wennblom *************** *** 21,57 **** # License:: Distributes under the same terms as Ruby # module CutSymbol ! require 'singleton' ! ! class CutSymbol__ ! include Singleton ! attr_accessor :cut_symbol ! attr_accessor :escaped_cut_symbol ! end ! ! # NOTE verify this sometime ! def cut_symbol=(c) ! CutSymbol__.instance.cut_symbol = c end ! def cut_symbol ! CutSymbol__.instance.cut_symbol ||= '^' ! end ! def escaped_cut_symbol ! CutSymbol__.instance.escaped_cut_symbol ||= "\\#{cut_symbol}" # \^ ! end ! # Used to check if multiple cut symbols are next to each other def re_cut_symbol_adjacent %r"#{escaped_cut_symbol}{2}" end ! # A Regexp of the cut_symbol. Convenience method. def re_cut_symbol %r"#{escaped_cut_symbol}" end end # CutSymbol ! end # Bio::RestrictionEnzyme \ No newline at end of file --- 21,115 ---- # License:: Distributes under the same terms as Ruby # + # = Usage + # + # #require 'bio/util/restriction_enzyme/cut_symbol' + # require 'cut_symbol' + # include Bio::RestrictionEnzyme::CutSymbol + # + # cut_symbol # => "^" + # set_cut_symbol('|') # => "|" + # cut_symbol # => "|" + # escaped_cut_symbol # => "\\|" + # re_cut_symbol # => /\|/ + # set_cut_symbol('^') # => "^" + # "abc^de" =~ re_cut_symbol # => 3 + # "abc^de" =~ re_cut_symbol_adjacent # => nil + # "abc^^de" =~ re_cut_symbol_adjacent # => 3 + # "a^bc^^de" =~ re_cut_symbol_adjacent # => 4 + # "a^bc^de" =~ re_cut_symbol_adjacent # => nil + # module CutSymbol ! # Set the token to be used as the cut symbol in a restriction enzyme sequece ! # ! # Starts as +^+ character ! # ! # --- ! # *Arguments* ! # * +glyph+: The single character to be used as the cut symbol in an enzyme sequence ! # *Returns*:: +glyph+ ! def set_cut_symbol(glyph) ! CutSymbol__.cut_symbol = glyph end ! # Get the token that's used as the cut symbol in a restriction enzyme sequece ! # ! # --- ! # *Arguments* ! # * _none_ ! # *Returns*:: +glyph+ ! def cut_symbol; CutSymbol__.cut_symbol; end ! # Get the token that's used as the cut symbol in a restriction enzyme sequece with ! # a back-slash preceding it. ! # ! # --- ! # *Arguments* ! # * _none_ ! # *Returns*:: +\glyph+ ! def escaped_cut_symbol; CutSymbol__.escaped_cut_symbol; end ! # Used to check if multiple cut symbols are next to each other. ! # ! # --- ! # *Arguments* ! # * _none_ ! # *Returns*:: +RegExp+ def re_cut_symbol_adjacent %r"#{escaped_cut_symbol}{2}" end ! # A Regexp of the cut_symbol. ! # ! # --- ! # *Arguments* ! # * _none_ ! # *Returns*:: +RegExp+ def re_cut_symbol %r"#{escaped_cut_symbol}" end + ######### + protected + ######### + + require 'singleton' + + # Class to keep state + class CutSymbol__ + include Singleton + + @cut_symbol = '^' + + def self.cut_symbol; @cut_symbol; end + + def self.cut_symbol=(glyph); + raise ArgumentError if glyph.size != 1 + @cut_symbol = glyph + end + + def self.escaped_cut_symbol; "\\" + self.cut_symbol; end + end + end # CutSymbol ! end # Bio::RestrictionEnzyme Index: analysis.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** analysis.rb 31 Dec 2006 21:50:31 -0000 1.6 --- analysis.rb 1 Jan 2007 02:16:05 -0000 1.7 *************** *** 33,37 **** require 'bio/util/restriction_enzyme' ! require 'bio/util/restriction_enzyme/analysis/sequence_range.rb' class Bio::RestrictionEnzyme --- 33,37 ---- require 'bio/util/restriction_enzyme' ! require 'bio/util/restriction_enzyme/analysis/sequence_range' class Bio::RestrictionEnzyme From trevor at dev.open-bio.org Sun Dec 31 21:31:24 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 02:31:24 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util restriction_enzyme.rb,1.7,1.8 Message-ID: <200701010231.l012VONX000650@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv628 Modified Files: restriction_enzyme.rb Log Message: Removed skeleton code of tags feature in RestrictionEnzyme. Index: restriction_enzyme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** restriction_enzyme.rb 1 Jan 2007 02:16:05 -0000 1.7 --- restriction_enzyme.rb 1 Jan 2007 02:31:22 -0000 1.8 *************** *** 222,226 **** # *Arguments* # * +name+: Enzyme name ! # *Returns*:: +true/false+ def self.enzyme_name?( name ) self.rebase.enzyme_name?(name) --- 222,226 ---- # *Arguments* # * +name+: Enzyme name ! # *Returns*:: +true+ _or_ +false+ def self.enzyme_name?( name ) self.rebase.enzyme_name?(name) From trevor at dev.open-bio.org Sun Dec 31 21:31:24 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 02:31:24 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/analysis fragment.rb, 1.2, 1.3 sequence_range.rb, 1.3, 1.4 tags.rb, 1.3, NONE Message-ID: <200701010231.l012VOUb000655@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis In directory dev.open-bio.org:/tmp/cvs-serv628/restriction_enzyme/analysis Modified Files: fragment.rb sequence_range.rb Removed Files: tags.rb Log Message: Removed skeleton code of tags feature in RestrictionEnzyme. --- tags.rb DELETED --- Index: fragment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/fragment.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fragment.rb 31 Dec 2006 21:50:31 -0000 1.2 --- fragment.rb 1 Jan 2007 02:31:22 -0000 1.3 *************** *** 12,16 **** $:.unshift(libpath) unless $:.include?(libpath) - require 'bio/util/restriction_enzyme/analysis/tags' require 'bio/util/restriction_enzyme/analysis/cut_ranges' require 'bio/util/restriction_enzyme/analysis/horizontal_cut_range' --- 12,15 ---- *************** *** 31,46 **** attr_reader :size - # attr_reader :tags def initialize( primary_bin, complement_bin ) - # @tags = [] @primary_bin = primary_bin @complement_bin = complement_bin end - # def add_tag( index, info=nil ) - # @tags[index] = info - # end - DisplayFragment = Struct.new(:primary, :complement) --- 30,39 ---- Index: sequence_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/sequence_range.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sequence_range.rb 1 Jan 2007 02:16:05 -0000 1.3 --- sequence_range.rb 1 Jan 2007 02:31:22 -0000 1.4 *************** *** 37,41 **** attr_reader :left, :right attr_reader :size - attr_reader :tags attr_reader :cut_ranges --- 37,40 ---- *************** *** 62,66 **** @size = (@right - @left) + 1 unless @left == nil or @right == nil - @tags = Tags.new @cut_ranges = CutRanges.new end --- 61,64 ---- *************** *** 158,162 **** bins.sort.each do |k, bin| fragment = Fragment.new( bin.p, bin.c ) - @tags.each { |k,v| fragment.add_tag(k,v) if (ts.left..ts.right).include?(k) } fragments << fragment end --- 156,159 ---- *************** *** 169,179 **** return fragments end - - def add_tag( index, info=nil ) - @__fragments_current = false - - raise IndexError unless index >= @left and index <= @right - @tags[index] = info - end # Cut occurs immediately after the index supplied. --- 166,169 ---- From trevor at dev.open-bio.org Sun Dec 31 22:36:39 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 03:36:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme single_strand.rb, 1.2, 1.3 string_formatting.rb, 1.2, 1.3 Message-ID: <200701010336.l013ad4R000750@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv728/lib/bio/util/restriction_enzyme Modified Files: single_strand.rb string_formatting.rb Log Message: Index: string_formatting.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/string_formatting.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** string_formatting.rb 31 Dec 2006 21:50:31 -0000 1.2 --- string_formatting.rb 1 Jan 2007 03:36:37 -0000 1.3 *************** *** 33,41 **** # Example: # pattern = 'n^ng^arraxt^n' ! # add_spacing( pattern ) # ! # Returns: ! # "n^n g^a r r a x t^n" # def add_spacing( seq, cs = cut_symbol ) str = '' --- 33,49 ---- # Example: # pattern = 'n^ng^arraxt^n' ! # add_spacing( pattern ) # => "n^n g^a r r a x t^n" # ! # --- ! # *Arguments* ! # * +seq+: sequence with cut symbols ! # * +cs+: (_optional_) Cut symbol along the string. The reason this is ! # definable outside of CutSymbol is that this is a utility function used ! # to form vertical and horizontal cuts such as: # + # a|t g c + # +---+ + # t a c|g + # *Returns*:: +String+ sequence with single character distance between bases def add_spacing( seq, cs = cut_symbol ) str = '' *************** *** 58,61 **** --- 66,74 ---- # Remove extraneous nucleic acid wildcards ('n' padding) from the # left and right sides + # + # --- + # *Arguments* + # * +s+: sequence with extraneous 'n' padding + # *Returns*:: +String+ sequence without 'n' padding on the sides def strip_padding( s ) if s[0].chr == 'n' *************** *** 72,75 **** --- 85,93 ---- # Remove extraneous nucleic acid wildcards ('n' padding) from the # left and right sides and remove cut symbols + # + # --- + # *Arguments* + # * +s+: sequence with extraneous 'n' padding and cut symbols + # *Returns*:: +String+ sequence without 'n' padding on the sides or cut symbols def strip_cuts_and_padding( s ) strip_padding( s.tr(cut_symbol, '') ) *************** *** 77,80 **** --- 95,103 ---- # Return the 'n' padding on the left side of the strand + # + # --- + # *Arguments* + # * +s+: sequence with extraneous 'n' padding on the left side of the strand + # *Returns*:: +String+ the 'n' padding from the left side def left_padding( s ) s =~ %r{^n+} *************** *** 84,87 **** --- 107,115 ---- # Return the 'n' padding on the right side of the strand + # + # --- + # *Arguments* + # * +s+: sequence with extraneous 'n' padding on the right side of the strand + # *Returns*:: +String+ the 'n' padding from the right side def right_padding( s ) s =~ %r{n+$} Index: single_strand.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** single_strand.rb 31 Dec 2006 21:50:31 -0000 1.2 --- single_strand.rb 1 Jan 2007 03:36:37 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- require 'bio/sequence' + module Bio; end class Bio::RestrictionEnzyme *************** *** 37,45 **** # The cut locations in enzyme notation. Contains a ! # CutLocationsInEnzymeNotation object. attr_reader :cut_locations_in_enzyme_notation # The cut locations transformed from enzyme index notation to 0-based ! # array index notation. Contains an Array attr_reader :cut_locations --- 38,47 ---- # The cut locations in enzyme notation. Contains a ! # CutLocationsInEnzymeNotation object set when the SingleStrand ! # object is initialized. attr_reader :cut_locations_in_enzyme_notation # The cut locations transformed from enzyme index notation to 0-based ! # array index notation. Contains an Array. attr_reader :cut_locations *************** *** 47,58 **** def orientation; [5,3]; end ! # +sequence+:: The enzyme sequence. ! # +c+:: Cut locations in enzyme notation. See CutLocationsInEnzymeNotation. # ! # * +sequence+ is required, +c+ is optional ! # * You cannot provide a sequence with cut symbols and provide cut locations. ! # * If +c+ is omitted, +input_pattern+ must contain a cut symbol. ! # * +sequence+ cannot contain adjacent cut symbols. # * +c+ is in enzyme index notation and therefore cannot contain a 0. # # +sequence+ must be a kind of: --- 49,67 ---- def orientation; [5,3]; end ! # Constructor for a Bio::RestrictionEnzyme::StingleStrand object. # ! # A single strand of restriction enzyme sequence pattern with a 5' to 3' orientation. ! # ! # --- ! # *Arguments* ! # * +sequence+: (_required_) The enzyme sequence. ! # * +c+: (_optional_) Cut locations in enzyme notation. ! # See Bio::RestrictionEnzyme::SingleStrand::CutLocationsInEnzymeNotation ! # ! # *Constraints* ! # * +sequence+ cannot contain immediately adjacent cut symbols (ex. atg^^c). # * +c+ is in enzyme index notation and therefore cannot contain a 0. + # * If +c+ is omitted, +sequence+ must contain a cut symbol. + # * You cannot provide both a sequence with cut symbols and provide cut locations - ambiguous. # # +sequence+ must be a kind of: *************** *** 62,69 **** # # +c+ must be a kind of: # * Integer, one or more # * Array - # * CutLocationsInEnzymeNotation # def initialize( sequence, *c ) c.flatten! # if an array was supplied as an argument --- 71,79 ---- # # +c+ must be a kind of: + # * Bio::RestrictionEnzyme::SingleStrand::CutLocationsInEnzymeNotation # * Integer, one or more # * Array # + # *Returns*:: nothing def initialize( sequence, *c ) c.flatten! # if an array was supplied as an argument *************** *** 80,83 **** --- 90,94 ---- super( pattern ) @cut_locations = @cut_locations_in_enzyme_notation.to_array_index + return end *************** *** 94,107 **** # TACGCAT # def palindromic? @stripped.reverse_complement == @stripped end ! # Pattern with no cut symbols and no 'n' padding. ! # * SingleStrand.new('garraxt', [-2, 1, 7]).stripped # "garraxt" attr_reader :stripped # The sequence with 'n' padding and cut symbols. # * SingleStrand.new('garraxt', [-2, 1, 7]).with_cut_symbols # => "n^ng^arraxt^n" def with_cut_symbols s = pattern --- 105,127 ---- # TACGCAT # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +true+ _or_ +false+ def palindromic? @stripped.reverse_complement == @stripped end ! # Sequence pattern with no cut symbols and no 'n' padding. ! # * SingleStrand.new('garraxt', [-2, 1, 7]).stripped # => "garraxt" attr_reader :stripped # The sequence with 'n' padding and cut symbols. # * SingleStrand.new('garraxt', [-2, 1, 7]).with_cut_symbols # => "n^ng^arraxt^n" + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: The sequence with 'n' padding and cut symbols. def with_cut_symbols s = pattern *************** *** 112,115 **** --- 132,140 ---- # The sequence with 'n' padding on the left and right for cuts larger than the sequence. # * SingleStrand.new('garraxt', [-2, 1, 7]).pattern # => "nngarraxtn" + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: The sequence with 'n' padding on the left and right for cuts larger than the sequence. def pattern return stripped if @cut_locations_in_enzyme_notation.min == nil *************** *** 117,121 **** # Add one more 'n' if a cut is at the last position ! right = (@cut_locations_in_enzyme_notation.max >= @stripped.length ? 'n' * (@cut_locations_in_enzyme_notation.max - @stripped.length + 1) : '') [left, stripped, right].to_s end --- 142,146 ---- # Add one more 'n' if a cut is at the last position ! right = ( (@cut_locations_in_enzyme_notation.max >= @stripped.length) ? ('n' * (@cut_locations_in_enzyme_notation.max - @stripped.length + 1)) : '') [left, stripped, right].to_s end *************** *** 123,139 **** # The sequence with 'n' pads, cut symbols, and spacing for alignment. # * SingleStrand.new('garraxt', [-2, 1, 7]).with_spaces # => "n^n g^a r r a x t^n" def with_spaces add_spacing( with_cut_symbols ) end - # FIXME recheck this - # NOTE: BEING WORKED ON, BUG EXISTS IN Bio::NucleicAcid - =begin - to_re - important - example z = [agc] - z must match [agcz] - not just [agc] - =end - ######### protected --- 148,160 ---- # The sequence with 'n' pads, cut symbols, and spacing for alignment. # * SingleStrand.new('garraxt', [-2, 1, 7]).with_spaces # => "n^n g^a r r a x t^n" + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: The sequence with 'n' pads, cut symbols, and spacing for alignment. def with_spaces add_spacing( with_cut_symbols ) end ######### protected *************** *** 142,146 **** def validate_args( input_pattern, input_cut_locations ) unless input_pattern.kind_of?(String) ! err = "input_pattern is not a String, Bio::Sequence::NA, or Bio::RestrictionEnzyme::SingleStrand::Sequence object\n" err += "pattern: #{input_pattern}\n" err += "class: #{input_pattern.class}" --- 163,167 ---- def validate_args( input_pattern, input_cut_locations ) unless input_pattern.kind_of?(String) ! err = "input_pattern is not a String, Bio::Sequence::NA, or Bio::RestrictionEnzyme::SingleStrand object\n" err += "pattern: #{input_pattern}\n" err += "class: #{input_pattern.class}" From trevor at dev.open-bio.org Sun Dec 31 22:36:39 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Mon, 01 Jan 2007 03:36:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/single_strand cut_locations_in_enzyme_notation.rb, 1.2, 1.3 Message-ID: <200701010336.l013adxq000756@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand In directory dev.open-bio.org:/tmp/cvs-serv728/lib/bio/util/restriction_enzyme/single_strand Modified Files: cut_locations_in_enzyme_notation.rb Log Message: Index: cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cut_locations_in_enzyme_notation.rb 31 Dec 2006 21:50:31 -0000 1.2 --- cut_locations_in_enzyme_notation.rb 1 Jan 2007 03:36:37 -0000 1.3 *************** *** 33,36 **** --- 33,42 ---- # # Enzyme index notation:: 1.._n_, value before 1 is -1 + # + # example:: [-3][-2][-1][1][2][3][4][5] + # + # Negative values are used to indicate when a cut may occur at a specified + # distance before the sequence begins. This would be padded with 'n' + # nucleotides to represent wildcards. # # Notes: *************** *** 38,43 **** # * +nil+ is not allowed here as it has no meaning # * +nil+ values are kept track of in DoubleStranded::CutLocations as they ! # need a reference point on the correlating strand. +nil+ represents no ! # cut or a partial digestion. # class CutLocationsInEnzymeNotation < Array --- 44,50 ---- # * +nil+ is not allowed here as it has no meaning # * +nil+ values are kept track of in DoubleStranded::CutLocations as they ! # need a reference point on the correlating strand. In ! # DoubleStranded::CutLocations +nil+ represents no cut or a partial ! # digestion. # class CutLocationsInEnzymeNotation < Array *************** *** 45,55 **** extend CutSymbol ! attr_reader :min, :max def initialize(*a) a.flatten! # in case an array was passed as an argument if a.size == 1 and a[0].kind_of? String and a[0] =~ re_cut_symbol ! # Initialize with a cut symbol pattern such as 'n^ng^arraxt^n' s = a[0] a = [] --- 52,77 ---- extend CutSymbol ! # First cut, in enzyme-index notation ! attr_reader :min ! ! # Last cut, in enzyme-index notation ! attr_reader :max + # Constructor for CutLocationsInEnzymeNotation + # + # --- + # *Arguments* + # * +a+: Locations of cuts represented as a string with cuts or an array of values + # Examples: + # * n^ng^arraxt^n + # * 2 + # * -1, 5 + # * [-1, 5] + # *Returns*:: nothing def initialize(*a) a.flatten! # in case an array was passed as an argument if a.size == 1 and a[0].kind_of? String and a[0] =~ re_cut_symbol ! # Initialize with a cut symbol pattern such as 'n^ng^arraxt^n' s = a[0] a = [] *************** *** 78,81 **** --- 100,107 ---- # [ -2, 1, 3 ] -> [ 0, 2, 4 ] # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Array+ of cuts in 0-based index notation def to_array_index return [] if @min == nil From k at dev.open-bio.org Tue Dec 12 23:57:44 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Tue, 12 Dec 2006 23:57:44 +0000 Subject: [BioRuby-cvs] bioruby/doc Design.rd.ja,1.7,NONE Message-ID: <200612122357.kBCNviTu005980@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv5976 Removed Files: Design.rd.ja Log Message: * obsoleted --- Design.rd.ja DELETED --- From k at dev.open-bio.org Tue Dec 12 23:58:06 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Tue, 12 Dec 2006 23:58:06 +0000 Subject: [BioRuby-cvs] bioruby/doc TODO.rd.ja,1.16,NONE Message-ID: <200612122358.kBCNw67S006004@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv6000 Removed Files: TODO.rd.ja Log Message: * obsoleted --- TODO.rd.ja DELETED --- From k at dev.open-bio.org Wed Dec 13 00:00:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Wed, 13 Dec 2006 00:00:17 +0000 Subject: [BioRuby-cvs] bioruby/doc BioRuby.rd.ja,1.10,NONE Message-ID: <200612130000.kBD00HAF006046@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv6042 Removed Files: BioRuby.rd.ja Log Message: * obsoleted --- BioRuby.rd.ja DELETED --- From ngoto at dev.open-bio.org Wed Dec 13 15:46:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 15:46:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.1,1.2 Message-ID: <200612131546.kBDFkUYH008108@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8064/db Modified Files: newick.rb Log Message: NHX (New Hampshire eXtended) input is supported by Bio::Newick class. Bio::PhylogeneticTree supports NHX output (as a string) by #output(:NHX). When outputs tree, indention can be specified by options. Many attributes are added to support Bio::PhylogeneticTree::Node and Bio::PhylogeneticTree::Edge. Node order in original Newick data is stored to Bio::PhylogeneticTree::Node#order_number. Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newick.rb 5 Oct 2006 13:38:22 -0000 1.1 --- newick.rb 13 Dec 2006 15:46:28 -0000 1.2 *************** *** 17,22 **** #+++ def __get_option(key, options) ! options[key] or (@options ? @options[key] : nil) end private :__get_option --- 17,31 ---- #+++ + DEFAULT_OPTIONS = + { :indent => ' ' } + def __get_option(key, options) ! if (r = options[key]) != nil then ! r ! elsif @options && (r = @options[key]) != nil then ! r ! else ! DEFAULT_OPTIONS[key] ! end end private :__get_option *************** *** 49,82 **** private :__to_newick_format_leaf # ! def __to_newick(parents, source, depth, options) result = [] ! indent0 = ' ' * depth ! indent = ' ' * (depth + 1) ! self.each_out_edge(source) do |src, tgt, edge| if parents.include?(tgt) then ;; elsif self.out_degree(tgt) == 1 then ! result << indent + __to_newick_format_leaf(tgt, edge, options) else result << ! __to_newick([ src ].concat(parents), tgt, depth + 1, options) + ! __to_newick_format_leaf(tgt, edge, options) end end ! indent0 + "(\n" + result.join(",\n") + ! (result.size > 0 ? "\n" : '') + indent0 + ')' end private :__to_newick # Returns a newick formatted string. ! def newick(options = {}) root = @root root ||= self.nodes.first return '();' unless root ! __to_newick([], root, 0, options) + __to_newick_format_leaf(root, Edge.new, options) + ";\n" end end #class PhylogeneticTree --- 58,212 ---- private :__to_newick_format_leaf + # formats leaf for NHX + def __to_newick_format_leaf_NHX(node, edge, options) + + label = get_node_name(node).to_s + + dist = get_edge_distance_string(edge) + + bs = get_node_bootstrap_string(node) + + if __get_option(:branch_length_style, options) == :disabled + dist = nil + end + + nhx = {} + + # bootstrap + nhx[:B] = bs if bs and !(bs.empty?) + # EC number + nhx[:E] = node.ec_number if node.instance_eval { + defined?(@ec_number) && self.ec_number + } + # scientific name + nhx[:S] = node.scientific_name if node.instance_eval { + defined?(@scientific_name) && self.scientific_name + } + # taxonomy id + nhx[:T] = node.taxonomy_id if node.instance_eval { + defined?(@taxonomy_id) && self.taxonomy_id + } + + # :D (gene duplication or speciation) + if node.instance_eval { defined?(@events) && !(self.events.empty?) } then + if node.events.include?(:gene_duplication) + nhx[:D] = 'Y' + elsif node.events.include?(:speciation) + nhx[:D] = 'N' + end + end + + # log likelihood + nhx[:L] = edge.log_likelihood if edge.instance_eval { + defined?(@log_likelihood) && self.log_likelihood } + # width + nhx[:W] = edge.width if edge.instance_eval { + defined?(@width) && self.width } + + # merges other parameters + flag = node.instance_eval { defined? @nhx_parameters } + nhx.merge!(node.nhx_parameters) if flag + flag = edge.instance_eval { defined? @nhx_parameters } + nhx.merge!(edge.nhx_parameters) if flag + + nhx_string = nhx.keys.sort{ |a,b| a.to_s <=> b.to_s }.collect do |key| + "#{key.to_s}=#{nhx[key].to_s}" + end.join(':') + nhx_string = "[&&NHX:" + nhx_string + "]" unless nhx_string.empty? + + label + (dist ? ":#{dist}" : '') + nhx_string + end + private :__to_newick_format_leaf_NHX + # ! def __to_newick(parents, source, depth, format_leaf, ! options, &block) result = [] ! if indent_string = __get_option(:indent, options) then ! indent0 = indent_string * depth ! indent = indent_string * (depth + 1) ! newline = "\n" ! else ! indent0 = indent = newline = '' ! end ! out_edges = self.out_edges(source) ! if block_given? then ! out_edges.sort! { |edge1, edge2| yield(edge1[1], edge2[1]) } ! else ! out_edges.sort! do |edge1, edge2| ! o1 = edge1[1].order_number ! o2 = edge2[1].order_number ! if o1 and o2 then ! o1 <=> o2 ! else ! edge1[1].name.to_s <=> edge2[1].name.to_s ! end ! end ! end ! out_edges.each do |src, tgt, edge| if parents.include?(tgt) then ;; elsif self.out_degree(tgt) == 1 then ! result << indent + __send__(format_leaf, tgt, edge, options) else result << ! __to_newick([ src ].concat(parents), tgt, depth + 1, ! format_leaf, options) + ! __send__(format_leaf, tgt, edge, options) end end ! indent0 + "(" + newline + result.join(',' + newline) + ! (result.size > 0 ? newline : '') + indent0 + ')' end private :__to_newick # Returns a newick formatted string. ! # If block is given, the order of the node is sorted ! # (as the same manner as Enumerable#sort). ! # Description about options. ! # :indent : indent string; set false to disable (default: ' ') ! # :bootstrap_style : :disabled disables bootstrap representations ! # :traditional traditional style ! # :molphy Molphy style (default) ! def output_newick(options = {}, &block) #:yields: node1, node2 root = @root root ||= self.nodes.first return '();' unless root ! __to_newick([], root, 0, :__to_newick_format_leaf, options, &block) + __to_newick_format_leaf(root, Edge.new, options) + ";\n" end + + alias newick output_newick + + + # Returns a NHX (New Hampshire eXtended) formatted string. + # If block is given, the order of the node is sorted + # (as the same manner as Enumerable#sort). + # Description about options. + # :indent : indent string; set false to disable (default: ' ') + def output_nhx(options = {}, &block) #:yields: node1, node2 + root = @root + root ||= self.nodes.first + return '();' unless root + __to_newick([], root, 0, + :__to_newick_format_leaf_NHX, options, &block) + + __to_newick_format_leaf_NHX(root, Edge.new, options) + + ";\n" + end + + # Returns formatted text (or something) of the tree + # Currently supported format is: :newick, :NHX + def output(format, *arg, &block) + case format + when :newick + output_newick(*arg, &block) + when :NHX + output_nhx(*arg, &block) + else + raise 'Unknown format' + end + end + end #class PhylogeneticTree *************** *** 105,114 **** # _options_ for parsing can be set. # ! # Note: molphy-style bootstrap values are always parsed, even if # the options[:bootstrap_style] is set to :traditional or :disabled. # Note: By default, if all of the internal node's names are numeric ! # and there are no molphy-style boostrap values, ! # the names are regarded as bootstrap values. ! # options[:bootstrap_style] = :disabled or :molphy to disable the feature. def initialize(str, options = nil) str = str.sub(/\;(.*)/m, ';') --- 235,245 ---- # _options_ for parsing can be set. # ! # Note: molphy-style bootstrap values may be parsed, even if # the options[:bootstrap_style] is set to :traditional or :disabled. # Note: By default, if all of the internal node's names are numeric ! # and there are no NHX and no molphy-style boostrap values, ! # the names of internal nodes are regarded as bootstrap values. ! # options[:bootstrap_style] = :disabled or :molphy to disable the feature ! # (or at least one NHX tag exists). def initialize(str, options = nil) str = str.sub(/\;(.*)/m, ';') *************** *** 155,167 **** # Parses newick formatted leaf (or internal node) name. ! def __parse_newick_leaf(str, node, edge) case str when /(.*)\:(.*)\[(.*)\]/ node.name = $1 edge.distance_string = $2 if $2 and !($2.strip.empty?) ! node.bootstrap_string = $3 if $3 and !($3.strip.empty?) when /(.*)\[(.*)\]/ node.name = $1 ! node.bootstrap_string = $2 if $2 and !($2.strip.empty?) when /(.*)\:(.*)/ node.name = $1 --- 286,300 ---- # Parses newick formatted leaf (or internal node) name. ! def __parse_newick_leaf(str, node, edge, options) case str when /(.*)\:(.*)\[(.*)\]/ node.name = $1 edge.distance_string = $2 if $2 and !($2.strip.empty?) ! # bracketted string into bstr ! bstr = $3 when /(.*)\[(.*)\]/ node.name = $1 ! # bracketted string into bstr ! bstr = $2 when /(.*)\:(.*)/ node.name = $1 *************** *** 170,173 **** --- 303,369 ---- node.name = str end + + # determines NHX or Molphy-style bootstrap + if bstr and !(bstr.strip.empty?) + case __get_option(:original_format, options) + when :nhx + # regarded as NHX string which might be broken + __parse_nhx(bstr, node, edge) + when :traditional + # simply ignored + else + case bstr + when /\A\&\&NHX/ + # NHX string + # force to set NHX mode + @options[:original_format] = :nhx + __parse_nhx(bstr, node, edge) + else + # Molphy-style boostrap values + # let molphy mode if nothing determined + @options[:original_format] ||= :molphy + node.bootstrap_string = bstr + end #case bstr + end + end + + # returns true + true + end + + # Parses NHX (New Hampshire eXtended) string + def __parse_nhx(bstr, node, edge) + a = bstr.split(/\:/) + a.shift if a[0] == '&&NHX' + a.each do |str| + tag, val = str.split(/\=/, 2) + case tag + when 'B' + node.bootstrap_string = val + when 'D' + case val + when 'Y' + node.events.push :gene_duplication + when 'N' + node.events.push :speciation + end + when 'E' + node.ec_number = val + when 'L' + edge.log_likelihood = val.to_f + when 'S' + node.scientific_name = val + when 'T' + node.taxonomy_id = val + when 'W' + edge.width = val.to_i + when 'XB' + edge.nhx_parameters[:XB] = val + when 'O', 'SO' + node.nhx_parameters[tag.to_sym] = val.to_i + else # :Co, :SN, :Sw, :XN, and others + node.nhx_parameters[tag.to_sym] = val + end + end #each true end *************** *** 215,219 **** next_token = ary[0] if next_token and next_token != ',' and next_token != ')' then ! __parse_newick_leaf(next_token, cur_node, edge) ary.shift end --- 411,415 ---- next_token = ary[0] if next_token and next_token != ',' and next_token != ')' then ! __parse_newick_leaf(next_token, cur_node, edge, options) ary.shift end *************** *** 226,230 **** leaf = Node.new edge = Edge.new ! __parse_newick_leaf(token, leaf, edge) nodes << leaf edges << Bio::Relation.new(cur_node, leaf, edge) --- 422,426 ---- leaf = Node.new edge = Edge.new ! __parse_newick_leaf(token, leaf, edge, options) nodes << leaf edges << Bio::Relation.new(cur_node, leaf, edge) *************** *** 234,250 **** raise ParseError, 'unmatched parentheses' unless node_stack.empty? bsopt = __get_option(:bootstrap_style, options) ! unless bsopt == :disabled or bsopt == :molphy then ! # If all of the internal node's names are numeric ! # and there are no molphy-style boostrap values, # the names are regarded as bootstrap values. flag = false internal_nodes.each do |node| - if node.bootstrap - unless __get_option(:bootstrap_style, options) == :traditional - @options[:bootstrap_style] = :molphy - end - flag = false - break - end if node.name and !node.name.to_s.strip.empty? then if /\A[\+\-]?\d*\.?\d*\z/ =~ node.name --- 430,440 ---- raise ParseError, 'unmatched parentheses' unless node_stack.empty? bsopt = __get_option(:bootstrap_style, options) ! ofmt = __get_option(:original_format, options) ! unless bsopt == :disabled or bsopt == :molphy or ! ofmt == :nhx or ofmt == :molphy then ! # If all of the internal node's names are numeric, # the names are regarded as bootstrap values. flag = false internal_nodes.each do |node| if node.name and !node.name.to_s.strip.empty? then if /\A[\+\-]?\d*\.?\d*\z/ =~ node.name *************** *** 258,261 **** --- 448,452 ---- if flag then @options[:bootstrap_style] = :traditional + @options[:original_format] = :traditional internal_nodes.each do |node| if node.name then *************** *** 266,274 **** end end # If the root implicitly prepared by the program is a leaf and # there are no additional information for the edge from the root to # the first internal node, the root is removed. if rel = edges[-1] and rel.node == [ root, internal_nodes[0] ] and ! rel.relation.instance_eval { !defined?(@distance) } and edges.find_all { |x| x.node.include?(root) }.size == 1 nodes.shift --- 457,471 ---- end end + # Sets nodes order numbers + nodes.each_with_index do |node, i| + node.order_number = i + end # If the root implicitly prepared by the program is a leaf and # there are no additional information for the edge from the root to # the first internal node, the root is removed. if rel = edges[-1] and rel.node == [ root, internal_nodes[0] ] and ! rel.relation.instance_eval { ! !defined?(@distance) and !defined?(@log_likelihood) and ! !defined?(@width) and !defined?(@nhx_parameters) } and edges.find_all { |x| x.node.include?(root) }.size == 1 nodes.shift From ngoto at dev.open-bio.org Wed Dec 13 15:46:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 15:46:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio phylogenetictree.rb,1.1,1.2 Message-ID: <200612131546.kBDFkUUO008111@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv8064 Modified Files: phylogenetictree.rb Log Message: NHX (New Hampshire eXtended) input is supported by Bio::Newick class. Bio::PhylogeneticTree supports NHX output (as a string) by #output(:NHX). When outputs tree, indention can be specified by options. Many attributes are added to support Bio::PhylogeneticTree::Node and Bio::PhylogeneticTree::Edge. Node order in original Newick data is stored to Bio::PhylogeneticTree::Node#order_number. Index: phylogenetictree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/phylogenetictree.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** phylogenetictree.rb 5 Oct 2006 13:38:21 -0000 1.1 --- phylogenetictree.rb 13 Dec 2006 15:46:28 -0000 1.2 *************** *** 74,77 **** --- 74,101 ---- @distance_string.to_s end + + #--- + # methods for NHX (New Hampshire eXtended) and/or PhyloXML + #+++ + + # log likelihood value (:L in NHX) + attr_accessor :log_likelihood + + # width of the edge + # ( of PhyloXML, or :W="w" in NHX) + attr_accessor :width + + # Other NHX parameters. Returns a Hash. + # Note that :L and :W + # are not stored here but stored in the proper attributes in this class. + # However, if you force to set these parameters in this hash, + # the parameters in this hash are preferred when generating NHX. + # In addition, If the same parameters are defined at Node object, + # the parameters in the node are preferred. + def nhx_parameters + @nhx_parameters ||= {} + @nhx_parameters + end + end #class Edge *************** *** 165,168 **** --- 189,229 ---- @name.to_s end + + # the order of the node + # (lower value, high priority) + attr_accessor :order_number + + #--- + # methods for NHX (New Hampshire eXtended) and/or PhyloXML + #+++ + + # Phylogenetic events. + # Returns an Array of one (or more?) of the following symbols + # :gene_duplication + # :speciation + def events + @events ||= [] + @events + end + + # EC number (EC_number in PhyloXML, or :E in NHX) + attr_accessor :ec_number + + # scientific name (scientific_name in PhyloXML, or :S in NHX) + attr_accessor :scientific_name + + # taxonomy identifier (taxonomy_identifier in PhyloXML, or :T in NHX) + attr_accessor :taxonomy_id + + # Other NHX parameters. Returns a Hash. + # Note that :D, :E, :S, and :T + # are not stored here but stored in the proper attributes in this class. + # However, if you force to set these parameters in this hash, + # the parameters in this hash are preferred when generating NHX. + def nhx_parameters + @nhx_parameters ||= {} + @nhx_parameters + end + end #class Node From ngoto at dev.open-bio.org Wed Dec 13 15:55:31 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 15:55:31 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.2,1.3 Message-ID: <200612131555.kBDFtVp3008178@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8158/lib/bio/db Modified Files: newick.rb Log Message: added "require bio/phylogenetictree" Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newick.rb 13 Dec 2006 15:46:28 -0000 1.2 --- newick.rb 13 Dec 2006 15:55:29 -0000 1.3 *************** *** 10,13 **** --- 10,15 ---- # + require 'bio/phylogenetictree' + module Bio class PhylogeneticTree From ngoto at dev.open-bio.org Wed Dec 13 16:01:37 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:01:37 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.70,1.71 Message-ID: <200612131601.kBDG1bBL008208@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv8186/lib Modified Files: bio.rb Log Message: added autoload of Bio::PhylogeneticTree and Bio::Newick. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** bio.rb 19 Sep 2006 05:41:45 -0000 1.70 --- bio.rb 13 Dec 2006 16:01:35 -0000 1.71 *************** *** 43,46 **** --- 43,48 ---- autoload :Alignment, 'bio/alignment' + ## PhylogeneticTree + autoload :PhylogeneticTree, 'bio/phylogenetictree' ## Map *************** *** 115,118 **** --- 117,121 ---- autoload :NBRF, 'bio/db/nbrf' + autoload :Newick, 'bio/db/newick' ### IO interface modules From ngoto at dev.open-bio.org Wed Dec 13 16:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.71,1.72 Message-ID: <200612131629.kBDGTduQ008839@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv8729/lib Modified Files: bio.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** bio.rb 13 Dec 2006 16:01:35 -0000 1.71 --- bio.rb 13 Dec 2006 16:29:36 -0000 1.72 *************** *** 43,48 **** autoload :Alignment, 'bio/alignment' ! ## PhylogeneticTree ! autoload :PhylogeneticTree, 'bio/phylogenetictree' ## Map --- 43,48 ---- autoload :Alignment, 'bio/alignment' ! ## Tree ! autoload :Tree, 'bio/tree' ## Map From ngoto at dev.open-bio.org Wed Dec 13 16:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.3,1.4 Message-ID: <200612131629.kBDGTdFZ008849@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8729/lib/bio/db Modified Files: newick.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newick.rb 13 Dec 2006 15:55:29 -0000 1.3 --- newick.rb 13 Dec 2006 16:29:37 -0000 1.4 *************** *** 10,17 **** # ! require 'bio/phylogenetictree' module Bio ! class PhylogeneticTree #--- --- 10,17 ---- # ! require 'bio/tree' module Bio ! class Tree #--- *************** *** 211,215 **** end ! end #class PhylogeneticTree #--- --- 211,215 ---- end ! end #class Tree #--- *************** *** 228,236 **** class ParseError < RuntimeError; end ! # same as Bio::PhylogeneticTree::Edge ! Edge = Bio::PhylogeneticTree::Edge ! # same as Bio::PhylogeneticTree::Node ! Node = Bio::PhylogeneticTree::Node # Creates a new Newick object. --- 228,236 ---- class ParseError < RuntimeError; end ! # same as Bio::Tree::Edge ! Edge = Bio::Tree::Edge ! # same as Bio::Tree::Node ! Node = Bio::Tree::Node # Creates a new Newick object. *************** *** 262,266 **** # Gets the tree. ! # Returns a Bio::PhylogeneticTree object. def tree if !defined?(@tree) --- 262,266 ---- # Gets the tree. ! # Returns a Bio::Tree object. def tree if !defined?(@tree) *************** *** 475,479 **** end # Let the tree into instance variables ! tree = Bio::PhylogeneticTree.new tree.instance_eval { @pathway.relations.concat(edges) --- 475,479 ---- end # Let the tree into instance variables ! tree = Bio::Tree.new tree.instance_eval { @pathway.relations.concat(edges) From ngoto at dev.open-bio.org Wed Dec 13 16:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_newick.rb,1.1,1.2 Message-ID: <200612131629.kBDGTduG008859@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv8729/test/unit/bio/db Modified Files: test_newick.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: test_newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_newick.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_newick.rb 5 Oct 2006 13:38:22 -0000 1.1 --- test_newick.rb 13 Dec 2006 16:29:37 -0000 1.2 *************** *** 17,21 **** require 'bio' ! require 'bio/phylogenetictree' require 'bio/db/newick' --- 17,21 ---- require 'bio' ! require 'bio/tree' require 'bio/db/newick' From ngoto at dev.open-bio.org Wed Dec 13 16:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.2,1.3 Message-ID: <200612131629.kBDGTd34008842@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv8729/lib/bio Modified Files: tree.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tree.rb 13 Dec 2006 15:46:28 -0000 1.2 --- tree.rb 13 Dec 2006 16:29:37 -0000 1.3 *************** *** 1,4 **** # ! # = bio/phylogenetictree.rb - phylogenetic tree data structure class # # Copyright:: Copyright (C) 2006 --- 1,4 ---- # ! # = bio/tree.rb - phylogenetic tree data structure class # # Copyright:: Copyright (C) 2006 *************** *** 21,25 **** # # This is alpha version. Incompatible changes may be made frequently. ! class PhylogeneticTree # Error when there are no path between specified nodes --- 21,25 ---- # # This is alpha version. Incompatible changes may be made frequently. ! class Tree # Error when there are no path between specified nodes *************** *** 255,259 **** # Creates a new phylogenetic tree. # When no arguments are given, it creates a new empty tree. ! # When a PhylogeneticTree object is given, it copies the tree. # Note that the new tree shares Node and Edge objects # with the given tree. --- 255,259 ---- # Creates a new phylogenetic tree. # When no arguments are given, it creates a new empty tree. ! # When a Tree object is given, it copies the tree. # Note that the new tree shares Node and Edge objects # with the given tree. *************** *** 499,503 **** # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a PhylogeneticTree object. # Note that the sub-tree shares Node and Edge objects # with the original tree. --- 499,503 ---- # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a Tree object. # Note that the sub-tree shares Node and Edge objects # with the original tree. *************** *** 524,528 **** # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a PhylogeneticTree object. # The result is unspecified for cyclic trees. # Note that the sub-tree shares Node and Edge objects --- 524,528 ---- # _nodes_ must be an array of nodes. # Nodes that do not exist in the original tree are ignored. ! # Returns a Tree object. # The result is unspecified for cyclic trees. # Note that the sub-tree shares Node and Edge objects *************** *** 551,555 **** # If the same edge exists, the edge in _other_ is used. # Returns self. ! # The result is unspecified if _other_ isn't a PhylogeneticTree object. # Note that the Node and Edge objects in the _other_ tree are # shared in the concatinated tree. --- 551,555 ---- # If the same edge exists, the edge in _other_ is used. # Returns self. ! # The result is unspecified if _other_ isn't a Tree object. # Note that the Node and Edge objects in the _other_ tree are # shared in the concatinated tree. *************** *** 816,820 **** self end ! end #class PhylogeneticTree end #module Bio --- 816,820 ---- self end ! end #class Tree end #module Bio From ngoto at dev.open-bio.org Wed Dec 13 16:29:39 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:29:39 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_tree.rb,1.2,1.3 Message-ID: <200612131629.kBDGTd1C008854@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv8729/test/unit/bio Modified Files: test_tree.rb Log Message: Bio::PhylogeneticTree is renamed to Bio::Tree and filenames are also renamed from phylogenetictree.rb to tree.rb and from test_phylogenetictree.rb to test_tree.rb. Index: test_tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_tree.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_tree.rb 6 Oct 2006 14:18:51 -0000 1.2 --- test_tree.rb 13 Dec 2006 16:29:37 -0000 1.3 *************** *** 1,4 **** # ! # = test/bio/test_phylogenetictree.rb - unit test for Bio::PhylogeneticTree # # Copyright:: Copyright (C) 2006 --- 1,4 ---- # ! # = test/bio/test_tree.rb - unit test for Bio::Tree # # Copyright:: Copyright (C) 2006 *************** *** 16,31 **** require 'bio' ! require 'bio/phylogenetictree' module Bio ! class TestPhylogeneticTreeEdge < Test::Unit::TestCase def setup ! @obj = Bio::PhylogeneticTree::Edge.new(123.45) end def test_initialize ! assert_nothing_raised { Bio::PhylogeneticTree::Edge.new } ! assert_equal(1.23, Bio::PhylogeneticTree::Edge.new(1.23).distance) ! assert_equal(12.3, Bio::PhylogeneticTree::Edge.new('12.3').distance) end --- 16,31 ---- require 'bio' ! require 'bio/tree' module Bio ! class TestTreeEdge < Test::Unit::TestCase def setup ! @obj = Bio::Tree::Edge.new(123.45) end def test_initialize ! assert_nothing_raised { Bio::Tree::Edge.new } ! assert_equal(1.23, Bio::Tree::Edge.new(1.23).distance) ! assert_equal(12.3, Bio::Tree::Edge.new('12.3').distance) end *************** *** 63,77 **** assert_equal("123.45", @obj.to_s) end ! end #class TestPhylogeneticTreeEdge ! class TestPhylogeneticTreeNode < Test::Unit::TestCase def setup ! @obj = Bio::PhylogeneticTree::Node.new end def test_initialize ! assert_nothing_raised { Bio::PhylogeneticTree::Node.new } a = nil ! assert_nothing_raised { a = Bio::PhylogeneticTree::Node.new('mouse') } assert_equal('mouse', a.name) end --- 63,77 ---- assert_equal("123.45", @obj.to_s) end ! end #class TestTreeEdge ! class TestTreeNode < Test::Unit::TestCase def setup ! @obj = Bio::Tree::Node.new end def test_initialize ! assert_nothing_raised { Bio::Tree::Node.new } a = nil ! assert_nothing_raised { a = Bio::Tree::Node.new('mouse') } assert_equal('mouse', a.name) end *************** *** 123,137 **** assert_equal('human', @obj.to_s) end ! end #class TestPhylogeneticTreeNode ! class TestPhylogeneticTree < Test::Unit::TestCase def setup ! @tree = Bio::PhylogeneticTree.new end def test_get_edge_distance ! edge = Bio::PhylogeneticTree::Edge.new assert_equal(nil, @tree.get_edge_distance(edge)) ! edge = Bio::PhylogeneticTree::Edge.new(12.34) assert_equal(12.34, @tree.get_edge_distance(edge)) assert_equal(12.34, @tree.get_edge_distance(12.34)) --- 123,137 ---- assert_equal('human', @obj.to_s) end ! end #class TestTreeNode ! class TestTree < Test::Unit::TestCase def setup ! @tree = Bio::Tree.new end def test_get_edge_distance ! edge = Bio::Tree::Edge.new assert_equal(nil, @tree.get_edge_distance(edge)) ! edge = Bio::Tree::Edge.new(12.34) assert_equal(12.34, @tree.get_edge_distance(edge)) assert_equal(12.34, @tree.get_edge_distance(12.34)) *************** *** 139,145 **** def test_get_edge_distance_string ! edge = Bio::PhylogeneticTree::Edge.new assert_equal(nil, @tree.get_edge_distance_string(edge)) ! edge = Bio::PhylogeneticTree::Edge.new(12.34) assert_equal("12.34", @tree.get_edge_distance_string(edge)) assert_equal("12.34", @tree.get_edge_distance_string(12.34)) --- 139,145 ---- def test_get_edge_distance_string ! edge = Bio::Tree::Edge.new assert_equal(nil, @tree.get_edge_distance_string(edge)) ! edge = Bio::Tree::Edge.new(12.34) assert_equal("12.34", @tree.get_edge_distance_string(edge)) assert_equal("12.34", @tree.get_edge_distance_string(12.34)) *************** *** 147,151 **** def test_get_node_name ! node = Bio::PhylogeneticTree::Node.new assert_equal(nil, @tree.get_node_name(node)) node.name = 'human' --- 147,151 ---- def test_get_node_name ! node = Bio::Tree::Node.new assert_equal(nil, @tree.get_node_name(node)) node.name = 'human' *************** *** 154,159 **** def test_initialize ! assert_nothing_raised { Bio::PhylogeneticTree.new } ! assert_nothing_raised { Bio::PhylogeneticTree.new(@tree) } end --- 154,159 ---- def test_initialize ! assert_nothing_raised { Bio::Tree.new } ! assert_nothing_raised { Bio::Tree.new(@tree) } end *************** *** 164,168 **** def test_root=() assert_equal(nil, @tree.root) ! node = Bio::PhylogeneticTree::Node.new @tree.root = node assert_equal(node, @tree.root) --- 164,168 ---- def test_root=() assert_equal(nil, @tree.root) ! node = Bio::Tree::Node.new @tree.root = node assert_equal(node, @tree.root) *************** *** 175,199 **** end ! end #class TestPhylogeneticTree ! class TestPhylogeneticTree2 < Test::Unit::TestCase def setup # Note that below data is NOT real. The distances are random. ! @tree = Bio::PhylogeneticTree.new ! @mouse = Bio::PhylogeneticTree::Node.new('mouse') ! @rat = Bio::PhylogeneticTree::Node.new('rat') ! @rodents = Bio::PhylogeneticTree::Node.new('rodents') ! @human = Bio::PhylogeneticTree::Node.new('human') ! @chimpanzee = Bio::PhylogeneticTree::Node.new('chimpanzee') ! @primates = Bio::PhylogeneticTree::Node.new('primates') ! @mammals = Bio::PhylogeneticTree::Node.new('mammals') @nodes = [ @mouse, @rat, @rodents, @human, @chimpanzee, @primates, @mammals ] ! @edge_rodents_mouse = Bio::PhylogeneticTree::Edge.new(0.0968) ! @edge_rodents_rat = Bio::PhylogeneticTree::Edge.new(0.1125) ! @edge_mammals_rodents = Bio::PhylogeneticTree::Edge.new(0.2560) ! @edge_primates_human = Bio::PhylogeneticTree::Edge.new(0.0386) ! @edge_primates_chimpanzee = Bio::PhylogeneticTree::Edge.new(0.0503) ! @edge_mammals_primates = Bio::PhylogeneticTree::Edge.new(0.2235) @edges = [ [ @rodents, @mouse, @edge_rodents_mouse ], --- 175,199 ---- end ! end #class TestTree ! class TestTree2 < Test::Unit::TestCase def setup # Note that below data is NOT real. The distances are random. ! @tree = Bio::Tree.new ! @mouse = Bio::Tree::Node.new('mouse') ! @rat = Bio::Tree::Node.new('rat') ! @rodents = Bio::Tree::Node.new('rodents') ! @human = Bio::Tree::Node.new('human') ! @chimpanzee = Bio::Tree::Node.new('chimpanzee') ! @primates = Bio::Tree::Node.new('primates') ! @mammals = Bio::Tree::Node.new('mammals') @nodes = [ @mouse, @rat, @rodents, @human, @chimpanzee, @primates, @mammals ] ! @edge_rodents_mouse = Bio::Tree::Edge.new(0.0968) ! @edge_rodents_rat = Bio::Tree::Edge.new(0.1125) ! @edge_mammals_rodents = Bio::Tree::Edge.new(0.2560) ! @edge_primates_human = Bio::Tree::Edge.new(0.0386) ! @edge_primates_chimpanzee = Bio::Tree::Edge.new(0.0503) ! @edge_mammals_primates = Bio::Tree::Edge.new(0.2235) @edges = [ [ @rodents, @mouse, @edge_rodents_mouse ], *************** *** 263,267 **** @tree.adjacent_nodes(@mammals).sort(&@by_id)) # test for not existed nodes ! assert_equal([], @tree.adjacent_nodes(Bio::PhylogeneticTree::Node.new)) end --- 263,267 ---- @tree.adjacent_nodes(@mammals).sort(&@by_id)) # test for not existed nodes ! assert_equal([], @tree.adjacent_nodes(Bio::Tree::Node.new)) end *************** *** 314,318 **** # test for not existed nodes ! assert_equal([], @tree.out_edges(Bio::PhylogeneticTree::Node.new)) end --- 314,318 ---- # test for not existed nodes ! assert_equal([], @tree.out_edges(Bio::Tree::Node.new)) end *************** *** 397,401 **** # test for not existed nodes flag = nil ! node = Bio::PhylogeneticTree::Node.new r = @tree.each_out_edge(node) do |src, tgt, edge| flag = true --- 397,401 ---- # test for not existed nodes flag = nil ! node = Bio::Tree::Node.new r = @tree.each_out_edge(node) do |src, tgt, edge| flag = true *************** *** 405,409 **** end ! end #class TestPhylogeneticTree2 end #module Bio --- 405,409 ---- end ! end #class TestTree2 end #module Bio From ngoto at dev.open-bio.org Wed Dec 13 16:58:41 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 16:58:41 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.16,1.17 Message-ID: <200612131658.kBDGwfYL009269@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv9231/lib/bio Modified Files: alignment.rb Log Message: changed RDoc Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** alignment.rb 30 Apr 2006 05:56:40 -0000 1.16 --- alignment.rb 13 Dec 2006 16:58:39 -0000 1.17 *************** *** 2,7 **** # = bio/alignment.rb - multiple alignment of sequences # ! # Copyright:: Copyright (C) 2003, 2005 ! # GOTO Naohisa # # License:: Ruby's --- 2,7 ---- # = bio/alignment.rb - multiple alignment of sequences # ! # Copyright:: Copyright (C) 2003, 2005, 2006 ! # GOTO Naohisa # # License:: Ruby's *************** *** 26,69 **** module Bio ! =begin rdoc ! ! = About Bio::Alignment ! ! Bio::Alignment is a namespace of classes/modules for multiple sequence ! alignment. ! ! = Multiple alignment container classes ! ! == Bio::Alignment::OriginalAlignment ! ! == Bio::Alignment::SequenceArray ! ! == Bio::Alignment::SequenceHash ! ! = Bio::Alignment::Site ! ! = Modules ! ! == Bio::Alignment::EnumerableExtension ! ! Mix-in for classes included Enumerable. ! ! == Bio::Alignment::ArrayExtension ! ! Mix-in for Array or Array-like classes. ! ! == Bio::Alignment::HashExtension ! ! Mix-in for Hash or Hash-like classes. ! ! == Bio::Alignment::SiteMethods ! ! == Bio::Alignment::PropertyMethods ! ! = Bio::Alignment::GAP ! ! = Compatibility from older BioRuby ! ! =end module Alignment --- 26,67 ---- module Bio ! # ! # = About Bio::Alignment ! # ! # Bio::Alignment is a namespace of classes/modules for multiple sequence ! # alignment. ! # ! # = Multiple alignment container classes ! # ! # == Bio::Alignment::OriginalAlignment ! # ! # == Bio::Alignment::SequenceArray ! # ! # == Bio::Alignment::SequenceHash ! # ! # = Bio::Alignment::Site ! # ! # = Modules ! # ! # == Bio::Alignment::EnumerableExtension ! # ! # Mix-in for classes included Enumerable. ! # ! # == Bio::Alignment::ArrayExtension ! # ! # Mix-in for Array or Array-like classes. ! # ! # == Bio::Alignment::HashExtension ! # ! # Mix-in for Hash or Hash-like classes. ! # ! # == Bio::Alignment::SiteMethods ! # ! # == Bio::Alignment::PropertyMethods ! # ! # = Bio::Alignment::GAP ! # ! # = Compatibility from older BioRuby ! # module Alignment From ngoto at dev.open-bio.org Wed Dec 13 17:29:20 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Wed, 13 Dec 2006 17:29:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.4,1.5 Message-ID: <200612131729.kBDHTKrR010219@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv10199/lib/bio/db Modified Files: newick.rb Log Message: output(:NHX) is changed to output(:nhx) Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** newick.rb 13 Dec 2006 16:29:37 -0000 1.4 --- newick.rb 13 Dec 2006 17:29:17 -0000 1.5 *************** *** 199,208 **** # Returns formatted text (or something) of the tree ! # Currently supported format is: :newick, :NHX def output(format, *arg, &block) case format when :newick output_newick(*arg, &block) ! when :NHX output_nhx(*arg, &block) else --- 199,208 ---- # Returns formatted text (or something) of the tree ! # Currently supported format is: :newick, :nhx def output(format, *arg, &block) case format when :newick output_newick(*arg, &block) ! when :nhx output_nhx(*arg, &block) else From ngoto at dev.open-bio.org Thu Dec 14 12:39:48 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 12:39:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.17,1.18 Message-ID: <200612141239.kBECdmPI013100@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv13080/lib/bio Modified Files: alignment.rb Log Message: Bio::Alignment::ClustalWFormatter was removed and methods were renemed and moved to Bio::Alignment::Output. Output of Phylip interleaved and non-interleaved and Molphy multiple alignment formats are supported. Some bug fix about ClustalW output about SequenceHash. Some changes in SequenceHash. Bio::Alignment::EnumerableExtension#sequnece_names are newly added. to_fasta and to_clustal methods are now obsoleted. Instead, please use output methods. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** alignment.rb 13 Dec 2006 16:58:39 -0000 1.17 --- alignment.rb 14 Dec 2006 12:39:45 -0000 1.18 *************** *** 623,627 **** elsif seqclass == Bio::Sequence::NA then amino = false ! elsif self.find { |x| /[EFILPQ]/i =~ x } then amino = true else --- 623,627 ---- elsif seqclass == Bio::Sequence::NA then amino = false ! elsif self.each_seq { |x| /[EFILPQ]/i =~ x } then amino = true else *************** *** 856,869 **** end #module EnumerableExtension ! # ClustalWFormatter is a module to create ClustalW-formatted text ! # from an alignment object. ! # ! # It will be obsoleted and the methods will be frequently changed. ! module ClustalWFormatter ! # Check whether there are same names. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def have_same_name?(array, len = 30) na30 = array.collect do |k| k.to_s.split(/[\x00\s]/)[0].to_s[0, len].gsub(/\:\;\,\(\)/, '_').to_s --- 856,882 ---- end #module EnumerableExtension ! module Output ! def output(format, *arg) ! case format ! when :clustal ! output_clustal(*arg) ! when :fasta ! output_fasta(*arg) ! when :phylip ! output_phylip(*arg) ! when :phylipnon ! output_phylipnon(*arg) ! when :molphy ! output_molphy(*arg) ! else ! raise "Unknown format: #{format.inspect}" ! end ! end ! ! # Check whether there are same names for ClustalW format. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def __clustal_have_same_name?(array, len = 30) na30 = array.collect do |k| k.to_s.split(/[\x00\s]/)[0].to_s[0, len].gsub(/\:\;\,\(\)/, '_').to_s *************** *** 892,904 **** end end ! private :have_same_name? ! # Changes sequence names if there are conflicted names. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def avoid_same_name(array, len = 30) na = array.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } ! if dupidx = have_same_name?(na, len) procs = [ Proc.new { |s, i| --- 905,918 ---- end end ! private :__clustal_have_same_name? ! # Changes sequence names if there are conflicted names ! # for ClustalW format. # # array:: names of the sequences (array of string) # len:: length to check (default:30) ! def __clustal_avoid_same_name(array, len = 30) na = array.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } ! if dupidx = __clustal_have_same_name?(na, len) procs = [ Proc.new { |s, i| *************** *** 914,918 **** na[i] = pr.call(s.to_s, i) end ! dupidx = have_same_name?(na, len) break unless dupidx end --- 928,932 ---- na[i] = pr.call(s.to_s, i) end ! dupidx = __clustal_have_same_name?(na, len) break unless dupidx end *************** *** 925,929 **** na end ! private :avoid_same_name # Generates ClustalW-formatted text --- 939,943 ---- na end ! private :__clustal_avoid_same_name # Generates ClustalW-formatted text *************** *** 931,935 **** # names:: names of the sequences # options:: options ! def clustalw_formatter(seqs, names, options = {}) #(original) aln = [ "CLUSTAL (0.00) multiple sequence alignment\n\n" ] --- 945,949 ---- # names:: names of the sequences # options:: options ! def __clustal_formatter(seqs, names, options = {}) #(original) aln = [ "CLUSTAL (0.00) multiple sequence alignment\n\n" ] *************** *** 946,950 **** end if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] ! sn = avoid_same_name(sn) end --- 960,964 ---- end if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] ! sn = __clustal_avoid_same_name(sn) end *************** *** 971,976 **** mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = seqs.collect do |s| ! s.to_s.gsub(seqs.gap_regexp, gchar) end case options[:case].to_s --- 985,991 ---- mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = Array.new(seqs.size).clear ! seqs.each_seq do |s| ! aseqs << s.to_s.gsub(seqs.gap_regexp, gchar) end case options[:case].to_s *************** *** 1006,1012 **** aln.join('') end ! private :clustalw_formatter ! end #module ClustalWFormatter # Bio::Alignment::ArrayExtension is a set of useful methods for --- 1021,1190 ---- aln.join('') end ! private :__clustal_formatter ! ! # Generates ClustalW-formatted text ! # seqs:: sequences (must be an alignment object) ! # names:: names of the sequences ! # options:: options ! def output_clustal(options = {}) ! __clustal_formatter(self, self.sequence_names, options) ! end ! ! # to_clustal is deprecated. Instead, please use output_clustal. ! #--- ! #alias to_clustal output_clustal ! #+++ ! def to_clustal(*arg) ! warn "to_clustal is deprecated. Please use output_clustal." ! output_clustal(*arg) ! end ! ! # Generates fasta format text and returns a string. ! def output_fasta(options={}) ! #(original) ! width = (options[:width] or 70) ! if options[:avoid_same_name] then ! na = __clustal_avoid_same_name(self.sequence_names, 30) ! else ! na = self.sequence_names.collect do |k| ! k.to_s.gsub(/[\r\n\x00]/, ' ') ! end ! end ! if width and width > 0 then ! w_reg = Regexp.new(".{1,#{width}}") ! self.collect do |s| ! ">#{na.shift}\n" + s.to_s.gsub(w_reg, "\\0\n") ! end.join('') ! else ! self.collect do |s| ! ">#{na.shift}\n" + s.to_s + "\n" ! end.join('') ! end ! end ! ! # generates phylip interleaved alignment format as a string ! def output_phylip(options = {}) ! aln, aseqs, lines = __output_phylip_common(options) ! lines.times do ! aseqs.each { |a| aln << a.shift } ! aln << "\n" ! end ! aln.pop if aln[-1] == "\n" ! aln.join('') ! end ! ! # generates Phylip3.2 (old) non-interleaved format as a string ! def output_phylipnon(options = {}) ! aln, aseqs, lines = __output_phylip_common(options) ! aln.first + aseqs.join('') ! end + # common routine for interleaved/non-interleaved phylip format + def __output_phylip_common(options = {}) + len = self.alignment_length + aln = [ " #{self.size} #{len}\n" ] + sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } + if options[:replace_space] + sn.collect! { |x| x.gsub(/\s/, '_') } + end + if !options.has_key?(:escape) or options[:escape] + sn.collect! { |x| x.gsub(/[\:\;\,\(\)]/, '_') } + end + if !options.has_key?(:split) or options[:split] + sn.collect! { |x| x.split(/\s/)[0].to_s } + end + if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] + sn = __clustal_avoid_same_name(sn, 10) + end + + namewidth = 10 + seqwidth = (options[:width] or 60) + seqwidth = seqwidth.div(10) * 10 + seqregexp = Regexp.new("(.{1,#{seqwidth.div(10) * 11}})") + gchar = (options[:gap_char] or '-') + + aseqs = Array.new(len).clear + self.each_seq do |s| + aseqs << s.to_s.gsub(self.gap_regexp, gchar) + end + case options[:case].to_s + when /lower/i + aseqs.each { |s| s.downcase! } + when /upper/i + aseqs.each { |s| s.upcase! } + end + + aseqs.collect! do |s| + snx = sn.shift + head = sprintf("%*s", -namewidth, snx.to_s)[0, namewidth] + head2 = ' ' * namewidth + s << (gchar * (len - s.length)) + s.gsub!(/(.{1,10})/n, " \\1") + s.gsub!(seqregexp, "\\1\n") + a = s.split(/^/) + head += a.shift + ret = a.collect { |x| head2 + x } + ret.unshift(head) + ret + end + lines = (len + seqwidth - 1).div(seqwidth) + [ aln, aseqs, lines ] + end + + # Generates Molphy alignment format text as a string + def output_molphy(options = {}) + len = self.alignment_length + header = "#{self.size} #{len}\n" + sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } + if options[:replace_space] + sn.collect! { |x| x.gsub(/\s/, '_') } + end + if !options.has_key?(:escape) or options[:escape] + sn.collect! { |x| x.gsub(/[\:\;\,\(\)]/, '_') } + end + if !options.has_key?(:split) or options[:split] + sn.collect! { |x| x.split(/\s/)[0].to_s } + end + if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] + sn = __clustal_avoid_same_name(sn, 30) + end + + seqwidth = (options[:width] or 60) + seqregexp = Regexp.new("(.{1,#{seqwidth}})") + gchar = (options[:gap_char] or '-') + + aseqs = Array.new(len).clear + self.each_seq do |s| + aseqs << s.to_s.gsub(self.gap_regexp, gchar) + end + case options[:case].to_s + when /lower/i + aseqs.each { |s| s.downcase! } + when /upper/i + aseqs.each { |s| s.upcase! } + end + + aseqs.collect! do |s| + s << (gchar * (len - s.length)) + s.gsub!(seqregexp, "\\1\n") + sn.shift + "\n" + s + end + aseqs.unshift(header) + aseqs.join('') + end + end #module Output + + module EnumerableExtension + include Output + + # Returns an array of sequence names. + # The order of the names must be the same as + # the order of each_seq. + def sequence_names + i = 0 + self.each_seq { |s| i += 1 } + (0...i).to_a + end + end #module EnumerableExtension # Bio::Alignment::ArrayExtension is a set of useful methods for *************** *** 1028,1037 **** each(&block) end - - include ClustalWFormatter - # Returns a string of Clustal W formatted text of the alignment. - def to_clustal(options = {}) - clustalw_formatter(self, (0...(self.size)).to_a, options) - end end #module ArrayExtension --- 1206,1209 ---- *************** *** 1060,1065 **** # # It works the same as Hash#each_value. ! def each_seq(&block) #:yields: seq ! each_value(&block) end --- 1232,1238 ---- # # It works the same as Hash#each_value. ! def each_seq #:yields: seq ! #each_value(&block) ! each_key { |k| yield self[k] } end *************** *** 1123,1135 **** end ! include ClustalWFormatter ! # Returns a string of Clustal W formatted text of the alignment. ! def to_clustal(options = {}) ! seqs = SequenceArray.new ! names = self.keys ! names.each do |k| ! seqs << self[k] ! end ! clustalw_formatter(seqs, names, options) end end #module HashExtension --- 1296,1304 ---- end ! # Returns an array of sequence names. ! # The order of the names must be the same as ! # the order of each_seq. ! def sequence_names ! self.keys end end #module HashExtension *************** *** 1783,1787 **** width = options[:width] unless width if options[:avoid_same_name] then ! na = avoid_same_name(self.keys, 30) else na = self.keys.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } --- 1952,1956 ---- width = options[:width] unless width if options[:avoid_same_name] then ! na = __clustal_avoid_same_name(self.keys, 30) else na = self.keys.collect { |k| k.to_s.gsub(/[\r\n\x00]/, ' ') } *************** *** 1814,1828 **** # # The specification of the argument will be changed. def to_fasta(*arg) #(original) self.to_fasta_array(*arg).join('') end - include ClustalWFormatter - # Returns a string of Clustal W formatted text of the alignment. - def to_clustal(options = {}) - clustalw_formatter(self, self.keys, options) - end - # The method name consensus will be obsoleted. # Please use consensus_string instead. --- 1983,1995 ---- # # The specification of the argument will be changed. + # + # Note: to_fasta is deprecated. + # Please use output_fasta instead. def to_fasta(*arg) #(original) + warn "to_fasta is deprecated. Please use output_fasta." self.to_fasta_array(*arg).join('') end # The method name consensus will be obsoleted. # Please use consensus_string instead. From ngoto at dev.open-bio.org Thu Dec 14 14:10:59 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 14:10:59 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_alignment.rb,1.7,1.8 Message-ID: <200612141410.kBEEAxCp013352@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv13312/test/unit/bio Modified Files: test_alignment.rb Log Message: Unit tests changed following the changes of Bio::Alignment. Index: test_alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_alignment.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_alignment.rb 24 Jan 2006 14:11:34 -0000 1.7 --- test_alignment.rb 14 Dec 2006 14:10:57 -0000 1.8 *************** *** 545,576 **** end #class TestAlignmentEnumerableExtension ! class TestAlignmentClustalWFormatter < Test::Unit::TestCase def setup @obj = Object.new ! @obj.extend(Alignment::ClustalWFormatter) end ! def test_have_same_name_true assert_equal([ 0, 1 ], @obj.instance_eval { ! have_same_name?([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end def test_have_same_name_false assert_equal(false, @obj.instance_eval { ! have_same_name?([ 'GTP ATG', 'ATP ATA', 'BBB' ]) }) end def test_avoid_same_name assert_equal([ 'ATP_ATG', 'ATP_ATA', 'BBB' ], ! @obj.instance_eval { ! avoid_same_name([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end def test_avoid_same_name_numbering assert_equal([ '0_ATP', '1_ATP', '2_BBB' ], ! @obj.instance_eval { ! avoid_same_name([ 'ATP', 'ATP', 'BBB' ]) }) end ! end #class TestAlignmentClustalWFormatter --- 545,577 ---- end #class TestAlignmentEnumerableExtension ! class TestAlignmentOutput < Test::Unit::TestCase def setup @obj = Object.new ! @obj.extend(Alignment::Output) end ! def test_clustal_have_same_name_true assert_equal([ 0, 1 ], @obj.instance_eval { ! __clustal_have_same_name?([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end def test_have_same_name_false assert_equal(false, @obj.instance_eval { ! __clustal_have_same_name?([ 'GTP ATG', 'ATP ATA', 'BBB' ]) }) end def test_avoid_same_name assert_equal([ 'ATP_ATG', 'ATP_ATA', 'BBB' ], ! @obj.instance_eval { ! __clustal_avoid_same_name([ 'ATP ATG', 'ATP ATA', 'BBB' ]) }) end + def test_avoid_same_name_numbering assert_equal([ '0_ATP', '1_ATP', '2_BBB' ], ! @obj.instance_eval { ! __clustal_avoid_same_name([ 'ATP', 'ATP', 'BBB' ]) }) end ! end #class TestAlignmentOutput From ngoto at dev.open-bio.org Thu Dec 14 14:11:56 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 14:11:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.18,1.19 Message-ID: <200612141411.kBEEBuxZ013380@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv13360/lib/bio Modified Files: alignment.rb Log Message: fixed mistaken amino distingushing routine in match_line. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** alignment.rb 14 Dec 2006 12:39:45 -0000 1.18 --- alignment.rb 14 Dec 2006 14:11:54 -0000 1.19 *************** *** 623,630 **** elsif seqclass == Bio::Sequence::NA then amino = false - elsif self.each_seq { |x| /[EFILPQ]/i =~ x } then - amino = true else amino = nil end end --- 623,634 ---- elsif seqclass == Bio::Sequence::NA then amino = false else amino = nil + self.each_seq do |x| + if /[EFILPQ]/i =~ x + amino = true + break + end + end end end From ngoto at dev.open-bio.org Thu Dec 14 14:54:53 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 14:54:53 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.11, 1.12 mafft.rb, 1.11, 1.12 sim4.rb, 1.6, 1.7 Message-ID: <200612141454.kBEEsqG1013493@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv13473/lib/bio/appl Modified Files: clustalw.rb mafft.rb sim4.rb Log Message: Changed to use Bio::Command in bio/command.rb instead of Open3.popen3. Bio::(ClustalW|MAFFT|Sim4)#option is changed to #options. Bio::ClustalW::errorlog and Bio::(MAFFT|Sim4)#log are deprecated and there are no replacements for the methods. Index: sim4.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/sim4.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sim4.rb 30 Apr 2006 05:50:19 -0000 1.6 --- sim4.rb 14 Dec 2006 14:54:50 -0000 1.7 *************** *** 16,21 **** # - require 'open3' require 'tempfile' module Bio --- 16,21 ---- # require 'tempfile' + require 'bio/command' module Bio *************** *** 30,41 **** # [+database+] Default file name of database('seq2'). # [+option+] Options (array of strings). ! def initialize(program = 'sim4', database = nil, option = []) @program = program ! @option = option @database = database #seq2 @command = nil @output = nil @report = nil - @log = nil end --- 30,40 ---- # [+database+] Default file name of database('seq2'). # [+option+] Options (array of strings). ! def initialize(program = 'sim4', database = nil, opt = []) @program = program ! @options = opt @database = database #seq2 @command = nil @output = nil @report = nil end *************** *** 47,57 **** # options ! attr_reader :option # last command-line strings executed by the object attr_reader :command # last messages of program reported to the STDERR ! attr_reader :log # last result text (String) --- 46,70 ---- # options ! attr_accessor :options ! ! # option is deprecated. Instead, please use options. ! def option ! warn "option is deprecated. Please use options." ! options ! end # last command-line strings executed by the object attr_reader :command + #--- # last messages of program reported to the STDERR ! #attr_reader :log ! #+++ ! ! #log is deprecated (no replacement) and returns empty string. ! def log ! warn "log is deprecated (no replacement) and returns empty string." ! '' ! end # last result text (String) *************** *** 97,112 **** @command = [ @program, filename1, (filename2 or @database), *@option ] @output = nil - @log = nil @report = nil ! Open3.popen3(*@command) do |din, dout, derr| ! din.close ! derr.sync = true ! t = Thread.start { @log = derr.read } ! begin ! @output = dout.read ! @report = Bio::Sim4::Report.new(@output) ! ensure ! t.join ! end end @report --- 110,118 ---- @command = [ @program, filename1, (filename2 or @database), *@option ] @output = nil @report = nil ! Bio::Command.call_command(*@command) do |io| ! io.close_write ! @output = io.read ! @report = Bio::Sim4::Report.new(@output) end @report Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** clustalw.rb 30 Apr 2006 05:50:19 -0000 1.11 --- clustalw.rb 14 Dec 2006 14:54:50 -0000 1.12 *************** *** 24,29 **** require 'tempfile' - require 'open3' require 'bio/sequence' require 'bio/alignment' --- 24,29 ---- require 'tempfile' + require 'bio/command' require 'bio/sequence' require 'bio/alignment' *************** *** 39,45 **** # Creates a new CLUSTAL W execution wrapper object (alignment factory). ! def initialize(program = 'clustalw', option = []) @program = program ! @option = option @command = nil @output = nil --- 39,45 ---- # Creates a new CLUSTAL W execution wrapper object (alignment factory). ! def initialize(program = 'clustalw', opt = []) @program = program ! @options = opt @command = nil @output = nil *************** *** 52,56 **** # options ! attr_accessor :option # Returns last command-line strings executed by this factory. --- 52,62 ---- # options ! attr_accessor :options ! ! # option is deprecated. Instead, please use options. ! def option ! warn "option is deprecated. Please use options." ! options ! end # Returns last command-line strings executed by this factory. *************** *** 144,149 **** attr_reader :output_dnd # Returns last error messages (to stderr) of CLUSTAL W execution. ! attr_reader :errorlog private --- 150,162 ---- attr_reader :output_dnd + #--- # Returns last error messages (to stderr) of CLUSTAL W execution. ! #attr_reader :errorlog ! #+++ ! #errorlog is deprecated (no replacement) and returns empty string. ! def errorlog ! warn "errorlog is deprecated (no replacement) and returns empty string." ! '' ! end private *************** *** 154,170 **** @log = nil ! Open3.popen3(*@command) do |din, dout, derr| ! din.close ! t = Thread.start do ! @errorlog = derr.read ! end @log = dout.read t.join end - # @command_string = @command.join(" ") - # IO.popen(@command, "r") do |io| - # io.sync = true - # @log = io.read - # end @log end --- 167,175 ---- @log = nil ! Bio::Command.call_command(*@command) do |io| ! io.close_write @log = dout.read t.join end @log end Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mafft.rb 25 Sep 2006 08:09:22 -0000 1.11 --- mafft.rb 14 Dec 2006 14:54:50 -0000 1.12 *************** *** 24,36 **** # require 'bio/db/fasta' require 'bio/io/flatfile' - #-- - # We use Open3.popen3, because MAFFT on win32 requires Cygwin. - #++ - require 'open3' - require 'tempfile' - module Bio --- 24,34 ---- # + require 'tempfile' + + require 'bio/command' + require 'bio/db/fasta' require 'bio/io/flatfile' module Bio *************** *** 108,118 **** # +program+ is the name of the program. # +opt+ is options of the program. ! def initialize(program, option) @program = program ! @option = option @command = nil @output = nil @report = nil - @log = nil end --- 106,115 ---- # +program+ is the name of the program. # +opt+ is options of the program. ! def initialize(program, opt) @program = program ! @options = opt @command = nil @output = nil @report = nil end *************** *** 121,125 **** # options ! attr_accessor :option # Shows last command-line string. Returns nil or an array of String. --- 118,128 ---- # options ! attr_accessor :options ! ! # option is deprecated. Instead, please use options. ! def option ! warn "option is deprecated. Please use options." ! options ! end # Shows last command-line string. Returns nil or an array of String. *************** *** 128,133 **** attr_reader :command # last message to STDERR when executing the program. ! attr_reader :log # Shows latest raw alignment result. --- 131,144 ---- attr_reader :command + #--- # last message to STDERR when executing the program. ! #attr_reader :log ! #+++ ! ! #log is deprecated (no replacement) and returns empty string. ! def log ! warn "log is deprecated (no replacement) and returns empty string." ! '' ! end # Shows latest raw alignment result. *************** *** 189,204 **** #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! @log = nil ! Open3.popen3(*@command) do |din, dout, derr| ! din.close ! derr.sync = true ! t = Thread.start do ! @log = derr.read ! end ! ff = Bio::FlatFile.new(Bio::FastaFormat, dout) @output = ff.to_a - t.join end - @log end --- 200,208 ---- #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! Bio::Command.call_command(*@command) do |io| ! io.close_write ! ff = Bio::FlatFile.new(Bio::FastaFormat, io) @output = ff.to_a end end From ngoto at dev.open-bio.org Thu Dec 14 15:09:01 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:09:01 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.19,1.20 Message-ID: <200612141509.kBEF91un013590@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv13570/lib/bio Modified Files: alignment.rb Log Message: EnumerableExtension#number_of_sequences are added and some methods are modifed to use it. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** alignment.rb 14 Dec 2006 14:11:54 -0000 1.19 --- alignment.rb 14 Dec 2006 15:08:59 -0000 1.20 *************** *** 989,993 **** mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = Array.new(seqs.size).clear seqs.each_seq do |s| aseqs << s.to_s.gsub(seqs.gap_regexp, gchar) --- 989,993 ---- mline = (options[:match_line] or seqs.match_line(mopt)) ! aseqs = Array.new(seqs.number_of_sequences).clear seqs.each_seq do |s| aseqs << s.to_s.gsub(seqs.gap_regexp, gchar) *************** *** 1087,1091 **** def __output_phylip_common(options = {}) len = self.alignment_length ! aln = [ " #{self.size} #{len}\n" ] sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] --- 1087,1091 ---- def __output_phylip_common(options = {}) len = self.alignment_length ! aln = [ " #{self.number_of_sequences} #{len}\n" ] sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] *************** *** 1108,1112 **** gchar = (options[:gap_char] or '-') ! aseqs = Array.new(len).clear self.each_seq do |s| aseqs << s.to_s.gsub(self.gap_regexp, gchar) --- 1108,1112 ---- gchar = (options[:gap_char] or '-') ! aseqs = Array.new(self.number_of_sequences).clear self.each_seq do |s| aseqs << s.to_s.gsub(self.gap_regexp, gchar) *************** *** 1139,1143 **** def output_molphy(options = {}) len = self.alignment_length ! header = "#{self.size} #{len}\n" sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] --- 1139,1143 ---- def output_molphy(options = {}) len = self.alignment_length ! header = "#{self.number_of_sequences} #{len}\n" sn = self.sequence_names.collect { |x| x.to_s.gsub(/[\r\n\x00]/, ' ') } if options[:replace_space] *************** *** 1182,1192 **** include Output # Returns an array of sequence names. # The order of the names must be the same as # the order of each_seq. def sequence_names ! i = 0 ! self.each_seq { |s| i += 1 } ! (0...i).to_a end end #module EnumerableExtension --- 1182,1197 ---- include Output + # Returns number of sequences in this alignment. + def number_of_sequences + i = 0 + self.each_seq { |s| i += 1 } + i + end + # Returns an array of sequence names. # The order of the names must be the same as # the order of each_seq. def sequence_names ! (0...(self.number_of_sequences)).to_a end end #module EnumerableExtension *************** *** 1210,1213 **** --- 1215,1223 ---- each(&block) end + + # Returns number of sequences in this alignment. + def number_of_sequences + self.size + end end #module ArrayExtension *************** *** 1300,1303 **** --- 1310,1318 ---- end + # Returns number of sequences in this alignment. + def number_of_sequences + self.size + end + # Returns an array of sequence names. # The order of the names must be the same as *************** *** 1579,1582 **** --- 1594,1598 ---- @seqs.size end + alias number_of_sequences size # If the key exists, returns true. Otherwise, returns false. From ngoto at dev.open-bio.org Thu Dec 14 15:22:07 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:22:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/clustalw report.rb,1.10,1.11 Message-ID: <200612141522.kBEFM7ni013826@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/clustalw In directory dev.open-bio.org:/tmp/cvs-serv13804/lib/bio/appl/clustalw Modified Files: report.rb Log Message: Bio::(ClustalW|MAFFT)::Report#algin is deprecated. Instead, please use #alignment method. Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw/report.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** report.rb 30 Apr 2006 05:50:19 -0000 1.10 --- report.rb 14 Dec 2006 15:22:05 -0000 1.11 *************** *** 82,95 **** # Gets an multiple alignment. # Returns a Bio::Alignment object. ! def align do_parse() unless @align @align end ! alias alignment align # Gets an fasta-format string of the sequences. # Returns a string. def to_fasta(*arg) ! align.to_fasta(*arg) end --- 82,103 ---- # Gets an multiple alignment. # Returns a Bio::Alignment object. ! def alignment do_parse() unless @align @align end ! ! # This will be deprecated. Instead, please use alignment. ! # ! # Gets an multiple alignment. ! # Returns a Bio::Alignment object. ! def align ! warn "align method will be deprecated. Please use \'alignment\'." ! alignment ! end # Gets an fasta-format string of the sequences. # Returns a string. def to_fasta(*arg) ! alignment.to_fasta(*arg) end *************** *** 97,101 **** # Returns an array of Bio::FastaFormat objects. def to_a ! align.to_fastaformat_array end --- 105,109 ---- # Returns an array of Bio::FastaFormat objects. def to_a ! alignment.to_fastaformat_array end From ngoto at dev.open-bio.org Thu Dec 14 15:22:07 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:22:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/mafft report.rb,1.9,1.10 Message-ID: <200612141522.kBEFM7vN013829@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/mafft In directory dev.open-bio.org:/tmp/cvs-serv13804/lib/bio/appl/mafft Modified Files: report.rb Log Message: Bio::(ClustalW|MAFFT)::Report#algin is deprecated. Instead, please use #alignment method. Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft/report.rb,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** report.rb 30 Apr 2006 05:50:19 -0000 1.9 --- report.rb 14 Dec 2006 15:22:05 -0000 1.10 *************** *** 67,76 **** # Gets an multiple alignment. ! # Returns an instance of Bio::Alignment class. ! def align do_parse() unless @align @align end ! alias alignment align # Gets an fasta-format string of the sequences. --- 67,84 ---- # Gets an multiple alignment. ! # Returns a Bio::Alignment object. ! def alignment do_parse() unless @align @align end ! ! # This will be deprecated. Instead, please use alignment. ! # ! # Gets an multiple alignment. ! # Returns a Bio::Alignment object. ! def align ! warn "align method will be deprecated. Please use \'alignment\'." ! alignment ! end # Gets an fasta-format string of the sequences. *************** *** 79,83 **** # Please refer to Bio::Alignment#to_fasta for arguments. def to_fasta(*arg) ! align.to_fasta(*arg) end --- 87,91 ---- # Please refer to Bio::Alignment#to_fasta for arguments. def to_fasta(*arg) ! alignment.to_fasta(*arg) end From ngoto at dev.open-bio.org Thu Dec 14 15:56:25 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:56:25 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.12, 1.13 mafft.rb, 1.12, 1.13 sim4.rb, 1.7, 1.8 Message-ID: <200612141556.kBEFuPd7014039@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14019/lib/bio/appl Modified Files: clustalw.rb mafft.rb sim4.rb Log Message: forggoten to change @option into @options Index: sim4.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/sim4.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sim4.rb 14 Dec 2006 14:54:50 -0000 1.7 --- sim4.rb 14 Dec 2006 15:56:22 -0000 1.8 *************** *** 108,112 **** # If filename2 is not specified, using self.database. def exec_local(filename1, filename2 = nil) ! @command = [ @program, filename1, (filename2 or @database), *@option ] @output = nil @report = nil --- 108,112 ---- # If filename2 is not specified, using self.database. def exec_local(filename1, filename2 = nil) ! @command = [ @program, filename1, (filename2 or @database), *@options ] @output = nil @report = nil Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** clustalw.rb 14 Dec 2006 14:54:50 -0000 1.12 --- clustalw.rb 14 Dec 2006 15:56:22 -0000 1.13 *************** *** 83,87 **** query_align(seqs) else ! exec_local(@option) end end --- 83,87 ---- query_align(seqs) else ! exec_local(@options) end end *************** *** 135,139 **** ] opt << "-type=#{seqtype}" if seqtype ! opt.concat(@option) exec_local(opt) tf_out.open --- 135,139 ---- ] opt << "-type=#{seqtype}" if seqtype ! opt.concat(@options) exec_local(opt) tf_out.open Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mafft.rb 14 Dec 2006 14:54:50 -0000 1.12 --- mafft.rb 14 Dec 2006 15:56:22 -0000 1.13 *************** *** 159,163 **** query_align(seqs) else ! exec_local(@option) end end --- 159,163 ---- query_align(seqs) else ! exec_local(@options) end end *************** *** 188,192 **** # Performs alignment of sequences in the file named +fn+. def query_by_filename(fn, seqtype = nil) ! opt = @option + [ fn ] exec_local(opt) @report = Report.new(@output, seqtype) --- 188,192 ---- # Performs alignment of sequences in the file named +fn+. def query_by_filename(fn, seqtype = nil) ! opt = @options + [ fn ] exec_local(opt) @report = Report.new(@output, seqtype) From ngoto at dev.open-bio.org Thu Dec 14 15:59:23 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 15:59:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.13, 1.14 mafft.rb, 1.13, 1.14 sim4.rb, 1.8, 1.9 Message-ID: <200612141559.kBEFxNqn014111@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14091/lib/bio/appl Modified Files: clustalw.rb mafft.rb sim4.rb Log Message: forgotten to change *@command to @command. Index: sim4.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/sim4.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sim4.rb 14 Dec 2006 15:56:22 -0000 1.8 --- sim4.rb 14 Dec 2006 15:59:21 -0000 1.9 *************** *** 111,115 **** @output = nil @report = nil ! Bio::Command.call_command(*@command) do |io| io.close_write @output = io.read --- 111,115 ---- @output = nil @report = nil ! Bio::Command.call_command(@command) do |io| io.close_write @output = io.read Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** clustalw.rb 14 Dec 2006 15:56:22 -0000 1.13 --- clustalw.rb 14 Dec 2006 15:59:21 -0000 1.14 *************** *** 167,171 **** @log = nil ! Bio::Command.call_command(*@command) do |io| io.close_write @log = dout.read --- 167,171 ---- @log = nil ! Bio::Command.call_command(@command) do |io| io.close_write @log = dout.read Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** mafft.rb 14 Dec 2006 15:56:22 -0000 1.13 --- mafft.rb 14 Dec 2006 15:59:21 -0000 1.14 *************** *** 200,204 **** #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! Bio::Command.call_command(*@command) do |io| io.close_write ff = Bio::FlatFile.new(Bio::FastaFormat, io) --- 200,204 ---- #STDERR.print "DEBUG: ", @command.join(" "), "\n" @output = nil ! Bio::Command.call_command(@command) do |io| io.close_write ff = Bio::FlatFile.new(Bio::FastaFormat, io) From ngoto at dev.open-bio.org Thu Dec 14 16:04:04 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:04:04 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb,1.14,1.15 Message-ID: <200612141604.kBEG44Cx014165@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14145 Modified Files: clustalw.rb Log Message: forgotten mistakes (din was changed to io) Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** clustalw.rb 14 Dec 2006 15:59:21 -0000 1.14 --- clustalw.rb 14 Dec 2006 16:04:02 -0000 1.15 *************** *** 169,173 **** Bio::Command.call_command(@command) do |io| io.close_write ! @log = dout.read t.join end --- 169,173 ---- Bio::Command.call_command(@command) do |io| io.close_write ! @log = io.read t.join end From ngoto at dev.open-bio.org Thu Dec 14 16:06:01 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:06:01 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb,1.15,1.16 Message-ID: <200612141606.kBEG61eJ014214@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14194 Modified Files: clustalw.rb Log Message: changed to use output_fasta instead of to_fasta Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** clustalw.rb 14 Dec 2006 16:04:02 -0000 1.15 --- clustalw.rb 14 Dec 2006 16:05:59 -0000 1.16 *************** *** 102,106 **** break if seqtype end ! query_string(seqs.to_fasta(70, :avoid_same_name => true), seqtype) end --- 102,106 ---- break if seqtype end ! query_string(seqs.output_fasta(70, :avoid_same_name => true), seqtype) end From ngoto at dev.open-bio.org Thu Dec 14 16:08:48 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:08:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb, 1.16, 1.17 mafft.rb, 1.14, 1.15 Message-ID: <200612141608.kBEG8mYv014242@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv14222 Modified Files: clustalw.rb mafft.rb Log Message: Changed to use output_fasta instead of to_fasta and options are changed. A mistake is fixed in clustalw.rb Index: clustalw.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** clustalw.rb 14 Dec 2006 16:05:59 -0000 1.16 --- clustalw.rb 14 Dec 2006 16:08:46 -0000 1.17 *************** *** 102,106 **** break if seqtype end ! query_string(seqs.output_fasta(70, :avoid_same_name => true), seqtype) end --- 102,107 ---- break if seqtype end ! query_string(seqs.output_fasta(:width => 70, ! :avoid_same_name => true), seqtype) end *************** *** 170,174 **** io.close_write @log = io.read - t.join end @log --- 171,174 ---- Index: mafft.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mafft.rb 14 Dec 2006 15:59:21 -0000 1.14 --- mafft.rb 14 Dec 2006 16:08:46 -0000 1.15 *************** *** 169,173 **** seqs = Bio::Alignment.new(seqs, *arg) end ! query_string(seqs.to_fasta(70)) end --- 169,173 ---- seqs = Bio::Alignment.new(seqs, *arg) end ! query_string(seqs.output_fasta(:width => 70)) end From ngoto at dev.open-bio.org Thu Dec 14 16:13:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:13:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip - New directory Message-ID: <200612141613.kBEGDUlK014339@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv14317/phylip Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/appl/phylip added to the repository From ngoto at dev.open-bio.org Thu Dec 14 16:13:30 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 16:13:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/gcg - New directory Message-ID: <200612141613.kBEGDUfW014343@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/gcg In directory dev.open-bio.org:/tmp/cvs-serv14317/gcg Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/appl/gcg added to the repository From nakao at dev.open-bio.org Thu Dec 14 16:19:25 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:19:25 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/iprscan - New directory Message-ID: <200612141619.kBEGJPNB014391@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14371/lib/bio/appl/iprscan Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/appl/iprscan added to the repository From nakao at dev.open-bio.org Thu Dec 14 16:20:03 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:20:03 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/iprscan - New directory Message-ID: <200612141620.kBEGK3Qd014439@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14419/test/unit/bio/appl/iprscan Log Message: Directory /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan added to the repository From nakao at dev.open-bio.org Thu Dec 14 16:20:27 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:20:27 +0000 Subject: [BioRuby-cvs] bioruby/test/data/iprscan - New directory Message-ID: <200612141620.kBEGKRYP014523@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/data/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14502/test/data/iprscan Log Message: Directory /home/repository/bioruby/bioruby/test/data/iprscan added to the repository From nakao at dev.open-bio.org Thu Dec 14 16:22:14 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:22:14 +0000 Subject: [BioRuby-cvs] bioruby/test/data/iprscan merged.raw,NONE,1.1 Message-ID: <200612141622.kBEGMEvx014606@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/data/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14577/test/data/iprscan Added Files: merged.raw Log Message: * Newly added files for InterProScan. --- NEW FILE: merged.raw --- Q9RHD9 D44DAE8C544CB7C1 267 HMMPfam PF00575 S1 1 55 3.3E-6 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMPfam PF00575 S1 68 142 4.1E-19 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMPfam PF00575 S1 155 228 1.8E-19 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMSmart SM00316 S1 3 55 7.1E-7 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMSmart SM00316 S1 70 142 8.1E-20 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 HMMSmart SM00316 S1 157 228 1.5E-21 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 ProfileScan PS50126 S1 1 55 14.869 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 ProfileScan PS50126 S1 72 142 20.809 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 ProfileScan PS50126 S1 159 228 22.541 T 11-Nov-2005 IPR003029 RNA binding S1 Molecular Function:RNA binding (GO:0003723) Q9RHD9 D44DAE8C544CB7C1 267 FPrintScan PR00681 RIBOSOMALS1 6 27 1.5E-17 T 11-Nov-2005 IPR000110 Ribosomal protein S1 Molecular Function:RNA binding (GO:0003723), Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Q9RHD9 D44DAE8C544CB7C1 267 FPrintScan PR00681 RIBOSOMALS1 85 104 1.5E-17 T 11-Nov-2005 IPR000110 Ribosomal protein S1 Molecular Function:RNA binding (GO:0003723), Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Q9RHD9 D44DAE8C544CB7C1 267 FPrintScan PR00681 RIBOSOMALS1 125 143 1.5E-17 T 11-Nov-2005 IPR000110 Ribosomal protein S1 Molecular Function:RNA binding (GO:0003723), Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Q9RHD9 D44DAE8C544CB7C1 267 superfamily SSF50249 Nucleic_acid_OB 3 60 1.4E-7 T 11-Nov-2005 IPR008994 Nucleic acid-binding OB-fold Molecular Function:nucleic acid binding (GO:0003676) Q9RHD9 D44DAE8C544CB7C1 267 superfamily SSF50249 Nucleic_acid_OB 61 205 6.3999999999999995E-24 T 11-Nov-2005 IPR008994 Nucleic acid-binding OB-fold Molecular Function:nucleic acid binding (GO:0003676) RS16_ECOLI F94D07049A6D489D 82 HMMTigr TIGR00002 S16 2 81 117.16 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 superfamily SSF54565 Ribosomal_S16 1 79 1.81E-8 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 HMMPfam PF00886 Ribosomal_S16 8 68 2.7000000000000004E-33 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 BlastProDom PD003791 Ribosomal_S16 10 77 4.0E-33 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) RS16_ECOLI F94D07049A6D489D 82 ProfileScan PS00732 RIBOSOMAL_S16 2 11 8.0E-5 T 11-Nov-2005 IPR000307 Ribosomal protein S16 Molecular Function:structural constituent of ribosome (GO:0003735), Cellular Component:intracellular (GO:0005622), Cellular Component:ribosome (GO:0005840), Biological Process:protein biosynthesis (GO:0006412) Y902_MYCTU CD84A335CCFFE6D7 446 superfamily SSF47384 His_kin_homodim 220 292 5.89E-7 T 11-Nov-2005 IPR009082 Histidine kinase, homodimeric Y902_MYCTU CD84A335CCFFE6D7 446 HMMSmart SM00304 HAMP 170 222 1.8E-6 T 11-Nov-2005 IPR003660 Histidine kinase, HAMP region Molecular Function:signal transducer activity (GO:0004871), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 ProfileScan PS50885 HAMP 170 222 7.777 T 11-Nov-2005 IPR003660 Histidine kinase, HAMP region Molecular Function:signal transducer activity (GO:0004871), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 HMMPfam PF00672 HAMP 151 219 1.1E-8 T 11-Nov-2005 IPR003660 Histidine kinase, HAMP region Molecular Function:signal transducer activity (GO:0004871), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 ProfileScan PS50109 HIS_KIN 237 446 34.449 T 11-Nov-2005 IPR005467 Histidine kinase Biological Process:protein amino acid phosphorylation (GO:0006468), Molecular Function:kinase activity (GO:0016301) Y902_MYCTU CD84A335CCFFE6D7 446 HMMSmart SM00388 HisKA 230 296 1.4E-12 T 11-Nov-2005 IPR003661 Histidine kinase A, N-terminal Molecular Function:two-component sensor molecule activity (GO:0000155), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 HMMPfam PF00512 HisKA 230 296 2.4E-11 T 11-Nov-2005 IPR003661 Histidine kinase A, N-terminal Molecular Function:two-component sensor molecule activity (GO:0000155), Biological Process:signal transduction (GO:0007165), Cellular Component:membrane (GO:0016020) Y902_MYCTU CD84A335CCFFE6D7 446 HMMSmart SM00387 HATPase_c 338 446 2.9E-24 T 11-Nov-2005 IPR003594 ATP-binding region, ATPase-like Molecular Function:ATP binding (GO:0005524) Y902_MYCTU CD84A335CCFFE6D7 446 HMMPfam PF02518 HATPase_c 338 445 2.5E-26 T 11-Nov-2005 IPR003594 ATP-binding region, ATPase-like Molecular Function:ATP binding (GO:0005524) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 374 388 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 392 402 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 406 424 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) Y902_MYCTU CD84A335CCFFE6D7 446 FPrintScan PR00344 BCTRLSENSOR 430 443 2.0E-12 T 11-Nov-2005 IPR004358 Histidine kinase related protein, C-terminal Biological Process:phosphorylation (GO:0016310), Molecular Function:transferase activity, transferring phosphorus-containing groups (GO:0016772) From nakao at dev.open-bio.org Thu Dec 14 16:22:14 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:22:14 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/iprscan test_report.rb, NONE, 1.1 Message-ID: <200612141622.kBEGMEgZ014610@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14577/test/unit/bio/appl/iprscan Added Files: test_report.rb Log Message: * Newly added files for InterProScan. --- NEW FILE: test_report.rb --- # # test/unit/bio/appl/iprscan/test_report.rb - Unit test for Bio::InterProScan::Report # # Copyright (C) 2006 Mitsuteru Nakao # # $Id: test_report.rb,v 1.1 2006/12/14 16:22:12 nakao Exp $ # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s $:.unshift(libpath) unless $:.include?(libpath) require 'test/unit' require 'bio/appl/iprscan/report' module Bio class TestIprscanData bioruby_root = Pathname.new(File.join(File.dirname(__FILE__), [".."] * 5)).cleanpath.to_s TestDataIprscan = Pathname.new(File.join(bioruby_root, "test", "data", "iprscan")).cleanpath.to_s def self.raw_format File.open(File.join(TestDataIprscan, "merged.raw")) end end class TestIprscanTxtReport < Test::Unit::TestCase def setup test_entry=<<-END slr0002\t860 InterPro\tIPR001264\tGlycosyl transferase, family 51 BlastProDom\tPD001895\tsp_Q55683_SYNY3_Q55683\t2e-37\t292-370 HMMPfam\tPF00912\tTransglycosyl\t8e-104\t204-372 InterPro\tIPR001460\tPenicillin-binding protein, transpeptidase domain HMMPfam\tPF00905\tTranspeptidase\t5.7e-30\t451-742 InterPro\tNULL\tNULL ProfileScan\tPS50310\tALA_RICH\t10.224\t805-856 // END @obj = Bio::Iprscan::Report.parse_in_txt(test_entry) end def test_query_id assert_equal('slr0002', @obj.query_id) end def test_query_length assert_equal(860, @obj.query_length) end def test_matches_size assert_equal(4, @obj.matches.size) end def test_match_ipr_id assert_equal('IPR001264', @obj.matches.first.ipr_id) end def test_match_ipr_description assert_equal('Glycosyl transferase, family 51', @obj.matches.first.ipr_description) end def test_match_method assert_equal('BlastProDom', @obj.matches.first.method) end def test_match_accession assert_equal('PD001895', @obj.matches.first.accession) end def test_match_description assert_equal('sp_Q55683_SYNY3_Q55683', @obj.matches.first.description) end def test_match_evalue assert_equal('2e-37', @obj.matches.first.evalue) end def test_match_match_start assert_equal(292, @obj.matches.first.match_start) end def test_match_match_end assert_equal(370, @obj.matches.first.match_end) end end # TestIprscanTxtReport class TestIprscanRawReport < Test::Unit::TestCase def setup test_raw = Bio::TestIprscanData.raw_format entry = '' @obj = [] while line = test_raw.gets if entry != '' and entry.split("\t").first == line.split("\t").first entry << line elsif entry != '' @obj << Bio::Iprscan::Report.parse_in_raw(entry) entry = line else entry << line end end end def test_obj assert_equal(2, @obj.size) end def test_query_id assert_equal('Q9RHD9', @obj.first.query_id) end def test_entry_id assert_equal('Q9RHD9', @obj.first.entry_id) end def test_query_length assert_equal(267, @obj.first.query_length) end def test_match_query_id assert_equal('Q9RHD9', @obj.first.matches.first.query_id) end def test_match_crc64 assert_equal('D44DAE8C544CB7C1', @obj.first.matches.first.crc64) end def test_match_query_length assert_equal(267, @obj.first.matches.first.query_length) end def test_match_method assert_equal('HMMPfam', @obj.first.matches.first.method) end def test_match_accession assert_equal('PF00575', @obj.first.matches.first.accession) end def test_match_description assert_equal('S1', @obj.first.matches.first.description) end def test_match_match_start assert_equal(1, @obj.first.matches.first.match_start) end def test_match_match_end assert_equal(55, @obj.first.matches.first.match_end) end def test_match_evalue assert_equal('3.3E-6', @obj.first.matches.first.evalue) end def test_match_status assert_equal('T', @obj.first.matches.first.status) end def test_match_date assert_equal('11-Nov-2005', @obj.first.matches.first.date) end def test_match_ipr_id assert_equal('IPR003029', @obj.first.matches.first.ipr_id) end def test_match_ipr_description assert_equal('RNA binding S1', @obj.first.matches.first.ipr_description) end def test_match_go_terms assert_equal(["Molecular Function:RNA binding (GO:0003723)"], @obj.first.matches.first.go_terms) end end end From nakao at dev.open-bio.org Thu Dec 14 16:22:14 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:22:14 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/iprscan report.rb,NONE,1.1 Message-ID: <200612141622.kBEGMEmb014615@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/iprscan In directory dev.open-bio.org:/tmp/cvs-serv14577/lib/bio/appl/iprscan Added Files: report.rb Log Message: * Newly added files for InterProScan. --- NEW FILE: report.rb --- # # = bio/appl/iprscan/report.rb - a class for iprscan output. # # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao # License:: Ruby's # # $Id: report.rb,v 1.1 2006/12/14 16:22:12 nakao Exp $ # # == Report classes for the iprscan program. # module Bio class Iprscan # = DESCRIPTION # Class for InterProScan report. It is used to parse results and reformat # results from (raw|xml|txt) into (html, xml, ebihtml, txt, gff3) format. # # See ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/README.html # # == USAGE # # Read a marged.txt and split each entry. # Bio::Iprscan::Report.reports_in_txt(File.read("marged.txt") do |report| # report.query_id # report.matches.size # report.matches.each do |match| # match.ipr_id #=> 'IPR...' # match.ipr_description # match.method # match.accession # match.description # match.match_start # match.match_end # match.evalue # end # # report.to_gff3 # # report.to_html # end # # Bio::Iprscan::Report.reports_in_raw(File.read("marged.raw") do |report| # report.class #=> Bio::Iprscan::Report # end # class Report # Entry delimiter pattern. RS = DELIMITER = "\n\/\/\n" # Qeury sequence name (entry_id). attr_accessor :query_id alias :entry_id :query_id # Qeury sequence length. attr_accessor :query_length # Matched InterPro motifs in Hash. Each InterPro motif have :name, # :definition, :accession and :motifs keys. And :motifs key contains # motifs in Array. Each motif have :method, :accession, :definition, # :score, :location_from and :location_to keys. attr_accessor :matches # == USAGE # Bio::Iprscan::Report.reports_in_raw(File.open("merged.raw")) do |report| # report # end # def self.reports_in_raw(io) entry = '' while line = io.gets if entry != '' and entry.split("\t").first == line.split("\t").first entry << line elsif entry != '' yield Bio::Iprscan::Report.parse_in_raw(entry) entry = line else entry << line end end end # Parser method for a raw formated entry. Retruns a Bio::Iprscan::Report # object. def self.parse_in_raw(str) report = self.new str.split(/\n/).each do |line| line = line.split("\t") report.matches << Match.new(:query_id => line[0], :crc64 => line[1], :query_length => line[2].to_i, :method => line[3], :accession => line[4], :description => line[5], :match_start => line[6].to_i, :match_end => line[7].to_i, :evalue => line[8], :status => line[9], :date => line[10]) if line[11] report.matches.last.ipr_id = line[11] report.matches.last.ipr_description = line[12] end report.matches.last.go_terms = line[13].split(', ') if line[13] end report.query_id = report.matches.first.query_id report.query_length = report.matches.first.query_length report end # Parser method for a xml formated entry. Retruns a Bio::Iprscan::Report # object. def self.parse_in_xml(str) NotImplementedError end # Splits entry stream. # # == Usage # Bio::Iprscan::Report.reports_in_txt(File.open("merged.txt")) do |report| # report # end def self.reports_in_txt(io) io.each(/\n\/\/\n/m) do |entry| yield self.parse_in_txt(entry) end end # Parser method for a txt formated entry. Retruns a Bio::Iprscan::Report # object. # # == Usage # # File.read("marged.txt").each(Bio::Iprscan::Report::RS) do |e| # report = Bio::Iprscan::Report.parse_in_txt(e) # end # def self.parse_in_txt(str) report = self.new ipr_line = '' str.split(/\n/).each do |line| line = line.split("\t") if line.size == 2 report.query_id = line[0] report.query_length = line[1].to_i elsif line.first == '//' elsif line.first == 'InterPro' ipr_line = line else startp, endp = line[4].split("-") report.matches << Match.new(:ipr_id => ipr_line[1], :ipr_description => ipr_line[2], :method => line[0], :accession => line[1], :description => line[2], :evalue => line[3], :match_start => startp.to_i, :match_end => endp.to_i) end end report end # def initialize @query_id = nil @query_length = nil @matches = [] end def to_html NotImplementedError end def to_xml NotImplementedError end def to_ebihtml NotImplementedError end def to_txt NotImplementedError end def to_raw NotImplementedError end def to_gff3 NotImplementedError end # == DESCRIPTION # Container class for InterProScan matches. # # == USAGE # match = Match.new(:query_id => ...) # # match.ipr_id = 'IPR001234' # match.ipr_id #=> 'IPR1234' # class Match def initialize(hash) @data = Hash.new hash.each do |key, value| @data[key.to_sym] = value end end # Date for computation. def date; @data[:date]; end # CRC64 checksum of query sequence. def crc64; @data[:crc64]; end # E-value of the match def evalue; @data[:evalue]; end # Status of the match (T for true / M for marginal). def status; @data[:status]; end # the corresponding InterPro entry (if any). def ipr_id; @data[:ipr_id]; end # the length of the sequence in AA. def length; @data[:length]; end # the analysis method launched. def method; @data[:method]; end # Object#metod overrided by Match#method # the Gene Ontology description for the InterPro entry, in "Aspect:term (ID)" format. def go_terms; @data[:go_terms]; end # Id of the input sequence. def query_id; @data[:query_id]; end # the end of the domain match. def match_end; @data[:match_end]; end # the database members entry for this match. def accession; @data[:accession]; end # the database mambers description for this match. def description; @data[:description]; end # the start of the domain match. def match_start; @data[:match_start]; end # the descriotion of the InterPro entry. def ipr_description; @data[:ipr_description]; end def method_missing(name, arg = nil) if arg name = name.to_s.sub(/=$/, '') @data[name.to_sym] = arg else @data[name.to_sym] end end end # class Match end # class Report end # class Iprscan end # module Bio From nakao at dev.open-bio.org Thu Dec 14 16:42:38 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 14 Dec 2006 16:42:38 +0000 Subject: [BioRuby-cvs] bioruby ChangeLog,1.54,1.55 Message-ID: <200612141642.kBEGgckx014692@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv14672 Modified Files: ChangeLog Log Message: * lib/bio/appl/iprscan/report.rb Newly added. Index: ChangeLog =================================================================== RCS file: /home/repository/bioruby/bioruby/ChangeLog,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** ChangeLog 6 Oct 2006 09:53:38 -0000 1.54 --- ChangeLog 14 Dec 2006 16:42:36 -0000 1.55 *************** *** 1,2 **** --- 1,8 ---- + 2006-12-15 Mitsuteru Nakao + + * lib/bio/appl/iprscan/report.rb + + Bio::Iprscan::Report for InterProScan output is newly added. + 2006-10-05 Naohisa Goto From ngoto at dev.open-bio.org Thu Dec 14 19:52:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:55 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.72,1.73 Message-ID: <200612141952.kBEJqtim015845@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv15819/lib Modified Files: bio.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** bio.rb 13 Dec 2006 16:29:36 -0000 1.72 --- bio.rb 14 Dec 2006 19:52:53 -0000 1.73 *************** *** 231,234 **** --- 231,238 ---- autoload :Blat, 'bio/appl/blat/report' + module GCG + autoload :Msf, 'bio/appl/gcg/msf' + autoload :Seq, 'bio/appl/gcg/seq' + end ### Utilities From ngoto at dev.open-bio.org Thu Dec 14 19:52:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio alignment.rb,1.20,1.21 Message-ID: <200612141952.kBEJqtEn015850@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv15819/lib/bio Modified Files: alignment.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. Index: alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/alignment.rb,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** alignment.rb 14 Dec 2006 15:08:59 -0000 1.20 --- alignment.rb 14 Dec 2006 19:52:53 -0000 1.21 *************** *** 24,27 **** --- 24,32 ---- require 'bio/sequence' + #--- + # (depends on autoload) + #require 'bio/appl/gcg/seq' + #+++ + module Bio *************** *** 871,874 **** --- 876,881 ---- when :phylipnon output_phylipnon(*arg) + when :msf + output_msf(*arg) when :molphy output_molphy(*arg) *************** *** 1177,1180 **** --- 1184,1305 ---- aseqs.join('') end + + # Generates msf formatted text as a string + def output_msf(options = {}) + len = self.seq_length + + if !options.has_key?(:avoid_same_name) or options[:avoid_same_name] + sn = __clustal_avoid_same_name(self.sequence_names) + else + sn = self.sequence_names.collect do |x| + x.to_s.gsub(/[\r\n\x00]/, ' ') + end + end + if !options.has_key?(:replace_space) or options[:replace_space] + sn.collect! { |x| x.gsub(/\s/, '_') } + end + if !options.has_key?(:escape) or options[:escape] + sn.collect! { |x| x.gsub(/[\:\;\,\(\)]/, '_') } + end + if !options.has_key?(:split) or options[:split] + sn.collect! { |x| x.split(/\s/)[0].to_s } + end + + seqwidth = 50 + namewidth = [31, sn.collect { |x| x.length }.max ].min + sep = ' ' * 2 + + seqregexp = Regexp.new("(.{1,#{seqwidth}})") + gchar = (options[:gap_char] or '.') + pchar = (options[:padding_char] or '~') + + aseqs = Array.new(self.number_of_sequences).clear + self.each_seq do |s| + aseqs << s.to_s.gsub(self.gap_regexp, gchar) + end + aseqs.each do |s| + s.sub!(/\A#{Regexp.escape(gchar)}+/) { |x| pchar * x.length } + s.sub!(/#{Regexp.escape(gchar)}+\z/, '') + s << (pchar * (len - s.length)) + end + + case options[:case].to_s + when /lower/i + aseqs.each { |s| s.downcase! } + when /upper/i + aseqs.each { |s| s.upcase! } + else #default upcase + aseqs.each { |s| s.upcase! } + end + + case options[:type].to_s + when /protein/i, /aa/i + amino = true + when /na/i + amino = false + else + if seqclass == Bio::Sequence::AA then + amino = true + elsif seqclass == Bio::Sequence::NA then + amino = false + else + # if we can't determine, we asuume as protein. + amino = aseqs.size + aseqs.each { |x| amino -= 1 if /\A[acgt]\z/i =~ x } + amino = false if amino <= 0 + end + end + + seq_type = (amino ? 'P' : 'N') + + fn = (options[:entry_id] or self.__id__.abs.to_s + '.msf') + dt = (options[:time] or Time.now).strftime('%B %d, %Y %H:%M') + + sums = aseqs.collect { |s| GCG::Seq.calc_checksum(s) } + #sums = aseqs.collect { |s| 0 } + sum = 0; sums.each { |x| sum += x }; sum %= 10000 + msf = + [ + "#{seq_type == 'N' ? 'N' : 'A' }A_MULTIPLE_ALIGNMENT 1.0\n", + "\n", + "\n", + " #{fn} MSF: #{len} Type: #{seq_type} #{dt} Check: #{sum} ..\n", + "\n" + ] + + sn.each do |snx| + msf << ' Name: ' + + sprintf('%*s', -namewidth, snx.to_s)[0, namewidth] + + " Len: #{len} Check: #{sums.shift} Weight: 1.00\n" + end + msf << "\n//\n" + + aseqs.collect! do |s| + snx = sn.shift + head = sprintf("%*s", namewidth, snx.to_s)[0, namewidth] + sep + s.gsub!(seqregexp, "\\1\n") + a = s.split(/^/) + a.collect { |x| head + x } + end + lines = (len + seqwidth - 1).div(seqwidth) + i = 1 + lines.times do + msf << "\n" + n_l = i + n_r = [ i + seqwidth - 1, len ].min + if n_l != n_r then + w = [ n_r - n_l + 1 - n_l.to_s.length - n_r.to_s.length, 1 ].max + msf << (' ' * namewidth + sep + n_l.to_s + + ' ' * w + n_r.to_s + "\n") + else + msf << (' ' * namewidth + sep + n_l.to_s + "\n") + end + aseqs.each { |a| msf << a.shift } + i += seqwidth + end + msf << "\n" + msf.join('') + end + end #module Output From ngoto at dev.open-bio.org Thu Dec 14 19:52:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/gcg msf.rb, NONE, 1.1 seq.rb, NONE, 1.1 Message-ID: <200612141952.kBEJqtQA015855@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/gcg In directory dev.open-bio.org:/tmp/cvs-serv15819/lib/bio/appl/gcg Added Files: msf.rb seq.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. --- NEW FILE: msf.rb --- # # = bio/appl/gcg/msf.rb - GCG multiple sequence alignment (.msf) parser class # # Copyright:: Copyright (C) 2003, 2006 # Naohisa Goto # License:: Ruby's # # $Id: msf.rb,v 1.1 2006/12/14 19:52:53 ngoto Exp $ # # = About Bio::GCG::Msf # # Please refer document of Bio::GCG::Msf. # #--- # (depends on autoload) #require 'bio/appl/gcg/seq' #+++ module Bio module GCG # The msf is a multiple sequence alignment format developed by Wisconsin. # Bio::GCG::Msf is a msf format parser. class Msf #< DB # delimiter used by Bio::FlatFile DELIMITER = RS = nil # Creates a new Msf object. def initialize(str) str = str.sub(/\A[\r\n]+/, '') if /^\!\![A-Z]+\_MULTIPLE\_ALIGNMNENT/ =~ str[/.*/] then @heading = str[/.*/] # '!!NA_MULTIPLE_ALIGNMENT 1.0' or like this str.sub!(/.*/, '') end str.sub!(/.*\.\.$/m, '') @description = $&.to_s.sub(/^.*\.\.$/, '').to_s d = $&.to_s if m = /(.+)\s+MSF\:\s+(\d+)\s+Type\:\s+(\w)\s+(.+)\s+(Comp)?Check\:\s+(\d+)/.match(d) then @entry_id = m[1].to_s.strip @length = (m[2] ? m[2].to_i : nil) @seq_type = m[3] @date = m[4].to_s.strip @checksum = (m[6] ? m[6].to_i : nil) end str.sub!(/.*\/\/$/m, '') a = $&.to_s.split(/^/) @seq_info = [] a.each do |x| if /Name\: / =~ x then s = {} x.scan(/(\S+)\: +(\S*)/) { |y| s[$1] = $2 } @seq_info << s end end @data = str @description.sub!(/\A(\r\n|\r|\n)/, '') @align = nil end # description attr_reader :description # ID of the alignment attr_reader :entry_id # alignment length attr_reader :length # sequence type ("N" for DNA/RNA or "P" for protein) attr_reader :seq_type # date attr_reader :date # checksum attr_reader :checksum # heading # ('!!NA_MULTIPLE_ALIGNMENT 1.0' or whatever like this) attr_reader :heading #--- ## data (internally used, will be obsoleted) #attr_reader :data # ## seq. info. (internally used, will be obsoleted) #attr_reader :seq_info #+++ # symbol comparison table def symbol_comparison_table unless defined?(@symbol_comparison_table) /Symbol comparison table\: +(\S+)/ =~ @description @symbol_comparison_table = $1 end @symbol_comparison_table end # gap weight def gap_weight unless defined?(@gap_weight) /GapWeight\: +(\S+)/ =~ @description @gap_weight = $1 end @gap_weight end # gap length weight def gap_length_weight unless defined?(@gap_length_weight) /GapLengthWeight\: +(\S+)/ =~ @description @gap_length_weight = $1 end @gap_length_weight end # CompCheck field def compcheck unless defined?(@compcheck) if /CompCheck\: +(\d+)/ =~ @description then @compcheck = $1.to_i else @compcheck = nil end end @compcheck end # parsing def do_parse return if @align a = @data.strip.split(/\n\n/) @seq_data = Array.new(@seq_info.size) @seq_data.collect! { |x| Array.new } a.each do |x| b = x.split(/\n/) nw = 0 if b.size > @seq_info.size then if /^ +/ =~ b.shift.to_s nw = $&.to_s.length end end if nw > 0 then b.each_with_index { |y, i| y[0, nw] = ''; @seq_data[i] << y } else b.each_with_index { |y, i| @seq_data[i] << y.strip.split(/ +/, 2)[1].to_s } end end case seq_type when 'P', 'p' k = Bio::Sequence::AA when 'N', 'n' k = Bio::Sequence::NA else k = Bio::Sequence::Generic end @seq_data.collect! do |x| y = x.join('') y.gsub!(/[\s\d]+/, '') k.new(y) end aln = Bio::Alignment.new @seq_data.each_with_index do |x, i| aln.store(@seq_info[i]['Name'], x) end @align = aln end private :do_parse # returns Bio::Alignment object. def alignment do_parse @align end # gets seq data (used internally) (will be obsoleted) def seq_data do_parse @seq_data end # validates checksum def validate_checksum do_parse valid = true total = 0 @seq_data.each_with_index do |x, i| sum = Bio::GCG::Seq.calc_checksum(x) if sum != @seq_info[i]['Check'].to_i valid = false break end total += sum end return false unless valid if @checksum != 0 # "Check:" field of BioPerl is always 0 valid = ((total % 10000) == @checksum) end valid end end #class Msf end #module GCG end # module Bio --- NEW FILE: seq.rb --- # # = bio/appl/gcg/seq.rb - GCG sequence file format class (.seq/.pep file) # # Copyright:: Copyright (C) 2003, 2006 # Naohisa Goto # License:: Ruby's # # $Id: seq.rb,v 1.1 2006/12/14 19:52:53 ngoto Exp $ # # = About Bio::GCG::Msf # # Please refer document of Bio::GCG::Msf. # module Bio module GCG # # = Bio::GCG::Seq # # This is GCG sequence file format (.seq or .pep) parser class. # # = References # # * Information about GCG Wisconsin Package(R) # http://www.accelrys.com/products/gcg_wisconsin_package . # * EMBOSS sequence formats # http://www.hgmp.mrc.ac.uk/Software/EMBOSS/Themes/SequenceFormats.html # * BioPerl document # http://docs.bioperl.org/releases/bioperl-1.2.3/Bio/SeqIO/gcg.html class Seq #< DB # delimiter used by Bio::FlatFile DELIMITER = RS = nil # Creates new instance of this class. # str must be a GCG seq formatted string. def initialize(str) @heading = str[/.*/] # '!!NA_SEQUENCE 1.0' or like this str = str.sub(/.*/, '') str.sub!(/.*\.\.$/m, '') @definition = $&.to_s.sub(/^.*\.\.$/, '').to_s desc = $&.to_s if m = /(.+)\s+Length\:\s+(\d+)\s+(.+)\s+Type\:\s+(\w)\s+Check\:\s+(\d+)/.match(desc) then @entry_id = m[1].to_s.strip @length = (m[2] ? m[2].to_i : nil) @date = m[3].to_s.strip @seq_type = m[4] @checksum = (m[5] ? m[5].to_i : nil) end @data = str @seq = nil @definition.strip! end # ID field. attr_reader :entry_id # Description field. attr_reader :definition # "Length:" field. # Note that sometimes this might differ from real sequence length. attr_reader :length # Date field of this entry. attr_reader :date # "Type:" field, which indicates sequence type. # "N" means nucleic acid sequence, "P" means protein sequence. attr_reader :seq_type # "Check:" field, which indicates checksum of current sequence. attr_reader :checksum # heading # ('!!NA_SEQUENCE 1.0' or whatever like this) attr_reader :heading #--- ## data (internally used, will be obsoleted) #attr_reader :data #+++ # Sequence data. # The class of the sequence is Bio::Sequence::NA, Bio::Sequence::AA # or Bio::Sequence::Generic, according to the sequence type. def seq unless @seq then case @seq_type when 'N', 'n' k = Bio::Sequence::NA when 'P', 'p' k = Bio::Sequence::AA else k = Bio::Sequence end @seq = k.new(@data.tr('^-a-zA-Z.~', '')) end @seq end # If you know the sequence is AA, use this method. # Returns a Bio::Sequence::AA object. # # If you call naseq for protein sequence, # or aaseq for nucleic sequence, RuntimeError will be raised. def aaseq if seq.is_a?(Bio::Sequence::AA) then @seq else raise 'seq_type != \'P\'' end end # If you know the sequence is NA, use this method. # Returens a Bio::Sequence::NA object. # # If you call naseq for protein sequence, # or aaseq for nucleic sequence, RuntimeError will be raised. def naseq if seq.is_a?(Bio::Sequence::NA) then @seq else raise 'seq_type != \'N\'' end end # Validates checksum. # If validation succeeds, returns true. # Otherwise, returns false. def validate_checksum checksum == self.class.calc_checksum(seq) end #--- # class methods #+++ # Calculates checksum from given string. def self.calc_checksum(str) # Reference: Bio::SeqIO::gcg of BioPerl-1.2.3 idx = 0 sum = 0 str.upcase.tr('^A-Z.~', '').each_byte do |c| idx += 1 sum += idx * c idx = 0 if idx >= 57 end (sum % 10000) end # Creates a new GCG sequence format text. # Parameters can be omitted. # # Examples: # Bio::GCG::Seq.to_gcg(:definition=>'H.sapiens DNA', # :seq_type=>'N', :entry_id=>'gi-1234567', # :seq=>seq, :date=>date) # def self.to_gcg(hash) seq = hash[:seq] if seq.is_a?(Bio::Sequence::NA) then seq_type = 'N' elsif seq.is_a?(Bio::Sequence::AA) then seq_type = 'P' else seq_type = (hash[:seq_type] or 'P') end if seq_type == 'N' then head = '!!NA_SEQUENCE 1.0' else head = '!!AA_SEQUENCE 1.0' end date = (hash[:date] or Time.now.strftime('%B %d, %Y %H:%M')) entry_id = hash[:entry_id].to_s.strip len = seq.length checksum = self.calc_checksum(seq) definition = hash[:definition].to_s.strip seq = seq.upcase.gsub(/.{1,50}/, "\\0\n") seq.gsub!(/.{10}/, "\\0 ") w = len.to_s.size + 1 i = 1 seq.gsub!(/^/) { |x| s = sprintf("\n%*d ", w, i); i += 50; s } [ head, "\n", definition, "\n\n", "#{entry_id} Length: #{len} #{date} " \ "Type: #{seq_type} Check: #{checksum} ..\n", seq, "\n" ].join('') end end #class Seq end #module GCG end #module Bio From ngoto at dev.open-bio.org Thu Dec 14 19:52:56 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:52:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io flatfile.rb,1.51,1.52 Message-ID: <200612141952.kBEJquI0015861@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv15819/lib/bio/io Modified Files: flatfile.rb Log Message: New files/classes: Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG msf multiple sequence alignment format parser, and Bio::GCG::Seq in lib/bio/appl/gcg/seq.rb for GCG sequence format parser. Autoload of the classes (in bio.rb) and file format autodetection (in flatfile.rb) are also supported. Bio::Alignment::Output#output_msf, #output(:msf, ...) are added to generate msf formatted string from multiple alignment object. Index: flatfile.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/flatfile.rb,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** flatfile.rb 22 Jun 2006 14:32:47 -0000 1.51 --- flatfile.rb 14 Dec 2006 19:52:53 -0000 1.52 *************** *** 1184,1187 **** --- 1184,1193 ---- /^CLUSTAL .*\(.*\).*sequence +alignment/ ], + gcg_msf = RuleRegexp[ 'Bio::GCG::Msf', + /^!!(N|A)A_MULTIPLE_ALIGNMENT .+/ ], + + gcg_seq = RuleRegexp[ 'Bio::GCG::Seq', + /^!!(N|A)A_SEQUENCE .+/ ], + blastxml = RuleRegexp[ 'Bio::Blast::Report', /\<\!DOCTYPE BlastOutput PUBLIC / ], From ngoto at dev.open-bio.org Thu Dec 14 19:55:12 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 19:55:12 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/gcg seq.rb,1.1,1.2 Message-ID: <200612141955.kBEJtCuL015910@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/gcg In directory dev.open-bio.org:/tmp/cvs-serv15890/appl/gcg Modified Files: seq.rb Log Message: fixed mistakes in Rdoc Index: seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/gcg/seq.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** seq.rb 14 Dec 2006 19:52:53 -0000 1.1 --- seq.rb 14 Dec 2006 19:55:10 -0000 1.2 *************** *** 8,14 **** # $Id$ # ! # = About Bio::GCG::Msf # ! # Please refer document of Bio::GCG::Msf. # --- 8,14 ---- # $Id$ # ! # = About Bio::GCG::Seq # ! # Please refer document of Bio::GCG::Seq. # From ngoto at dev.open-bio.org Thu Dec 14 22:38:55 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 14 Dec 2006 22:38:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip alignment.rb,NONE,1.1 Message-ID: <200612142238.kBEMctul016532@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv16512 Added Files: alignment.rb Log Message: Phylip format multiple sequence alignment parser class Bio::Phylip::PhylipFormat is added. --- NEW FILE: alignment.rb --- # # = bio/appl/phylip/alignment.rb - phylip multiple alignment format parser # # Copyright:: Copyright (C) 2006 # GOTO Naohisa # # License:: Ruby's # # $Id: alignment.rb,v 1.1 2006/12/14 22:38:53 ngoto Exp $ # # = About Bio::Phylip::PhylipFormat # # Please refer document of Bio::Phylip::PhylipFormat class. # module Bio module Phylip # This is phylip multiple alignment format parser. # The two formats, interleaved and non-interleaved, are # automatically determined. # class PhylipFormat # create a new object from a string def initialize(str) @data = str.strip.split(/(?:\r\n|\r|\n)/) @first_line = @data.shift @number_of_sequences, @alignment_length = @first_line.to_s.strip.split(/\s+/).collect { |x| x.to_i } end # number of sequences attr_reader :number_of_sequences # alignment length attr_reader :alignment_length # If the alignment format is "interleaved", returns true. # If not, returns false. # It would mistake to determine if the alignment is very short. def interleaved? unless defined? @interleaved_flag then if /\A +/ =~ @data[1].to_s then @interleaved_flag = false else @interleaved_flag = true end end @interleaved_flag end # Gets the alignment. Returns a Bio::Alignment object. def alignment unless defined? @alignment then do_parse a = Bio::Alignment.new (0... at number_of_sequences).each do |i| a.add_seq(@sequences[i], @sequence_names[i]) end @alignment = a end @alignment end private def do_parse if interleaved? then do_parse_interleaved else do_parse_noninterleaved end end def do_parse_interleaved first_block = @data[0, @number_of_sequences] @data[0, @number_of_sequences] = '' @sequence_names = Array.new(@number_of_sequences) { '' } @sequences = Array.new(@number_of_sequences) do ' ' * @alignment_length end first_block.each_with_index do |x, i| n, s = x.split(/ +/, 2) @sequence_names[i] = n @sequences[i].replace(s.gsub(/\s+/, '')) end i = 0 @data.each do |x| if x.strip.length <= 0 then i = 0 else @sequences[i] << x.gsub(/\s+/, '') i = (i + 1) % @number_of_sequences end end @data.clear true end def do_parse_noninterleaved @sequence_names = Array.new(@number_of_sequences) { '' } @sequences = Array.new(@number_of_sequences) do ' ' * @alignment_length end curseq = nil i = 0 @data.each do |x| next if x.strip.length <= 0 if !curseq or curseq.length > @alignment_length or /^\s/ !~ x then p i n, s = x.strip.split(/ +/, 2) @sequence_names[i] = n curseq = @sequences[i] curseq.replace(s.gsub(/\s+/, '')) i += 1 else curseq << x.gsub(/\s+/, '') end end @data.clear true end end #class PhylipFormat end #module Phylip end #module Bio From nakao at dev.open-bio.org Fri Dec 15 06:29:04 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Fri, 15 Dec 2006 06:29:04 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.73,1.74 Message-ID: <200612150629.kBF6T4Fm017361@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv17341/lib Modified Files: bio.rb Log Message: * Added autoload for Bio::Iprscan. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** bio.rb 14 Dec 2006 19:52:53 -0000 1.73 --- bio.rb 15 Dec 2006 06:29:01 -0000 1.74 *************** *** 236,239 **** --- 236,241 ---- end + autoload :Iprscan, 'bio/appl/iprscan/report' + ### Utilities From k at dev.open-bio.org Fri Dec 15 14:24:44 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Fri, 15 Dec 2006 14:24:44 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io sql.rb,1.5,1.6 Message-ID: <200612151424.kBFEOifa019643@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv19598 Modified Files: sql.rb Log Message: * a patch contributed from Raoul Pierre Bonnai Jean (RJP) which is improved to catch up with the recent BioSQL schema. Index: sql.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/sql.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sql.rb 19 Sep 2006 05:49:19 -0000 1.5 --- sql.rb 15 Dec 2006 14:24:42 -0000 1.6 *************** *** 3,6 **** --- 3,7 ---- # # Copyright:: Copyright (C) 2002 Toshiaki Katayama + # Copyright:: Copyright (C) 2006 Raoul Pierre Bonnal Jean # License:: Ruby's # *************** *** 69,74 **** return unless row ! mol = row['molecule'] ! seq = row['biosequence_str'] case mol --- 70,75 ---- return unless row ! mol = row['alphabet'] ! seq = row['seq'] case mol *************** *** 83,92 **** def subseq(from, to) length = to - from + 1 ! query = "select molecule, substring(biosequence_str, ?, ?) as subseq" + " from biosequence where bioentry_id = ?" row = @dbh.execute(query, from, length, @bioentry_id).fetch return unless row ! mol = row['molecule'] seq = row['subseq'] --- 84,93 ---- def subseq(from, to) length = to - from + 1 ! query = "select alphabet, substring(seq, ?, ?) as subseq" + " from biosequence where bioentry_id = ?" row = @dbh.execute(query, from, length, @bioentry_id).fetch return unless row ! mol = row['alphabet'] seq = row['subseq'] *************** *** 108,114 **** f_id = row['seqfeature_id'] ! k_id = row['seqfeature_key_id'] ! s_id = row['seqfeature_source_id'] ! rank = row['seqfeature_rank'].to_i - 1 # key : type (gene, CDS, ...) --- 109,115 ---- f_id = row['seqfeature_id'] ! k_id = row['type_term_id'] ! s_id = row['source_term_id'] ! rank = row['rank'].to_i - 1 # key : type (gene, CDS, ...) *************** *** 143,156 **** hash = { ! 'start' => row['reference_start'], ! 'end' => row['reference_end'], ! 'journal' => row['reference_location'], ! 'title' => row['reference_title'], ! 'authors' => row['reference_authors'], ! 'medline' => row['reference_medline'] } hash.default = '' ! rank = row['reference_rank'].to_i - 1 array[rank] = hash end --- 144,157 ---- hash = { ! 'start' => row['start_pos'], ! 'end' => row['end_pos'], ! 'journal' => row['location'], ! 'title' => row['title'], ! 'authors' => row['authors'], ! 'medline' => row['crc'] } hash.default = '' ! rank = row['rank'].to_i - 1 array[rank] = hash end *************** *** 172,176 **** @dbh.execute(query, @bioentry_id).fetch_all.each do |row| next unless row ! rank = row['comment_rank'].to_i - 1 array[rank] = row['comment_text'] end --- 173,177 ---- @dbh.execute(query, @bioentry_id).fetch_all.each do |row| next unless row ! rank = row['rank'].to_i - 1 array[rank] = row['comment_text'] end *************** *** 211,222 **** def taxonomy query = <<-END ! select full_lineage, common_name, ncbi_taxa_id ! from bioentry_taxa, taxa ! where bioentry_id = ? and bioentry_taxa.taxa_id = taxa.taxa_id END row = @dbh.execute(query, @bioentry_id).fetch ! @lineage = row ? row['full_lineage'] : '' ! @common_name = row ? row['common_name'] : '' ! @ncbi_taxa_id = row ? row['ncbi_taxa_id'] : '' row ? [@lineage, @common_name, @ncbi_taxa_id] : [] end --- 212,223 ---- def taxonomy query = <<-END ! select taxon_name.name, taxon.ncbi_taxon_id from bioentry ! join taxon_name using(taxon_id) join taxon using (taxon_id) ! where bioentry_id = ? END row = @dbh.execute(query, @bioentry_id).fetch ! # @lineage = row ? row['full_lineage'] : '' ! @common_name = row ? row['name'] : '' ! @ncbi_taxa_id = row ? row['ncbi_taxon_id'] : '' row ? [@lineage, @common_name, @ncbi_taxa_id] : [] end *************** *** 241,267 **** def feature_key(k_id) ! query = "select * from seqfeature_key where seqfeature_key_id = ?" row = @dbh.execute(query, k_id).fetch ! row ? row['key_name'] : '' end def feature_source(s_id) ! query = "select * from seqfeature_source where seqfeature_source_id = ?" row = @dbh.execute(query, s_id).fetch ! row ? row['source_name'] : '' end def feature_locations(f_id) locations = [] ! query = "select * from seqfeature_location where seqfeature_id = ?" @dbh.execute(query, f_id).fetch_all.each do |row| next unless row location = Bio::Location.new ! location.strand = row['seq_strand'] ! location.from = row['seq_start'] ! location.to = row['seq_end'] ! xref = feature_locations_remote(row['seqfeature_location_id']) location.xref_id = xref.shift unless xref.empty? --- 242,268 ---- def feature_key(k_id) ! query = "select * from term where term_id= ?" row = @dbh.execute(query, k_id).fetch ! row ? row['name'] : '' end def feature_source(s_id) ! query = "select * from term where term_id = ?" row = @dbh.execute(query, s_id).fetch ! row ? row['name'] : '' end def feature_locations(f_id) locations = [] ! query = "select * from location where seqfeature_id = ?" @dbh.execute(query, f_id).fetch_all.each do |row| next unless row location = Bio::Location.new ! location.strand = row['strand'] ! location.from = row['start_pos'] ! location.to = row['end_pos'] ! xref = feature_locations_remote(row['dbxref_if']) location.xref_id = xref.shift unless xref.empty? *************** *** 269,273 **** #feature_locations_qv(row['seqfeature_location_id']) ! rank = row['location_rank'].to_i - 1 locations[rank] = location end --- 270,274 ---- #feature_locations_qv(row['seqfeature_location_id']) ! rank = row['rank'].to_i - 1 locations[rank] = location end *************** *** 276,280 **** def feature_locations_remote(l_id) ! query = "select * from remote_seqfeature_name where seqfeature_location_id = ?" row = @dbh.execute(query, l_id).fetch row ? [row['accession'], row['version']] : [] --- 277,281 ---- def feature_locations_remote(l_id) ! query = "select * from dbxref where dbxref_id = ?" row = @dbh.execute(query, l_id).fetch row ? [row['accession'], row['version']] : [] *************** *** 282,288 **** def feature_locations_qv(l_id) ! query = "select * from location_qualifier_value where seqfeature_location_id = ?" row = @dbh.execute(query, l_id).fetch ! row ? [row['qualifier_value'], row['slot_value']] : [] end --- 283,289 ---- def feature_locations_qv(l_id) ! query = "select * from location_qualifier_value where location_id = ?" row = @dbh.execute(query, l_id).fetch ! row ? [row['value'], row['int_value']] : [] end *************** *** 293,301 **** next unless row ! key = feature_qualifiers_key(row['seqfeature_qualifier_id']) ! value = row['qualifier_value'] qualifier = Bio::Feature::Qualifier.new(key, value) ! rank = row['seqfeature_qualifier_rank'].to_i - 1 qualifiers[rank] = qualifier end --- 294,302 ---- next unless row ! key = feature_qualifiers_key(row['seqfeature_id']) ! value = row['value'] qualifier = Bio::Feature::Qualifier.new(key, value) ! rank = row['rank'].to_i - 1 qualifiers[rank] = qualifier end *************** *** 304,310 **** def feature_qualifiers_key(q_id) ! query = "select * from seqfeature_qualifier where seqfeature_qualifier_id = ?" row = @dbh.execute(query, q_id).fetch ! row ? row['qualifier_name'] : '' end end --- 305,314 ---- def feature_qualifiers_key(q_id) ! query = <<-END ! select * from seqfeature_qualifier_value ! join term using(term_id) where seqfeature_id = ? ! END row = @dbh.execute(query, q_id).fetch ! row ? row['name'] : '' end end From ngoto at dev.open-bio.org Fri Dec 15 14:36:16 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 14:36:16 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip distance_matrix.rb, NONE, 1.1 Message-ID: <200612151436.kBFEaGGP019713@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv19693/lib/bio/appl/phylip Added Files: distance_matrix.rb Log Message: New class Bio::Phylip::DistanceMatrix, parser of phylip distance matrix (generated by dnadist/protdist/restdist). --- NEW FILE: distance_matrix.rb --- # # = bio/appl/phylip/distance_matrix.rb - phylip distance matrix parser # # Copyright:: Copyright (C) 2006 # GOTO Naohisa # # License:: Ruby's # # $Id: distance_matrix.rb,v 1.1 2006/12/15 14:36:14 ngoto Exp $ # # = About Bio::Phylip::DistanceMatrix # # Please refer document of Bio::Phylip::DistanceMatrix class. # require 'matrix' module Bio module Phylip # This is a parser class for phylip distance matrix data # created by dnadist, protdist, or restdist commands. # class DistanceMatrix # creates a new distance matrix object def initialize(str) data = str.strip.split(/(?:\r\n|\r|\n)/) @otus = data.shift.to_s.strip.to_i prev = nil data.collect! do |x| if /\A +/ =~ x and prev then prev.concat x.strip.split(/\s+/) nil else prev = x.strip.split(/\s+/) prev end end data.compact! if data.size != @otus then raise "inconsistent data (OTUs=#{@otus} but #{data.size} rows)" end @otu_names = data.collect { |x| x.shift } mat = data.collect do |x| if x.size != @otus then raise "inconsistent data (OTUs=#{@otus} but #{x.size} columns)" end x.collect { |y| y.to_f } end @matrix = Matrix.rows(mat, false) @original_matrix = Matrix.rows(data, false) end # distance matrix (returns Ruby's Matrix object) attr_reader :matrix # matrix contains values as original strings. # Use it when you doubt precision of floating-point numbers. attr_reader :original_matrix # number of OTUs attr_reader :otus # names of OTUs attr_reader :otu_names # Generates a new phylip distance matrix formatted text as a string. def self.generate(matrix, otu_names = nil) if matrix.row_size != matrix.column_size then raise "must be a square matrix" end otus = matrix.row_size data = (0...otus).collect do |i| name = ((otu_names and otu_names[i]) or "OTU#{i.to_s}") x = (0...otus).collect { |j| sprintf("%9.6f", matrix[i, j]) } x.unshift(sprintf("%-10s", name)[0, 10]) str = x[0, 7].join(' ') + "\n" 7.step(otus + 1, 7) do |k| str << ' ' + x[k, 7].join(' ') + "\n" end str end sprintf("%5d\n", otus) + data.join('') end end #class DistanceMatrix end #module Phylip end #module Bio From ngoto at dev.open-bio.org Fri Dec 15 14:59:28 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 14:59:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/phylip distance_matrix.rb, 1.1, 1.2 Message-ID: <200612151459.kBFExS52019864@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/phylip In directory dev.open-bio.org:/tmp/cvs-serv19837/lib/bio/appl/phylip Modified Files: distance_matrix.rb Log Message: Bio::Tree#output_phylip_distance_matrix(...) and Bio::Tree#output(:phylip_distance_matrix, ...) are added to output phylip-style distance matrix as a string. Index: distance_matrix.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/phylip/distance_matrix.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** distance_matrix.rb 15 Dec 2006 14:36:14 -0000 1.1 --- distance_matrix.rb 15 Dec 2006 14:59:26 -0000 1.2 *************** *** 67,79 **** # Generates a new phylip distance matrix formatted text as a string. ! def self.generate(matrix, otu_names = nil) if matrix.row_size != matrix.column_size then raise "must be a square matrix" end otus = matrix.row_size ! data = (0...otus).collect do |i| name = ((otu_names and otu_names[i]) or "OTU#{i.to_s}") x = (0...otus).collect { |j| sprintf("%9.6f", matrix[i, j]) } ! x.unshift(sprintf("%-10s", name)[0, 10]) str = x[0, 7].join(' ') + "\n" --- 67,82 ---- # Generates a new phylip distance matrix formatted text as a string. ! def self.generate(matrix, otu_names = nil, options = {}) if matrix.row_size != matrix.column_size then raise "must be a square matrix" end otus = matrix.row_size ! names = (0...otus).collect do |i| name = ((otu_names and otu_names[i]) or "OTU#{i.to_s}") + name + end + data = (0...otus).collect do |i| x = (0...otus).collect { |j| sprintf("%9.6f", matrix[i, j]) } ! x.unshift(sprintf("%-10s", names[i])[0, 10]) str = x[0, 7].join(' ') + "\n" From ngoto at dev.open-bio.org Fri Dec 15 14:59:28 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 14:59:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db newick.rb,1.5,1.6 Message-ID: <200612151459.kBFExSDP019859@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv19837/lib/bio/db Modified Files: newick.rb Log Message: Bio::Tree#output_phylip_distance_matrix(...) and Bio::Tree#output(:phylip_distance_matrix, ...) are added to output phylip-style distance matrix as a string. Index: newick.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/newick.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** newick.rb 13 Dec 2006 17:29:17 -0000 1.5 --- newick.rb 15 Dec 2006 14:59:25 -0000 1.6 *************** *** 206,209 **** --- 206,211 ---- when :nhx output_nhx(*arg, &block) + when :phylip_distance_matrix + output_phylip_distance_matrix(*arg, &block) else raise 'Unknown format' *************** *** 211,214 **** --- 213,235 ---- end + #--- + # This method isn't suitable to written in this file? + #+++ + + # Generates phylip-style distance matrix as a string. + # if nodes is not given, all leaves in the tree are used. + # If the names of some of the given (or default) nodes + # are not defined or are empty, the names are automatically generated. + def output_phylip_distance_matrix(nodes = nil, options = {}) + nodes = self.leaves unless nodes + names = nodes.collect do |x| + y = get_node_name(x) + y = sprintf("%x", x.__id__.abs) if y.empty? + y + end + m = self.distance_matrix(nodes) + Bio::Phylip::DistanceMatrix.generate(m, names, options) + end + end #class Tree From ngoto at dev.open-bio.org Fri Dec 15 15:02:29 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 15:02:29 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.74,1.75 Message-ID: <200612151502.kBFF2Txu019936@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv19916/lib Modified Files: bio.rb Log Message: autoload of Bio::Phylip::PhylipFormat and Bio::Phylip::DistanceMatrix are added. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** bio.rb 15 Dec 2006 06:29:01 -0000 1.74 --- bio.rb 15 Dec 2006 15:02:27 -0000 1.75 *************** *** 236,239 **** --- 236,244 ---- end + module Phylip + autoload :PhylipFormat, 'bio/appl/phylip/alignment' + autoload :DistanceMatrix, 'bio/appl/phylip/distance_matrix' + end + autoload :Iprscan, 'bio/appl/iprscan/report' From ngoto at dev.open-bio.org Fri Dec 15 16:23:20 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 16:23:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/mafft report.rb,1.10,1.11 Message-ID: <200612151623.kBFGNKi5020171@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/mafft In directory dev.open-bio.org:/tmp/cvs-serv20151/lib/bio/appl/mafft Modified Files: report.rb Log Message: INCOMAPTIBLE CHANGE: Bio::MAFFT::Report#initialize now gets string of multi-fasta formmatted text instead of Array. Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft/report.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** report.rb 14 Dec 2006 15:22:05 -0000 1.10 --- report.rb 15 Dec 2006 16:23:18 -0000 1.11 *************** *** 23,26 **** --- 23,27 ---- # + require 'stringio' require 'bio/db/fasta' require 'bio/io/flatfile' *************** *** 39,48 **** # Creates a new Report object. ! # +ary+ should be an Array of Bio::FastaFormat. # +seqclass+ should on of following: # Class: Bio::Sequence::AA, Bio::Sequence::NA, ... # String: 'PROTEIN', 'DNA', ... ! def initialize(ary, seqclass = nil) ! @data = ary @align = nil case seqclass --- 40,58 ---- # Creates a new Report object. ! # +str+ should be multi-fasta formatted text as a string. # +seqclass+ should on of following: # Class: Bio::Sequence::AA, Bio::Sequence::NA, ... # String: 'PROTEIN', 'DNA', ... ! # ! # Compatibility Note: the old usage (to get array of Bio::FastaFormat ! # objects) is deprecated. ! def initialize(str, seqclass = nil) ! if str.is_a?(Array) then ! warn "Array of Bio::FastaFormat objects will be no longer accepted." ! @data = str ! else ! ff = Bio::FlatFile.new(Bio::FastaFormat, StringIO.new(str)) ! @data = ff.to_a ! end @align = nil case seqclass From k at dev.open-bio.org Fri Dec 15 16:53:22 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Fri, 15 Dec 2006 16:53:22 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io sql.rb,1.6,1.7 Message-ID: <200612151653.kBFGrMJp020261@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv20257/io Modified Files: sql.rb Log Message: * fixed author's name, sorry. Index: sql.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/sql.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sql.rb 15 Dec 2006 14:24:42 -0000 1.6 --- sql.rb 15 Dec 2006 16:53:20 -0000 1.7 *************** *** 3,7 **** # # Copyright:: Copyright (C) 2002 Toshiaki Katayama ! # Copyright:: Copyright (C) 2006 Raoul Pierre Bonnal Jean # License:: Ruby's # --- 3,7 ---- # # Copyright:: Copyright (C) 2002 Toshiaki Katayama ! # Copyright:: Copyright (C) 2006 Raoul Jean Pierre Bonnal # License:: Ruby's # From ngoto at dev.open-bio.org Fri Dec 15 16:54:27 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 16:54:27 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io flatfile.rb,1.52,1.53 Message-ID: <200612151654.kBFGsRBx020289@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv20269/lib/bio/io Modified Files: flatfile.rb Log Message: Added file format autodetection support for T-COFFEE clustal format. Index: flatfile.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/flatfile.rb,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** flatfile.rb 14 Dec 2006 19:52:53 -0000 1.52 --- flatfile.rb 15 Dec 2006 16:54:25 -0000 1.53 *************** *** 1181,1186 **** /^RESIDUE +.+ +\d+\s*$/ ], ! clustal = RuleRegexp[ 'Bio::ClustalW::Report', ! /^CLUSTAL .*\(.*\).*sequence +alignment/ ], gcg_msf = RuleRegexp[ 'Bio::GCG::Msf', --- 1181,1187 ---- /^RESIDUE +.+ +\d+\s*$/ ], ! clustal = RuleRegexp2[ 'Bio::ClustalW::Report', ! /^CLUSTAL .*\(.*\).*sequence +alignment/, ! /^CLUSTAL FORMAT for T-COFFEE/ ], gcg_msf = RuleRegexp[ 'Bio::GCG::Msf', From ngoto at dev.open-bio.org Fri Dec 15 18:32:02 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 18:32:02 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.3,1.4 Message-ID: <200612151832.kBFIW2Wp020742@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv20722/lib/bio Modified Files: tree.rb Log Message: Added Bio::Tree::total_distance to calculate total distance (total length) of the current tree. Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tree.rb 13 Dec 2006 16:29:37 -0000 1.3 --- tree.rb 15 Dec 2006 18:32:00 -0000 1.4 *************** *** 694,697 **** --- 694,706 ---- end + # Returns total distance of all edges. + # It would raise error if some edges didn't contain distance values. + def total_distance + distance = 0 + self.each_edge do |source, target, edge| + distance += get_edge_distance(edge) + end + distance + end # Calculates distance matrix of given nodes. From ngoto at dev.open-bio.org Fri Dec 15 18:43:12 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 18:43:12 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.4,1.5 Message-ID: <200612151843.kBFIhC6H020832@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv20812/lib/bio Modified Files: tree.rb Log Message: added Bio::Tree#find_node_by_name to get node by name. Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tree.rb 15 Dec 2006 18:32:00 -0000 1.4 --- tree.rb 15 Dec 2006 18:43:10 -0000 1.5 *************** *** 372,375 **** --- 372,388 ---- end + # Finds a node in the tree by given name and returns the node. + # If the node does not found, returns nil. + # If multiple nodes with the same name exist, + # the result would be one of those (unspecified). + def find_node_by_name(str) + self.each_node do |node| + if get_node_name(node) == str + return node + end + end + nil + end + # Adds a node to the tree. # Returns self. From ngoto at dev.open-bio.org Fri Dec 15 18:45:19 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Fri, 15 Dec 2006 18:45:19 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio tree.rb,1.5,1.6 Message-ID: <200612151845.kBFIjJVZ020881@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv20861/lib/bio Modified Files: tree.rb Log Message: find_node_by_name is renamed to get_node_by_name Index: tree.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/tree.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tree.rb 15 Dec 2006 18:43:10 -0000 1.5 --- tree.rb 15 Dec 2006 18:45:17 -0000 1.6 *************** *** 376,380 **** # If multiple nodes with the same name exist, # the result would be one of those (unspecified). ! def find_node_by_name(str) self.each_node do |node| if get_node_name(node) == str --- 376,380 ---- # If multiple nodes with the same name exist, # the result would be one of those (unspecified). ! def get_node_by_name(str) self.each_node do |node| if get_node_name(node) == str From k at dev.open-bio.org Sun Dec 24 02:39:46 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:39:46 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails Rakefile,1.1,NONE Message-ID: <200612240239.kBO2dkuE007571@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails In directory dev.open-bio.org:/tmp/cvs-serv7567 Removed Files: Rakefile Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- Rakefile DELETED --- From k at dev.open-bio.org Sun Dec 24 02:40:28 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/test test_helper.rb, 1.1, NONE Message-ID: <200612240240.kBO2eSi7007595@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/test In directory dev.open-bio.org:/tmp/cvs-serv7591/test Removed Files: test_helper.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- test_helper.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:40:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script server,1.1,NONE Message-ID: <200612240240.kBO2edfk007619@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7615/script Removed Files: server Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- server DELETED --- From k at dev.open-bio.org Sun Dec 24 02:40:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script runner,1.1,NONE Message-ID: <200612240240.kBO2emLY007643@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7639/script Removed Files: runner Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- runner DELETED --- From k at dev.open-bio.org Sun Dec 24 02:40:56 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:40:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/process spinner, 1.1, NONE Message-ID: <200612240240.kBO2eumJ007667@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/process In directory dev.open-bio.org:/tmp/cvs-serv7663/script/process Removed Files: spinner Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- spinner DELETED --- From k at dev.open-bio.org Sun Dec 24 02:41:07 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/process spawner, 1.1, NONE Message-ID: <200612240241.kBO2f7bw007691@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/process In directory dev.open-bio.org:/tmp/cvs-serv7687/script/process Removed Files: spawner Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- spawner DELETED --- From k at dev.open-bio.org Sun Dec 24 02:41:15 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:15 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/process reaper, 1.1, NONE Message-ID: <200612240241.kBO2fFCi007715@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/process In directory dev.open-bio.org:/tmp/cvs-serv7711/script/process Removed Files: reaper Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- reaper DELETED --- From k at dev.open-bio.org Sun Dec 24 02:41:24 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:24 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script plugin,1.1,NONE Message-ID: <200612240241.kBO2fOYG007739@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7735/script Removed Files: plugin Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- plugin DELETED --- From k at dev.open-bio.org Sun Dec 24 02:41:33 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/performance profiler, 1.1, NONE Message-ID: <200612240241.kBO2fX2Y007763@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/performance In directory dev.open-bio.org:/tmp/cvs-serv7759/script/performance Removed Files: profiler Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- profiler DELETED --- From k at dev.open-bio.org Sun Dec 24 02:41:42 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:42 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script/performance benchmarker, 1.1, NONE Message-ID: <200612240241.kBO2fg0G007787@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script/performance In directory dev.open-bio.org:/tmp/cvs-serv7783/script/performance Removed Files: benchmarker Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- benchmarker DELETED --- From k at dev.open-bio.org Sun Dec 24 02:41:51 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script generate, 1.1, NONE Message-ID: <200612240241.kBO2fp7v007811@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7807/script Removed Files: generate Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- generate DELETED --- From k at dev.open-bio.org Sun Dec 24 02:41:59 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:41:59 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script destroy,1.1,NONE Message-ID: <200612240241.kBO2fxFO007835@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7831/script Removed Files: destroy Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- destroy DELETED --- From k at dev.open-bio.org Sun Dec 24 02:42:09 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:42:09 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script console,1.1,NONE Message-ID: <200612240242.kBO2g9Qq007859@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7855/script Removed Files: console Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- console DELETED --- From k at dev.open-bio.org Sun Dec 24 02:42:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:42:21 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script breakpointer, 1.1, NONE Message-ID: <200612240242.kBO2gLNH007883@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7879/script Removed Files: breakpointer Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- breakpointer DELETED --- From k at dev.open-bio.org Sun Dec 24 02:42:32 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:42:32 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/script about,1.1,NONE Message-ID: <200612240242.kBO2gWDE007907@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/script In directory dev.open-bio.org:/tmp/cvs-serv7903/script Removed Files: about Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- about DELETED --- From k at dev.open-bio.org Sun Dec 24 02:44:20 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/stylesheets main.css, 1.1, NONE Message-ID: <200612240244.kBO2iKKQ007937@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/stylesheets In directory dev.open-bio.org:/tmp/cvs-serv7933/public/stylesheets Removed Files: main.css Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- main.css DELETED --- From k at dev.open-bio.org Sun Dec 24 02:44:28 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:28 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public robots.txt, 1.1, NONE Message-ID: <200612240244.kBO2iSQc007961@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv7957/public Removed Files: robots.txt Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- robots.txt DELETED --- From k at dev.open-bio.org Sun Dec 24 02:44:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts prototype.js, 1.1, NONE Message-ID: <200612240244.kBO2ideA007985@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv7981/public/javascripts Removed Files: prototype.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- prototype.js DELETED --- From k at dev.open-bio.org Sun Dec 24 02:44:49 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:49 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts effects.js, 1.1, NONE Message-ID: <200612240244.kBO2inXG008009@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv8005/public/javascripts Removed Files: effects.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- effects.js DELETED --- From k at dev.open-bio.org Sun Dec 24 02:44:58 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:44:58 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts dragdrop.js, 1.1, NONE Message-ID: <200612240244.kBO2iw7M008033@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv8029/public/javascripts Removed Files: dragdrop.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dragdrop.js DELETED --- From k at dev.open-bio.org Sun Dec 24 02:45:08 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:45:08 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/javascripts controls.js, 1.1, NONE Message-ID: <200612240245.kBO2j8GH008057@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/javascripts In directory dev.open-bio.org:/tmp/cvs-serv8053/public/javascripts Removed Files: controls.js Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- controls.js DELETED --- From k at dev.open-bio.org Sun Dec 24 02:45:23 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:45:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public index.html, 1.1, NONE Message-ID: <200612240245.kBO2jNvr008081@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8077/public Removed Files: index.html Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- index.html DELETED --- From k at dev.open-bio.org Sun Dec 24 02:45:33 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:45:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/images rails.png, 1.1, NONE Message-ID: <200612240245.kBO2jXV9008105@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/images In directory dev.open-bio.org:/tmp/cvs-serv8101/public/images Removed Files: rails.png Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- rails.png DELETED --- From k at dev.open-bio.org Sun Dec 24 02:48:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:48:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public/images icon.png, 1.1, NONE Message-ID: <200612240248.kBO2mm5q008129@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public/images In directory dev.open-bio.org:/tmp/cvs-serv8125/public/images Removed Files: icon.png Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- icon.png DELETED --- From k at dev.open-bio.org Sun Dec 24 02:48:57 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:48:57 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public favicon.ico, 1.1, NONE Message-ID: <200612240248.kBO2mvuw008153@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8149/public Removed Files: favicon.ico Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- favicon.ico DELETED --- From k at dev.open-bio.org Sun Dec 24 02:49:13 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:13 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public dispatch.rb, 1.1, NONE Message-ID: <200612240249.kBO2nD9B008177@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8173/public Removed Files: dispatch.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dispatch.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:49:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:21 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public dispatch.fcgi, 1.1, NONE Message-ID: <200612240249.kBO2nL71008201@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8197/public Removed Files: dispatch.fcgi Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dispatch.fcgi DELETED --- From k at dev.open-bio.org Sun Dec 24 02:49:30 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public dispatch.cgi, 1.1, NONE Message-ID: <200612240249.kBO2nUPR008225@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8221/public Removed Files: dispatch.cgi Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- dispatch.cgi DELETED --- From k at dev.open-bio.org Sun Dec 24 02:49:38 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:38 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public 500.html, 1.1, NONE Message-ID: <200612240249.kBO2ncEJ008249@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8245/public Removed Files: 500.html Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- 500.html DELETED --- From k at dev.open-bio.org Sun Dec 24 02:49:49 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:49:49 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public 404.html, 1.1, NONE Message-ID: <200612240249.kBO2nnGS008273@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8269/public Removed Files: 404.html Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- 404.html DELETED --- From k at dev.open-bio.org Sun Dec 24 02:50:12 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:50:12 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/public .htaccess, 1.1, NONE Message-ID: <200612240250.kBO2oCsq008297@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/public In directory dev.open-bio.org:/tmp/cvs-serv8293/public Removed Files: .htaccess Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- .htaccess DELETED --- From k at dev.open-bio.org Sun Dec 24 02:50:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:50:21 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/doc README_FOR_APP, 1.1, NONE Message-ID: <200612240250.kBO2oLAX008321@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/doc In directory dev.open-bio.org:/tmp/cvs-serv8317/doc Removed Files: README_FOR_APP Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- README_FOR_APP DELETED --- From k at dev.open-bio.org Sun Dec 24 02:50:29 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:50:29 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config routes.rb, 1.1, NONE Message-ID: <200612240250.kBO2oT0Z008345@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8341/config Removed Files: routes.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- routes.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:51:15 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:51:15 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config/environments test.rb, 1.1, NONE Message-ID: <200612240251.kBO2pFMU008369@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config/environments In directory dev.open-bio.org:/tmp/cvs-serv8365/config/environments Removed Files: test.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- test.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:51:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:51:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config/environments production.rb, 1.1, NONE Message-ID: <200612240251.kBO2pmI0008393@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config/environments In directory dev.open-bio.org:/tmp/cvs-serv8389/config/environments Removed Files: production.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- production.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:51:59 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:51:59 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config/environments development.rb, 1.1, NONE Message-ID: <200612240251.kBO2pxYk008417@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config/environments In directory dev.open-bio.org:/tmp/cvs-serv8413/config/environments Removed Files: development.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- development.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:52:23 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:52:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config environment.rb, 1.1, NONE Message-ID: <200612240252.kBO2qNkK008441@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8437/config Removed Files: environment.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- environment.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:53:07 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config database.yml, 1.1, NONE Message-ID: <200612240253.kBO2r7Ui008465@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8461/config Removed Files: database.yml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- database.yml DELETED --- From k at dev.open-bio.org Sun Dec 24 02:53:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/config boot.rb,1.1,NONE Message-ID: <200612240253.kBO2rH92008489@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/config In directory dev.open-bio.org:/tmp/cvs-serv8485/config Removed Files: boot.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- boot.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:53:26 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:26 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/shell show.rhtml, 1.1, NONE Message-ID: <200612240253.kBO2rQYl008513@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/shell In directory dev.open-bio.org:/tmp/cvs-serv8509/app/views/shell Removed Files: show.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- show.rhtml DELETED --- From k at dev.open-bio.org Sun Dec 24 02:53:56 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:53:56 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/shell index.rhtml, 1.1, NONE Message-ID: <200612240253.kBO2ruGr008537@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/shell In directory dev.open-bio.org:/tmp/cvs-serv8533/app/views/shell Removed Files: index.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- index.rhtml DELETED --- From k at dev.open-bio.org Sun Dec 24 02:54:05 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:05 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/shell history.rhtml, 1.1, NONE Message-ID: <200612240254.kBO2s52p008561@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/shell In directory dev.open-bio.org:/tmp/cvs-serv8557/app/views/shell Removed Files: history.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- history.rhtml DELETED --- From k at dev.open-bio.org Sun Dec 24 02:54:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/views/layouts shell.rhtml, 1.1, NONE Message-ID: <200612240254.kBO2sHa3008585@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/views/layouts In directory dev.open-bio.org:/tmp/cvs-serv8581/app/views/layouts Removed Files: shell.rhtml Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- shell.rhtml DELETED --- From k at dev.open-bio.org Sun Dec 24 02:54:30 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:30 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/models shell_connection.rb, 1.1, NONE Message-ID: <200612240254.kBO2sUhj008609@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/models In directory dev.open-bio.org:/tmp/cvs-serv8605/app/models Removed Files: shell_connection.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- shell_connection.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:54:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/helpers application_helper.rb, 1.1, NONE Message-ID: <200612240254.kBO2sdQ8008633@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/helpers In directory dev.open-bio.org:/tmp/cvs-serv8629/app/helpers Removed Files: application_helper.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- application_helper.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:54:48 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:48 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/controllers shell_controller.rb, 1.1, NONE Message-ID: <200612240254.kBO2smnH008657@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/controllers In directory dev.open-bio.org:/tmp/cvs-serv8653/app/controllers Removed Files: shell_controller.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- shell_controller.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 02:54:58 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 02:54:58 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/app/controllers application.rb, 1.1, NONE Message-ID: <200612240254.kBO2sw4C008681@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/app/controllers In directory dev.open-bio.org:/tmp/cvs-serv8677/app/controllers Removed Files: application.rb Log Message: remove rails's copy (among these, script/server and the files under app/ were the original but we rewrited new version as a generator, which will be committed soon). --- application.rb DELETED --- From k at dev.open-bio.org Sun Dec 24 06:18:52 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 06:18:52 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators - New directory Message-ID: <200612240618.kBO6Iqcc009086@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators In directory dev.open-bio.org:/tmp/cvs-serv9082/generators Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators added to the repository From k at dev.open-bio.org Sun Dec 24 06:19:19 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 06:19:19 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby - New directory Message-ID: <200612240619.kBO6JJFK009111@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby In directory dev.open-bio.org:/tmp/cvs-serv9107/bioruby Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby added to the repository From k at dev.open-bio.org Sun Dec 24 06:19:55 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 06:19:55 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates - New directory Message-ID: <200612240619.kBO6JtNK009135@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates In directory dev.open-bio.org:/tmp/cvs-serv9131/templates Log Message: Directory /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates added to the repository From k at dev.open-bio.org Sun Dec 24 08:27:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:27:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby bioruby_generator.rb, NONE, 1.1 Message-ID: <200612240827.kBO8RHk0009285@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby In directory dev.open-bio.org:/tmp/cvs-serv9279 Added Files: bioruby_generator.rb Log Message: * Rails generator for BioRuby shell on Rails --- NEW FILE: bioruby_generator.rb --- class BiorubyGenerator < Rails::Generator::Base def manifest record do |m| m.directory 'app/controllers' m.directory 'app/helpers' m.directory 'app/views/bioruby' m.directory 'app/views/layouts' m.directory 'public/images' m.directory 'public/stylesheets' m.file 'bioruby_controller.rb', 'app/controllers/bioruby_controller.rb' m.file 'bioruby_helper.rb', 'app/helpers/bioruby_helper.rb' m.file '_methods.rhtml', 'app/views/bioruby/_methods.rhtml' m.file '_classes.rhtml', 'app/views/bioruby/_classes.rhtml' m.file '_modules.rhtml', 'app/views/bioruby/_modules.rhtml' m.file '_result.rhtml', 'app/views/bioruby/_result.rhtml' m.file '_variables.rhtml', 'app/views/bioruby/_variables.rhtml' m.file 'commands.rhtml', 'app/views/bioruby/commands.rhtml' m.file 'history.rhtml', 'app/views/bioruby/history.rhtml' m.file 'index.rhtml', 'app/views/bioruby/index.rhtml' m.file 'bioruby.rhtml', 'app/views/layouts/bioruby.rhtml' m.file 'bioruby.png', 'public/images/bioruby.png' m.file 'bioruby.css', 'public/stylesheets/bioruby.css' end end end From k at dev.open-bio.org Sun Dec 24 08:27:17 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:27:17 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates _classes.rhtml, NONE, 1.1 _methods.rhtml, NONE, 1.1 _modules.rhtml, NONE, 1.1 _result.rhtml, NONE, 1.1 _variables.rhtml, NONE, 1.1 bioruby.css, NONE, 1.1 bioruby.png, NONE, 1.1 bioruby.rhtml, NONE, 1.1 bioruby_controller.rb, NONE, 1.1 bioruby_helper.rb, NONE, 1.1 commands.rhtml, NONE, 1.1 history.rhtml, NONE, 1.1 index.rhtml, NONE, 1.1 shell_helper.rb, NONE, 1.1 Message-ID: <200612240827.kBO8RHVb009287@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/rails/vendor/plugins/generators/bioruby/templates In directory dev.open-bio.org:/tmp/cvs-serv9279/templates Added Files: _classes.rhtml _methods.rhtml _modules.rhtml _result.rhtml _variables.rhtml bioruby.css bioruby.png bioruby.rhtml bioruby_controller.rb bioruby_helper.rb commands.rhtml history.rhtml index.rhtml shell_helper.rb Log Message: * Rails generator for BioRuby shell on Rails --- NEW FILE: shell_helper.rb --- module ShellHelper include Bio::Shell def evaluate_script(script) @local_variables = eval("local_variables", Bio::Shell.cache[:binding]) - ["_erbout"] # write out to history begin Bio::Shell.cache[:histfile].puts "#{Time.now}\t#{script.strip.inspect}" eval(script, Bio::Shell.cache[:binding]) rescue $! end end def method_link() end def reference_link(class_name) case class_name when /Bio::(.+)/ "http://bioruby.org/rdoc/classes/Bio/#{$1.split('::').join('/')}.html" when /Chem::(.+)/ "http://chemruby.org/rdoc/classes/Chem/#{$1.split('::').join('/')}.html" else "http://www.ruby-doc.org/core/classes/#{class_name.split('::').join('/')}.html" end end end --- NEW FILE: _classes.rhtml --- [ <%= @class %> ] <%= @classes.map{ |x| reference_link(x) }.join(" > ") %> --- NEW FILE: commands.rhtml ---

BioRuby shell commands

    <% @bioruby_commands.each do |cmd| %>
  • <%= cmd %>
  • <% end %>
--- NEW FILE: bioruby.rhtml --- BioRuby shell on Rails <%= stylesheet_link_tag "bioruby.css" %> <%= javascript_include_tag :defaults %>

Project
  • <%= project_workdir %>
Functions
  • <%= link_to "Console", :action => "index" %>
  • <%= link_to "History", :action => "history" %>
  • <%= link_to "Commands", :action => "commands" %>
Local variables
<%= render :partial => "variables" %>

BioRuby shell on Rails

<%= yield %>
--- NEW FILE: _modules.rhtml --- [ <%= @class %> ] <%= @modules.map {|x| reference_link(x) }.join(" | ") %> --- NEW FILE: _variables.rhtml ---
    <% local_variables.each do |var| %>
  • <%= link_to_remote var, :update => "index", :url => {:action => "evaluate", :script => var} %>
  • <% end %>
--- NEW FILE: bioruby.css --- /* body */ body { color: #6e8377; background-color: #ffffff; font-family: verdana, arial, helvetica, sans-serif; } /* main */ div#main { width: 700px; background-color: #ffffff; padding-top: 0px; padding-left: 10px; } pre { color: #6e8377; background-color: #eaedeb; border-color: #6e8377; border-style: dashed; border-width: 1px; padding: 5px; overflow: auto; } div.evaluate div.input pre.script { background-color: #ffffeb; border-style: solid; } div.evaluate div.output div.methods { padding: 5px; background-color: #ffffdd; border: 1px solid #ffcc00; } div.evaluate div.output div.classes { padding: 5px; background-color: #ccffcc; border: 1px solid #00ff00; } div.evaluate div.output div.modules { padding: 5px; background-color: #ffcccc; border: 1px solid #ff0000; } div.evaluate div.output pre.result { border-style: dashed; } div.evaluate div.output pre.output { border-style: dashed; } div.evaluate hr.evaluate { border-style: dotted none none none; border-top-width: 1px; border-color: #6e8377; height: 1px; } /* side */ div#side { width: 150px; background-color: #ffffff; position: absolute; top: 10px; left: 10px; } div#side div.title { border-width: 0px 0px 1px 0px; } div#side img { padding: 5px; } /* history */ div#history { } div#history div.histtime { background-color: #eaedeb; padding: 5px; } div#history div.histline { background-color: #ffffeb; padding: 5px; font-family: monospace; white-space: pre; } /* image */ img { /* centering */ display: block; margin-left: auto; margin-right: auto; } /* em */ em { color: #6e8377; font-style: normal; } /* link */ a { text-decoration: none; } a:link { color: #669933; } a:visited { color: #669933; } a:hover { text-decoration: underline; } /* header */ h1 { font-size: 200%; color: #ffffff; background-color: #6e8377; line-height: 64px; text-align: right; padding-right: 20px; } h2 { font-size: 160%; color: #6e8377; border-color: #b9c3be; border-style: dashed; border-width: 0px 0px 1px 0px; } h3 { font-size: 140%; color: #6e8377; border-color: #b9c3be; border-style: dotted; border-width: 0px 0px 1px 0px; } h4 { font-size: 130%; color: #6e8377; border-color: #b9c3be; border-style: solid; border-width: 0px 0px 1px 0px; } h5 { font-size: 120%; color: #6e8377; } h6 { font-size: 110%; color: #6e8377; } /* list */ dt { color: #6e8377; border-color: #b9c3be; border-style: dashed; border-width: 1px; padding: 5px; } ul { color: #6e8377; } /* table */ th { vertical-align: top; } td { vertical-align: top; } /* textarea */ textarea { overflow: auto; } /* blockquote */ blockquote { color: #6e8377; background-color: #eaedeb; border-color: #6e8377; border-style: dashed; border-width: 1px; } /* media */ @media print { div#main { margin-left: 0px; } div#side { display: none; } } @media screen { div#main { margin-left: 150px; } div#side { display: block; } } --- NEW FILE: bioruby_helper.rb --- module BiorubyHelper HIDE_VARIABLES = [ "_", "irb", "_erbout", ] include Bio::Shell def project_workdir Bio::Shell.cache[:workdir] end def have_results Bio::Shell.cache[:results].number > 0 end def local_variables eval("local_variables", Bio::Shell.cache[:binding]) - HIDE_VARIABLES end def reference_link(class_or_module) name = class_or_module.to_s case name when /Bio::(.+)/ path = $1.split('::').join('/') url = "http://bioruby.org/rdoc/classes/Bio/#{path}.html" when /Chem::(.+)/ path = $1.split('::').join('/') url = "http://chemruby.org/rdoc/classes/Chem/#{path}.html" else path = name.split('::').join('/') url = "http://www.ruby-doc.org/core/classes/#{path}.html" end return "#{name}" end end --- NEW FILE: _result.rhtml ---

Input: [<%= @number %>]
<%=h @script %>
Result: [<%= link_to_remote "methods", :url => {:action => "list_methods", :number => @number} %>] [<%= link_to_remote "classes", :url => {:action => "list_classes", :number => @number} %>] [<%= link_to_remote "modules", :url => {:action => "list_modules", :number => @number} %>]
<%=h @result %>
<% if @output %> Output:
<%=h @output %>
<% end %>
--- NEW FILE: _methods.rhtml --- [ <%= @class %> ] <% @methods.sort.each do |x| %> <%= x %> <% end %> --- NEW FILE: index.rhtml ---
<%= form_remote_tag(:url => {:action => "evaluate"}, :position => "top") %> BioRuby script    Show [ <%= link_to_remote "All", :url => {:action => "results", :limit => 0} %> | <%= link_to_remote "Last 5", :url => {:action => "results", :limit => 5} %> | <%= link_to_remote "Previous", :url => {:action => "results", :limit => 1} %> ] or [ <%= link_to "Clear", :action => "index" %> ] results

<%= end_form_tag %>
--- NEW FILE: history.rhtml ---

Command history

<% @history.each do |line| %> <% if line[/^# /] %>
<%= line %>
<% else %>
<%= line %>
<% end %> <% end %>
--- NEW FILE: bioruby_controller.rb --- class BiorubyController < ApplicationController HIDE_METHODS = Object.methods HIDE_MODULES = [ WEBrick, Base64::Deprecated, Base64, PP::ObjectMixin, ] def evaluate begin @script = params[:script].strip # write out to history Bio::Shell.store_history(@script) # evaluate ruby script @result = eval(@script, Bio::Shell.cache[:binding]) # *TODO* need to handle with output of print/puts/p/pp etc. here @output = nil rescue @result = $! @output = nil end @number = Bio::Shell.cache[:results].store(@script, @result, @output) render :update do |page| page.insert_html :after, "console", :partial => "result" page.replace_html "variables", :partial => "variables" page.hide "methods_#{@number}" page.hide "classes_#{@number}" page.hide "modules_#{@number}" end end def list_methods number = params[:number].to_i script, result, output = Bio::Shell.cache[:results].restore(number) @class = result.class @methods = result.methods - HIDE_METHODS render :update do |page| page.replace_html "methods_#{number}", :partial => "methods" page.visual_effect :toggle_blind, "methods_#{number}", :duration => 0.5 end end def list_classes number = params[:number].to_i script, result, output = Bio::Shell.cache[:results].restore(number) class_name = result.class @class = class_name @classes = [] loop do @classes.unshift(class_name) if class_name == Object break else class_name = class_name.superclass end end render :update do |page| page.replace_html "classes_#{number}", :partial => "classes" page.visual_effect :toggle_blind, "classes_#{number}", :duration => 0.5 end end def list_modules number = params[:number].to_i script, result, output = Bio::Shell.cache[:results].restore(number) @class = result.class @modules = result.class.included_modules - HIDE_MODULES render :update do |page| page.replace_html "modules_#{number}", :partial => "modules" page.visual_effect :toggle_blind, "modules_#{number}", :duration => 0.5 end end def results if Bio::Shell.cache[:results].number > 0 limit = params[:limit].to_i max_num = Bio::Shell.cache[:results].number min_num = [ max_num - limit + 1, 1 ].max min_num = 1 if limit == 0 render :update do |page| # delete all existing results in the current DOM for clean up page.select(".evaluate").each do |element| page.remove element end # add selected results to the current DOM min_num.upto(max_num) do |@number| @script, @result, @output = Bio::Shell.cache[:results].restore(@number) if @script page.insert_html :after, "console", :partial => "result" page.replace_html "variables", :partial => "variables" page.hide "methods_#{@number}" page.hide "classes_#{@number}" page.hide "modules_#{@number}" end end end end end def commands @bioruby_commands = Bio::Shell.private_instance_methods.sort end def history @history = File.readlines(Bio::Shell.history_file) end end --- NEW FILE: bioruby.png --- (This appears to be a binary file; contents omitted.) From k at dev.open-bio.org Sun Dec 24 08:32:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:32:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio shell.rb,1.16,1.17 Message-ID: <200612240832.kBO8WAHA009411@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv9398/lib/bio Modified Files: shell.rb Log Message: * New BioRuby shell with Ruby on Rails generator functionality is integrated. Index: shell.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell.rb,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** shell.rb 25 Jul 2006 18:45:27 -0000 1.16 --- shell.rb 24 Dec 2006 08:32:08 -0000 1.17 *************** *** 12,23 **** require 'yaml' require 'open-uri' require 'pp' module Bio::Shell require 'bio/shell/core' require 'bio/shell/interface' require 'bio/shell/object' - require 'bio/shell/web' require 'bio/shell/demo' require 'bio/shell/plugin/entry' --- 12,27 ---- require 'yaml' require 'open-uri' + require 'fileutils' require 'pp' module Bio::Shell + require 'bio/shell/setup' + require 'bio/shell/irb' + require 'bio/shell/web' + require 'bio/shell/script' require 'bio/shell/core' require 'bio/shell/interface' require 'bio/shell/object' require 'bio/shell/demo' require 'bio/shell/plugin/entry' *************** *** 33,37 **** extend Ghost - extend Private end --- 37,40 ---- From k at dev.open-bio.org Sun Dec 24 08:32:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:32:10 +0000 Subject: [BioRuby-cvs] bioruby/bin bioruby,1.16,1.17 Message-ID: <200612240832.kBO8WA76009406@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/bin In directory dev.open-bio.org:/tmp/cvs-serv9398/bin Modified Files: bioruby Log Message: * New BioRuby shell with Ruby on Rails generator functionality is integrated. Index: bioruby =================================================================== RCS file: /home/repository/bioruby/bioruby/bin/bioruby,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** bioruby 25 Jul 2006 18:16:28 -0000 1.16 --- bioruby 24 Dec 2006 08:32:08 -0000 1.17 *************** *** 15,151 **** rescue LoadError end - - - ### BioRuby shell setup - require 'bio/shell' include Bio::Shell ! # command line argument (working directory or bioruby shell script file) ! workdir = nil ! script = nil ! if arg = ARGV.shift ! if File.directory?(arg) ! # directory or symlink to directory ! workdir = arg ! Dir.chdir(workdir) ! elsif File.exists?(arg) ! # BioRuby shell script (load script after the previous session is restored) ! workdir = File.dirname(arg) ! script = File.basename(arg) ! Dir.chdir(workdir) ! else ! workdir = arg ! Dir.mkdir(workdir) ! Dir.chdir(workdir) ! end ! else ! unless File.exists?(Bio::Shell.history) ! message = "Are you sure to start new session in this directory? [y/n] " ! unless Bio::Shell.ask_yes_or_no(message) ! exit ! end ! end ! end ! ! # loading configuration and plugins ! Bio::Shell.setup ! ! ! ### IRB setup ! ! require 'irb' ! begin ! require 'irb/completion' ! Bio::Shell.cache[:readline] = true ! rescue LoadError ! Bio::Shell.cache[:readline] = false ! end ! ! IRB.setup(nil) ! ! # set application name ! IRB.conf[:AP_NAME] = 'bioruby' ! ! # change prompt for bioruby ! $_ = Bio::Shell.esc_seq ! IRB.conf[:PROMPT][:BIORUBY_COLOR] = { ! :PROMPT_I => "bio#{$_[:ruby]}ruby#{$_[:none]}> ", ! :PROMPT_S => "bio#{$_[:ruby]}ruby#{$_[:none]}%l ", ! :PROMPT_C => "bio#{$_[:ruby]}ruby#{$_[:none]}+ ", ! :RETURN => " ==> %s\n" ! } ! IRB.conf[:PROMPT][:BIORUBY] = { ! :PROMPT_I => "bioruby> ", ! :PROMPT_S => "bioruby%l ", ! :PROMPT_C => "bioruby+ ", ! :RETURN => " ==> %s\n" ! } ! if Bio::Shell.config[:color] ! IRB.conf[:PROMPT_MODE] = :BIORUBY_COLOR ! else ! IRB.conf[:PROMPT_MODE] = :BIORUBY ! end ! IRB.conf[:ECHO] = Bio::Shell.config[:echo] || false ! ! # irb/input-method.rb >= v1.5 (not in 1.8.2) ! #IRB.conf[:SAVE_HISTORY] = 100000 ! ! # not beautifully works ! #IRB.conf[:AUTO_INDENT] = true ! ! ! ### Start IRB ! ! irb = IRB::Irb.new ! ! # needed for method completion ! IRB.conf[:MAIN_CONTEXT] = irb.context # loading workspace and command history Bio::Shell.load_session - if script - load script - exit - end - - Bio::Shell.create_save_dir - - $history_file = File.open(Bio::Shell.history, "a") - $history_file.sync = true - - # overwrite gets to store history with time stamp - io = IRB.conf[:MAIN_CONTEXT].io - - io.class.class_eval do - alias_method :irb_original_gets, :gets - end - - def io.gets - line = irb_original_gets - $history_file.puts "#{Time.now}\t#{line}" if line - line - end - # main loop ! Signal.trap("SIGINT") do ! irb.signal_handle ! end ! ! catch(:IRB_EXIT) do ! irb.eval_input ! end ! ! $history_file.close if $history_file ! # shut down the rails server ! if $web_server ! $web_server.each do |io| ! io.close end - $web_access_log.close if $web_access_log - $web_error_log.close if $web_error_log end --- 15,40 ---- rescue LoadError end require 'bio/shell' + # required to run commands (getseq, ls etc.) include Bio::Shell ! # setup command line options, working directory, and irb configurations ! Bio::Shell::Setup.new # loading workspace and command history Bio::Shell.load_session # main loop ! if Bio::Shell.cache[:rails] ! Bio::Shell.cache[:rails].join ! else ! Signal.trap("SIGINT") do ! Bio::Shell.cache[:irb].signal_handle ! end ! catch(:IRB_EXIT) do ! Bio::Shell.cache[:irb].eval_input end end *************** *** 153,160 **** Bio::Shell.save_session - if workdir - puts "Leaving directory '#{workdir}'." - puts "History is saved in '#{workdir}/#{Bio::Shell.history}'." - end - - --- 42,43 ---- From k at dev.open-bio.org Sun Dec 24 08:32:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:32:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell setup.rb, NONE, 1.1 irb.rb, NONE, 1.1 script.rb, NONE, 1.1 web.rb, 1.1, 1.2 Message-ID: <200612240832.kBO8WAbT009416@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9398/lib/bio/shell Modified Files: web.rb Added Files: setup.rb irb.rb script.rb Log Message: * New BioRuby shell with Ruby on Rails generator functionality is integrated. Index: web.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/web.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** web.rb 27 Feb 2006 09:22:42 -0000 1.1 --- web.rb 24 Dec 2006 08:32:08 -0000 1.2 *************** *** 13,88 **** module Bio::Shell ! private ! def rails_directory_setup ! server = "script/server" ! unless File.exists?(server) ! require 'fileutils' ! basedir = File.dirname(__FILE__) ! print "Copying web server files ... " ! FileUtils.cp_r("#{basedir}/rails/.", ".") ! puts "done" end - end ! def rails_server_setup ! require 'open3' ! $web_server = Open3.popen3(server) ! $web_error_log = File.open("log/web-error.log", "a") ! $web_server[2].reopen($web_error_log) ! while line = $web_server[1].gets ! if line[/druby:\/\/localhost/] ! uri = line.chomp ! puts uri if $DEBUG ! break end end ! $web_access_log = File.open("log/web-access.log", "a") ! $web_server[1].reopen($web_access_log) ! ! return uri ! end ! def web ! return if $web_server ! require 'drb/drb' ! # $SAFE = 1 # disable eval() and friends ! rails_directory_setup ! #uri = rails_server_setup ! uri = 'druby://localhost:81064' # baioroji- ! $drb_server = DRbObject.new_with_uri(uri) ! $drb_server.puts_remote("Connected") ! puts "Connected to server #{uri}" ! puts "Open http://localhost:3000/shell/" ! io = IRB.conf[:MAIN_CONTEXT].io ! io.class.class_eval do ! alias_method :shell_original_gets, :gets ! end - def io.gets - bind = IRB.conf[:MAIN_CONTEXT].workspace.binding - vars = eval("local_variables", bind) - vars.each do |var| - next if var == "_" - if val = eval("#{var}", bind) - $drb_server[var] = val - else - $drb_server.delete(var) - end - end - line = shell_original_gets - line - end - end - end --- 13,93 ---- module Bio::Shell ! class Web ! def initialize ! Bio::Shell.cache[:binding] = binding ! Bio::Shell.cache[:results] ||= Results.new ! install_rails ! setup_rails ! start_rails end ! private ! def setup_rails ! puts ! puts ">>>" ! puts ">>> open http://localhost:3000/bioruby" ! puts ">>>" ! puts ! puts '(port # may differ if opts for rails are given "bioruby --web proj -- -p port")' ! puts ! end ! def install_rails ! unless File.exist?("script/generate") ! puts "Installing Rails application for BioRuby shell ... " ! system("rails .") ! puts "done" ! end ! unless File.exist?("app/controllers/bioruby_controller.rb") ! basedir = File.dirname(__FILE__) ! puts "Installing Rails plugin for BioRuby shell ... " ! FileUtils.cp_r("#{basedir}/rails/.", ".") ! system("./script/generate bioruby shell") ! puts "done" end end ! def start_rails ! begin ! Bio::Shell.cache[:rails] = Thread.new { ! require './config/boot' ! require 'commands/server' ! } ! end ! end ! class Results ! attr_accessor :number, :script, :result, :output ! def initialize ! @number = 0 ! @script = [] ! @result = [] ! @output = [] ! end ! def store(script, result, output) ! @number += 1 ! @script[@number] = script ! @result[@number] = result ! @output[@number] = output ! return @number ! end ! def restore(number) ! return @script[number], @result[number], @output[number] ! end ! end ! end ! private ! # *TODO* stop irb and start rails? ! #def web ! #end end --- NEW FILE: irb.rb --- # # = bio/shell/irb.rb - CUI for the BioRuby shell # # Copyright:: Copyright (C) 2006 # Toshiaki Katayama # License:: Ruby's # # $Id: irb.rb,v 1.1 2006/12/24 08:32:08 k Exp $ # module Bio::Shell class Irb def initialize require 'irb' begin require 'irb/completion' Bio::Shell.cache[:readline] = true rescue LoadError Bio::Shell.cache[:readline] = false end IRB.setup(nil) setup_irb start_irb end def start_irb Bio::Shell.cache[:irb] = IRB::Irb.new # needed for method completion IRB.conf[:MAIN_CONTEXT] = Bio::Shell.cache[:irb].context # store binding for evaluation Bio::Shell.cache[:binding] = IRB.conf[:MAIN_CONTEXT].workspace.binding # overwrite gets to store history with time stamp io = IRB.conf[:MAIN_CONTEXT].io io.class.class_eval do alias_method :irb_original_gets, :gets end def io.gets line = irb_original_gets if line Bio::Shell.store_history(line) end return line end end def setup_irb # set application name IRB.conf[:AP_NAME] = 'bioruby' # change prompt for bioruby $_ = Bio::Shell.colors IRB.conf[:PROMPT][:BIORUBY_COLOR] = { :PROMPT_I => "bio#{$_[:ruby]}ruby#{$_[:none]}> ", :PROMPT_S => "bio#{$_[:ruby]}ruby#{$_[:none]}%l ", :PROMPT_C => "bio#{$_[:ruby]}ruby#{$_[:none]}+ ", :RETURN => " ==> %s\n" } IRB.conf[:PROMPT][:BIORUBY] = { :PROMPT_I => "bioruby> ", :PROMPT_S => "bioruby%l ", :PROMPT_C => "bioruby+ ", :RETURN => " ==> %s\n" } if Bio::Shell.config[:color] IRB.conf[:PROMPT_MODE] = :BIORUBY_COLOR else IRB.conf[:PROMPT_MODE] = :BIORUBY end # echo mode (uncomment to off by default) #IRB.conf[:ECHO] = Bio::Shell.config[:echo] || false # irb/input-method.rb >= v1.5 (not in 1.8.2) #IRB.conf[:SAVE_HISTORY] = 100000 # not nicely works #IRB.conf[:AUTO_INDENT] = true end end # Irb end --- NEW FILE: script.rb --- # # = bio/shell/script.rb - script mode for the BioRuby shell # # Copyright:: Copyright (C) 2006 # Toshiaki Katayama # License:: Ruby's # # $Id: script.rb,v 1.1 2006/12/24 08:32:08 k Exp $ # module Bio::Shell class Script def initialize(script) Bio::Shell.cache[:binding] = TOPLEVEL_BINDING Bio::Shell.load_session eval(File.read(File.join(Bio::Shell.script_dir, script)), TOPLEVEL_BINDING) exit end end # Script end --- NEW FILE: setup.rb --- # # = bio/shell/setup.rb - setup initial environment for the BioRuby shell # # Copyright:: Copyright (C) 2006 # Toshiaki Katayama # License:: Ruby's # # $Id: setup.rb,v 1.1 2006/12/24 08:32:08 k Exp $ # require 'getoptlong' class Bio::Shell::Setup def initialize check_ruby_version # command line options getoptlong # setup working directory setup_workdir # load configuration and plugins Dir.chdir(@workdir) Bio::Shell.configure Bio::Shell.cache[:workdir] = @workdir # set default to irb mode @mode ||= :irb case @mode when :web # setup rails server Bio::Shell::Web.new when :irb # setup irb server Bio::Shell::Irb.new when :script # run bioruby shell script Bio::Shell::Script.new(@script) end end def check_ruby_version if RUBY_VERSION < "1.8.2" raise "BioRuby shell runs on Ruby version >= 1.8.2" end end # command line argument (working directory or bioruby shell script file) def getoptlong opts = GetoptLong.new opts.set_options( [ '--rails', '-r', GetoptLong::NO_ARGUMENT ], [ '--web', '-w', GetoptLong::NO_ARGUMENT ], [ '--console', '-c', GetoptLong::NO_ARGUMENT ], [ '--irb', '-i', GetoptLong::NO_ARGUMENT ] ) opts.each_option do |opt, arg| case opt when /--rails/, /--web/ @mode = :web when /--console/, /--irb/ @mode = :irb end end end def setup_workdir arg = ARGV.shift # Options after the '--' argument are not parsed by GetoptLong and # are passed to irb or rails. This hack preserve the first option # when working directory of the project is not given. if arg and arg[/^-/] ARGV.unshift arg arg = nil end if arg.nil? # run in current directory @workdir = current_workdir elsif File.directory?(arg) # run in existing directory @workdir = arg elsif File.file?(arg) # run file as a bioruby shell script @workdir = File.join(File.dirname(arg), "..") @script = File.basename(arg) @mode = :script else # run in new directory @workdir = install_workdir(arg) end end def current_workdir unless File.exists?(Bio::Shell.datadir) message = "Are you sure to start new session in this directory? [y/n] " unless Bio::Shell.ask_yes_or_no(message) exit end end return '.' end def install_workdir(workdir) FileUtils.mkdir_p(workdir) return workdir end end # Setup From k at dev.open-bio.org Sun Dec 24 08:36:02 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:36:02 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell core.rb,1.21,1.22 Message-ID: <200612240836.kBO8a244009480@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9476 Modified Files: core.rb Log Message: * independent from IRB (except for some config routines) * interface (Core) is separated from internals (Ghost) Index: core.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/core.rb,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** core.rb 27 Feb 2006 09:09:57 -0000 1.21 --- core.rb 24 Dec 2006 08:36:00 -0000 1.22 *************** *** 9,23 **** # ! module Bio::Shell::Ghost ! ! SAVEDIR = "session/" CONFIG = "config" OBJECT = "object" HISTORY = "history" ! SCRIPT = "script.rb" ! PLUGIN = "plugin/" DATADIR = "data/" ! BIOFLAT = "bioflat/" MARSHAL = [ Marshal::MAJOR_VERSION, Marshal::MINOR_VERSION ] --- 9,22 ---- # + module Bio::Shell::Core ! SAVEDIR = "shell/session/" CONFIG = "config" OBJECT = "object" HISTORY = "history" ! SCRIPT = "shell/script.rb" ! PLUGIN = "shell/plugin/" DATADIR = "data/" ! BIOFLAT = "data/bioflat/" MARSHAL = [ Marshal::MAJOR_VERSION, Marshal::MINOR_VERSION ] *************** *** 37,42 **** } ! def history ! SAVEDIR + HISTORY end --- 36,41 ---- } ! def colors ! ESC_SEQ end *************** *** 45,63 **** end ! def esc_seq ! ESC_SEQ end ! ### save/restore the environment ! def setup ! @config = {} ! @cache = {} ! check_version ! check_marshal ! load_config ! load_plugin end ! # A hash to store persistent configurations attr_accessor :config --- 44,83 ---- end ! def script_dir ! File.dirname(SCRIPT) end ! def object_file ! SAVEDIR + OBJECT ! end ! def history_file ! SAVEDIR + HISTORY end ! ! def ask_yes_or_no(message) ! loop do ! print "#{message}" ! answer = gets ! if answer.nil? ! # readline support might be broken ! return false ! elsif /^\s*[Nn]/.match(answer) ! return false ! elsif /^\s*[Yy]/.match(answer) ! return true ! else ! # loop ! end ! end ! end ! ! end ! ! ! module Bio::Shell::Ghost ! ! include Bio::Shell::Core ! # A hash to store persistent configurations attr_accessor :config *************** *** 66,76 **** --- 86,108 ---- attr_accessor :cache + ### save/restore the environment + + def configure + @config = {} + @cache = {} + create_save_dir + load_config + load_plugin + end + def load_session load_object load_history opening_splash + open_history end def save_session + close_history closing_splash if create_save_dir_ask *************** *** 79,97 **** save_config end end ! ### setup ! ! def check_version ! if RUBY_VERSION < "1.8.2" ! raise "BioRuby shell runs on Ruby version >= 1.8.2" ! end ! end ! ! def check_marshal ! if @config[:marshal] and @config[:marshal] != MARSHAL ! raise "Marshal version mismatch" ! end ! end def create_save_dir --- 111,119 ---- save_config end + puts "Leaving directory '#{@cache[:workdir]}'" + puts "History is saved in '#{@cache[:workdir]}/#{SAVEDIR + HISTORY}'" end ! ### directories def create_save_dir *************** *** 108,114 **** if ask_yes_or_no("Save session in '#{SAVEDIR}' directory? [y/n] ") create_real_dir(SAVEDIR) - create_real_dir(DATADIR) create_real_dir(PLUGIN) ! # create_real_dir(BIOFLAT) @cache[:save] = true else --- 130,136 ---- if ask_yes_or_no("Save session in '#{SAVEDIR}' directory? [y/n] ") create_real_dir(SAVEDIR) create_real_dir(PLUGIN) ! create_real_dir(DATADIR) ! create_real_dir(BIOFLAT) @cache[:save] = true else *************** *** 119,144 **** end - def ask_yes_or_no(message) - loop do - print "#{message}" - answer = gets - if answer.nil? - # readline support might be broken - return false - elsif /^\s*[Nn]/.match(answer) - return false - elsif /^\s*[Yy]/.match(answer) - return true - else - # loop - end - end - end - def create_real_dir(dir) unless File.directory?(dir) begin print "Creating directory (#{dir}) ... " ! Dir.mkdir(dir) puts "done" rescue --- 141,149 ---- end def create_real_dir(dir) unless File.directory?(dir) begin print "Creating directory (#{dir}) ... " ! FileUtils.mkdir_p(dir) puts "done" rescue *************** *** 152,160 **** def create_flat_dir(dbname) dir = BIOFLAT + dbname.to_s.strip - unless File.directory?(BIOFLAT) - Dir.mkdir(BIOFLAT) - end unless File.directory?(dir) ! Dir.mkdir(dir) end return dir --- 157,162 ---- def create_flat_dir(dbname) dir = BIOFLAT + dbname.to_s.strip unless File.directory?(dir) ! FileUtils.mkdir_p(dir) end return dir *************** *** 209,213 **** def config_echo ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding flag = ! @config[:echo] @config[:echo] = IRB.conf[:ECHO] = flag --- 211,215 ---- def config_echo ! bind = Bio::Shell.cache[:binding] flag = ! @config[:echo] @config[:echo] = IRB.conf[:ECHO] = flag *************** *** 217,221 **** def config_color ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding flag = ! @config[:color] @config[:color] = flag --- 219,223 ---- def config_color ! bind = Bio::Shell.cache[:binding] flag = ! @config[:color] @config[:color] = flag *************** *** 264,269 **** ### object def load_object ! load_object_file(SAVEDIR + OBJECT) end --- 266,282 ---- ### object + def check_marshal + if @config[:marshal] and @config[:marshal] != MARSHAL + raise "Marshal version mismatch" + end + end + def load_object ! begin ! check_marshal ! load_object_file(SAVEDIR + OBJECT) ! rescue ! warn "Error: Load aborted : #{$!}" ! end end *************** *** 272,276 **** print "Loading object (#{file}) ... " begin ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding hash = Marshal.load(File.read(file)) hash.each do |k, v| --- 285,289 ---- print "Loading object (#{file}) ... " begin ! bind = Bio::Shell.cache[:binding] hash = Marshal.load(File.read(file)) hash.each do |k, v| *************** *** 288,292 **** end end ! def save_object save_object_file(SAVEDIR + OBJECT) --- 301,305 ---- end end ! def save_object save_object_file(SAVEDIR + OBJECT) *************** *** 296,324 **** begin print "Saving object (#{file}) ... " File.open(file, "w") do |f| ! begin ! bind = IRB.conf[:MAIN_CONTEXT].workspace.binding ! list = eval("local_variables", bind) ! list -= ["_"] ! hash = {} ! list.each do |elem| ! value = eval(elem, bind) ! if value ! begin ! Marshal.dump(value) ! hash[elem] = value ! rescue ! # value could not be dumped. ! end end end - Marshal.dump(hash, f) - @config[:marshal] = MARSHAL - rescue - warn "Error: Failed to dump (#{file}) : #{$!}" end end puts "done" rescue warn "Error: Failed to save (#{file}) : #{$!}" end --- 309,335 ---- begin print "Saving object (#{file}) ... " + File.rename(file, "#{file}.old") if File.exist?(file) File.open(file, "w") do |f| ! bind = Bio::Shell.cache[:binding] ! list = eval("local_variables", bind) ! list -= ["_"] ! hash = {} ! list.each do |elem| ! value = eval(elem, bind) ! if value ! begin ! Marshal.dump(value) ! hash[elem] = value ! rescue ! # value could not be dumped. end end end + Marshal.dump(hash, f) + @config[:marshal] = MARSHAL end puts "done" rescue + File.rename("#{file}.old", file) if File.exist?("#{file}.old") warn "Error: Failed to save (#{file}) : #{$!}" end *************** *** 327,330 **** --- 338,355 ---- ### history + def open_history + @cache[:histfile] = File.open(SAVEDIR + HISTORY, "a") + @cache[:histfile].sync = true + end + + def store_history(line) + Bio::Shell.cache[:histfile].puts "# #{Time.now}" + Bio::Shell.cache[:histfile].puts line + end + + def close_history + @cache[:histfile].close if @cache[:histfile] + end + def load_history if @cache[:readline] *************** *** 337,343 **** print "Loading history (#{file}) ... " File.open(file).each do |line| ! #Readline::HISTORY.push line.chomp ! date, hist = line.chomp.split("\t") ! Readline::HISTORY.push hist if hist end puts "done" --- 362,368 ---- print "Loading history (#{file}) ... " File.open(file).each do |line| ! unless line[/^# /] ! Readline::HISTORY.push line.chomp ! end end puts "done" *************** *** 345,348 **** --- 370,374 ---- end + # not used (use open_history/close_history instead) def save_history if @cache[:readline] *************** *** 440,445 **** def splash_message_color str = splash_message ! ruby = ESC_SEQ[:ruby] ! none = ESC_SEQ[:none] return str.sub(/R u b y/) { "#{ruby}R u b y#{none}" } end --- 466,471 ---- def splash_message_color str = splash_message ! ruby = colors[:ruby] ! none = colors[:none] return str.sub(/R u b y/) { "#{ruby}R u b y#{none}" } end *************** *** 465,469 **** s = message || splash_message l = s.length ! c = ESC_SEQ x = " " 0.step(l,2) do |i| --- 491,495 ---- s = message || splash_message l = s.length ! c = colors x = " " 0.step(l,2) do |i| From k at dev.open-bio.org Sun Dec 24 08:36:47 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:36:47 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell interface.rb,1.14,1.15 Message-ID: <200612240836.kBO8alCD009541@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9537 Modified Files: interface.rb Log Message: * independent from IRB Index: interface.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/interface.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** interface.rb 27 Feb 2006 09:36:35 -0000 1.14 --- interface.rb 24 Dec 2006 08:36:45 -0000 1.15 *************** *** 16,21 **** def ls ! list = eval("local_variables", conf.workspace.binding).reject { |x| ! eval(x, conf.workspace.binding).nil? } puts list.inspect --- 16,22 ---- def ls ! bind = Bio::Shell.cache[:binding] ! list = eval("local_variables", bind).reject { |x| ! eval(x, bind).nil? } puts list.inspect *************** *** 24,33 **** def rm(name) ! list = eval("local_variables", conf.workspace.binding).reject { |x| ! eval(x, conf.workspace.binding).nil? } begin if list.include?(name.to_s) ! eval("#{name} = nil", conf.workspace.binding) else raise --- 25,35 ---- def rm(name) ! bind = Bio::Shell.cache[:binding] ! list = eval("local_variables", bind).reject { |x| ! eval(x, bind).nil? } begin if list.include?(name.to_s) ! eval("#{name} = nil", bind) else raise From k at dev.open-bio.org Sun Dec 24 08:40:02 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:40:02 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell object.rb,1.1,1.2 Message-ID: <200612240840.kBO8e2UM009604@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9600 Modified Files: object.rb Log Message: * skeletal attempt for object formatting Index: object.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/object.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object.rb 27 Feb 2006 09:16:13 -0000 1.1 --- object.rb 24 Dec 2006 08:40:00 -0000 1.2 *************** *** 10,15 **** # - require 'cgi' require 'pp' ### Object extention --- 10,16 ---- # require 'pp' + require 'cgi' + require 'yaml' ### Object extention *************** *** 19,52 **** attr_accessor :memo ! # *TODO* ! def to_html ! if self.is_a?(String) ! "
" + self + "
" else ! str = "" ! PP.pp(self, str) ! "
" + str + "
" ! #"
" + CGI.escapeHTML(str) + "
" ! #self.inspect ! #"
" + self.inspect + "
" ! #"
" + self.to_s + "
" end end end ! =begin ! module Bio ! class DB ! def to_html ! html = "" ! html += "" ! @data.each do |k, v| ! html += "" ! end ! html += "
#{k}#{v}
" end end end - =end - --- 20,71 ---- attr_accessor :memo ! def output(format = :yaml) ! case format ! when :yaml ! self.to_yaml ! when :html ! format_html ! when :inspect ! format_pp ! when :png ! # *TODO* ! when :svg ! # *TODO* ! when :graph ! # *TODO* (Gruff, RSRuby etc.) else ! #self.inspect.to_s.fold(80) ! self.to_s end end + + private + + def format_html + "
#{CGI.escapeHTML(format_pp)}
" + end + + def format_pp + str = "" + PP.pp(self, str) + return str + end + end ! class Hash ! ! private ! ! def format_html ! html = "" ! html += "" ! @data.each do |k, v| ! html += "" end + html += "
#{k}#{v}
" + return html end + end From k at dev.open-bio.org Sun Dec 24 08:40:45 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:40:45 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell demo.rb,1.2,1.3 Message-ID: <200612240840.kBO8ejTW009647@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell In directory dev.open-bio.org:/tmp/cvs-serv9643 Modified Files: demo.rb Log Message: * follow the change of some bioruby shell commands Index: demo.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/demo.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** demo.rb 26 Mar 2006 00:38:10 -0000 1.2 --- demo.rb 24 Dec 2006 08:40:43 -0000 1.3 *************** *** 25,29 **** def initialize ! @bind = IRB.conf[:MAIN_CONTEXT].workspace.binding end --- 25,29 ---- def initialize ! @bind = Bio::Shell.cache[:binding] end *************** *** 39,44 **** end def mito ! run(%q[entry = ent("data/kumamushi.gb")], "Load kumamushi gene from GenBank database entry ...", false) && run(%q[disp entry], "Check the contents ...", false) && run(%q[kuma = flatparse(entry)], "Parse the database entry ...", true) && --- 39,47 ---- end + def aldh2 + end + def mito ! run(%q[entry = getent("data/kumamushi.gb")], "Load kumamushi gene from GenBank database entry ...", false) && run(%q[disp entry], "Check the contents ...", false) && run(%q[kuma = flatparse(entry)], "Parse the database entry ...", true) && *************** *** 62,66 **** def sequence ! run(%q[dna = seq("atgc" * 100)], "Generating DNA sequence ...", true) && run(%q[doublehelix dna], "Double helix representation", false) && run(%q[protein = dna.translate], "Translate DNA into Protein ...", true) && --- 65,69 ---- def sequence ! run(%q[dna = getseq("atgc" * 100)], "Generating DNA sequence ...", true) && run(%q[doublehelix dna], "Double helix representation", false) && run(%q[protein = dna.translate], "Translate DNA into Protein ...", true) && *************** *** 71,75 **** def entry ! run(%q[kuma = obj("gb:AF237819")], "Obtain an entry from GenBank database", false) && run(%q[kuma.definition], "Definition of the entry", true) && run(%q[kuma.naseq], "Sequence of the entry", true) && --- 74,78 ---- def entry ! run(%q[kuma = getobj("gb:AF237819")], "Obtain an entry from GenBank database", false) && run(%q[kuma.definition], "Definition of the entry", true) && run(%q[kuma.naseq], "Sequence of the entry", true) && *************** *** 82,91 **** run(%q[pwd], "Show current working directory ...", false) && run(%q[dir], "Show directory contents ...", false) && ! run(%q[dir "session"], "Show directory contents ...", false) && true end def pdb ! run(%q[ent_1bl8 = ent("pdb:1bl8")], "Retrieving PDB entry 1BL8 ...", false) && run(%q[head ent_1bl8], "Head part of the entry ...", false) && run(%q[savefile("1bl8.pdb", ent_1bl8)], "Saving the original entry in file ...", false) && --- 85,94 ---- run(%q[pwd], "Show current working directory ...", false) && run(%q[dir], "Show directory contents ...", false) && ! run(%q[dir "shell/session"], "Show directory contents ...", false) && true end def pdb ! run(%q[ent_1bl8 = getent("pdb:1bl8")], "Retrieving PDB entry 1BL8 ...", false) && run(%q[head ent_1bl8], "Head part of the entry ...", false) && run(%q[savefile("1bl8.pdb", ent_1bl8)], "Saving the original entry in file ...", false) && From k at dev.open-bio.org Sun Dec 24 08:46:52 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:46:52 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin codon.rb,1.14,1.15 Message-ID: <200612240846.kBO8kqQW009816@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv9812 Modified Files: codon.rb Log Message: * changed to use Bio::Shell.colors instead of Bio::Shell.esc_seq Index: codon.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/codon.rb,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** codon.rb 19 Sep 2006 06:17:19 -0000 1.14 --- codon.rb 24 Dec 2006 08:46:50 -0000 1.15 *************** *** 36,50 **** def setup_colors ! esc_seq = Bio::Shell.esc_seq @colors = { ! :text => esc_seq[:none], ! :aa => esc_seq[:green], ! :start => esc_seq[:red], ! :stop => esc_seq[:red], ! :basic => esc_seq[:cyan], ! :polar => esc_seq[:blue], ! :acidic => esc_seq[:magenta], ! :nonpolar => esc_seq[:yellow], } end --- 36,50 ---- def setup_colors ! c = Bio::Shell.colors @colors = { ! :text => c[:none], ! :aa => c[:green], ! :start => c[:red], ! :stop => c[:red], ! :basic => c[:cyan], ! :polar => c[:blue], ! :acidic => c[:magenta], ! :nonpolar => c[:yellow], } end From k at dev.open-bio.org Sun Dec 24 08:49:14 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:49:14 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin keggapi.rb,1.10,1.11 Message-ID: <200612240849.kBO8nEAG009897@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv9893 Modified Files: keggapi.rb Log Message: * Bio::Shell::Private module is nolonger extended to Bio::Shell Index: keggapi.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/keggapi.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** keggapi.rb 9 Feb 2006 20:48:53 -0000 1.10 --- keggapi.rb 24 Dec 2006 08:49:12 -0000 1.11 *************** *** 12,19 **** module Private def keggapi_definition2tab(list) ary = [] list.each do |entry| ! ary << "#{entry.entry_id}:\t#{entry.definition}" end return ary --- 12,22 ---- module Private + + module_function + def keggapi_definition2tab(list) ary = [] list.each do |entry| ! ary << "#{entry.entry_id}\t#{entry.definition}" end return ary *************** *** 50,53 **** --- 53,57 ---- yield result else + puts result return result end *************** *** 56,59 **** --- 60,64 ---- def btit(str) result = keggapi.btit(str) + puts result return result end *************** *** 61,64 **** --- 66,70 ---- def bconv(str) result = keggapi.bconv(str) + puts result return result end *************** *** 68,72 **** def keggdbs list = keggapi.list_databases ! result = Bio::Shell.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} --- 74,78 ---- def keggdbs list = keggapi.list_databases ! result = Bio::Shell::Private.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} *************** *** 75,79 **** def keggorgs list = keggapi.list_organisms ! result = Bio::Shell.keggapi_definition2tab(list).sort.join("\n") puts result return list.map {|x| x.entry_id} --- 81,85 ---- def keggorgs list = keggapi.list_organisms ! result = Bio::Shell::Private.keggapi_definition2tab(list).sort.join("\n") puts result return list.map {|x| x.entry_id} *************** *** 82,90 **** def keggpathways(org = "map") list = keggapi.list_pathways(org) ! result = Bio::Shell.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} end def kegggenomeseq(org) result = "" --- 88,97 ---- def keggpathways(org = "map") list = keggapi.list_pathways(org) ! result = Bio::Shell::Private.keggapi_definition2tab(list).join("\n") puts result return list.map {|x| x.entry_id} end + # use KEGG DAS insetad def kegggenomeseq(org) result = "" From k at dev.open-bio.org Sun Dec 24 08:50:20 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:50:20 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin entry.rb, 1.8, 1.9 seq.rb, 1.18, 1.19 blast.rb, 1.1, 1.2 psort.rb, 1.1, 1.2 Message-ID: <200612240850.kBO8oKMw009976@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv9972 Modified Files: entry.rb seq.rb blast.rb psort.rb Log Message: * seq, ent, obj commands are changed to getseq, getent, getobj respectively Index: blast.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/blast.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** blast.rb 25 Jul 2006 18:43:17 -0000 1.1 --- blast.rb 24 Dec 2006 08:50:18 -0000 1.2 *************** *** 21,28 **** data = Bio::FastaFormat.new(query) desc = data.definition ! tmp = seq(data.seq) else desc = "query" ! tmp = seq(query) end --- 21,28 ---- data = Bio::FastaFormat.new(query) desc = data.definition ! tmp = getseq(data.seq) else desc = "query" ! tmp = getseq(query) end Index: entry.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/entry.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** entry.rb 27 Feb 2006 09:37:14 -0000 1.8 --- entry.rb 24 Dec 2006 08:50:18 -0000 1.9 *************** *** 13,16 **** --- 13,25 ---- private + # Read a text file and collect the first word of each line in array + def readlist(filename) + list = [] + File.open(filename).each do |line| + list << line[/^\S+/] + end + return list + end + # Obtain a Bio::Sequence::NA (DNA) or a Bio::Sequence::AA (Amino Acid) # sequence from *************** *** 19,23 **** # * "filename" -- "gbvrl.gbk" (first entry only) # * "db:entry" -- "embl:BUM" (entry is retrieved by the ent method) ! def seq(arg) seq = "" if arg.kind_of?(Bio::Sequence) --- 28,32 ---- # * "filename" -- "gbvrl.gbk" (first entry only) # * "db:entry" -- "embl:BUM" (entry is retrieved by the ent method) ! def getseq(arg) seq = "" if arg.kind_of?(Bio::Sequence) *************** *** 26,31 **** ent = flatauto(arg) elsif arg[/:/] ! str = ent(arg) ! ent = flatparse(str) else tmp = arg --- 35,39 ---- ent = flatauto(arg) elsif arg[/:/] ! ent = getobj(arg) else tmp = arg *************** *** 35,45 **** tmp = ent.seq elsif ent.respond_to?(:naseq) ! seq = ent.naseq elsif ent.respond_to?(:aaseq) ! seq = ent.aaseq end if tmp and tmp.is_a?(String) and not tmp.empty? ! seq = Bio::Sequence.auto(tmp).seq end return seq --- 43,56 ---- tmp = ent.seq elsif ent.respond_to?(:naseq) ! #seq = ent.naseq ! tmp = ent.naseq elsif ent.respond_to?(:aaseq) ! #seq = ent.aaseq ! tmp = ent.aaseq end if tmp and tmp.is_a?(String) and not tmp.empty? ! #seq = Bio::Sequence.auto(tmp).seq ! seq = Bio::Sequence.auto(tmp) end return seq *************** *** 50,54 **** # * "filename" -- local file (first entry only) # * "db:entry" -- local BioFlat, OBDA, EMBOSS, KEGG API ! def ent(arg) entry = "" db, entry_id = arg.to_s.strip.split(/:/) --- 61,65 ---- # * "filename" -- local file (first entry only) # * "db:entry" -- local BioFlat, OBDA, EMBOSS, KEGG API ! def getent(arg) entry = "" db, entry_id = arg.to_s.strip.split(/:/) *************** *** 87,92 **** # Obtain a parsed object from sources that ent() supports. ! def obj(arg) ! str = ent(arg) flatparse(str) end --- 98,103 ---- # Obtain a parsed object from sources that ent() supports. ! def getobj(arg) ! str = getent(arg) flatparse(str) end Index: psort.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/psort.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** psort.rb 25 Jul 2006 18:42:09 -0000 1.1 --- psort.rb 24 Dec 2006 08:50:18 -0000 1.2 *************** *** 14,18 **** def psort1(str) ! seq = seq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate --- 14,18 ---- def psort1(str) ! seq = getseq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate *************** *** 30,34 **** def psort2(str) ! seq = seq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate --- 30,34 ---- def psort2(str) ! seq = getseq(str) if seq.is_a?(Bio::Sequence::NA) seq = seq.translate Index: seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/seq.rb,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** seq.rb 19 Sep 2006 06:20:38 -0000 1.18 --- seq.rb 24 Dec 2006 08:50:18 -0000 1.19 *************** *** 18,22 **** seq = str else ! seq = seq(str) end --- 18,22 ---- seq = str else ! seq = getseq(str) end *************** *** 43,47 **** def sixtrans(str) ! seq = seq(str) [ 1, 2, 3, -1, -2, -3 ].each do |frame| title = "Translation #{frame.to_s.rjust(2)}" --- 43,47 ---- def sixtrans(str) ! seq = getseq(str) [ 1, 2, 3, -1, -2, -3 ].each do |frame| title = "Translation #{frame.to_s.rjust(2)}" *************** *** 54,58 **** def seqstat(str) max = 150 ! seq = seq(str) rep = "\n* * * Sequence statistics * * *\n\n" if seq.respond_to?(:complement) --- 54,58 ---- def seqstat(str) max = 150 ! seq = getseq(str) rep = "\n* * * Sequence statistics * * *\n\n" if seq.respond_to?(:complement) *************** *** 133,142 **** # Argument need to be at least 16 bases in length. def doublehelix(str) ! seq = seq(str) ! if str.length < 16 warn "Error: Sequence must be longer than 16 bases." return end ! if ! seq.respond_to?(:complement) warn "Error: Sequence must be a DNA sequence." return --- 133,142 ---- # Argument need to be at least 16 bases in length. def doublehelix(str) ! seq = getseq(str) ! if seq.length < 16 warn "Error: Sequence must be longer than 16 bases." return end ! if seq.moltype != Bio::Sequence::NA warn "Error: Sequence must be a DNA sequence." return From k at dev.open-bio.org Sun Dec 24 08:50:39 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 08:50:39 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin midi.rb,1.7,1.8 Message-ID: <200612240850.kBO8odJA010004@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv10000 Modified Files: midi.rb Log Message: * fix in sample code Index: midi.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/midi.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** midi.rb 9 Feb 2006 20:48:53 -0000 1.7 --- midi.rb 24 Dec 2006 08:50:37 -0000 1.8 *************** *** 421,430 **** seq_file = ARGV.shift mid_file = ARGV.shift - style = ARGV.shift Bio::FlatFile.auto(seq_file) do |ff| ff.each do |f| ! midi(f.naseq[0..1000], mid_file, style) end end end --- 421,430 ---- seq_file = ARGV.shift mid_file = ARGV.shift Bio::FlatFile.auto(seq_file) do |ff| ff.each do |f| ! midifile(mid_file, f.naseq[0..1000]) end end end + From k at dev.open-bio.org Sun Dec 24 09:18:45 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 09:18:45 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db/kegg kgml.rb,1.5,1.6 Message-ID: <200612240918.kBO9Ijew010657@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db/kegg In directory dev.open-bio.org:/tmp/cvs-serv10653/db/kegg Modified Files: kgml.rb Log Message: some methods are renamed to avoid confusion * :type -> :entry_type * :type -> :category * :map -> :pathway Index: kgml.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/kegg/kgml.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kgml.rb 19 Sep 2006 05:55:38 -0000 1.5 --- kgml.rb 24 Dec 2006 09:18:43 -0000 1.6 *************** *** 22,26 **** # # :id -> :entry_id ! # :type -> :entry_type # names() # --- 22,27 ---- # # :id -> :entry_id ! # :type -> :category ! # :map -> :pathway # names() # *************** *** 39,43 **** # === Examples # ! # file = ARGF.read("kgml/hsa/hsa00010.xml") # kgml = Bio::KEGG::KGML.new(file) # --- 40,44 ---- # === Examples # ! # file = File.read("kgml/hsa/hsa00010.xml") # kgml = Bio::KEGG::KGML.new(file) # *************** *** 54,61 **** # puts entry.entry_id # puts entry.name ! # puts entry.entry_type # puts entry.link # puts entry.reaction ! # puts entry.map # # attributes # puts entry.label # name --- 55,62 ---- # puts entry.entry_id # puts entry.name ! # puts entry.category # puts entry.link # puts entry.reaction ! # puts entry.pathway # # attributes # puts entry.label # name *************** *** 122,126 **** class Entry ! attr_accessor :entry_id, :name, :entry_type, :link, :reaction, :map attr_accessor :label, :shape, :x, :y, :width, :height, :fgcolor, :bgcolor attr_accessor :components --- 123,127 ---- class Entry ! attr_accessor :entry_id, :name, :category, :link, :reaction, :pathway attr_accessor :label, :shape, :x, :y, :width, :height, :fgcolor, :bgcolor attr_accessor :components *************** *** 162,172 **** attr = node.attributes entry = Entry.new ! entry.entry_id = attr["id"].to_i ! entry.name = attr["name"] ! entry.entry_type = attr["type"] # implied ! entry.link = attr["link"] ! entry.reaction = attr["reaction"] ! entry.map = attr["map"] node.elements.each("graphics") { |graphics| --- 163,173 ---- attr = node.attributes entry = Entry.new ! entry.entry_id = attr["id"].to_i ! entry.name = attr["name"] ! entry.category = attr["type"] # implied ! entry.link = attr["link"] ! entry.reaction = attr["reaction"] ! entry.pathway = attr["map"] node.elements.each("graphics") { |graphics| From k at dev.open-bio.org Sun Dec 24 09:30:24 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 09:30:24 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/shell/plugin seq.rb,1.19,1.20 Message-ID: <200612240930.kBO9UOru000615@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv609/lib/bio/shell/plugin Modified Files: seq.rb Log Message: * seq command is changed to getseq, and the returned object is changed from Bio::Sequence::NA to Bio::Sequence with @moltype = Bio::Sequence::NA Index: seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/shell/plugin/seq.rb,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** seq.rb 24 Dec 2006 08:50:18 -0000 1.19 --- seq.rb 24 Dec 2006 09:30:22 -0000 1.20 *************** *** 56,60 **** seq = getseq(str) rep = "\n* * * Sequence statistics * * *\n\n" ! if seq.respond_to?(:complement) fwd = seq rev = seq.complement --- 56,60 ---- seq = getseq(str) rep = "\n* * * Sequence statistics * * *\n\n" ! if seq.moltype == Bio::Sequence::NA fwd = seq rev = seq.complement From k at dev.open-bio.org Sun Dec 24 09:30:25 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 09:30:25 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/shell/plugin test_seq.rb, 1.7, 1.8 Message-ID: <200612240930.kBO9UPoo000620@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/shell/plugin In directory dev.open-bio.org:/tmp/cvs-serv609/test/unit/bio/shell/plugin Modified Files: test_seq.rb Log Message: * seq command is changed to getseq, and the returned object is changed from Bio::Sequence::NA to Bio::Sequence with @moltype = Bio::Sequence::NA Index: test_seq.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/shell/plugin/test_seq.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_seq.rb 27 Feb 2006 09:40:13 -0000 1.7 --- test_seq.rb 24 Dec 2006 09:30:23 -0000 1.8 *************** *** 41,47 **** def test_naseq str = 'ACGT' ! assert_equal(Bio::Sequence::NA, seq(str).class) ! assert_equal(Bio::Sequence::NA.new(str), seq(str)) ! assert_equal('acgt', seq(str)) end --- 41,47 ---- def test_naseq str = 'ACGT' ! assert_equal(Bio::Sequence, getseq(str).class) ! assert_equal(Bio::Sequence::NA, getseq(str).moltype) ! assert_equal('acgt', getseq(str).seq) end *************** *** 49,55 **** def test_aaseq str = 'WD' ! assert_equal(Bio::Sequence::AA, seq(str).class) ! assert_equal(Bio::Sequence::AA.new('WD'), seq(str)) ! assert_equal('WD', seq(str)) end --- 49,55 ---- def test_aaseq str = 'WD' ! assert_equal(Bio::Sequence, getseq(str).class) ! assert_equal(Bio::Sequence::AA, getseq(str).moltype) ! assert_equal('WD', getseq(str).seq) end From k at dev.open-bio.org Sun Dec 24 10:04:53 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:04:53 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.75,1.76 Message-ID: <200612241004.kBOA4rvY001599@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv1525/lib Modified Files: bio.rb Log Message: * autoload for Bio::Nexus * added Bio.command module functions (where 'command' can be any of the BioRuby shell commands) Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** bio.rb 15 Dec 2006 15:02:27 -0000 1.75 --- bio.rb 24 Dec 2006 10:04:51 -0000 1.76 *************** *** 11,15 **** module Bio ! BIORUBY_VERSION = [1, 0, 0].extend(Comparable) ### Basic data types --- 11,15 ---- module Bio ! BIORUBY_VERSION = [1, 1, 0].extend(Comparable) ### Basic data types *************** *** 118,121 **** --- 118,122 ---- autoload :Newick, 'bio/db/newick' + autoload :Nexus, 'bio/db/nexus' ### IO interface modules *************** *** 251,254 **** --- 252,268 ---- autoload :Command, 'bio/command' + ### Provide BioRuby shell 'command' also as 'Bio.command' (like ChemRuby) + + def self.method_missing(*args) + require 'bio/shell' + extend Bio::Shell + public_class_method(*Bio::Shell.private_instance_methods) + if Bio.respond_to?(args.first) + Bio.send(*args) + else + raise NameError + end + end + end From k at dev.open-bio.org Sun Dec 24 10:06:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:06:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/data aa.rb,0.18,0.19 Message-ID: <200612241006.kBOA6Amp001676@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/data In directory dev.open-bio.org:/tmp/cvs-serv1660/lib/bio/data Modified Files: aa.rb Log Message: * small change on amino acids description Index: aa.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/data/aa.rb,v retrieving revision 0.18 retrieving revision 0.19 diff -C2 -d -r0.18 -r0.19 *** aa.rb 25 Jul 2006 18:50:01 -0000 0.18 --- aa.rb 24 Dec 2006 10:06:07 -0000 0.19 *************** *** 69,78 **** 'Trp' => 'tryptophan', 'Tyr' => 'tyrosine', ! 'Asx' => 'asparagine/aspartic acid', ! 'Glx' => 'glutamine/glutamic acid', ! 'Xle' => 'isoleucine/leucine', 'Sec' => 'selenocysteine', 'Pyl' => 'pyrrolysine', ! 'Xaa' => 'unknown', } --- 69,78 ---- 'Trp' => 'tryptophan', 'Tyr' => 'tyrosine', ! 'Asx' => 'asparagine/aspartic acid [DN]', ! 'Glx' => 'glutamine/glutamic acid [EQ]', ! 'Xle' => 'isoleucine/leucine [IL]', 'Sec' => 'selenocysteine', 'Pyl' => 'pyrrolysine', ! 'Xaa' => 'unknown [A-Z]', } From k at dev.open-bio.org Sun Dec 24 10:11:13 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:11:13 +0000 Subject: [BioRuby-cvs] bioruby README.DEV,1.11,1.12 Message-ID: <200612241011.kBOABDpg002068@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv2058 Modified Files: README.DEV Log Message: * trivial Index: README.DEV =================================================================== RCS file: /home/repository/bioruby/bioruby/README.DEV,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** README.DEV 19 Sep 2006 05:39:05 -0000 1.11 --- README.DEV 24 Dec 2006 10:11:11 -0000 1.12 *************** *** 78,82 **** # # Copyright:: Copyright (C) 2001, 2003-2005 Bio R. Hacker , ! # Copyright:: Copyright (C) 2006 Chem R. Hacker # # License:: Ruby's --- 78,82 ---- # # Copyright:: Copyright (C) 2001, 2003-2005 Bio R. Hacker , ! # Copyright:: Copyright (C) 2006 Chem R. Hacker # # License:: Ruby's *************** *** 150,159 **** # # s = Bio::Sequence.new('atgc') ! # puts s #=> 'atgc' # # Note that this method does not intialize the contained sequence # as any kind of bioruby object, only as a simple string # ! # puts s.seq.class #=> String # # See Bio::Sequence#na, Bio::Sequence#aa, and Bio::Sequence#auto --- 150,159 ---- # # s = Bio::Sequence.new('atgc') ! # puts s # => 'atgc' # # Note that this method does not intialize the contained sequence # as any kind of bioruby object, only as a simple string # ! # puts s.seq.class # => String # # See Bio::Sequence#na, Bio::Sequence#aa, and Bio::Sequence#auto From k at dev.open-bio.org Sun Dec 24 10:14:21 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:14:21 +0000 Subject: [BioRuby-cvs] bioruby/doc KEGG_API.rd, 1.2, 1.3 KEGG_API.rd.ja, 1.8, 1.9 Message-ID: <200612241014.kBOAEL1e002250@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv2234 Modified Files: KEGG_API.rd KEGG_API.rd.ja Log Message: * updated to KEGG API v6.0 Index: KEGG_API.rd.ja =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd.ja,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** KEGG_API.rd.ja 23 Feb 2006 04:51:23 -0000 1.8 --- KEGG_API.rd.ja 24 Dec 2006 10:14:19 -0000 1.9 *************** *** 20,23 **** --- 20,24 ---- * (()) * (()) + * (()) * (()) * (()) *************** *** 31,98 **** * (()), (()) * (()), (()) [...1530 lines suppressed...] + ?????????????????????????????????????????????????????????????? + ???????????????????????????????? bget ?????????? "-f k" + ?????????????????? KCF ???????????????????????????????????????? + + ?????? + ArrayOfStructureAlignment + + ???? + kcf = bget("-f k gl:G12922") + search_glycans_by_kcam(kcf, "gapped", "local", 1, 5) + + ???? URL?? + * (()) + * (()) == Notes ! Last updated: November 20, 2006 =end Index: KEGG_API.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KEGG_API.rd 23 Feb 2006 04:51:23 -0000 1.2 --- KEGG_API.rd 24 Dec 2006 10:14:19 -0000 1.3 *************** *** 81,148 **** * (()), (()) * (()), (()) * (()) * (()) ! * (()), ! (()), ! (()) * (()) ! * (()), ! (()), [...1502 lines suppressed...] + + You can obtain a KCF formatted structural data of matched glycans + using bget method with the "-f k" option to confirm the alignment. + + Return value: + ArrayOfStructureAlignment + + Example: + kcf = bget("-f k gl:G12922") + search_glycans_by_kcam(kcf, "gapped", "local", 1, 5) + + Related site: + * (()) + * (()) == Notes ! Last updated: November 20, 2006 =end From k at dev.open-bio.org Sun Dec 24 14:55:55 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 14:55:55 +0000 Subject: [BioRuby-cvs] bioruby/bin bioruby,1.17,1.18 Message-ID: <200612241455.kBOEttSM003821@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/bin In directory dev.open-bio.org:/tmp/cvs-serv3812/bin Modified Files: bioruby Log Message: * updated for version 1.1.0 (need to use 'gem install bio --no-wrappers' to avoid modification of bin/* files by RubyGems) Index: bioruby =================================================================== RCS file: /home/repository/bioruby/bioruby/bin/bioruby,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** bioruby 24 Dec 2006 08:32:08 -0000 1.17 --- bioruby 24 Dec 2006 14:55:53 -0000 1.18 *************** *** 12,16 **** begin require 'rubygems' ! require_gem 'bio', '~> 0.7' rescue LoadError end --- 12,16 ---- begin require 'rubygems' ! require_gem 'bio', '>= 1.1.0' rescue LoadError end From k at dev.open-bio.org Sun Dec 24 14:55:55 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 14:55:55 +0000 Subject: [BioRuby-cvs] bioruby gemspec.rb,1.7,1.8 Message-ID: <200612241455.kBOEttvT003818@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv3812 Modified Files: gemspec.rb Log Message: * updated for version 1.1.0 (need to use 'gem install bio --no-wrappers' to avoid modification of bin/* files by RubyGems) Index: gemspec.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/gemspec.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gemspec.rb 27 Feb 2006 12:13:54 -0000 1.7 --- gemspec.rb 24 Dec 2006 14:55:53 -0000 1.8 *************** *** 1,8 **** - $:.unshift '../lib' require 'rubygems' spec = Gem::Specification.new do |s| s.name = 'bio' ! s.version = "1.0.0" s.author = "BioRuby project" --- 1,7 ---- require 'rubygems' spec = Gem::Specification.new do |s| s.name = 'bio' ! s.version = "1.1.0" s.author = "BioRuby project" From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/blast test_report.rb, 1.3, 1.4 test_xmlparser.rb, 1.4, 1.5 Message-ID: <200612241719.kBOHJ6VO004072@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/blast In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/blast Modified Files: test_report.rb test_xmlparser.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_xmlparser.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/blast/test_xmlparser.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_xmlparser.rb 3 Feb 2006 17:21:51 -0000 1.4 --- test_xmlparser.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/appl/blast/test_xmlparser.rb - Unit test for Bio::Blast::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/blast/test_xmlparser.rb - Unit test for Bio::Blast::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ *************** *** 39,43 **** def self.output ! File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read end end --- 26,31 ---- def self.output ! # File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read ! File.open(File.join(TestDataBlast, '2.2.15.blastp.m7')).read end end Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/blast/test_report.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_report.rb 3 Feb 2006 17:21:51 -0000 1.3 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/blast/test_report.rb - Unit test for Bio::Blast::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/blast/test_report.rb - Unit test for Bio::Blast::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_alignment.rb, 1.8, 1.9 test_db.rb, 1.2, 1.3 test_feature.rb, 1.2, 1.3 test_shell.rb, 1.5, 1.6 Message-ID: <200612241719.kBOHJ69d004063@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio Modified Files: test_alignment.rb test_db.rb test_feature.rb test_shell.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_feature.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_feature.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_feature.rb 23 Nov 2005 11:47:12 -0000 1.2 --- test_feature.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/test_feature.rb - Unit test for Features/Feature classes # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/test_feature.rb - Unit test for Features/Feature classes # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_alignment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_alignment.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_alignment.rb 14 Dec 2006 14:10:57 -0000 1.8 --- test_alignment.rb 24 Dec 2006 17:19:04 -0000 1.9 *************** *** 2,7 **** # test/unit/bio/test_alignment.rb - Unit test for Bio::Alignment # ! # Copyright (C) 2004 Moses Hohman ! # 2005 Naohisa Goto # # This library is free software; you can redistribute it and/or --- 2,7 ---- # test/unit/bio/test_alignment.rb - Unit test for Bio::Alignment # ! # Copyright:: Copyright (C) 2004 Moses Hohman ! # Copyright (C) 2005 Naohisa Goto # # This library is free software; you can redistribute it and/or Index: test_db.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_db.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_db.rb 23 Nov 2005 11:44:12 -0000 1.2 --- test_db.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/test_db.rb - Unit test for Bio::DB # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/test_db.rb - Unit test for Bio::DB # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_shell.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_shell.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_shell.rb 21 Feb 2006 17:40:37 -0000 1.5 --- test_shell.rb 24 Dec 2006 17:19:04 -0000 1.6 *************** *** 2,20 **** # test/unit/bio/test_shell.rb - Unit test for Bio::Shell # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/test_shell.rb - Unit test for Bio::Shell # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/targetp test_report.rb, 1.3, 1.4 Message-ID: <200612241719.kBOHJ6nE004097@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/targetp In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/targetp Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/targetp/test_report.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_report.rb 23 Nov 2005 01:42:38 -0000 1.3 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/targetp/test_report.rb - Unit test for Bio::TargetP::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/targetp/test_report.rb - Unit test for Bio::TargetP::Report # ! # Copyright: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/tmhmm test_report.rb, 1.2, 1.3 Message-ID: <200612241719.kBOHJ6O4004102@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/tmhmm In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/tmhmm Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/tmhmm/test_report.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_report.rb 23 Nov 2005 05:10:34 -0000 1.2 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/appl/tmhmm/test_report.rb - Unit test for Bio::TMHMM::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/tmhmm/test_report.rb - Unit test for Bio::TMHMM::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/sosui test_report.rb, 1.3, 1.4 Message-ID: <200612241719.kBOHJ6hb004092@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/sosui In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/sosui Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/sosui/test_report.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_report.rb 22 Nov 2005 08:31:48 -0000 1.3 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/sosui/test_report.rb - Unit test for Bio::SOSUI::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/sosui/test_report.rb - Unit test for Bio::SOSUI::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/data test_aa.rb, 1.4, 1.5 test_codontable.rb, 1.4, 1.5 Message-ID: <200612241719.kBOHJ6u1004107@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/data In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/data Modified Files: test_aa.rb test_codontable.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_codontable.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_codontable.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_codontable.rb 23 Nov 2005 05:25:10 -0000 1.4 --- test_codontable.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/data/test_codontable.rb - Unit test for Bio::CodonTable # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/data/test_codontable.rb - Unit test for Bio::CodonTable # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_aa.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_aa.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_aa.rb 23 Nov 2005 05:25:10 -0000 1.4 --- test_aa.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/data/test_aa.rb - Unit test for Bio::AminoAcid # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/data/test_aa.rb - Unit test for Bio::AminoAcid # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_fasta.rb, 1.3, 1.4 test_gff.rb, 1.4, 1.5 test_prosite.rb, 1.4, 1.5 Message-ID: <200612241719.kBOHJ6Lv004113@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/db Modified Files: test_fasta.rb test_gff.rb test_prosite.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_fasta.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_fasta.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_fasta.rb 18 Dec 2005 17:55:13 -0000 1.3 --- test_fasta.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/test_fasta.rb - Unit test for Bio::FastaFormat # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/test_fasta.rb - Unit test for Bio::FastaFormat # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_prosite.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_prosite.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_prosite.rb 26 Jul 2006 08:15:28 -0000 1.4 --- test_prosite.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/db/test_prosite.rb - Unit test for Bio::PROSITE # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/test_prosite.rb - Unit test for Bio::PROSITE # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_gff.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_gff.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_gff.rb 19 Dec 2005 01:21:42 -0000 1.4 --- test_gff.rb 24 Dec 2006 17:19:04 -0000 1.5 *************** *** 2,20 **** # test/unit/bio/db/test_gff.rb - Unit test for Bio::GFF # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/test_gff.rb - Unit test for Bio::GFF # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/genscan test_report.rb, 1.2, 1.3 Message-ID: <200612241719.kBOHJ6X0004078@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/genscan In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/genscan Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/genscan/test_report.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_report.rb 22 Nov 2005 08:31:47 -0000 1.2 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/appl/genscan/test_report.rb - Unit test for Bio::Genscan::Report # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/genscan/test_report.rb - Unit test for Bio::Genscan::Report # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl test_blast.rb,1.3,1.4 Message-ID: <200612241719.kBOHJ64Z004069@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl Modified Files: test_blast.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_blast.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/test_blast.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_blast.rb 3 Feb 2006 17:39:13 -0000 1.3 --- test_blast.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/appl/test_blast.rb - Unit test for Bio::Blast # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/test_blast.rb - Unit test for Bio::Blast # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:06 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:06 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/hmmer test_report.rb, 1.1, 1.2 Message-ID: <200612241719.kBOHJ6sW004087@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/hmmer In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/appl/hmmer Modified Files: test_report.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/hmmer/test_report.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_report.rb 2 Feb 2006 17:10:08 -0000 1.1 --- test_report.rb 24 Dec 2006 17:19:04 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/appl/hmmer/test_report.rb - Unit test for Bio::HMMER::Report # ! # Copyright (C) 2006 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/appl/hmmer/test_report.rb - Unit test for Bio::HMMER::Report # ! # Copyright:: Copyright (C) 2006 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util test_sirna.rb,1.2,1.3 Message-ID: <200612241719.kBOHJ7Vf004144@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/util Modified Files: test_sirna.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_sirna.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_sirna.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_sirna.rb 27 Dec 2005 17:27:38 -0000 1.2 --- test_sirna.rb 24 Dec 2006 17:19:05 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/util/test_sirna.rb - Unit test for Bio::SiRNA. # ! # Copyright (C) 2005 Mitsuteru C. Nakap ! # ! # 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$ --- 2,7 ---- # test/unit/bio/util/test_sirna.rb - Unit test for Bio::SiRNA. # ! # Copyright:: Copyright (C) 2005 Mitsuteru C. Nakap ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db/kegg test_genes.rb,1.3,1.4 Message-ID: <200612241719.kBOHJ74p004127@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db/kegg In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/db/kegg Modified Files: test_genes.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_genes.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/kegg/test_genes.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_genes.rb 9 Nov 2005 13:20:09 -0000 1.3 --- test_genes.rb 24 Dec 2006 17:19:05 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/kegg/test_genes.rb - Unit test for Bio::KEGG::GENES # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/kegg/test_genes.rb - Unit test for Bio::KEGG::GENES # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/io test_ddbjxml.rb, 1.1, 1.2 test_fastacmd.rb, 1.1, 1.2 Message-ID: <200612241719.kBOHJ7f7004132@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/io In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/io Modified Files: test_ddbjxml.rb test_fastacmd.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_fastacmd.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/io/test_fastacmd.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_fastacmd.rb 28 Jan 2006 08:05:52 -0000 1.1 --- test_fastacmd.rb 24 Dec 2006 17:19:05 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/io/test_fastacmd.rb - Unit test for Bio::Blast::Fastacmd. # ! # Copyright (C) 2006 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/io/test_fastacmd.rb - Unit test for Bio::Blast::Fastacmd. # ! # Copyright:: Copyright (C) 2006 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_ddbjxml.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/io/test_ddbjxml.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_ddbjxml.rb 11 Dec 2005 14:59:25 -0000 1.1 --- test_ddbjxml.rb 24 Dec 2006 17:19:05 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/io/test_ddbjxml.rb - Unit test for DDBJ XML. # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/io/test_ddbjxml.rb - Unit test for DDBJ XML. # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/sequence test_common.rb, 1.2, 1.3 test_compat.rb, 1.1, 1.2 Message-ID: <200612241719.kBOHJ7co004138@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/sequence In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/sequence Modified Files: test_common.rb test_compat.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_compat.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_compat.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_compat.rb 5 Feb 2006 17:39:27 -0000 1.1 --- test_compat.rb 24 Dec 2006 17:19:05 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/sequence/test_compat.rb - Unit test for Bio::Sequencce::Compat # ! # Copyright (C) 2006 Mitsuteru C. Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/sequence/test_compat.rb - Unit test for Bio::Sequencce::Compat # ! # Copyright:: Copyright (C) 2006 Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ Index: test_common.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_common.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_common.rb 7 Feb 2006 16:53:08 -0000 1.2 --- test_common.rb 24 Dec 2006 17:19:05 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/sequence/test_common.rb - Unit test for Bio::Sequencce::Common # ! # Copyright (C) 2006 Mitsuteru C. Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/sequence/test_common.rb - Unit test for Bio::Sequencce::Common # ! # Copyright:: Copyright (C) 2006 Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ From nakao at dev.open-bio.org Sun Dec 24 17:19:07 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Sun, 24 Dec 2006 17:19:07 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db/embl test_common.rb, 1.2, 1.3 test_embl.rb, 1.3, 1.4 test_uniprot.rb, 1.3, 1.4 Message-ID: <200612241719.kBOHJ7KC004120@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db/embl In directory dev.open-bio.org:/tmp/cvs-serv4015/test/unit/bio/db/embl Modified Files: test_common.rb test_embl.rb test_uniprot.rb Log Message: * Chaged license from LGPL to Ruby's. Index: test_uniprot.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_uniprot.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_uniprot.rb 18 Dec 2005 17:43:51 -0000 1.3 --- test_uniprot.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/embl/test_uniprot.rb - Unit test for Bio::UniProt # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/embl/test_uniprot.rb - Unit test for Bio::UniProt # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_common.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_common.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_common.rb 23 Nov 2005 10:00:54 -0000 1.2 --- test_common.rb 24 Dec 2006 17:19:04 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/db/embl/common.rb - Unit test for Bio::EMBL::COMMON module # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/embl/common.rb - Unit test for Bio::EMBL::COMMON module # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ Index: test_embl.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_embl.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_embl.rb 23 Nov 2005 10:02:42 -0000 1.3 --- test_embl.rb 24 Dec 2006 17:19:04 -0000 1.4 *************** *** 2,20 **** # test/unit/bio/db/embl/test_embl.rb - Unit test for Bio::EMBL # ! # Copyright (C) 2005 Mitsuteru Nakao ! # ! # 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$ --- 2,7 ---- # test/unit/bio/db/embl/test_embl.rb - Unit test for Bio::EMBL # ! # Copyright:: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From k at dev.open-bio.org Sun Dec 24 18:32:57 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 18:32:57 +0000 Subject: [BioRuby-cvs] bioruby ChangeLog,1.55,1.56 Message-ID: <200612241832.kBOIWvF8004345@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv4341 Modified Files: ChangeLog Log Message: * some additional notes before the 1.1 release Index: ChangeLog =================================================================== RCS file: /home/repository/bioruby/bioruby/ChangeLog,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** ChangeLog 14 Dec 2006 16:42:36 -0000 1.55 --- ChangeLog 24 Dec 2006 18:32:55 -0000 1.56 *************** *** 1,2 **** --- 1,28 ---- + 2006-12-24 Toshiaki Katayama + + * bin/bioruby, lib/bio/shell/, lib/bio/shell/rails/ + + Web functionallity of the BioRuby shell is completely rewrited + to utilize generator of the Ruby on Rails. This means we don't + need to have a copy of the rails installation in our code base + any more. The shell now run in threads so user does not need + to run 2 processes as before (drb and webrick). Most importantly, + the shell is extended to have textarea to input any code and + the evaluated result is returned with AJAX having various neat + visual effects. + + 2006-12-19 Christian Zmasek + + * lib/bio/db/nexus.rb + + Bio::Nexus is newly developed during the Phyloinformatics hackathon. + + 2006-12-16 Toshiaki Katayama + + * lib/bio/io/sql.rb + + Updated to follow recent BioSQL schema contributed by + Raoul Jean Pierre Bonnal. + 2006-12-15 Mitsuteru Nakao From k at dev.open-bio.org Wed Dec 27 13:32:42 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Wed, 27 Dec 2006 13:32:42 +0000 Subject: [BioRuby-cvs] bioruby/doc KEGG_API.rd, 1.3, 1.4 KEGG_API.rd.ja, 1.9, 1.10 Message-ID: <200612271332.kBRDWgXV010808@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv10804/doc Modified Files: KEGG_API.rd KEGG_API.rd.ja Log Message: * updated from KEGG API v6.0 to v6.1 Index: KEGG_API.rd.ja =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd.ja,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** KEGG_API.rd.ja 24 Dec 2006 10:14:19 -0000 1.9 --- KEGG_API.rd.ja 27 Dec 2006 13:32:40 -0000 1.10 *************** *** 69,75 **** --- 69,78 ---- * (()) * (()) + # * (()) + # * (()) * (()) * (()) * (()) + # * (()) * (()) * (()) *************** *** 77,80 **** --- 80,86 ---- * (()) * (()) + # * (()) + # * (()) + # * (()) * (()) * (()) *************** *** 111,120 **** --- 117,130 ---- * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) *************** *** 604,608 **** ?????????? ID ?????????????? embl:J00231 ?? EMBL ?????????? J00231 ?? ??????????entry_id ?????????? genes_id, enzyme_id, compound_id, ! glycan_id, reaction_id, pathway_id, motif_id ???????????????? * genes_id ?? keggorg ???????????? ':' ?????????? KEGG ???????? ID ?????? --- 614,618 ---- ?????????? ID ?????????????? embl:J00231 ?? EMBL ?????????? J00231 ?? ??????????entry_id ?????????? genes_id, enzyme_id, compound_id, ! drug_id, glycan_id, reaction_id, pathway_id, motif_id ???????????????? * genes_id ?? keggorg ???????????? ':' ?????????? KEGG ???????? ID ?????? *************** *** 615,618 **** --- 625,631 ---- C00158 ?????????????????????????????????? + * drug_id ?? dr: ???????????????? ID ??????dr:D00201 ?????????????? + D00201 ???????????????????????????????????????????? + * glycan_id ?? gl: ???????????????? ID ??????gl:G00050 ?????????? G00050 ???????????? Paragloboside ???????????? *************** *** 1123,1126 **** --- 1136,1153 ---- * (()) + #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) + # + #???????? genes_id ???????????????????????????????????????????????????? + #???????????????? org ?? 'all' ???????????????????????????????????? + # + #?????? + # ArrayOfSSDBRelation + # + #???? + # # ?????????????? b0002 ?????????????????????????????????????????????? + # # ?????????????????????????? + # get_neighbors_by_gene('eco:b0002', 'all' 1, 10) + # # ???????????? offset = offset + limit ?????????????? + # get_neighbors_by_gene('eco:b0002', 'all' 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) *************** *** 1172,1175 **** --- 1199,1212 ---- get_paralogs_by_gene('eco:b0002', 11, 10) + #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) + # + #???????????????????????? Smith-Waterman ?????????????????????????????? + # + #?????? + # SSDBRelation + # + #???? + # # ???????? b0002 ???????? b3940 ???????????????????????????????????????? + # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif *************** *** 1218,1221 **** --- 1255,1268 ---- get_ko_by_gene('eco:b0002') + #--- get_ko_members(string:ko_id) + # + #???????? ko_id ?? KO ???????????????????????????????????????????? + # + #?????? + # ArrayOfstring (genes_id) + # + #???? + # # KO ???? K02208 ?????????????????????????????????? + # get_ko_by_gene('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) *************** *** 1256,1260 **** --- 1303,1329 ---- get_genes_by_ko('ko:K00010', 'all') + #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #???????????????????? OC ?????????????????????????????????? + # + #?????? + # ArrayOfstring (genes_id) + # + #???? + # # eco:b0002 ???????????????????????????????????????????????????????? + # get_oc_members_by_gene('eco:b0002', 1, 10) + # get_oc_members_by_gene('eco:b0002', 11, 10) + #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #???????????????????? PC ?????????????????????????????????? + # + #?????? + # ArrayOfstring (genes_id) + # + #???? + # # eco:b0002 ?????????????????????????????????????????????????????? + # get_pc_members_by_gene('eco:b0002', 1, 10) + # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY *************** *** 1672,1675 **** --- 1741,1754 ---- search_compounds_by_name("shikimic acid") + --- search_drugs_by_name(string:name) + + ???????????????????????????? + + ?????? + ArrayOfstring (drug_id) + + ???? + search_drugs_by_name("tetracyclin") + --- search_glycans_by_name(string:name) *************** *** 1694,1697 **** --- 1773,1788 ---- search_compounds_by_composition("C7H10O5") + --- search_drugs_by_composition(string:composition) + + ???????????????????????????? + ?????????????????????????????????????????????? + ???????????????????????? + + ?????? + ArrayOfstring (drug_id) + + ???? + search_drugs_by_composition("HCl") + --- search_glycans_by_composition(string:composition) *************** *** 1717,1720 **** --- 1808,1822 ---- search_compounds_by_mass(174.05, 0.1) + --- search_drugs_by_mass(float:mass, float:range) + + ?????????????????????????????? + mass ???????????? ??range ???????????????????????????????? + + ?????? + ArrayOfstring (drug_id) + + ???? + search_drugs_by_mass(150, 1.0) + --- search_glycans_by_mass(float:mass, float:range) *************** *** 1746,1749 **** --- 1848,1869 ---- * (()) + --- search_drugs_by_subcomp(string:mol, int:offset, int:limit) + + ???????????????????????????? subcomp ?????????????????????????????? + + ?????????????????????????????????????????????????????????????? + ???????????????????????????????????? bget ?????????? "-f m" + ?????????????????? MOL ???????????????????????????????????????? + + ?????? + ArrayOfStructureAlignment + + ???? + mol = bget("-f m dr:D00201") + search_drugs_by_subcomp(mol, 1, 5) + + ???? URL?? + * (()) + --- search_glycans_by_kcam(string:kcf, string:program, string:option, int:offset, int:limit) *************** *** 1771,1775 **** == Notes ! Last updated: November 20, 2006 =end --- 1891,1895 ---- == Notes ! Last updated: December 27, 2006 =end Index: KEGG_API.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** KEGG_API.rd 24 Dec 2006 10:14:19 -0000 1.3 --- KEGG_API.rd 27 Dec 2006 13:32:39 -0000 1.4 *************** *** 118,124 **** --- 118,127 ---- * (()) * (()) + # * (()) + # * (()) * (()) * (()) * (()) + # * (()) * (()) * (()) *************** *** 126,129 **** --- 129,135 ---- * (()) * (()) + # * (()) + # * (()) + # * (()) * (()) * (()) *************** *** 160,169 **** --- 166,179 ---- * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) * (()) + * (()) * (()) *************** *** 599,604 **** the database name and the identifier of an entry joined by a colon sign as 'database:entry' (e.g. 'embl:J00231' means an EMBL entry 'J00231'). ! 'entry_id' includes 'genes_id', 'enzyme_id', 'compound_id', 'glycan_id', ! 'reaction_id', 'pathway_id' and 'motif_id' described in below. * 'genes_id' is a gene identifier used in KEGG/GENES which consists of --- 609,614 ---- the database name and the identifier of an entry joined by a colon sign as 'database:entry' (e.g. 'embl:J00231' means an EMBL entry 'J00231'). ! 'entry_id' includes 'genes_id', 'enzyme_id', 'compound_id', 'drug_id', ! 'glycan_id', 'reaction_id', 'pathway_id' and 'motif_id' described in below. * 'genes_id' is a gene identifier used in KEGG/GENES which consists of *************** *** 606,622 **** * 'enzyme_id' is an enzyme identifier consisting of database name 'ec' ! and an enzyme code used in KEGG/LIGAND (e.g. 'ec:1.1.1.1' means an ! alcohol dehydrogenase enzyme) ! * 'compound_id' is a compound identifier consisting of database name 'cpd' ! and a compound number used in KEGG/LIGAND (e.g. 'cpd:C00158' means a ! citric acid). Note that some compounds also have 'glycan_id' and ! both IDs are accepted and converted internally by the corresponding ! methods. * 'glycan_id' is a glycan identifier consisting of database name 'gl' ! and a glycan number used in KEGG/GLYCAN (e.g. 'gl:G00050' means a ! Paragloboside). Note that some glycans also have 'compound_id' and ! both IDs are accepted and converted internally by the corresponding methods. --- 616,636 ---- * 'enzyme_id' is an enzyme identifier consisting of database name 'ec' ! and an enzyme code used in KEGG/LIGAND ENZYME database. ! (e.g. 'ec:1.1.1.1' means an alcohol dehydrogenase enzyme) ! * 'compound_id' is a compound identifier consisting of database name ! 'cpd' and a compound number used in KEGG COMPOUND / LIGAND database ! (e.g. 'cpd:C00158' means a citric acid). Note that some compounds ! also have 'glycan_id' and both IDs are accepted and converted internally ! by the corresponding methods. ! ! * 'drug_id' is a drug identifier consisting of database name 'dr' ! and a compound number used in KEGG DRUG / LIGAND database ! (e.g. 'dr:D00201' means a tetracycline). * 'glycan_id' is a glycan identifier consisting of database name 'gl' ! and a glycan number used in KEGG GLYCAN database (e.g. 'gl:G00050' ! means a Paragloboside). Note that some glycans also have 'compound_id' ! and both IDs are accepted and converted internally by the corresponding methods. *************** *** 692,695 **** --- 706,724 ---- length2 amino acid length of the genes_id2 (int) + #Notice (26 Nov, 2004): + # + #We found a serious bug with the 'best_flag_1to2' and 'best_flag_2to1' + #fields in the SSDBRelation data type. The methods returning the + #SSDBRelation (and ArrayOfSSDBRelation) data type had returned the + #opposite values of the intended results with the both fields. + #The following methods had been affected by this bug: + # + ## * get_neighbors_by_gene + # * get_best_neighbors_by_gene + # * get_reverse_best_neighbors_by_gene + # * get_paralogs_by_gene + ## * get_similarity_between_genes + # + #This problem is fixed in the KEGG API version 3.2. + ArrayOfSSDBRelation *************** *** 1136,1139 **** --- 1165,1182 ---- * (()) + #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) + # + #Search homologous genes of the user specified 'genes_id' from specified + #organism (or from all organisms if 'all' is given as org). + # + #Return value: + # ArrayOfSSDBRelation + # + #Examples: + # # This will search all homologous genes of E. coli gene 'b0002' + # # in the SSDB and returns the first ten results. + # get_neighbors_by_gene('eco:b0002', 'all', 1, 10) + # # Next ten results. + # get_neighbors_by_gene('eco:b0002', 'all', 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) *************** *** 1185,1188 **** --- 1228,1242 ---- get_paralogs_by_gene('eco:b0002', 11, 10) + #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) + # + #Returns data containing Smith-Waterman score and alignment positions + #between the two genes. + # + #Return value: + # SSDBRelation + # + #Example: + # # Returns a 'sw_score' between two E. coli genes 'b0002' and 'b3940' + # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif *************** *** 1228,1231 **** --- 1282,1295 ---- get_ko_by_gene('eco:b0002') + #--- get_ko_members(string:ko_id) + # + #Returns all genes assigned to the given KO entry. + # + #Return value: + # ArrayOfstring (genes_id) + # + #Example + # # Returns genes_ids those which belong to KO entry 'ko:K02598'. + # get_ko_members('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) *************** *** 1267,1271 **** --- 1331,1359 ---- get_genes_by_ko('ko:K00010', 'all') + #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #Search all members of the same OC (KEGG Ortholog Cluster) to which given + #genes_id belongs. + # + #Return value: + # ArrayOfstring (genes_id) + # + #Example + # # Returns genes belonging to the same OC with eco:b0002 gene. + # get_oc_members_by_gene('eco:b0002', 1, 10) + # get_oc_members_by_gene('eco:b0002', 11, 10) + #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) + # + #Search all members of the same PC (KEGG Paralog Cluster) to which given + #genes_id belongs. + # + #Return value: + # ArrayOfstring (genes_id) + # + #Example + # # Returns genes belonging to the same PC with eco:b0002 gene. + # get_pc_members_by_gene('eco:b0002', 1, 10) + # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY *************** *** 1684,1687 **** --- 1772,1785 ---- search_compounds_by_name("shikimic acid") + --- search_drugs_by_name(string:name) + + Returns a list of drugs having the specified name. + + Return value: + ArrayOfstring (drug_id) + + Example: + search_drugs_by_name("tetracyclin") + --- search_glycans_by_name(string:name) *************** *** 1705,1708 **** --- 1803,1817 ---- search_compounds_by_composition("C7H10O5") + --- search_drugs_by_composition(string:composition) + + Returns a list of drugs containing elements indicated by the composition. + Order of the elements is insensitive. + + Return value: + ArrayOfstring (drug_id) + + Example: + search_drugs_by_composition("HCl") + --- search_glycans_by_composition(string:composition) *************** *** 1727,1730 **** --- 1836,1850 ---- search_compounds_by_mass(174.05, 0.1) + --- search_drugs_by_mass(float:mass, float:range) + + Returns a list of drugs having the molecular weight around 'mass' + with some ambiguity (range). + + Return value: + ArrayOfstring (drug_id) + + Example: + search_drugs_by_mass(150, 1.0) + --- search_glycans_by_mass(float:mass, float:range) *************** *** 1756,1759 **** --- 1876,1897 ---- * (()) + --- search_drugs_by_subcomp(string:mol, int:offset, int:limit) + + Returns a list of drugs with the alignment having common sub-structure + calculated by the subcomp program. + + You can obtain a MOL formatted structural data of matched drugs + using bget method with the "-f m" option to confirm the alignment. + + Return value: + ArrayOfStructureAlignment + + Example: + mol = bget("-f m dr:D00201") + search_drugs_by_subcomp(mol, 1, 5) + + Related site: + * (()) + --- search_glycans_by_kcam(string:kcf, string:program, string:option, int:offset, int:limit) *************** *** 1780,1784 **** == Notes ! Last updated: November 20, 2006 =end --- 1918,1923 ---- == Notes ! Last updated: December 27, 2006 =end + From k at dev.open-bio.org Wed Dec 27 13:40:47 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Wed, 27 Dec 2006 13:40:47 +0000 Subject: [BioRuby-cvs] bioruby/doc KEGG_API.rd, 1.4, 1.5 KEGG_API.rd.ja, 1.10, 1.11 Message-ID: <200612271340.kBRDelOv010854@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv10850 Modified Files: KEGG_API.rd KEGG_API.rd.ja Log Message: * obsoleted comments are removed Index: KEGG_API.rd.ja =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd.ja,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** KEGG_API.rd.ja 27 Dec 2006 13:32:40 -0000 1.10 --- KEGG_API.rd.ja 27 Dec 2006 13:40:45 -0000 1.11 *************** *** 69,78 **** * (()) * (()) - # * (()) - # * (()) * (()) * (()) * (()) - # * (()) * (()) * (()) --- 69,75 ---- *************** *** 80,86 **** * (()) * (()) - # * (()) - # * (()) - # * (()) * (()) * (()) --- 77,80 ---- *************** *** 1136,1153 **** * (()) - #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) - # - #???????? genes_id ???????????????????????????????????????????????????? - #???????????????? org ?? 'all' ???????????????????????????????????? - # - #?????? - # ArrayOfSSDBRelation - # - #???? - # # ?????????????? b0002 ?????????????????????????????????????????????? - # # ?????????????????????????? - # get_neighbors_by_gene('eco:b0002', 'all' 1, 10) - # # ???????????? offset = offset + limit ?????????????? - # get_neighbors_by_gene('eco:b0002', 'all' 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) --- 1130,1133 ---- *************** *** 1199,1212 **** get_paralogs_by_gene('eco:b0002', 11, 10) - #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) - # - #???????????????????????? Smith-Waterman ?????????????????????????????? - # - #?????? - # SSDBRelation - # - #???? - # # ???????? b0002 ???????? b3940 ???????????????????????????????????????? - # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif --- 1179,1182 ---- *************** *** 1255,1268 **** get_ko_by_gene('eco:b0002') - #--- get_ko_members(string:ko_id) - # - #???????? ko_id ?? KO ???????????????????????????????????????????? - # - #?????? - # ArrayOfstring (genes_id) - # - #???? - # # KO ???? K02208 ?????????????????????????????????? - # get_ko_by_gene('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) --- 1225,1228 ---- *************** *** 1303,1329 **** get_genes_by_ko('ko:K00010', 'all') - #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #???????????????????? OC ?????????????????????????????????? - # - #?????? - # ArrayOfstring (genes_id) - # - #???? - # # eco:b0002 ???????????????????????????????????????????????????????? - # get_oc_members_by_gene('eco:b0002', 1, 10) - # get_oc_members_by_gene('eco:b0002', 11, 10) - #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #???????????????????? PC ?????????????????????????????????? - # - #?????? - # ArrayOfstring (genes_id) - # - #???? - # # eco:b0002 ?????????????????????????????????????????????????????? - # get_pc_members_by_gene('eco:b0002', 1, 10) - # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY --- 1263,1267 ---- Index: KEGG_API.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/KEGG_API.rd,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** KEGG_API.rd 27 Dec 2006 13:32:39 -0000 1.4 --- KEGG_API.rd 27 Dec 2006 13:40:45 -0000 1.5 *************** *** 118,127 **** * (()) * (()) - # * (()) - # * (()) * (()) * (()) * (()) - # * (()) * (()) * (()) --- 118,124 ---- *************** *** 129,135 **** * (()) * (()) - # * (()) - # * (()) - # * (()) * (()) * (()) --- 126,129 ---- *************** *** 706,724 **** length2 amino acid length of the genes_id2 (int) - #Notice (26 Nov, 2004): - # - #We found a serious bug with the 'best_flag_1to2' and 'best_flag_2to1' - #fields in the SSDBRelation data type. The methods returning the - #SSDBRelation (and ArrayOfSSDBRelation) data type had returned the - #opposite values of the intended results with the both fields. - #The following methods had been affected by this bug: - # - ## * get_neighbors_by_gene - # * get_best_neighbors_by_gene - # * get_reverse_best_neighbors_by_gene - # * get_paralogs_by_gene - ## * get_similarity_between_genes - # - #This problem is fixed in the KEGG API version 3.2. + ArrayOfSSDBRelation --- 700,703 ---- *************** *** 1165,1182 **** * (()) - #--- get_neighbors_by_gene(string:genes_id, string:org, int:offset, int:limit) - # - #Search homologous genes of the user specified 'genes_id' from specified - #organism (or from all organisms if 'all' is given as org). - # - #Return value: - # ArrayOfSSDBRelation - # - #Examples: - # # This will search all homologous genes of E. coli gene 'b0002' - # # in the SSDB and returns the first ten results. - # get_neighbors_by_gene('eco:b0002', 'all', 1, 10) - # # Next ten results. - # get_neighbors_by_gene('eco:b0002', 'all', 11, 10) --- get_best_best_neighbors_by_gene(string:genes_id, int:offset, int:limit) --- 1144,1147 ---- *************** *** 1228,1242 **** get_paralogs_by_gene('eco:b0002', 11, 10) - #--- get_similarity_between_genes(string:genes_id1, string:genes_id2) - # - #Returns data containing Smith-Waterman score and alignment positions - #between the two genes. - # - #Return value: - # SSDBRelation - # - #Example: - # # Returns a 'sw_score' between two E. coli genes 'b0002' and 'b3940' - # get_similarity_between_genes('eco:b0002', 'eco:b3940') ==== Motif --- 1193,1196 ---- *************** *** 1282,1295 **** get_ko_by_gene('eco:b0002') - #--- get_ko_members(string:ko_id) - # - #Returns all genes assigned to the given KO entry. - # - #Return value: - # ArrayOfstring (genes_id) - # - #Example - # # Returns genes_ids those which belong to KO entry 'ko:K02598'. - # get_ko_members('ko:K02598') --- get_ko_by_ko_class(string:ko_class_id) --- 1236,1239 ---- *************** *** 1331,1359 **** get_genes_by_ko('ko:K00010', 'all') - #--- get_oc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #Search all members of the same OC (KEGG Ortholog Cluster) to which given - #genes_id belongs. - # - #Return value: - # ArrayOfstring (genes_id) - # - #Example - # # Returns genes belonging to the same OC with eco:b0002 gene. - # get_oc_members_by_gene('eco:b0002', 1, 10) - # get_oc_members_by_gene('eco:b0002', 11, 10) - #--- get_pc_members_by_gene(string:genes_id, int:offset, int:limit) - # - #Search all members of the same PC (KEGG Paralog Cluster) to which given - #genes_id belongs. - # - #Return value: - # ArrayOfstring (genes_id) - # - #Example - # # Returns genes belonging to the same PC with eco:b0002 gene. - # get_pc_members_by_gene('eco:b0002', 1, 10) - # get_pc_members_by_gene('eco:b0002', 11, 10) ==== PATHWAY --- 1275,1279 ---- From nakao at dev.open-bio.org Thu Dec 28 06:25:24 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 28 Dec 2006 06:25:24 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/appl/blast test_xmlparser.rb, 1.5, 1.6 Message-ID: <200612280625.kBS6POX4013884@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/appl/blast In directory dev.open-bio.org:/tmp/cvs-serv13864/test/unit/bio/appl/blast Modified Files: test_xmlparser.rb Log Message: * Fixed a bug to read a data file. Index: test_xmlparser.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/appl/blast/test_xmlparser.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_xmlparser.rb 24 Dec 2006 17:19:04 -0000 1.5 --- test_xmlparser.rb 28 Dec 2006 06:25:21 -0000 1.6 *************** *** 26,31 **** def self.output ! # File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read ! File.open(File.join(TestDataBlast, '2.2.15.blastp.m7')).read end end --- 26,31 ---- def self.output ! File.open(File.join(TestDataBlast, 'b0002.faa.m7')).read ! # File.open(File.join(TestDataBlast, '2.2.15.blastp.m7')).read end end From ngoto at dev.open-bio.org Thu Dec 28 15:35:52 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 28 Dec 2006 15:35:52 +0000 Subject: [BioRuby-cvs] bioruby/doc Changes-0.7.rd,1.17,1.18 Message-ID: <200612281535.kBSFZqer015141@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/doc In directory dev.open-bio.org:/tmp/cvs-serv15096/doc Modified Files: Changes-0.7.rd Log Message: Changes by ngoto during Phyloinformatics Hackathon are written in the ChangeLog and incompatible changes after 1.0.0 are written in Changes-0.7.rd. Index: Changes-0.7.rd =================================================================== RCS file: /home/repository/bioruby/bioruby/doc/Changes-0.7.rd,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Changes-0.7.rd 22 Mar 2006 10:19:22 -0000 1.17 --- Changes-0.7.rd 28 Dec 2006 15:35:50 -0000 1.18 *************** *** 184,187 **** --- 184,189 ---- --- Bio::Alignment + In 0.7.0: + * Old Bio::Alignment class is renamed to Bio::Alignment::OriginalAlignment. Now, new Bio::Alignment is a module. However, you don't mind so much *************** *** 200,203 **** --- 202,210 ---- * There are more and more changes to be written... + In 1.1.0: + + * Bio::Alignment::ClustalWFormatter is removed and methods in this module + are renemed and moved to Bio::Alignment::Output. + --- Bio::PDB *************** *** 240,243 **** --- 247,260 ---- * There are more and more changes to be written... + In 1.1.0: + + * In Bio::PDB::ATOM#name, #resName, #iCode, and #charge, whitespaces are + stripped during initializing. + * In Bio::PDB::ATOM#segID, whitespaces are right-stripped during initializing. + * In Bio::PDB::ATOM#element, whitespaces are left-stripped during initializing. + * Bio::PDB::HETATM#name, #resName, #iCode, #charge, #segID, and #element + are also subject to the above changes, because Bio::PDB::HETATM inherits + Bio::PDB::ATOM. + --- Bio::FlatFile *************** *** 262,270 **** structure (which is not recommended) would not work. ! In 1.0.1: * Bio::FlatFile#entry_start_pos and #entry_ended_pos are enabled only when Bio::FlatFile#entry_pos_flag is true. === Deleted files --- 279,302 ---- structure (which is not recommended) would not work. ! In 1.1.0: * Bio::FlatFile#entry_start_pos and #entry_ended_pos are enabled only when Bio::FlatFile#entry_pos_flag is true. + --- Bio::ClustalW, Bio::MAFFT, Bio::Sim4 + + In 1.1.0: + + * Bio::(ClustalW|MAFFT|Sim4)#option is changed to #options. + * Bio::ClustalW::errorlog and Bio::(MAFFT|Sim4)#log are removed. + No replacements/alternatives are available. + + --- Bio::MAFFT::Report + + In 1.1.0: + + * Bio::MAFFT::Report#initialize is changed to get a string of multi-fasta + formmatted text instead of Array. + === Deleted files From ngoto at dev.open-bio.org Thu Dec 28 15:35:52 2006 From: ngoto at dev.open-bio.org (Naohisa Goto) Date: Thu, 28 Dec 2006 15:35:52 +0000 Subject: [BioRuby-cvs] bioruby ChangeLog,1.56,1.57 Message-ID: <200612281535.kBSFZqGI015138@dev.open-bio.org> Update of /home/repository/bioruby/bioruby In directory dev.open-bio.org:/tmp/cvs-serv15096 Modified Files: ChangeLog Log Message: Changes by ngoto during Phyloinformatics Hackathon are written in the ChangeLog and incompatible changes after 1.0.0 are written in Changes-0.7.rd. Index: ChangeLog =================================================================== RCS file: /home/repository/bioruby/bioruby/ChangeLog,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** ChangeLog 24 Dec 2006 18:32:55 -0000 1.56 --- ChangeLog 28 Dec 2006 15:35:50 -0000 1.57 *************** *** 30,33 **** --- 30,78 ---- Bio::Iprscan::Report for InterProScan output is newly added. + 2006-12-15 Naohisa Goto + + * lib/bio/appl/mafft/report.rb + + Bio::MAFFT::Report#initialize is changed to get a string of + multi-fasta formmatted text instead of Array. + + 2006-12-14 Naohisa Goto + + * lib/bio/appl/phylip/alignment.rb + + Phylip format multiple sequence alignment parser class + Bio::Phylip::PhylipFormat is newly added. + + * lib/bio/appl/phylip/distance_matrix.rb + + Bio::Phylip::DistanceMatrix, a parser for phylip distance matrix + (generated by dnadist/protdist/restdist programs) is newly added. + + * lib/bio/appl/gcg/msf.rb, lib/bio/appl/gcg/seq.rb + + Bio::GCG::Msf in lib/bio/appl/gcg/msf.rb for GCG MSF multiple + sequence alignment format parser, and Bio::GCG::Seq in + lib/bio/appl/gcg/seq.rb for GCG sequence format parser are + newly added. + + * lib/bio/alignment.rb + + Output of Phylip interleaved/non-interleaved format (.phy), + Molphy alignment format (.mol), and GCG MSF format (.msf) + are supported. Bio::Alignment::ClustalWFormatter is removed + and methods in the module are renamed and moved to + Bio::Alignment::Output. + + * lib/bio/appl/clustalw.rb, lib/bio/appl/mafft.rb, lib/bio/appl/sim4.rb + + Changed to use Bio::Command instead of Open3.popen3. + + 2006-12-13 Naohisa Goto + + * lib/bio/tree.rb, lib/bio/db/newick.rb + + Bio::PhylogeneticTree is renamed to Bio::Tree, and + lib/bio/phylogenetictree.rb is renamed to lib/bio/tree.rb. + NHX (New Hampshire eXtended) parser/writer support are added. 2006-10-05 Naohisa Goto From czmasek at dev.open-bio.org Tue Dec 19 05:09:49 2006 From: czmasek at dev.open-bio.org (Chris Zmasek) Date: Tue, 19 Dec 2006 05:09:49 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db nexus.rb,NONE,1.1 Message-ID: <200612190509.kBJ59nf9028498@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv28474 Added Files: nexus.rb Log Message: Initial commit of nexus.rb - a parser for nexus formatted data (developed at first phyloinformatics hackathon at nescent in durham, nc, usa) --- NEW FILE: nexus.rb --- # # = bio/db/nexus.rb - Nexus Standard phylogenetic tree parser / formatter # # Copyright:: Copyright (C) 2006 Christian M Zmasek # # License:: Ruby's # # $Id: nexus.rb,v 1.1 2006/12/19 05:09:46 czmasek Exp $ # # == Description # # This file contains classes that implement a parser for NEXUS formatted # data as well as objects to store, access, and write the parsed data. # # The following five blocks: # taxa, characters, distances, trees, data # are recognizable and parsable. # # The parser can deal with (nested) comments (indicated by square brackets), [...1817 lines suppressed...] def Util::larger_than_zero( i ) return ( i != nil && i.to_i > 0 ) end # Returns true if String str is not nil and longer than 0. # --- # *Arguments*: # * (required) _str_: String # *Returns*:: true or false def Util::longer_than_zero( str ) return ( str != nil && str.length > 0 ) end end # class Util end # class Nexus end #module Bio From czmasek at dev.open-bio.org Tue Dec 19 05:17:29 2006 From: czmasek at dev.open-bio.org (Chris Zmasek) Date: Tue, 19 Dec 2006 05:17:29 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_nexus.rb,NONE,1.1 Message-ID: <200612190517.kBJ5HTVV028567@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv28563 Added Files: test_nexus.rb Log Message: Initial commit for test_nexus.rb. --- NEW FILE: test_nexus.rb --- # # = test/bio/db/nexus.rb - Unit test for Bio::Nexus # # Copyright:: Copyright (C) 2006 Christian M Zmasek # # License:: Ruby's # # $Id: test_nexus.rb,v 1.1 2006/12/19 05:17:27 czmasek Exp $ # # == Description # # This file contains unit tests for Bio::Nexus. # require 'test/unit' require 'bio/db/nexus' module Bio class TestNexus < Test::Unit::TestCase NEXUS_STRING_1 = <<-END_OF_NEXUS_STRING #NEXUS Begin Taxa; Dimensions [[comment]] ntax=4; TaxLabels "hag fish" [comment] 'african frog' [lots of different comment follow] [] [a] [[a]] [ a ] [[ a ]] [ [ a ] ] [a ] [[a ]] [ [a ] ] [ a] [[ a]] [ [ a] ] [ ] [[ ]] [ [ ] ] [ a b ] [[ a b ]] [ [ a b ] ] [x[ x [x[ x[[x[[xx[x[ x]] ]x ] []]][x]]x]]] [comment_1 comment_3] "rat snake" 'red mouse'; End; [yet another comment End; ] Begin Characters; Dimensions nchar=20 ntax=4; [ ntax=1000; ] Format DataType=DNA Missing=x Gap=- MatchChar=.; Matrix [comment] fish ACATA GAGGG TACCT CTAAG frog ACTTA GAGGC TACCT CTAGC snake ACTCA CTGGG TACCT TTGCG mouse ACTCA GACGG TACCT TTGCG; End; Begin Trees; [comment] Tree best=(fish,(frog,(snake,mo use))); [some long comment] Tree other=(snake, (frog,(fish,mo use ))); End; Begin Trees; [comment] Tree worst=(A,(B,(C,D ))); Tree bad=(a, (b,(c , d ) ) ); End; Begin Distances; Dimensions nchar=20 ntax=5; Format Triangle=Both; Matrix taxon_1 0.0 1.0 2.0 4.0 7.0 taxon_2 1.0 0.0 3.0 5.0 8.0 taxon_3 3.0 4.0 0.0 6.0 9.0 taxon_4 7.0 3.0 2.0 0.0 9.5 taxon_5 1.2 1.3 1.4 1.5 0.0; End; Begin Data; Dimensions ntax=5 nchar=14; Format Datatype=RNA gap=# MISSING=x MatchChar=^; TaxLabels ciona cow [comment1 commentX] ape 'purple urchin' "green lizard"; Matrix [ comment [old comment] ] taxon_1 A- CCGTCGA-GTTA taxon_2 T- CCG-CGA-GATC taxon_3 A- C-GTCGA-GATG taxon_4 A- C C TC G A - -G T T T taxon_5 T-CGGTCGT-CTTA; End; Begin Private1; Something foo=5 bar=20; Format Datatype=DNA; Matrix taxon_1 1111 1111111111 taxon_2 2222 2222222222 taxon_3 3333 3333333333 taxon_4 4444 4444444444 taxon_5 5555 5555555555; End; Begin Private1; some [boring] interesting [ outdated ] data be here End; END_OF_NEXUS_STRING DATA_BLOCK_OUTPUT_STRING = <<-DATA_BLOCK_OUTPUT_STRING Begin Data; Dimensions NTax=5 NChar=14; Format DataType=RNA Missing=x Gap=# MatchChar=^; TaxLabels ciona cow ape purple_urchin green_lizard; Matrix taxon_1 A-CCGTCGA-GTTA taxon_2 T-CCG-CGA-GATC taxon_3 A-C-GTCGA-GATG taxon_4 A-CCTCGA--GTTT taxon_5 T-CGGTCGT-CTTA; End; DATA_BLOCK_OUTPUT_STRING def test_nexus nexus = Bio::Nexus.new( NEXUS_STRING_1 ) blocks = nexus.get_blocks assert_equal( 8, blocks.size ) private_blocks = nexus.get_blocks_by_name( "private1" ) data_blocks = nexus.get_data_blocks character_blocks = nexus.get_characters_blocks trees_blocks = nexus.get_trees_blocks distances_blocks = nexus.get_distances_blocks taxa_blocks = nexus.get_taxa_blocks assert_equal( 2, private_blocks.size ) assert_equal( 1, data_blocks.size ) assert_equal( 1, character_blocks.size ) assert_equal( 2, trees_blocks.size ) assert_equal( 1, distances_blocks.size ) assert_equal( 1, taxa_blocks.size ) taxa_block = taxa_blocks[ 0 ] assert_equal( taxa_block.get_number_of_taxa.to_i , 4 ) assert_equal( taxa_block.get_taxa[ 0 ], "hag_fish" ) assert_equal( taxa_block.get_taxa[ 1 ], "african_frog" ) assert_equal( taxa_block.get_taxa[ 2 ], "rat_snake" ) assert_equal( taxa_block.get_taxa[ 3 ], "red_mouse" ) chars_block = character_blocks[ 0 ] assert_equal( chars_block.get_number_of_taxa.to_i, 4 ) assert_equal( chars_block.get_number_of_characters.to_i, 20 ) assert_equal( chars_block.get_datatype, "DNA" ) assert_equal( chars_block.get_match_character, "." ) assert_equal( chars_block.get_missing, "x" ) assert_equal( chars_block.get_gap_character, "-" ) assert_equal( chars_block.get_matrix.get_value( 0, 0 ), "fish" ) assert_equal( chars_block.get_matrix.get_value( 1, 0 ), "frog" ) assert_equal( chars_block.get_matrix.get_value( 2, 0 ), "snake" ) assert_equal( chars_block.get_matrix.get_value( 3, 0 ), "mouse" ) assert_equal( chars_block.get_matrix.get_value( 0, 20 ), "G" ) assert_equal( chars_block.get_matrix.get_value( 1, 20 ), "C" ) assert_equal( chars_block.get_matrix.get_value( 2, 20 ), "G" ) assert_equal( chars_block.get_matrix.get_value( 3, 20 ), "G" ) assert_equal( chars_block.get_characters_strings_by_name( "fish" )[ 0 ], "ACATAGAGGGTACCTCTAAG" ) assert_equal( chars_block.get_characters_strings_by_name( "frog" )[ 0 ], "ACTTAGAGGCTACCTCTAGC" ) assert_equal( chars_block.get_characters_strings_by_name( "snake" )[ 0 ], "ACTCACTGGGTACCTTTGCG" ) assert_equal( chars_block.get_characters_strings_by_name( "mouse" )[ 0 ], "ACTCAGACGGTACCTTTGCG" ) assert_equal( chars_block.get_characters_string( 0 ), "ACATAGAGGGTACCTCTAAG" ) assert_equal( chars_block.get_characters_string( 1 ), "ACTTAGAGGCTACCTCTAGC" ) assert_equal( chars_block.get_characters_string( 2 ), "ACTCACTGGGTACCTTTGCG" ) assert_equal( chars_block.get_characters_string( 3 ), "ACTCAGACGGTACCTTTGCG" ) assert_equal( chars_block.get_row_name( 1 ), "frog" ) assert_equal( chars_block.get_sequences_by_name( "fish" )[ 0 ].seq.to_s.downcase, "ACATAGAGGGTACCTCTAAG".downcase ) assert_equal( chars_block.get_sequences_by_name( "frog" )[ 0 ].seq.to_s.downcase, "ACTTAGAGGCTACCTCTAGC".downcase ) assert_equal( chars_block.get_sequences_by_name( "snake" )[ 0 ].seq.to_s.downcase, "ACTCACTGGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequences_by_name( "mouse" )[ 0 ].seq.to_s.downcase, "ACTCAGACGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequences_by_name( "fish" )[ 0 ].definition, "fish" ) assert_equal( chars_block.get_sequences_by_name( "frog" )[ 0 ].definition, "frog" ) assert_equal( chars_block.get_sequences_by_name( "snake" )[ 0 ].definition, "snake" ) assert_equal( chars_block.get_sequences_by_name( "mouse" )[ 0 ].definition, "mouse" ) assert_equal( chars_block.get_sequence( 0 ).seq.to_s.downcase, "ACATAGAGGGTACCTCTAAG".downcase ) assert_equal( chars_block.get_sequence( 1 ).seq.to_s.downcase, "ACTTAGAGGCTACCTCTAGC".downcase ) assert_equal( chars_block.get_sequence( 2 ).seq.to_s.downcase, "ACTCACTGGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequence( 3 ).seq.to_s.downcase, "ACTCAGACGGTACCTTTGCG".downcase ) assert_equal( chars_block.get_sequence( 0 ).definition, "fish" ) assert_equal( chars_block.get_sequence( 1 ).definition, "frog" ) assert_equal( chars_block.get_sequence( 2 ).definition, "snake" ) assert_equal( chars_block.get_sequence( 3 ).definition, "mouse" ) tree_block_0 = trees_blocks[ 0 ] tree_block_1 = trees_blocks[ 1 ] assert_equal( tree_block_0.get_tree_names[ 0 ], "best" ) assert_equal( tree_block_0.get_tree_names[ 1 ], "other" ) assert_equal( tree_block_0.get_tree_strings_by_name( "best" )[ 0 ], "(fish,(frog,(snake,mouse)));" ) assert_equal( tree_block_0.get_tree_strings_by_name( "other" )[ 0 ], "(snake,(frog,(fish,mouse)));" ) best_tree = tree_block_0.get_trees_by_name( "best" )[ 0 ] other_tree = tree_block_0.get_trees_by_name( "other" )[ 0 ] worst_tree = tree_block_1.get_tree( 0 ) bad_tree = tree_block_1.get_tree( 1 ) assert_equal( 6, best_tree.descendents( best_tree.root ).size ) assert_equal( 4, best_tree.leaves.size) assert_equal( 6, other_tree.descendents( other_tree.root ).size ) assert_equal( 4, other_tree.leaves.size) fish_leaf_best = best_tree.nodes.find { |x| x.name == 'fish' } assert_equal( 1, best_tree.ancestors( fish_leaf_best ).size ) fish_leaf_other = other_tree.nodes.find { |x| x.name == 'fish' } assert_equal( 3, other_tree.ancestors( fish_leaf_other ).size ) a_leaf_worst = worst_tree.nodes.find { |x| x.name == 'A' } assert_equal( 1, worst_tree.ancestors( a_leaf_worst ).size ) c_leaf_bad = bad_tree.nodes.find { |x| x.name == 'c' } assert_equal( 3, bad_tree.ancestors( c_leaf_bad ).size ) dist_block = distances_blocks[ 0 ] assert_equal( dist_block.get_number_of_taxa.to_i, 5 ) assert_equal( dist_block.get_number_of_characters.to_i, 20 ) assert_equal( dist_block.get_triangle, "Both" ) assert_equal( dist_block.get_matrix.get_value( 0, 0 ), "taxon_1" ) assert_equal( dist_block.get_matrix.get_value( 1, 0 ), "taxon_2" ) assert_equal( dist_block.get_matrix.get_value( 2, 0 ), "taxon_3" ) assert_equal( dist_block.get_matrix.get_value( 3, 0 ), "taxon_4" ) assert_equal( dist_block.get_matrix.get_value( 4, 0 ), "taxon_5" ) assert_equal( dist_block.get_matrix.get_value( 0, 5 ).to_f, 7.0 ) assert_equal( dist_block.get_matrix.get_value( 1, 5 ).to_f, 8.0 ) assert_equal( dist_block.get_matrix.get_value( 2, 5 ).to_f, 9.0 ) assert_equal( dist_block.get_matrix.get_value( 3, 5 ).to_f, 9.5 ) assert_equal( dist_block.get_matrix.get_value( 4, 5 ).to_f, 0.0 ) data_block = data_blocks[ 0 ] assert_equal( data_block.get_number_of_taxa.to_i, 5 ) assert_equal( data_block.get_number_of_characters.to_i, 14 ) assert_equal( data_block.get_datatype, "RNA" ) assert_equal( data_block.get_match_character, "^" ) assert_equal( data_block.get_missing, "x" ) assert_equal( data_block.get_gap_character, "#" ) assert_equal( data_block.get_matrix.get_value( 0, 0 ), "taxon_1" ) assert_equal( data_block.get_matrix.get_value( 1, 0 ), "taxon_2" ) assert_equal( data_block.get_matrix.get_value( 2, 0 ), "taxon_3" ) assert_equal( data_block.get_matrix.get_value( 3, 0 ), "taxon_4" ) assert_equal( data_block.get_matrix.get_value( 4, 0 ), "taxon_5" ) assert_equal( data_block.get_matrix.get_value( 0, 14 ), "A" ) assert_equal( data_block.get_matrix.get_value( 1, 14 ), "C" ) assert_equal( data_block.get_matrix.get_value( 2, 14 ), "G" ) assert_equal( data_block.get_matrix.get_value( 3, 14 ), "T" ) assert_equal( data_block.get_matrix.get_value( 4, 14 ), "A" ) assert_equal( data_block.get_taxa[ 0 ], "ciona" ) assert_equal( data_block.get_taxa[ 1 ], "cow" ) assert_equal( data_block.get_taxa[ 2 ], "ape" ) assert_equal( data_block.get_taxa[ 3 ], "purple_urchin" ) assert_equal( data_block.get_taxa[ 4 ], "green_lizard" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_1" )[ 0 ], "A-CCGTCGA-GTTA" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_2" )[ 0 ], "T-CCG-CGA-GATC" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_3" )[ 0 ], "A-C-GTCGA-GATG" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_4" )[ 0 ], "A-CCTCGA--GTTT" ) assert_equal( data_block.get_characters_strings_by_name( "taxon_5" )[ 0 ], "T-CGGTCGT-CTTA" ) assert_equal( data_block.get_characters_string( 0 ), "A-CCGTCGA-GTTA" ) assert_equal( data_block.get_characters_string( 1 ), "T-CCG-CGA-GATC" ) assert_equal( data_block.get_characters_string( 2 ), "A-C-GTCGA-GATG" ) assert_equal( data_block.get_characters_string( 3 ), "A-CCTCGA--GTTT" ) assert_equal( data_block.get_characters_string( 4 ), "T-CGGTCGT-CTTA" ) assert_equal( data_block.get_row_name( 0 ), "taxon_1" ) assert_equal( data_block.get_row_name( 1 ), "taxon_2" ) assert_equal( data_block.get_row_name( 2 ), "taxon_3" ) assert_equal( data_block.get_row_name( 3 ), "taxon_4" ) assert_equal( data_block.get_row_name( 4 ), "taxon_5" ) assert_equal( data_block.get_sequences_by_name( "taxon_1" )[ 0 ].seq.to_s.downcase, "A-CCGTCGA-GTTA".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_2" )[ 0 ].seq.to_s.downcase, "T-CCG-CGA-GATC".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_3" )[ 0 ].seq.to_s.downcase, "A-C-GTCGA-GATG".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_4" )[ 0 ].seq.to_s.downcase, "A-CCTCGA--GTTT".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_5" )[ 0 ].seq.to_s.downcase, "T-CGGTCGT-CTTA".downcase ) assert_equal( data_block.get_sequences_by_name( "taxon_1" )[ 0 ].definition, "taxon_1" ) assert_equal( data_block.get_sequences_by_name( "taxon_2" )[ 0 ].definition, "taxon_2" ) assert_equal( data_block.get_sequences_by_name( "taxon_3" )[ 0 ].definition, "taxon_3" ) assert_equal( data_block.get_sequences_by_name( "taxon_4" )[ 0 ].definition, "taxon_4" ) assert_equal( data_block.get_sequences_by_name( "taxon_5" )[ 0 ].definition, "taxon_5" ) assert_equal( data_block.get_sequence( 0 ).seq.to_s.downcase, "A-CCGTCGA-GTTA".downcase ) assert_equal( data_block.get_sequence( 1 ).seq.to_s.downcase, "T-CCG-CGA-GATC".downcase ) assert_equal( data_block.get_sequence( 2 ).seq.to_s.downcase, "A-C-GTCGA-GATG".downcase ) assert_equal( data_block.get_sequence( 3 ).seq.to_s.downcase, "A-CCTCGA--GTTT".downcase ) assert_equal( data_block.get_sequence( 4 ).seq.to_s.downcase, "T-CGGTCGT-CTTA".downcase ) assert_equal( data_block.get_sequence( 0 ).definition, "taxon_1" ) assert_equal( data_block.get_sequence( 1 ).definition, "taxon_2" ) assert_equal( data_block.get_sequence( 2 ).definition, "taxon_3" ) assert_equal( data_block.get_sequence( 3 ).definition, "taxon_4" ) assert_equal( data_block.get_sequence( 4 ).definition, "taxon_5" ) assert_equal( DATA_BLOCK_OUTPUT_STRING, data_block.to_nexus() ) generic_0 = private_blocks[ 0 ] generic_1 = private_blocks[ 1 ] assert_equal( generic_0.get_tokens[ 0 ], "Something" ) assert_equal( generic_0.get_tokens[ 1 ], "foo" ) assert_equal( generic_0.get_tokens[ 2 ], "5" ) assert_equal( generic_0.get_tokens[ 3 ], "bar" ) assert_equal( generic_0.get_tokens[ 4 ], "20" ) assert_equal( generic_0.get_tokens[ 5 ], "Format" ) assert_equal( generic_0.get_tokens[ 6 ], "Datatype" ) assert_equal( generic_0.get_tokens[ 7 ], "DNA" ) assert_equal( generic_0.get_tokens[ 8 ], "Matrix" ) assert_equal( generic_0.get_tokens[ 9 ], "taxon_1" ) assert_equal( generic_0.get_tokens[10 ], "1111" ) assert_equal( generic_1.get_tokens[ 0 ], "some" ) assert_equal( generic_1.get_tokens[ 1 ], "interesting" ) assert_equal( generic_1.get_tokens[ 2 ], "data" ) assert_equal( generic_1.get_tokens[ 3 ], "be" ) assert_equal( generic_1.get_tokens[ 4 ], "here" ) end # test_nexus end # class TestNexus end # module Bio From czmasek at dev.open-bio.org Tue Dec 19 05:37:52 2006 From: czmasek at dev.open-bio.org (Chris Zmasek) Date: Tue, 19 Dec 2006 05:37:52 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db nexus.rb,1.1,1.2 Message-ID: <200612190537.kBJ5bqCG028671@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv28667 Modified Files: nexus.rb Log Message: minor change: phylogenetictree was renamed into tree. Index: nexus.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/nexus.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** nexus.rb 19 Dec 2006 05:09:46 -0000 1.1 --- nexus.rb 19 Dec 2006 05:37:50 -0000 1.2 *************** *** 90,96 **** require 'bio/sequence' ! require 'bio/sequence/aa' ! require 'bio/sequence/na' ! require 'bio/phylogenetictree' require 'bio/db/newick' --- 90,94 ---- require 'bio/sequence' ! require 'bio/tree' require 'bio/db/newick' From k at dev.open-bio.org Sun Dec 24 10:10:10 2006 From: k at dev.open-bio.org (Katayama Toshiaki) Date: Sun, 24 Dec 2006 10:10:10 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio map.rb, 1.8, 1.9 location.rb, 0.26, 0.27 Message-ID: <200612241010.kBOAAAPb001957@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv1876/lib/bio Modified Files: map.rb location.rb Log Message: * Bio::Locations#equals? method is moved from bio/map.rb to bio/location.rb * RDoc documents are reformatted to fit within 80 columns on terminal Index: location.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/location.rb,v retrieving revision 0.26 retrieving revision 0.27 diff -C2 -d -r0.26 -r0.27 *** location.rb 19 Sep 2006 06:13:54 -0000 0.26 --- location.rb 24 Dec 2006 10:10:08 -0000 0.27 *************** *** 3,7 **** # # Copyright:: Copyright (C) 2001, 2005 Toshiaki Katayama ! # 2006 Jan Aerts # License:: Ruby's # --- 3,7 ---- # # Copyright:: Copyright (C) 2001, 2005 Toshiaki Katayama ! # Copyright:: Copyright (C) 2006 Jan Aerts # License:: Ruby's # *************** *** 13,19 **** # == 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 --- 13,19 ---- # == 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 *************** *** 29,42 **** # class Location include Comparable # Parses a'location' segment, which can be 'ID:' + ('n' or 'n..m' or 'n^m' # or "seq") with '<' or '>', and returns a Bio::Location object. # location = Bio::Location.new('500..550') # # --- # *Arguments*: ! # * (required) _str_: GenBank style position string (see Bio::Locations documentation) ! # *Returns*:: Bio::Location object def initialize(location = nil) --- 29,45 ---- # class Location + include Comparable # Parses a'location' segment, which can be 'ID:' + ('n' or 'n..m' or 'n^m' # or "seq") with '<' or '>', and returns a Bio::Location object. + # # location = Bio::Location.new('500..550') # # --- # *Arguments*: ! # * (required) _str_: GenBank style position string (see Bio::Locations ! # documentation) ! # *Returns*:: the Bio::Location object def initialize(location = nil) *************** *** 55,59 **** # s : start base, e : end base => from, to case location ! when /^[<>]?(\d+)$/ # (A, I) n s = e = $1.to_i when /^[<>]?(\d+)\.\.[<>]?(\d+)$/ # (B, I) n..m --- 58,62 ---- # s : start base, e : end base => from, to case location ! when /^[<>]?(\d+)$/ # (A, I) n s = e = $1.to_i when /^[<>]?(\d+)\.\.[<>]?(\d+)$/ # (B, I) n..m *************** *** 103,107 **** # --- # *Arguments*: ! # * (required) _sequence_: sequence to be used to replace the sequence at the location # *Returns*:: the Bio::Location object def replace(sequence) --- 106,111 ---- # --- # *Arguments*: ! # * (required) _sequence_: sequence to be used to replace the sequence ! # at the location # *Returns*:: the Bio::Location object def replace(sequence) *************** *** 117,123 **** # Check where a Bio::Location object is located compared to another # Bio::Location object (mainly to facilitate the use of Comparable). ! # A location A is upstream of location B if the start position of location A ! # is smaller than the start position of location B. If they're the same, the ! # end positions are checked. # --- # *Arguments*: --- 121,127 ---- # Check where a Bio::Location object is located compared to another # Bio::Location object (mainly to facilitate the use of Comparable). ! # A location A is upstream of location B if the start position of ! # location A is smaller than the start position of location B. If ! # they're the same, the end positions are checked. # --- # *Arguments*: *************** *** 147,151 **** end ! end # class location # == Description --- 151,155 ---- end ! end # Location # == Description *************** *** 158,171 **** # # locations = Bio::Locations.new('join(complement(500..550), 600..625)') ! # locations.each do |location| ! # puts "class=" + location.class.to_s ! # puts "start=" + location.from.to_s + ";end=" + location.to.to_s \ ! # + ";strand=" + location.strand.to_s # end ! # # Output would be: ! # # class=Bio::Location ! # # start=500;end=550;strand=-1 ! # # class=Bio::Location ! # # start=600;end=625;strand=1 # # # For the following three location strings, print the span and range --- 162,174 ---- # # locations = Bio::Locations.new('join(complement(500..550), 600..625)') ! # locations.each do |loc| ! # puts "class = " + loc.class.to_s ! # puts "range = #{loc.from}..#{loc.to} (strand = #{loc.strand})" # end ! # # Output would be: ! # # class = Bio::Location ! # # range = 500..550 (strand = -1) ! # # class = Bio::Location ! # # range = 600..625 (strand = 1) # # # For the following three location strings, print the span and range *************** *** 178,229 **** # 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 ! # ! # The second column of the feature descriptor line designates the ! # location of the feature in the sequence. The location descriptor ! # begins at position 22. Several conventions are used to indicate ! # sequence location. ! # ! # Base numbers in location descriptors refer to numbering in the entry, ! # which is not necessarily the same as the numbering scheme used in the ! # published report. The first base in the presented sequence is numbered ! # base 1. Sequences are presented in the 5 to 3 direction. ! # ! # Location descriptors can be one of the following: # # (A) 1. A single base; ! # # (B) 2. A contiguous span of bases; ! # # (C) 3. A site between two bases; ! # # (D) 4. A single base chosen from a range of bases; ! # # (E) 5. A single base chosen from among two or more specified bases; ! # # (F) 6. A joining of sequence spans; ! # # (G) 7. A reference to an entry other than the one to which the feature ! # belongs (i.e., a remote entry), followed by a location descriptor ! # referring to the remote sequence; ! # # (H) 8. A literal sequence (a string of bases enclosed in quotation marks). # ! # # (C) A site between two residues, such as an endonuclease cleavage site, is # indicated by listing the two bases separated by a carat (e.g., 23^24). ! # # (D) A single residue chosen from a range of residues is indicated by the # number of the first and last bases in the range separated by a single # period (e.g., 23.79). The symbols < and > indicate that the end point # (I) of the range is beyond the specified base number. ! # # (B) A contiguous span of bases is indicated by the number of the first and # last bases in the range separated by two periods (e.g., 23..79). The --- 181,233 ---- # 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 ! # ! # The second column of the feature descriptor line designates the ! # location of the feature in the sequence. The location descriptor ! # begins at position 22. Several conventions are used to indicate ! # sequence location. ! # ! # Base numbers in location descriptors refer to numbering in the entry, ! # which is not necessarily the same as the numbering scheme used in the ! # published report. The first base in the presented sequence is numbered ! # base 1. Sequences are presented in the 5 to 3 direction. ! # ! # Location descriptors can be one of the following: # # (A) 1. A single base; ! # # (B) 2. A contiguous span of bases; ! # # (C) 3. A site between two bases; ! # # (D) 4. A single base chosen from a range of bases; ! # # (E) 5. A single base chosen from among two or more specified bases; ! # # (F) 6. A joining of sequence spans; ! # # (G) 7. A reference to an entry other than the one to which the feature ! # belongs (i.e., a remote entry), followed by a location descriptor ! # referring to the remote sequence; ! # # (H) 8. A literal sequence (a string of bases enclosed in quotation marks). # ! # ==== Description commented with pattern IDs. ! # # (C) A site between two residues, such as an endonuclease cleavage site, is # indicated by listing the two bases separated by a carat (e.g., 23^24). ! # # (D) A single residue chosen from a range of residues is indicated by the # number of the first and last bases in the range separated by a single # period (e.g., 23.79). The symbols < and > indicate that the end point # (I) of the range is beyond the specified base number. ! # # (B) A contiguous span of bases is indicated by the number of the first and # last bases in the range separated by two periods (e.g., 23..79). The *************** *** 231,254 **** # specified base number. Starting and ending positions can be indicated # by base number or by one of the operators described below. ! # # Operators are prefixes that specify what must be done to the indicated # sequence to locate the feature. The following are the operators # available, along with their most common format and a description. ! # # (J) complement (location): The feature is complementary to the location # indicated. Complementary strands are read 5 to 3. ! # # (F) join (location, location, .. location): The indicated elements should # be placed end to end to form one contiguous sequence. ! # # (F) order (location, location, .. location): The elements are found in the # specified order in the 5 to 3 direction, but nothing is implied about # the rationality of joining them. ! # # (F) group (location, location, .. location): The elements are related and # should be grouped together, but no order is implied. ! # # (E) one-of (location, location, .. location): The element can be any one, ! # but only one, of the items listed. # # === Reduction strategy of the position notations --- 235,258 ---- # specified base number. Starting and ending positions can be indicated # by base number or by one of the operators described below. ! # # Operators are prefixes that specify what must be done to the indicated # sequence to locate the feature. The following are the operators # available, along with their most common format and a description. ! # # (J) complement (location): The feature is complementary to the location # indicated. Complementary strands are read 5 to 3. ! # # (F) join (location, location, .. location): The indicated elements should # be placed end to end to form one contiguous sequence. ! # # (F) order (location, location, .. location): The elements are found in the # specified order in the 5 to 3 direction, but nothing is implied about # the rationality of joining them. ! # # (F) group (location, location, .. location): The elements are related and # should be grouped together, but no order is implied. ! # # (E) one-of (location, location, .. location): The element can be any one, ! # but only one, of the items listed. # # === Reduction strategy of the position notations *************** *** 257,404 **** # * (B) Location n..m # * (C) Location n^m ! # * (D) (n.m) => Location n # * (E) ! # * one-of(n,m,..) => Location n ! # * one-of(n..m,..) => Location n..m # * (F) ! # * order(loc,loc,..) => join(loc, loc,..) ! # * group(loc,loc,..) => join(loc, loc,..) ! # * join(loc,loc,..) => Sequence ! # * (G) ID:loc => Location with ID ! # * (H) "atgc" => Location only with Sequence # * (I) # * Location n with lt flag # * >n => Location n with gt flag ! # * Location n..m with lt flag ! # * n..>m => Location n..m with gt flag ! # * m => Location n..m with lt, gt flag ! # * (J) complement(loc) => Sequence # * (K) replace(loc, str) => Location with replacement Sequence # - # === GenBank location examples - # - # (C) n^m - # - # * [AB015179] 754^755 - # * [AF179299] complement(53^54) - # * [CELXOL1ES] replace(4480^4481,"") - # * [ECOUW87] replace(4792^4793,"a") - # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") - # - # (D) (n.m) - # - # * [HACSODA] 157..(800.806) - # * [HALSODB] (67.68)..(699.703) - # * [AP001918] (45934.45974)..46135 - # * [BACSPOJ] <180..(731.761) - # * [BBU17998] (88.89)..>1122 - # * [ECHTGA] complement((1700.1708)..(1715.1721)) - # * [ECPAP17] complement(<22..(255.275)) - # * [LPATOVGNS] complement((64.74)..1525) - # * [PIP404CG] join((8298.8300)..10206,1..855) - # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) - # * [HUMMIC2A] replace((651.655)..(651.655),"") - # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) - # - # (E) one-of - # - # * [ECU17136] one-of(898,900)..983 - # * [CELCYT1A] one-of(5971..6308,5971..6309) - # * [DMU17742] 8050..one-of(10731,10758,10905,11242) - # * [PFU27807] one-of(623,627,632)..one-of(628,633,637) - # * [BTBAINH1] one-of(845,953,963,1078,1104)..1354 - # * [ATU39449] join(one-of(969..1094,970..1094,995..1094,1018..1094),1518..1587,1726..2119,2220..2833,2945..3215) - # - # (F) join, order, group - # - # * [AB037374S2] join(AB037374.1:1..177,1..807) - # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) - # * [ASNOS11] join(AF130124.1:<2563..2964,AF130125.1:21..157,AF130126.1:12..174,AF130127.1:21..112,AF130128.1:21..162,AF130128.1:281..595,AF130128.1:661..842,AF130128.1:916..1030,AF130129.1:21..115,AF130130.1:21..165,AF130131.1:21..125,AF130132.1:21..428,AF130132.1:492..746,AF130133.1:21..168,AF130133.1:232..401,AF130133.1:475..906,AF130133.1:970..1107,AF130133.1:1176..1367,21..>128) - # - # * [AARPOB2] order(AF194507.1:<1..510,1..>871) - # * [AF006691] order(912..1918,20410..21416) - # * [AF024666] order(complement(18919..19224),complement(13965..14892)) - # * [AF264948] order(27066..27076,27089..27099,27283..27314,27330..27352) - # * [D63363] order(3..26,complement(964..987)) - # * [ECOCURLI2] order(complement(1009..>1260),complement(AF081827.1:<1..177)) - # * [S72388S2] order(join(S72388.1:757..911,S72388.1:609..1542),1..>139) - # * [HEYRRE07] order(complement(1..38),complement(M82666.1:1..140),complement(M82665.1:1..176),complement(M82664.1:1..215),complement(M82663.1:1..185),complement(M82662.1:1..49),complement(M82661.1:1..133)) - # * [COL11A1G34] order(AF101079.1:558..1307,AF101080.1:1..749,AF101081.1:1..898,AF101082.1:1..486,AF101083.1:1..942,AF101084.1:1..1734,AF101085.1:1..2385,AF101086.1:1..1813,AF101087.1:1..2287,AF101088.1:1..1073,AF101089.1:1..989,AF101090.1:1..5017,AF101091.1:1..3401,AF101092.1:1..1225,AF101093.1:1..1072,AF101094.1:1..989,AF101095.1:1..1669,AF101096.1:1..918,AF101097.1:1..1114,AF101098.1:1..1074,AF101099.1:1..1709,AF101100.1:1..986,AF101101.1:1..1934,AF101102.1:1..1699,AF101103.1:1..940,AF101104.1:1..2330,AF101105.1:1..4467,AF101106.1:1..1876,AF101107.1:1..2465,AF101108.1:1..1150,AF101109.1:1..1170,AF101110.1:1..1158,AF101111.1:1..1193,1..611) - # - # group() are found in the COMMENT field only (in GenBank 122.0) - # - # gbpat2.seq: FT repeat_region group(598..606,611..619) - # gbpat2.seq: FT repeat_region group(8..16,1457..1464). - # gbpat2.seq: FT variation group(t1,t2) - # gbpat2.seq: FT variation group(t1,t3) - # gbpat2.seq: FT variation group(t1,t2,t3) - # gbpat2.seq: FT repeat_region group(11..202,203..394) - # gbpri9.seq:COMMENT Residues reported = 'group(1..2145);'. - # - # (G) ID:location - # - # * [AARPOB2] order(AF194507.1:<1..510,1..>871) - # * [AF178221S4] join(AF178221.1:<1..60,AF178222.1:1..63,AF178223.1:1..42,1..>90) - # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) - # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) - # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) - # - # (I) <, > - # - # * [A5U48871] <1..>318 - # * [AA23SRRNP] <1..388 - # * [AA23SRRNP] 503..>1010 - # * [AAM5961] complement(<1..229) - # * [AAM5961] complement(5231..>5598) - # * [AF043934] join(<1,60..99,161..241,302..370,436..594,676..887,993..1141,1209..1329,1387..1559,1626..1646,1708..>1843) - # * [BACSPOJ] <180..(731.761) - # * [BBU17998] (88.89)..>1122 - # * [AARPOB2] order(AF194507.1:<1..510,1..>871) - # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) - # - # (J) complement - # - # * [AF179299] complement(53^54) <= hoge insertion site etc. - # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) - # * [AF209868S2] order(complement(1..>308),complement(AF209868.1:75..336)) - # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) - # * [CPPLCG] complement(<1..(1093.1098)) - # * [D63363] order(3..26,complement(964..987)) - # * [ECHTGA] complement((1700.1708)..(1715.1721)) - # * [ECOUXW] order(complement(1658..1663),complement(1636..1641)) - # * [LPATOVGNS] complement((64.74)..1525) - # * [AF129075] complement(join(71606..71829,75327..75446,76039..76203,76282..76353,76914..77029,77114..77201,77276..77342,78138..78316,79755..79892,81501..81562,81676..81856,82341..82490,84208..84287,85032..85122,88316..88403)) - # * [ZFDYST2] join(AF137145.1:<1..18,complement(<1..99)) - # - # (K) replace - # - # * [CSU27710] replace(64,"A") - # * [CELXOL1ES] replace(5256,"t") - # * [ANICPC] replace(1..468,"") - # * [CSU27710] replace(67..68,"GC") - # * [CELXOL1ES] replace(4480^4481,"") <= ? only one case in GenBank 122.0 - # * [ECOUW87] replace(4792^4793,"a") - # * [CEU34893] replace(1..22,"ggttttaacccagttactcaag") - # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") - # * [MBDR3S1] replace(1400..>9281,"") - # * [HUMMHDPB1F] replace(complement(36..37),"ttc") - # * [HUMMIC2A] replace((651.655)..(651.655),"") - # * [LEIMDRPGP] replace(1..1554,"L01572") - # * [TRBND3] replace(376..395,"atttgtgtgtggtaatta") - # * [TRBND3] replace(376..395,"atttgtgtgggtaatttta") - # * [TRBND3] replace(376..395,"attttgttgttgttttgttttgaatta") - # * [TRBND3] replace(376..395,"atgtgtggtgaatta") - # * [TRBND3] replace(376..395,"atgtgtgtggtaatta") - # * [TRBND3] replace(376..395,"gatttgttgtggtaatttta") - # * [MSU09460] replace(193, <= replace(193, "t") - # * [HUMMAGE12X] replace(3002..3003, <= replace(3002..3003, "GC") - # * [ADR40FIB] replace(510..520, <= replace(510..520, "taatcctaccg") - # * [RATDYIIAAB] replace(1306..1443,"aagaacatccacggagtcagaactgggctcttcacgccggatttggcgttcgaggccattgtgaaaaagcaggcaatgcaccagcaagctcagttcctacccctgcgtggacctggttatccaggagctaatcagtacagttaggtggtcaagctgaaagagccctgtctgaaa") - # class Locations include Enumerable ! # Parses a GenBank style position string and returns a Bio::Locations object, ! # which contains a list of Bio::Location objects. # locations = Bio::Locations.new('join(complement(500..550), 600..625)') # --- 261,290 ---- # * (B) Location n..m # * (C) Location n^m ! # * (D) (n.m) => Location n # * (E) ! # * one-of(n,m,..) => Location n ! # * one-of(n..m,..) => Location n..m # * (F) ! # * order(loc,loc,..) => join(loc, loc,..) ! # * group(loc,loc,..) => join(loc, loc,..) ! # * join(loc,loc,..) => Sequence ! # * (G) ID:loc => Location with ID ! # * (H) "atgc" => Location only with Sequence # * (I) # * Location n with lt flag # * >n => Location n with gt flag ! # * Location n..m with lt flag ! # * n..>m => Location n..m with gt flag ! # * m => Location n..m with lt, gt flag ! # * (J) complement(loc) => Sequence # * (K) replace(loc, str) => Location with replacement Sequence # class Locations + include Enumerable ! # Parses a GenBank style position string and returns a Bio::Locations ! # object, which contains a list of Bio::Location objects. ! # # locations = Bio::Locations.new('join(complement(500..550), 600..625)') # *************** *** 419,422 **** --- 305,320 ---- attr_accessor :locations + # Evaluate equality of Bio::Locations object. + def equals?(other) + if ! other.kind_of?(Bio::Locations) + return nil + end + if self.sort == other.sort + return true + else + return false + end + end + # Iterates on each Bio::Location object. def each *************** *** 479,482 **** --- 377,381 ---- # puts loc.relative(13524) # => 10 # puts loc.relative(13506, :aa) # => 3 + # # --- # *Arguments*: *************** *** 509,516 **** # puts loc.absolute(10) # => 13524 # puts loc.absolute(10, :aa) # => 13506 # --- # *Arguments*: # * (required) _position_: nucleotide position within locus ! # * _:aa_: flag to be used if _position_ is a aminoacid position rather than a nucleotide position # *Returns*:: position within the whole of the sequence def absolute(n, type = nil) --- 408,417 ---- # puts loc.absolute(10) # => 13524 # puts loc.absolute(10, :aa) # => 13506 + # # --- # *Arguments*: # * (required) _position_: nucleotide position within locus ! # * _:aa_: flag to be used if _position_ is a aminoacid position rather than ! # a nucleotide position # *Returns*:: position within the whole of the sequence def absolute(n, type = nil) *************** *** 540,546 **** position.gsub!(/(\.{2})?\(?([<>\d]+)\.([<>\d]+)(?!:)\)?/) do |match| if $1 ! $1 + $3 # ..(n.m) => ..m else ! $2 # (?n.m)? => n end end --- 441,447 ---- position.gsub!(/(\.{2})?\(?([<>\d]+)\.([<>\d]+)(?!:)\)?/) do |match| if $1 ! $1 + $3 # ..(n.m) => ..m else ! $2 # (?n.m)? => n end end *************** *** 550,556 **** position.gsub!(/(\.{2})?one-of\(([^,]+),([^)]+)\)/) do |match| if $1 ! $1 + $3.gsub(/.*,(.*)/, '\1') # ..one-of(n,m) => ..m else ! $2 # one-of(n,m) => n end end --- 451,457 ---- position.gsub!(/(\.{2})?one-of\(([^,]+),([^)]+)\)/) do |match| if $1 ! $1 + $3.gsub(/.*,(.*)/, '\1') # ..one-of(n,m) => ..m else ! $2 # one-of(n,m) => n end end *************** *** 670,678 **** end ! end # class Locations ! end # module Bio if __FILE__ == $0 puts "Test new & span methods" --- 571,701 ---- end ! end # Locations ! end # Bio + + # === GenBank location examples + # + # (C) n^m + # + # * [AB015179] 754^755 + # * [AF179299] complement(53^54) + # * [CELXOL1ES] replace(4480^4481,"") + # * [ECOUW87] replace(4792^4793,"a") + # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") + # + # (D) (n.m) + # + # * [HACSODA] 157..(800.806) + # * [HALSODB] (67.68)..(699.703) + # * [AP001918] (45934.45974)..46135 + # * [BACSPOJ] <180..(731.761) + # * [BBU17998] (88.89)..>1122 + # * [ECHTGA] complement((1700.1708)..(1715.1721)) + # * [ECPAP17] complement(<22..(255.275)) + # * [LPATOVGNS] complement((64.74)..1525) + # * [PIP404CG] join((8298.8300)..10206,1..855) + # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) + # * [HUMMIC2A] replace((651.655)..(651.655),"") + # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) + # + # (E) one-of + # + # * [ECU17136] one-of(898,900)..983 + # * [CELCYT1A] one-of(5971..6308,5971..6309) + # * [DMU17742] 8050..one-of(10731,10758,10905,11242) + # * [PFU27807] one-of(623,627,632)..one-of(628,633,637) + # * [BTBAINH1] one-of(845,953,963,1078,1104)..1354 + # * [ATU39449] join(one-of(969..1094,970..1094,995..1094,1018..1094),1518..1587,1726..2119,2220..2833,2945..3215) + # + # (F) join, order, group + # + # * [AB037374S2] join(AB037374.1:1..177,1..807) + # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) + # * [ASNOS11] join(AF130124.1:<2563..2964,AF130125.1:21..157,AF130126.1:12..174,AF130127.1:21..112,AF130128.1:21..162,AF130128.1:281..595,AF130128.1:661..842,AF130128.1:916..1030,AF130129.1:21..115,AF130130.1:21..165,AF130131.1:21..125,AF130132.1:21..428,AF130132.1:492..746,AF130133.1:21..168,AF130133.1:232..401,AF130133.1:475..906,AF130133.1:970..1107,AF130133.1:1176..1367,21..>128) + # + # * [AARPOB2] order(AF194507.1:<1..510,1..>871) + # * [AF006691] order(912..1918,20410..21416) + # * [AF024666] order(complement(18919..19224),complement(13965..14892)) + # * [AF264948] order(27066..27076,27089..27099,27283..27314,27330..27352) + # * [D63363] order(3..26,complement(964..987)) + # * [ECOCURLI2] order(complement(1009..>1260),complement(AF081827.1:<1..177)) + # * [S72388S2] order(join(S72388.1:757..911,S72388.1:609..1542),1..>139) + # * [HEYRRE07] order(complement(1..38),complement(M82666.1:1..140),complement(M82665.1:1..176),complement(M82664.1:1..215),complement(M82663.1:1..185),complement(M82662.1:1..49),complement(M82661.1:1..133)) + # * [COL11A1G34] order(AF101079.1:558..1307,AF101080.1:1..749,AF101081.1:1..898,AF101082.1:1..486,AF101083.1:1..942,AF101084.1:1..1734,AF101085.1:1..2385,AF101086.1:1..1813,AF101087.1:1..2287,AF101088.1:1..1073,AF101089.1:1..989,AF101090.1:1..5017,AF101091.1:1..3401,AF101092.1:1..1225,AF101093.1:1..1072,AF101094.1:1..989,AF101095.1:1..1669,AF101096.1:1..918,AF101097.1:1..1114,AF101098.1:1..1074,AF101099.1:1..1709,AF101100.1:1..986,AF101101.1:1..1934,AF101102.1:1..1699,AF101103.1:1..940,AF101104.1:1..2330,AF101105.1:1..4467,AF101106.1:1..1876,AF101107.1:1..2465,AF101108.1:1..1150,AF101109.1:1..1170,AF101110.1:1..1158,AF101111.1:1..1193,1..611) + # + # group() are found in the COMMENT field only (in GenBank 122.0) + # + # gbpat2.seq: FT repeat_region group(598..606,611..619) + # gbpat2.seq: FT repeat_region group(8..16,1457..1464). + # gbpat2.seq: FT variation group(t1,t2) + # gbpat2.seq: FT variation group(t1,t3) + # gbpat2.seq: FT variation group(t1,t2,t3) + # gbpat2.seq: FT repeat_region group(11..202,203..394) + # gbpri9.seq:COMMENT Residues reported = 'group(1..2145);'. + # + # (G) ID:location + # + # * [AARPOB2] order(AF194507.1:<1..510,1..>871) + # * [AF178221S4] join(AF178221.1:<1..60,AF178222.1:1..63,AF178223.1:1..42,1..>90) + # * [BOVMHDQBY4] join(M30006.1:(392.467)..575,M30005.1:415..681,M30004.1:129..410,M30004.1:907..1017,521..534) + # * [HUMSOD102] order(L44135.1:(454.445)..>538,<1..181) + # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) + # + # (I) <, > + # + # * [A5U48871] <1..>318 + # * [AA23SRRNP] <1..388 + # * [AA23SRRNP] 503..>1010 + # * [AAM5961] complement(<1..229) + # * [AAM5961] complement(5231..>5598) + # * [AF043934] join(<1,60..99,161..241,302..370,436..594,676..887,993..1141,1209..1329,1387..1559,1626..1646,1708..>1843) + # * [BACSPOJ] <180..(731.761) + # * [BBU17998] (88.89)..>1122 + # * [AARPOB2] order(AF194507.1:<1..510,1..>871) + # * [SL16SRRN1] order(<1..>267,X67092.1:<1..>249,X67093.1:<1..>233) + # + # (J) complement + # + # * [AF179299] complement(53^54) <= hoge insertion site etc. + # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) + # * [AF209868S2] order(complement(1..>308),complement(AF209868.1:75..336)) + # * [AP000001] join(complement(1..61),complement(AP000007.1:252907..253505)) + # * [CPPLCG] complement(<1..(1093.1098)) + # * [D63363] order(3..26,complement(964..987)) + # * [ECHTGA] complement((1700.1708)..(1715.1721)) + # * [ECOUXW] order(complement(1658..1663),complement(1636..1641)) + # * [LPATOVGNS] complement((64.74)..1525) + # * [AF129075] complement(join(71606..71829,75327..75446,76039..76203,76282..76353,76914..77029,77114..77201,77276..77342,78138..78316,79755..79892,81501..81562,81676..81856,82341..82490,84208..84287,85032..85122,88316..88403)) + # * [ZFDYST2] join(AF137145.1:<1..18,complement(<1..99)) + # + # (K) replace + # + # * [CSU27710] replace(64,"A") + # * [CELXOL1ES] replace(5256,"t") + # * [ANICPC] replace(1..468,"") + # * [CSU27710] replace(67..68,"GC") + # * [CELXOL1ES] replace(4480^4481,"") <= ? only one case in GenBank 122.0 + # * [ECOUW87] replace(4792^4793,"a") + # * [CEU34893] replace(1..22,"ggttttaacccagttactcaag") + # * [APLPCII] replace(1905^1906,"acaaagacaccgccctacgcc") + # * [MBDR3S1] replace(1400..>9281,"") + # * [HUMMHDPB1F] replace(complement(36..37),"ttc") + # * [HUMMIC2A] replace((651.655)..(651.655),"") + # * [LEIMDRPGP] replace(1..1554,"L01572") + # * [TRBND3] replace(376..395,"atttgtgtgtggtaatta") + # * [TRBND3] replace(376..395,"atttgtgtgggtaatttta") + # * [TRBND3] replace(376..395,"attttgttgttgttttgttttgaatta") + # * [TRBND3] replace(376..395,"atgtgtggtgaatta") + # * [TRBND3] replace(376..395,"atgtgtgtggtaatta") + # * [TRBND3] replace(376..395,"gatttgttgtggtaatttta") + # * [MSU09460] replace(193, <= replace(193, "t") + # * [HUMMAGE12X] replace(3002..3003, <= replace(3002..3003, "GC") + # * [ADR40FIB] replace(510..520, <= replace(510..520, "taatcctaccg") + # * [RATDYIIAAB] replace(1306..1443,"aagaacatccacggagtcagaactgggctcttcacgccggatttggcgttcgaggccattgtgaaaaagcaggcaatgcaccagcaagctcagttcctacccctgcgtggacctggttatccaggagctaatcagtacagttaggtggtcaagctgaaagagccctgtctgaaa") + # + if __FILE__ == $0 puts "Test new & span methods" Index: map.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/map.rb,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** map.rb 27 Jun 2006 12:40:15 -0000 1.8 --- map.rb 24 Dec 2006 10:10:08 -0000 1.9 *************** *** 2,54 **** # = bio/map.rb - biological mapping class # ! # Copyright:: Copyright (C) 2006 ! # Jan Aerts # Licence:: Ruby's # # $Id$ require 'bio/location' module Bio ! # Add a method to Bio::Locations class ! class Locations ! def equals?(other) ! if ! other.kind_of?(Bio::Locations) ! return nil ! end ! if self.sort == other.sort ! return true ! else ! return false ! end ! end ! end ! ! # = DESCRIPTION ! # The Bio::Module contains classes that describe mapping information and can ! # be used to contain linkage maps, radiation-hybrid maps, etc. ! # As the same marker can be mapped to more than one map, and a single map ! # typically contains more than one marker, the link between the markers and ! # maps is handled by Bio::Map::Mapping objects. Therefore, to link a map to ! # a marker, a Bio::Mapping object is added to that Bio::Map. See usage below. # ! # Not only maps in the strict sense have map-like features (and similarly ! # not only markers in the strict sense have marker-like features). For example, ! # a microsatellite is something that can be mapped on a linkage map (and ! # hence becomes a 'marker'), but a clone can also be mapped to a cytogenetic ! # map. In that case, the clone acts as a marker and has marker-like properties. ! # That same clone can also be considered a 'map' when BAC-end sequences are ! # mapped to it. To reflect this flexibility, the modules Bio::Map::ActsLikeMap ! # and Bio::Map::ActsLikeMarker define methods that are typical for maps and ! # markers. # #-- ! # In a certain sense, a biological sequence also has map- and marker-like ! # properties: things can be mapped to it at certain locations, and the sequence ! # itself can be mapped to something else (e.g. the BAC-end sequence example ! # above, or a BLAST-result). #++ # ! # = USAGE # my_marker1 = Bio::Map::Marker.new('marker1') # my_marker2 = Bio::Map::Marker.new('marker2') --- 2,44 ---- # = bio/map.rb - biological mapping class # ! # Copyright:: Copyright (C) 2006 Jan Aerts # Licence:: Ruby's # # $Id$ + require 'bio/location' module Bio ! # == Description # ! # The Bio::Map contains classes that describe mapping information ! # and can be used to contain linkage maps, radiation-hybrid maps, ! # etc. As the same marker can be mapped to more than one map, and a ! # single map typically contains more than one marker, the link ! # between the markers and maps is handled by Bio::Map::Mapping ! # objects. Therefore, to link a map to a marker, a Bio::Map::Mapping ! # object is added to that Bio::Map. See usage below. ! # ! # Not only maps in the strict sense have map-like features (and ! # similarly not only markers in the strict sense have marker-like ! # features). For example, a microsatellite is something that can be ! # mapped on a linkage map (and hence becomes a 'marker'), but a ! # clone can also be mapped to a cytogenetic map. In that case, the ! # clone acts as a marker and has marker-like properties. That same ! # clone can also be considered a 'map' when BAC-end sequences are ! # mapped to it. To reflect this flexibility, the modules ! # Bio::Map::ActsLikeMap and Bio::Map::ActsLikeMarker define methods ! # that are typical for maps and markers. # #-- ! # In a certain sense, a biological sequence also has map- and ! # marker-like properties: things can be mapped to it at certain ! # locations, and the sequence itself can be mapped to something else ! # (e.g. the BAC-end sequence example above, or a BLAST-result). #++ # ! # == Usage ! # # my_marker1 = Bio::Map::Marker.new('marker1') # my_marker2 = Bio::Map::Marker.new('marker2') *************** *** 62,101 **** # my_marker3.add_mapping_as_marker(my_map1, '9') # ! # puts "Does my_map1 contain marker3? => " + my_map1.contains_marker?(my_marker3).to_s ! # puts "Does my_map2 contain marker3? => " + my_map2.contains_marker?(my_marker3).to_s # # my_map1.mappings_as_map.sort.each do |mapping| ! # puts mapping.map.name + "\t" + mapping.marker.name + "\t" + mapping.location.from.to_s + ".." + mapping.location.to.to_s # end # puts my_map1.mappings_as_map.min.marker.name # my_map2.mappings_as_map.each do |mapping| ! # puts mapping.map.name + "\t" + mapping.marker.name + "\t" + mapping.location.from.to_s + ".." + mapping.location.to.to_s # end module Map ! # = DESCRIPTION ! # The Bio::Map::ActsLikeMap module contains methods that are typical for ! # map-like things: ! # * add markers with their locations (through Bio::Map::Mappings) ! # * check if a given marker is mapped to it ! # , and can be mixed into other classes (e.g. Bio::Map::SimpleMap) ! # ! # Classes that include this mixin should provide an array property called mappings_as_map. ! # For example: ! # class MyMapThing ! # include Bio::Map::ActsLikeMap ! # ! # def initialize (name) ! # @name = name ! # @mappings_as_maps = Array.new ! # end ! # attr_accessor :name, :mappings_as_map ! # end module ActsLikeMap ! # = DESCRIPTION # Adds a Bio::Map::Mappings object to its array of mappings. # ! # = USAGE # # suppose we have a Bio::Map::SimpleMap object called my_map # my_map.add_mapping_as_map(Bio::Map::Marker.new('marker_a'), '5') # --- # *Arguments*: --- 52,112 ---- # my_marker3.add_mapping_as_marker(my_map1, '9') # ! # print "Does my_map1 contain marker3? => " ! # puts my_map1.contains_marker?(my_marker3).to_s ! # print "Does my_map2 contain marker3? => " ! # puts my_map2.contains_marker?(my_marker3).to_s # # my_map1.mappings_as_map.sort.each do |mapping| ! # puts [ mapping.map.name, ! # mapping.marker.name, ! # mapping.location.from.to_s, ! # mapping.location.to.to_s ].join("\t") # end # puts my_map1.mappings_as_map.min.marker.name + # # my_map2.mappings_as_map.each do |mapping| ! # puts [ mapping.map.name, ! # mapping.marker.name, ! # mapping.location.from.to_s, ! # mapping.location.to.to_s ].join("\t") # end + # module Map ! ! # == Description ! # ! # The Bio::Map::ActsLikeMap module contains methods that are typical for ! # map-like things: ! # ! # * add markers with their locations (through Bio::Map::Mappings) ! # * check if a given marker is mapped to it, ! # and can be mixed into other classes (e.g. Bio::Map::SimpleMap) ! # ! # Classes that include this mixin should provide an array property ! # called mappings_as_map. ! # ! # For example: ! # ! # class MyMapThing ! # include Bio::Map::ActsLikeMap ! # ! # def initialize (name) ! # @name = name ! # @mappings_as_maps = Array.new ! # end ! # attr_accessor :name, :mappings_as_map ! # end ! # module ActsLikeMap ! ! # == Description ! # # Adds a Bio::Map::Mappings object to its array of mappings. # ! # == Usage ! # # # suppose we have a Bio::Map::SimpleMap object called my_map # my_map.add_mapping_as_map(Bio::Map::Marker.new('marker_a'), '5') + # # --- # *Arguments*: *************** *** 126,131 **** return self end ! ! # Checks whether a Bio::Map::Marker is mapped to this Bio::Map::SimpleMap. # --- # *Arguments*: --- 137,144 ---- return self end ! ! # Checks whether a Bio::Map::Marker is mapped to this ! # Bio::Map::SimpleMap. ! # # --- # *Arguments*: *************** *** 146,160 **** end ! end #ActsLikeMap ! # = DESCRIPTION ! # The Bio::Map::ActsLikeMarker module contains methods that are typical for ! # marker-like things: # * map it to one or more maps # * check if it's mapped to a given map ! # , and can be mixed into other classes (e.g. Bio::Map::Marker) # ! # Classes that include this mixin should provide an array property called mappings_as_marker. # For example: # class MyMarkerThing # include Bio::Map::ActsLikeMarker --- 159,178 ---- end ! end # ActsLikeMap ! # == Description ! # ! # The Bio::Map::ActsLikeMarker module contains methods that are ! # typical for marker-like things: ! # # * map it to one or more maps # * check if it's mapped to a given map ! # and can be mixed into other classes (e.g. Bio::Map::Marker) # ! # Classes that include this mixin should provide an array property ! # called mappings_as_marker. ! # # For example: + # # class MyMarkerThing # include Bio::Map::ActsLikeMarker *************** *** 166,176 **** # attr_accessor :name, :mappings_as_marker # end module ActsLikeMarker ! # = DESCRIPTION # Adds a Bio::Map::Mappings object to its array of mappings. # ! # = USAGE # # suppose we have a Bio::Map::Marker object called marker_a # marker_a.add_mapping_as_marker(Bio::Map::SimpleMap.new('my_map'), '5') # --- # *Arguments*: --- 184,199 ---- # attr_accessor :name, :mappings_as_marker # end + # module ActsLikeMarker ! ! # == Description ! # # Adds a Bio::Map::Mappings object to its array of mappings. # ! # == Usage ! # # # suppose we have a Bio::Map::Marker object called marker_a # marker_a.add_mapping_as_marker(Bio::Map::SimpleMap.new('my_map'), '5') + # # --- # *Arguments*: *************** *** 242,252 **** ! end #ActsLikeMarker ! # = DESCRIPTION # Creates a new Bio::Map::Mapping object, which links Bio::Map::ActsAsMap- # and Bio::Map::ActsAsMarker-like objects. This class is typically not # accessed directly, but through map- or marker-like objects. class Mapping include Comparable --- 265,277 ---- ! end # ActsLikeMarker ! # == Description ! # # Creates a new Bio::Map::Mapping object, which links Bio::Map::ActsAsMap- # and Bio::Map::ActsAsMarker-like objects. This class is typically not # accessed directly, but through map- or marker-like objects. class Mapping + include Comparable *************** *** 283,296 **** end # Mapping ! # = DESCRIPTION ! # This class handles the essential storage of name, type and units of a map. ! # It includes Bio::Map::ActsLikeMap, and therefore supports the methods of ! # that module. # ! # = USAGE # my_map1 = Bio::Map::SimpleMap.new('RH_map_ABC (2006)', 'RH', 'cR') # my_map1.add_marker(Bio::Map::Marker.new('marker_a', '17') # my_map1.add_marker(Bio::Map::Marker.new('marker_b', '5') class SimpleMap include Bio::Map::ActsLikeMap --- 308,325 ---- end # Mapping ! # == Description ! # ! # This class handles the essential storage of name, type and units ! # of a map. It includes Bio::Map::ActsLikeMap, and therefore ! # supports the methods of that module. # ! # == Usage ! # # my_map1 = Bio::Map::SimpleMap.new('RH_map_ABC (2006)', 'RH', 'cR') # my_map1.add_marker(Bio::Map::Marker.new('marker_a', '17') # my_map1.add_marker(Bio::Map::Marker.new('marker_b', '5') + # class SimpleMap + include Bio::Map::ActsLikeMap *************** *** 324,336 **** end # SimpleMap ! # = DESCRIPTION ! # This class handles markers that are anchored to a Bio::Map::SimpleMap. It ! # includes Bio::Map::ActsLikeMarker, and therefore supports the methods of ! # that module. # ! # = USAGE # marker_a = Bio::Map::Marker.new('marker_a') # marker_b = Bio::Map::Marker.new('marker_b') class Marker include Bio::Map::ActsLikeMarker --- 353,369 ---- end # SimpleMap ! # == Description ! # ! # This class handles markers that are anchored to a Bio::Map::SimpleMap. ! # It includes Bio::Map::ActsLikeMarker, and therefore supports the ! # methods of that module. # ! # == Usage ! # # marker_a = Bio::Map::Marker.new('marker_a') # marker_b = Bio::Map::Marker.new('marker_b') + # class Marker + include Bio::Map::ActsLikeMarker *************** *** 352,355 **** --- 385,390 ---- end # Marker + end # Map + end # Bio From nakao at dev.open-bio.org Thu Dec 28 01:00:26 2006 From: nakao at dev.open-bio.org (Mitsuteru C. Nakao) Date: Thu, 28 Dec 2006 01:00:26 +0000 Subject: [BioRuby-cvs] bioruby/test/data/blast 2.2.15.blastp.m7,NONE,1.1 Message-ID: <200612280100.kBS10QUI013565@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/data/blast In directory dev.open-bio.org:/tmp/cvs-serv13545/test/data/blast Added Files: 2.2.15.blastp.m7 Log Message: * Test data for blast 2.2.15. --- NEW FILE: 2.2.15.blastp.m7 --- blastp blastp 2.2.15 [Oct-15-2006] ~Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, ~Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), ~"Gapped BLAST and PSI-BLAST: a new generation of protein database search~programs", Nucleic Acids Res. 25:3389-3402. p53_barbu.fasta lcl|1_0 P53_HUMAN P04637 Cellular tumor antigen p53 (Tumor suppressor p53) (Phosphoprotein p53) (Antigen NY-CO-13). 393 BLOSUM62 10 11 1 F 1 lcl|1_0 P53_HUMAN P04637 Cellular tumor antigen p53 (Tumor suppressor p53) (Phosphoprotein p53) (Antigen NY-CO-13). 393 1 gnl|BL_ORD_ID|13 P53_HUMAN P04637 Cellular tumor antigen p53 (Tumor suppressor p53) (Phosphoprotein p53) (Antigen NY-CO-13). 13 393 1 755.362 1949 0 1 393 1 393 1 1 366 366 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPPVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDE SWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD 2 gnl|BL_ORD_ID|6 P53_CERAE P13481 Cellular tumor antigen p53 (Tumor suppressor p53). 6 393 1 730.324 1884 0 1 393 1 393 1 1 353 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPHMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP HELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 3 gnl|BL_ORD_ID|17 P53_MACMU P56424 Cellular tumor antigen p53 (Tumor suppressor p53). 17 393 1 729.169 1881 0 1 393 1 393 1 1 352 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPPMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHQLPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP H+LPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 4 gnl|BL_ORD_ID|16 P53_MACFU P61260 Cellular tumor antigen p53 (Tumor suppressor p53). 16 393 1 729.169 1881 0 1 393 1 393 1 1 352 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPPMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHQLPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP H+LPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 5 gnl|BL_ORD_ID|15 P53_MACFA P56423 Cellular tumor antigen p53 (Tumor suppressor p53). 15 393 1 729.169 1881 0 1 393 1 393 1 1 352 357 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDPSIEPPLSQETFSDLWKLLPENNVLSPLPSQAVDDLMLSPDDLAQWLTEDPGPDEAPRMSEAAPPMAPTPAAPTPAAPAPAPSWPLSSSVPSQKTYHGSYGFRLGFLHSGTAKSVTCTYSPDLNKMFCQLAKTCPVQLWVDSTPPPGSRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYSDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCHQLPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPAGSRAHSSHLKSKKGQSTSRHKKFMFKTEGPDSD MEEPQSDPS+EPPLSQETFSDLWKLLPENNVLSPLPSQA+DDLMLSPDD+ QW TEDPGPDE SWPLSSSVPSQKTY GSYGFRLGFLHSGTAKSVTCTYSP LNKMFCQLAKTCPVQLWVDSTPPPG+RVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEY DDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP H+LPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEP GSRAHSSHLKSKKGQSTSRHKK MFKTEGPDSD 6 gnl|BL_ORD_ID|18 P53_MARMO O36006 Cellular tumor antigen p53 (Tumor suppressor p53). 18 391 1 659.448 1700 0 1 393 1 391 1 1 323 338 2 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEAQSDLSIEPPLSQETFSDLWNLLPENNVLSPVLSPPMDDLLLSSEDVENWF--DKGPDEALQMSAAPAPKAPTPAASTLAAPSPATSWPLSSSVPSQNTYPGVYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSECTTIHYNYMCNSSCMGGMNRRPILTIITLEGSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKRGEPCPEPPPRSTKRALPNGTSSSPQPKKKPLDGEYFTLKIRGRARFEMFQELNEALELKDAQAEKEPGESRPHPSYLKSKKGQSTSRHKKIIFKREGPDSD MEE QSD S+EPPLSQETFSDLW LLPENNVLSP+ S MDDL+LS +D+E WF D GPDE SWPLSSSVPSQ TY G YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDSTPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGS+CTTIHYNYMCNSSCMGGMNRRPILTIITLE SSGNLLGRNSFEVRVCACPGRDRRTEEEN RK+GEP E PP STKRALPN TSSSPQPKKKPLDGEYFTL+IRGR RFEMF+ELNEALELKDAQA KEPG SR H S+LKSKKGQSTSRHKK++FK EGPDSD 7 gnl|BL_ORD_ID|25 P53_RABIT Q95330 Cellular tumor antigen p53 (Tumor suppressor p53). 25 391 1 648.277 1671 0 1 393 1 391 1 1 322 338 4 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTS-SSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSDLSLEPPLSQETFSDLWKLLPENNLLTTSLNPPVDDL-LSAEDVANWLNEDP--EEGLRVPAAPAPEAPAPAAPALAAPAPATSWPLSSSVPSQKTYHGNYGFRLGFLHSGTAKSVTCTYSPCLNKLFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCPELPPGSSKRALPTTTTDSSPQTKKKPLDGEYFILKIRGRERFEMFRELNEALELKDAQAEKEPGGSRAHSSYLKAKKGQSTSRHKKPMFKREGPDSD MEE QSD S+EPPLSQETFSDLWKLLPENN+L+ + +DDL LS +D+ W EDP +E SWPLSSSVPSQKTY G+YGFRLGFLHSGTAKSVTCTYSP LNK+FCQLAKTCPVQLWVDSTPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKKGEP ELPPGS+KRALP T+ SSPQ KKKPLDGEYF L+IRGRERFEMFRELNEALELKDAQA KEPGGSRAHSS+LK+KKGQSTSRHKK MFK EGPDSD 8 gnl|BL_ORD_ID|9 P53_DELLE Q8SPZ3 Cellular tumor antigen p53 (Tumor suppressor p53). 9 387 1 635.95 1639 0 1 393 1 387 1 1 318 332 8 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELGVEPPLSQETFSDLWKLLPENNLLSSELSPAVDDLLLSPEDVANWL--DERPDEAPQMPEPPAPAAPTPAAPAPAT-----SWPLSSFVPSQKTYPGSYGFHLGFLHSGTAKSVTCTYSPALNKLFCQLAKTCPVQLWVSSPPPPGTRVRAMAIYKKSEYMTEVVRRCPHHERCSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDSNGNLLGRNSFEVRVCACPGRDRRTEEENFHKKGQSCPELPTGSAKRALPTGTSSSPPQKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGESRAHSSHLKSKKGQSPSRHKKLMFKREGPDSD MEE Q++ VEPPLSQETFSDLWKLLPENN+LS S A+DDL+LSP+D+ W D PDE SWPLSS VPSQKTY GSYGF LGFLHSGTAKSVTCTYSPALNK+FCQLAKTCPVQLWV S PPPGTRVRAMAIYK+S++MTEVVRRCPHHERCSD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLEDS+GNLLGRNSFEVRVCACPGRDRRTEEEN KKG+ ELP GS KRALP TSSSP KKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPG SRAHSSHLKSKKGQS SRHKKLMFK EGPDSD 9 gnl|BL_ORD_ID|23 P53_PIG Q9TUB2 Cellular tumor antigen p53 (Tumor suppressor p53). 23 386 1 607.446 1565 4.50259e-177 1 393 1 386 1 1 308 326 11 395 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSP-LPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSELGVEPPLSQETFSDLWKLLPENNLLSSELSLAAVNDLLLSP--VTNWLDENPDDASRVPAPPAATAPAPAAPAPAT-------SWPLSSFVPSQKTYPGSYDFRLGFLHSGTAKSVTCTYSPALNKLFCQLAKTCPVQLWVSSPPPPGTRVRAMAIYKKSEYMTEVVRRCPHHERSSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDASGNLLGRNSFEVRVCACPGRDRRTEEENFLKKGQSCPEPPPGSTKRALPTSTSSSPVQKKKPLDGEYFTLQIRGRERFEMFRELNDALELKDAQTARESGENRAHSSHLKSKKGQSPSRHKKPMFKREGPDSD MEE QS+ VEPPLSQETFSDLWKLLPENN+LS L A++DL+LSP + W E+P SWPLSS VPSQKTY GSY FRLGFLHSGTAKSVTCTYSPALNK+FCQLAKTCPVQLWV S PPPGTRVRAMAIYK+S++MTEVVRRCPHHER SD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLED+SGNLLGRNSFEVRVCACPGRDRRTEEEN KKG+ E PPGSTKRALP +TSSSP KKKPLDGEYFTLQIRGRERFEMFRELN+ALELKDAQ +E G +RAHSSHLKSKKGQS SRHKK MFK EGPDSD 10 gnl|BL_ORD_ID|4 P53_CANFA Q29537 Cellular tumor antigen p53 (Tumor suppressor p53). 4 381 1 604.749 1558 2.91849e-176 1 393 1 381 1 1 304 325 14 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSELNIDPPLSQETFSELWNLLPENNVLSSELCPAVDELLL-PESVVNWLDEDSDD------------APRMPATSAPTAPGPAPSWPLSSSVPSPKTYPGTYGFRLGFLHSGTAKSVTWTYSPLLNKLFCQLAKTCPVQLWVSSPPPPNTCVRAMAIYKKSEFVTEVVRRCPHHERCSDSSDGLAPPQHLIRVEGNLRAKYLDDRNTFRHSVVVPYEPPEVGSDYTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNVLGRNSFEVRVCACPGRDRRTEEENFHKKGEPCPEPPPGSTKRALPPSTSSSPPQKKKPLDGEYFTLQIRGRERYEMFRNLNEALELKDAQSGKEPGGSRAHSSHLKAKKGQSTSRHKKLMFKREGLDSD MEE QS+ +++PPLSQETFS+LW LLPENNVLS A+D+L+L P+ + W ED SWPLSSSVPS KTY G+YGFRLGFLHSGTAKSVT TYSP LNK+FCQLAKTCPVQLWV S PPP T VRAMAIYK+S+ +TEVVRRCPHHERCSDS DGLAPPQHLIRVEGNLR +YLDDRNTFRHSVVVPYEPPEVGSD TTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGN+LGRNSFEVRVCACPGRDRRTEEEN KKGEP E PPGSTKRALP +TSSSP KKKPLDGEYFTLQIRGRER+EMFR LNEALELKDAQ+GKEPGGSRAHSSHLK+KKGQSTSRHKKLMFK EG DSD 11 gnl|BL_ORD_ID|11 P53_FELCA P41685 Cellular tumor antigen p53 (Tumor suppressor p53). 11 386 1 602.823 1553 1.10903e-175 1 393 1 386 1 1 303 325 9 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MQEPPLELTIEPPLSQETFSELWNLLPENNVLSSELSSAMNELPLS-EDVANWL--DEAPDDASGMSAVPAPAAPAPATPAPAI-----SWPLSSFVPSQKTYPGAYGFHLGFLQSGTAKSVTCTYSPPLNKLFCQLAKTCPVQLWVRSPPPPGTCVRAMAIYKKSEFMTEVVRRCPHHERCPDSSDGLAPPQHLIRVEGNLHAKYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPIITIITLEDSNGKLLGRNSFEVRVCACPGRDRRTEEENFRKKGEPCPEPPPGSTKRALPPSTSSTPPQKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQSGKEPGGSRAHSSHLKAKKGQSTSRHKKPMLKREGLDSD M+EP + ++EPPLSQETFS+LW LLPENNVLS S AM++L LS +D+ W D PD+ SWPLSS VPSQKTY G+YGF LGFL SGTAKSVTCTYSP LNK+FCQLAKTCPVQLWV S PPPGT VRAMAIYK+S+ MTEVVRRCPHHERC DS DGLAPPQHLIRVEGNL +YLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPI+TIITLEDS+G LLGRNSFEVRVCACPGRDRRTEEEN RKKGEP E PPGSTKRALP +TSS+P KKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQ+GKEPGGSRAHSSHLK+KKGQSTSRHKK M K EG DSD 12 gnl|BL_ORD_ID|5 P53_CAVPO Q9WUR6 Cellular tumor antigen p53 (Tumor suppressor p53). 5 391 1 600.512 1547 5.50404e-175 1 393 1 391 1 1 297 319 2 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPHSDLSIEPPLSQETFSDLWKLLPENNVLSDSLSPPMDHLLLSPEEVASWLGENPDGD--GHVSAAPVSEAPTSAGPALVAPAPATSWPLSSSVPSHKPYRGSYGFEVHFLKSGTAKSVTCTYSPGLNKLFCQLAKTCPVQVWVESPPPPGTRVRALAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLHAEYVDDRTTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGKLLGRDSFEVRVCACPGRDRRTEEENFRKKGGLCPEPTPGNIKRALPTSTSSSPQPKKKPLDAEYFTLKIRGRKNFEILREINEALEFKDAQTEKEPGESRPHSSYPKSKKGQSTSCHKKLMFKREGLDSD MEEP SD S+EPPLSQETFSDLWKLLPENNVLS S MD L+LSP+++ W E+P D SWPLSSSVPS K Y+GSYGF + FL SGTAKSVTCTYSP LNK+FCQLAKTCPVQ+WV+S PPPGTRVRA+AIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNL EY+DDR TFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSG LLGR+SFEVRVCACPGRDRRTEEEN RKKG E PG+ KRALP +TSSSPQPKKKPLD EYFTL+IRGR+ FE+ RE+NEALE KDAQ KEPG SR HSS+ KSKKGQSTS HKKLMFK EG DSD 13 gnl|BL_ORD_ID|27 P53_SHEEP P51664 Cellular tumor antigen p53 (Tumor suppressor p53). 27 382 1 595.89 1535 1.35569e-173 1 393 1 382 1 1 299 320 13 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELGVEPPLSQETFSDLWNLLPENNLLSSELSAPVDDLLPYSEDVVTWLDECPNE------------APQMPEPPAQAALAPATSWPLSSFVPSQKTYPGNYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSPPPPGTRVRAMAIYKKLEHMTEVVRRSPHHERSSDYSDGLAPPQHLIRVEGNLRAEYFDDRNTFRHSVVVPYESPEIESECTTIHYNFMCNSSCMGGMNRRPILTIITLEDSRGNLLGRSSFEVRVCACPGRDRRTEEENFRKKGQSCPEPPPGSTKRALPSSTSSSPQQKKKPLDGEYFTLQIRGRKRFEMFRELNEALELMDAQAGREPGESRAHSSHLKSKKGPSPSCHKKPMLKREGPDSD MEE Q++ VEPPLSQETFSDLW LLPENN+LS S +DDL+ +D+ W E P SWPLSS VPSQKTY G+YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDS PPPGTRVRAMAIYK+ +HMTEVVRR PHHER SD SDGLAPPQHLIRVEGNLR EY DDRNTFRHSVVVPYE PE+ S+CTTIHYN+MCNSSCMGGMNRRPILTIITLEDS GNLLGR+SFEVRVCACPGRDRRTEEEN RKKG+ E PPGSTKRALP++TSSSPQ KKKPLDGEYFTLQIRGR+RFEMFRELNEALEL DAQAG+EPG SRAHSSHLKSKKG S S HKK M K EGPDSD 14 gnl|BL_ORD_ID|19 P53_MESAU Q00366 Cellular tumor antigen p53 (Tumor suppressor p53). 19 396 1 594.349 1531 3.94446e-173 1 393 1 396 1 1 300 324 7 398 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQ-AMDDLMLSPDDIEQWFTEDPGP----DEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDLSIELPLSQETFSDLWKLLPPNNVLSTLPSSDSIEELFLS-ENVAGWL-EDPGEALQGSAAAAAPAAPAAEDPVAETPAPVASAPATPWPLSSSVPSYKTYQGDYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVSSTPPPGTRVRAMAIYKKLQYMTEVVRRCPHHERSSEGDGLAPPQHLIRVEGNMHAEYLDDKQTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDPSGNLLGRNSFEVRICACPGRDRRTEEKNFQKKGEPCPELPPKSAKRALPTNTSSSPQPKRKTLDGEYFTLKIRGQERFKMFQELNEALELKDAQALKASEDSGAHSSYLKSKKGQSASRLKKLMIKREGPDSD MEEPQSD S+E PLSQETFSDLWKLLP NNVLS LPS ++++L LS +++ W EDPG WPLSSSVPS KTYQG YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWV STPPPGTRVRAMAIYK+ Q+MTEVVRRCPHHER S+ DGLAPPQHLIRVEGN+ EYLDD+ TFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLED SGNLLGRNSFEVR+CACPGRDRRTEE+N +KKGEP ELPP S KRALP NTSSSPQPK+K LDGEYFTL+IRG+ERF+MF+ELNEALELKDAQA K S AHSS+LKSKKGQS SR KKLM K EGPDSD 15 gnl|BL_ORD_ID|8 P53_CRIGR O09185 Cellular tumor antigen p53 (Tumor suppressor p53). 8 393 1 594.349 1531 3.94446e-173 1 393 1 393 1 1 296 321 2 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQ-AMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEEPQSDLSIELPLSQETFSDLWKLLPPNNVLSTLPSSDSIEELFLS-ENVTGWLEDSGGALQGVAAAAASTAEDPVTETPAPVASAPATPWPLSSSVPSYKTYQGDYGFRLGFLHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVNSTPPPGTRVRAMAIYKKLQYMTEVVRRCPHHERSSEGDSLAPPQHLIRVEGNLHAEYLDDKQTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDPSGNLLGRNSFEVRICACPGRDRRTEEKNFQKKGEPCPELPPKSAKRALPTNTSSSPPPKKKTLDGEYFTLKIRGHERFKMFQELNEALELKDAQASKGSEDNGAHSSYLKSKKGQSASRLKKLMIKREGPDSD MEEPQSD S+E PLSQETFSDLWKLLP NNVLS LPS ++++L LS +++ W + G + WPLSSSVPS KTYQG YGFRLGFLHSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWV+STPPPGTRVRAMAIYK+ Q+MTEVVRRCPHHER S+ D LAPPQHLIRVEGNL EYLDD+ TFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLED SGNLLGRNSFEVR+CACPGRDRRTEE+N +KKGEP ELPP S KRALP NTSSSP PKKK LDGEYFTL+IRG ERF+MF+ELNEALELKDAQA K + AHSS+LKSKKGQS SR KKLM K EGPDSD 16 gnl|BL_ORD_ID|2 P53_BOVIN P67939 Cellular tumor antigen p53 (Tumor suppressor p53). 2 386 1 588.956 1517 1.65722e-171 1 393 1 386 1 1 299 318 9 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELNVEPPLSQETFSDLWNLLPENNLLSSELSAPVDDL-LPYTDVATWLDECPNE-------APQMPEPSAPAAPPPATPAPATSWPLSSFVPSQKTYPGNYGFRLGFLQSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSPPPPGTRVRAMAIYKKLEHMTEVVRRCPHHERSSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYESPEIDSECTTIHYNFMCNSSCMGGMNRRPILTIITLEDSCGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGQSCPEPPPRSTKRALPTNTSSSPQPKKKPLDGEYFTLQIRGFKRYEMFRELNDALELKDALDGREPGESRAHSSHLKSKKRPSPSCHKKPMLKREGPDSD MEE Q++ +VEPPLSQETFSDLW LLPENN+LS S +DDL L D+ W E P SWPLSS VPSQKTY G+YGFRLGFL SGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDS PPPGTRVRAMAIYK+ +HMTEVVRRCPHHER SD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYE PE+ S+CTTIHYN+MCNSSCMGGMNRRPILTIITLEDS GNLLGRNSFEVRVCACPGRDRRTEEENLRKKG+ E PP STKRALP NTSSSPQPKKKPLDGEYFTLQIRG +R+EMFRELN+ALELKDA G+EPG SRAHSSHLKSKK S S HKK M K EGPDSD 17 gnl|BL_ORD_ID|1 P53_BOSIN P67938 Cellular tumor antigen p53 (Tumor suppressor p53). 1 386 1 588.956 1517 1.65722e-171 1 393 1 386 1 1 299 318 9 394 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQAELNVEPPLSQETFSDLWNLLPENNLLSSELSAPVDDL-LPYTDVATWLDECPNE-------APQMPEPSAPAAPPPATPAPATSWPLSSFVPSQKTYPGNYGFRLGFLQSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSPPPPGTRVRAMAIYKKLEHMTEVVRRCPHHERSSDYSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYESPEIDSECTTIHYNFMCNSSCMGGMNRRPILTIITLEDSCGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGQSCPEPPPRSTKRALPTNTSSSPQPKKKPLDGEYFTLQIRGFKRYEMFRELNDALELKDALDGREPGESRAHSSHLKSKKRPSPSCHKKPMLKREGPDSD MEE Q++ +VEPPLSQETFSDLW LLPENN+LS S +DDL L D+ W E P SWPLSS VPSQKTY G+YGFRLGFL SGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDS PPPGTRVRAMAIYK+ +HMTEVVRRCPHHER SD SDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYE PE+ S+CTTIHYN+MCNSSCMGGMNRRPILTIITLEDS GNLLGRNSFEVRVCACPGRDRRTEEENLRKKG+ E PP STKRALP NTSSSPQPKKKPLDGEYFTLQIRG +R+EMFRELN+ALELKDA G+EPG SRAHSSHLKSKK S S HKK M K EGPDSD 18 gnl|BL_ORD_ID|26 P53_RAT P10361 Cellular tumor antigen p53 (Tumor suppressor p53). 26 391 1 575.859 1483 1.4518e-167 1 393 1 391 1 1 295 317 8 396 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPS---QAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEDSQSDMSIELPLSQETFSCLWKLLPPDDILPTTATGSPNSMEDLFL-PQDVAELLE---GPEEALQVSAPAAQEPGTEAPAPVAPASATP-WPLSSSVPSQKTYQGNYGFHLGFLQSGTAKSVMCTYSISLNKLFCQLAKTCPVQLWVTSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDGDGLAPPQHLIRVEGNPYAEYLDDRQTFRHSVVVPYEPPEVGSDYTTIHYKYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRDSFEVRVCACPGRDRRTEEENFRKKEEHCPELPPGSAKRALPTSTSSSPQQKKKPLDGEYFTLKIRGRERFEMFRELNEALELKDARAAEESGDSRAHSSYPKTKKGQSTSRHKKPMIKKVGPDSD ME+ QSD S+E PLSQETFS LWKLLP +++L + +M+DL L P D+ + GP+E WPLSSSVPSQKTYQG+YGF LGFL SGTAKSV CTYS +LNK+FCQLAKTCPVQLWV STPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSD DGLAPPQHLIRVEGN EYLDDR TFRHSVVVPYEPPEVGSD TTIHY YMCNSSCMGGMNRRPILTIITLEDSSGNLLGR+SFEVRVCACPGRDRRTEEEN RKK E ELPPGS KRALP +TSSSPQ KKKPLDGEYFTL+IRGRERFEMFRELNEALELKDA+A +E G SRAHSS+ K+KKGQSTSRHKK M K GPDSD 19 gnl|BL_ORD_ID|20 P53_MOUSE P02340 Cellular tumor antigen p53 (Tumor suppressor p53). 20 390 1 574.318 1479 4.22408e-167 1 393 4 390 1 1 293 314 6 393 MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD MEESQSDISLELPLSQETFSGLWKLLPPEDIL-PSP-HCMDDLLL-PQDVEEFFE---GPSEALRVSGAPAAQDPVTETPGPVAPAPATPWPLSSFVPSQKTYQGNYGFHLGFLQSGTAKSVMCTYSPPLNKLFCQLAKTCPVQLWVSATPPAGSRVRAMAIYKKSQHMTEVVRRCPHHERCSDGDGLAPPQHLIRVEGNLYPEYLEDRQTFRHSVVVPYEPPEAGSEYTTIHYKYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRDSFEVRVCACPGRDRRTEEENFRKKEVLCPELPPGSAKRALPTCTSASPPQKKKPLDGEYFTLKIRGRKRFEMFRELNEALELKDAHATEESGDSRAHSSYLKTKKGQSTSRHKKTMVKKVGPDSD MEE QSD S+E PLSQETFS LWKLLP ++L P P MDDL+L P D+E++F GP E WPLSS VPSQKTYQG+YGF LGFL SGTAKSV CTYSP LNK+FCQLAKTCPVQLWV +TPP G+RVRAMAIYK+SQHMTEVVRRCPHHERCSD DGLAPPQHLIRVEGNL EYL+DR TFRHSVVVPYEPPE GS+ TTIHY YMCNSSCMGGMNRRPILTIITLEDSSGNLLGR+SFEVRVCACPGRDRRTEEEN RKK ELPPGS KRALP TS+SP KKKPLDGEYFTL+IRGR+RFEMFRELNEALELKDA A +E G SRAHSS+LK+KKGQSTSRHKK M K GPDSD 20 gnl|BL_ORD_ID|28 P53_SPEBE Q64662 Cellular tumor antigen p53 (Tumor suppressor p53) (Fragment). 28 314 1 530.02 1364 9.13575e-154 21 335 1 313 1 1 256 268 2 315 DLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGR DLWNLLPENNVLSPVLSPPMDDLLLSSEDVENWF--DKGPDEALQMSAAPAPKAPTPAASTLAAPTPAISWPLSSSVPSQNTYPGVYGFRLGFIHSGTAKSVTCTYSPSLNKLFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKKSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSESTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKRGEPCPEPPPGSTKRALPTGTNSSPQPKKKPLDGEYFTLKIRGR DLW LLPENNVLSP+ S MDDL+LS +D+E WF D GPDE SWPLSSSVPSQ TY G YGFRLGF+HSGTAKSVTCTYSP+LNK+FCQLAKTCPVQLWVDSTPPPGTRVRAMAIYK+SQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGS+ TTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RK+GEP E PPGSTKRALP T+SSPQPKKKPLDGEYFTL+IRGR 21 gnl|BL_ORD_ID|12 P53_HORSE P79892 Cellular tumor antigen p53 (Tumor suppressor p53) (Fragment). 12 280 1 448.743 1153 2.67666e-129 39 329 2 280 1 1 227 238 14 292 AMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFT AVNNLLLSPD-VVNWL--DEGPDEAPRMPAAPAPLAPAPAT----------SWPLSSFVPSQKTYPGCYGFRLGFLNSGTAKSVTCTYSPTLNKLFCQLAKTCPVQLLVSSPPPPGTRVRAMAIYKKSEFMTEVVRRCPHHERCSDSSDGLAPPQHLIRVEGNLRAEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKEEPCPEPPPRSTKRVLSSNTSSSPPQKKKPLDGEYFT A+++L+LSPD + W D GPDE SWPLSS VPSQKTY G YGFRLGFL+SGTAKSVTCTYSP LNK+FCQLAKTCPVQL V S PPPGTRVRAMAIYK+S+ MTEVVRRCPHHERCSDS DGLAPPQHLIRVEGNLR EYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKK EP E PP STKR L +NTSSSP KKKPLDGEYFT 22 gnl|BL_ORD_ID|10 P53_EQUAS Q29480 Cellular tumor antigen p53 (Tumor suppressor p53) (Fragment). 10 207 1 374.015 959 8.37873e-107 126 330 1 206 1 1 181 187 1 206 YSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTL YSPALNKMFCQLAKTCPVYLRISSPPPPGTRVRAMAIYKKSEFMTEVVRRCPHHERCSDSSDGLAPPQHLIRVEGNLRAEYLDDRNTLRHSVVVPYEPPEVGSDCTTIHYNFMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENFRKKEEPCPEPPPRSTKRVLSSNTSSSPPQKEDPLDGEYFTL YSPALNKMFCQLAKTCPV L + S PPPGTRVRAMAIYK+S+ MTEVVRRCPHHERCSDS DGLAPPQHLIRVEGNLR EYLDDRNT RHSVVVPYEPPEVGSDCTTIHYN+MCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEEN RKK EP E PP STKR L +NTSSSP K+ PLDGEYFTL 23 gnl|BL_ORD_ID|7 P53_CHICK P10360 Cellular tumor antigen p53 (Tumor suppressor p53). 7 367 1 355.91 912 2.36124e-101 5 386 4 364 1 1 197 240 27 385 QSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSD-SDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPL--DGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFK EMEPLLEPT---EVFMDLWSMLPYSMQQLPLPEDHSNWQELSPLE-----PSDPPPPPPPPPLPLAAAAPPPLNPPTPPRAAP------SPVVPSTEDYGGDFDFRVGFVEAGTAKSVTCTYSPVLNKVYCRLAKPCPVQVRVGVAPPPGSSLRAVAVYKKSEHVAEVVRRCPHHERCGGGTDGLAPAQHLIRVEGNPQARYHDDETTKRHSVVVPYEPPEVGSDCTTVLYNFMCNSSCMGGMNRRPILTILTLEGPGGQLLGRRCFEVRVCACPGRDRKIEEENFRKRGG-----AGGVAKRAMSPPTEAPEPPKKRVLNPDNEIFYLQVRGRRRYEMLKEINEALQL--AEGGSAPRPSKGRRVKV---EGPQPSCGKKLLQK + +P +EP E F DLW +LP + PLP + LSP + DP P S VPS + Y G + FR+GF+ +GTAKSVTCTYSP LNK++C+LAK CPVQ+ V PPPG+ +RA+A+YK+S+H+ EVVRRCPHHERC +DGLAP QHLIRVEGN + Y DD T RHSVVVPYEPPEVGSDCTT+ YN+MCNSSCMGGMNRRPILTI+TLE G LLGR FEVRVCACPGRDR+ EEEN RK+G G KRA+ T + PKK+ L D E F LQ+RGR R+EM +E+NEAL+L A+ G P S+ + +G S KKL+ K 24 gnl|BL_ORD_ID|21 P53_ONCMY P25035 Cellular tumor antigen p53 (Tumor suppressor p53). 21 396 1 343.969 881 9.28528e-98 9 393 7 396 1 1 194 245 33 404 SVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTED----PGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHEL---PPGSTKRALPNNTSSSPQP------KKKPL--DGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKK---GQSTSRHKKLMFKTEGPDSD NVSLPLSQESFEDLWKM-------------NLNLVAVQPPETESWVGYDNFMMEAPLQVEFDPSLFEVSATEPAPQPSISTLDTGS-PPTSTVPTTSDYPGALGFQLRFLQSSTAKSVTCTYSPDLNKLFCQLAKTCPVQIVVDHPPPPGAVVRALAIYKKLSDVADVVRRCPHHQSTSENNEGPAPRGHLVRVEGNQRSEYMEDGNTLRHSVLVPYEPPQVGSECTTVLYNFMCNSSCMGGMNRRPILTIITLETQEGQLLGRRSFEVRVCACPGRDRKTEEINLKKQQETTLETKTKPAQGIKRAMKEASLPAPQPGASKKTKSSPAVSDDEIYTLQIRGKEKYEMLKKFNDSLELSELVPVADADKYRQKCLTKRVAKRDFGVGPKKRKKLLVKEEKSDSD +V PLSQE+F DLWK+ ++ + + P + E W D P + S P +S+VP+ Y G+ GF+L FL S TAKSVTCTYSP LNK+FCQLAKTCPVQ+ VD PPPG VRA+AIYK+ + +VVRRCPHH+ S++ +G AP HL+RVEGN R EY++D NT RHSV+VPYEPP+VGS+CTT+ YN+MCNSSCMGGMNRRPILTIITLE G LLGR SFEVRVCACPGRDR+TEE NL+K+ E E P KRA+ + +PQP K P D E +TLQIRG+E++EM ++ N++LEL + + R + K G + KKL+ K E DSD 25 gnl|BL_ORD_ID|0 P53_BARBU Q9W678 Cellular tumor antigen p53 (Tumor suppressor p53). 0 369 1 341.658 875 4.60823e-97 92 393 56 369 1 1 181 219 12 314 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPH--HELPPGSTKRALPNNTSSSPQP---KKKPLDG----EYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAH-SSHLKSKKGQS--TSRHKKLMFKTEGPDSD PPTASVPVATDYPGEHGFKLGFPQSGTAKSVTCTYSSDLNKLFCQLAKTCPVQMVVNVAPPQGSVIRATAIYKKSEHVAEVVRRCPHHERTPDGDGLAPAAHLIRVEGNSRALYREDDVNSRHSVVVPYEVPQLGSEFTTVLYNFMCNSSCMGGMNRRPILTIISLETHDGQLLGRRSFEVRVCACPGRDRKTEESNFRKDQETKTLDKIPSANKRSLTKDSTSSVPRPEGSKKAKLSGSSDEEIYTLQVRGKERYEMLKKINDSLELSDVVPPSEMDRYRQKLLTKGKKKDGQTPEPKRGKKLMVKDEKSDSD P ++SVP Y G +GF+LGF SGTAKSVTCTYS LNK+FCQLAKTCPVQ+ V+ PP G+ +RA AIYK+S+H+ EVVRRCPHHER D DGLAP HLIRVEGN R Y +D RHSVVVPYE P++GS+ TT+ YN+MCNSSCMGGMNRRPILTII+LE G LLGR SFEVRVCACPGRDR+TEE N RK E ++P + + ++TSS P+P KK L G E +TLQ+RG+ER+EM +++N++LEL D E R + K K GQ+ R KKLM K E DSD 26 gnl|BL_ORD_ID|3 P53_BRARE P79734 Cellular tumor antigen p53 (Tumor suppressor p53). 3 373 1 338.576 867 3.9011e-96 92 393 60 373 1 1 181 215 12 314 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGS-TKRALPNNTSSS---PQPKKK----PLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTS---RHKKLMFKTEG-PDSD PPTSTVPETSDYPGDHGFRLRFPQSGTAKSVTCTYSPDLNKLFCQLAKTCPVQMVVDVAPPQGSVVRATAIYKKSEHVAEVVRRCPHHERTPDGDNLAPAGHLIRVEGNQRANYREDNITLRHSVFVPYEAPQLGAEWTTVLLNYMCNSSCMGGMNRRPILTIITLETQEGQLLGRRSFEVRVCACPGRDRKTEESNFKKDQETKTMAKTTTGTKRSLVKESSSATLRPEGSKKAKGSSSDEEIFTLQVRGRERYEILKKLNDSLELSDVVPASDAEKYRQKFMTKNKKENRESSEPKQGKKLMVKDEGRSDSD P +S+VP Y G +GFRL F SGTAKSVTCTYSP LNK+FCQLAKTCPVQ+ VD PP G+ VRA AIYK+S+H+ EVVRRCPHHER D D LAP HLIRVEGN R Y +D T RHSV VPYE P++G++ TT+ NYMCNSSCMGGMNRRPILTIITLE G LLGR SFEVRVCACPGRDR+TEE N +K E + TKR+L +SS+ P+ KK D E FTLQ+RGRER+E+ ++LN++LEL D + R K+ + +S + KKLM K EG DSD 27 gnl|BL_ORD_ID|14 P53_ICTPU O93379 Cellular tumor antigen p53 (Tumor suppressor p53). 14 376 1 333.183 853 1.63901e-94 10 393 12 376 1 1 192 240 41 395 VEPPLSQETFSDLW--KLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDS-DGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRAL---PNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDA--QAGKEPGGSRAHSSHLKSKKGQST---SRHKKLMFKTEGPDSD VEPPDSQE-FAELWLRNLIVRDNSLWGKEEEIPDDLQEVPCDVLLSDMLQPQSS----------------------------SSPPTSTVPVTSDYPGLLNFTLHFQESSGTKSVTCTYSPDLNKLFCQLAKTCPVLMAVSSSPPPGSVLRATAVYKRSEHVAEVVRRCPHHERSNDSSDGPAPPGHLLRVEGNSRAVYQEDGNTQAHSVVVPYEPPQVGSQSTTVLYNYMCNSSCMGGMNRRPILTIITLETQDGHLLGRRTFEVRVCACPGRDRKTEESNFKKQQEPKTS-GKTLTKRSMKDPPSHPEASKKSKNSSSDDEIYTLQVRGKERYEFLKKINDGLELSDVVPPADQEKYRQKLLSKTCRKERDGAAGEPKRGKKRLVKEEKCDSD VEPP SQE F++LW L+ +N L + DDL P D+ P S P +S+VP Y G F L F S KSVTCTYSP LNK+FCQLAKTCPV + V S+PPPG+ +RA A+YK+S+H+ EVVRRCPHHER +DS DG APP HL+RVEGN R Y +D NT HSVVVPYEPP+VGS TT+ YNYMCNSSCMGGMNRRPILTIITLE G+LLGR +FEVRVCACPGRDR+TEE N +K+ EP TKR++ P++ +S + K D E +TLQ+RG+ER+E +++N+ LEL D A +E + S + ++ + R KK + K E DSD 28 gnl|BL_ORD_ID|29 P53_TETMU Q9W679 Cellular tumor antigen p53 (Tumor suppressor p53). 29 367 1 267.7 683 8.45682e-75 7 393 3 367 1 1 159 220 32 392 DPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEXXXXXXXXXXXXXXXXXXXXXXXXXXXSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKK-----KPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD EENISLPLSQDTFQDLW-----DNVSAP----PISTIQTAALENEAWPAERQMNMMCNFMDSTFNEALFNLLPEPPSRDGANSSSP---TVPVTTDYPGEYGFKLRFQKSGTAKSVTSTYSEILNKLYCQLAKTSLVEVLLGKDPPMGAVLRATAIYKKTEHVAEVVRRCPHHQ---NEDSAEHRSHLIRMEGSERAQYFEHPHTKRQSVTVPYEPPQLGSEFTTILLSFMCNSSCMGGMNRRPILTILTLETQEGIVLGRRCFEVRVCACPGRDRKTEETNSTKM---QNDAKDAKKRKSVPTPDSTTIKKSKTASSAEEDNNEVYTLQIRGRKRYEMLKKINDGLDLLE----NKPKSKATH-----RPDGPIPPSGKRLLHRGEKSDSD + ++ PLSQ+TF DLW +NV +P + + + + E W E S P +VP Y G YGF+L F SGTAKSVT TYS LNK++CQLAKT V++ + PP G +RA AIYK+++H+ EVVRRCPHH+ + D HLIR+EG+ R +Y + +T R SV VPYEPP++GS+ TTI ++MCNSSCMGGMNRRPILTI+TLE G +LGR FEVRVCACPGRDR+TEE N K ++ ++++P S++ + K + + E +TLQIRGR+R+EM +++N+ L+L + +P H G K+L+ + E DSD 29 gnl|BL_ORD_ID|22 P53_ORYLA P79820 Cellular tumor antigen p53 (Tumor suppressor p53). 22 352 1 262.307 669 3.55304e-73 92 371 77 351 1 1 142 190 21 288 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPK-----KKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQA---GKEPGGSRAHSSHLKS PPPTTVPVTTDYPGSYELELRFQKSGTAKSVTSTYSETLNKLYCQLAKTSPIEVRVSKEPPKGAILRATAVYKKTEHVADVVRRCPHHQ---NEDSVEHRSHLIRVEGSQLAQYFEDPYTKRQSVTVPYEPPQPGSEMTTILLSYMCNSSCMGGMNRRPILTILTLE-TEGLVLGRRCFEVRICACPGRDRKTEEES-RQKTQP--------KKRKVTPNTSSSKRKKSHSSGEEEDNREVFHFEVYGRERYEFLKKINDGLELLEKESKSKNKDSGMVPSSGKKLKS P ++VP Y GSY L F SGTAKSVT TYS LNK++CQLAKT P+++ V PP G +RA A+YK+++H+ +VVRRCPHH+ + D + HLIRVEG+ +Y +D T R SV VPYEPP+ GS+ TTI +YMCNSSCMGGMNRRPILTI+TLE + G +LGR FEVR+CACPGRDR+TEEE+ R+K +P KR + NTSSS + K ++ + E F ++ GRER+E +++N+ LEL + ++ K+ G + LKS 30 gnl|BL_ORD_ID|24 P53_PLAFE O12946 Cellular tumor antigen p53 (Tumor suppressor p53). 24 366 1 259.225 661 3.00783e-72 92 393 70 366 1 1 145 197 23 311 PLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEE------NLRKKGEPHHELPPGS---TKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD PPSSTVPVVTDYPGEYGFQLRFQKSGTAKSVTSTFSELLKKLYCQLAKTSPVEVLLSKEPPQGAVLRATAVYKKTEHVADVVRRCPHHQT---EDTAEHRSHLIRLEGSQRALYFEDPHTKRQSVTVPYEPPQLGSETTAILLSFMCNSSCMGGMNRRQILTILTLETPDGLVLGRRCFEVRVCACPGRDRKTDEESSTKTPNGPKQTKKRKQAPSNSAPHTTTVMKSKSSSSAEEE----DKEVFTVLVKGRERYEIIKKINEAFE---GAAEKE----KAKNKVAVKQELPVPSSGKRLVQRGERSDSD P SS+VP Y G YGF+L F SGTAKSVT T+S L K++CQLAKT PV++ + PP G +RA A+YK+++H+ +VVRRCPHH+ D HLIR+EG+ R Y +D +T R SV VPYEPP++GS+ T I ++MCNSSCMGGMNRR ILTI+TLE G +LGR FEVRVCACPGRDR+T+EE N K+ + + P S T + + +SSS + + D E FT+ ++GRER+E+ +++NEA E A KE +A + ++ S K+L+ + E DSD 30 11169 53 3.25686e+06 0.041 0.267 0.14 From trevor at dev.open-bio.org Sun Dec 31 18:46:16 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:16 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db test_rebase.rb,1.2,1.3 Message-ID: <200612311846.kBVIkGfx031911@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db In directory dev.open-bio.org:/tmp/cvs-serv31881/db Modified Files: test_rebase.rb Log Message: Relicense of test suites. Index: test_rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/test_rebase.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_rebase.rb 20 Jan 2006 09:53:24 -0000 1.2 --- test_rebase.rb 31 Dec 2006 18:46:14 -0000 1.3 *************** *** 2,30 **** # test/unit/bio/db/test_rebase.rb - Unit test for Bio::REBASE # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'pathname' --- 2,11 ---- # test/unit/bio/db/test_rebase.rb - Unit test for Bio::REBASE # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'pathname' *************** *** 35,40 **** require 'bio/db/rebase' ! module Bio ! class TestREBASE < Test::Unit::TestCase def setup --- 16,21 ---- require 'bio/db/rebase' ! module Bio #:nodoc: ! class TestREBASE < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 18:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme test_analysis.rb, 1.3, 1.4 test_double_stranded.rb, 1.1, 1.2 test_integer.rb, 1.1, 1.2 test_single_strand.rb, 1.1, 1.2 test_single_strand_complement.rb, 1.1, 1.2 test_string_formatting.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHrw031918@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme Modified Files: test_analysis.rb test_double_stranded.rb test_integer.rb test_single_strand.rb test_single_strand_complement.rb test_string_formatting.rb Log Message: Relicense of test suites. Index: test_analysis.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_analysis.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_analysis.rb 28 Feb 2006 22:22:50 -0000 1.3 --- test_analysis.rb 31 Dec 2006 18:46:14 -0000 1.4 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_analysis.rb - Unit test for Bio::RestrictionEnzyme::Analysis + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/analysis' ! module Bio ! class TestAnalysis < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/analysis' ! module Bio #:nodoc: ! class TestAnalysis < Test::Unit::TestCase #:nodoc: def setup Index: test_double_stranded.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_double_stranded.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_double_stranded.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_double_stranded.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_double_stranded.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded' ! module Bio ! class TestDoubleStranded < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded' ! module Bio #:nodoc: ! class TestDoubleStranded < Test::Unit::TestCase #:nodoc: def setup Index: test_single_strand.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_single_strand.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_single_strand.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_single_strand.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_single_strand.rb - Unit test for Bio::RestrictionEnzyme::SingleStrand + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/single_strand' ! module Bio ! class TestSingleStrand < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/single_strand' ! module Bio #:nodoc: ! class TestSingleStrand < Test::Unit::TestCase #:nodoc: def setup Index: test_integer.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_integer.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_integer.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_integer.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_integer.rb - Unit test for Bio::RestrictionEnzyme::Integer + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/integer' ! module Bio ! class TestCutLocationsInEnzymeNotation < Test::Unit::TestCase def test_negative? --- 16,22 ---- require 'bio/util/restriction_enzyme/integer' ! module Bio #:nodoc: ! class TestCutLocationsInEnzymeNotation < Test::Unit::TestCase #:nodoc: def test_negative? Index: test_string_formatting.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_string_formatting.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_string_formatting.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_string_formatting.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_string_formatting.rb - Unit test for Bio::RestrictionEnzyme::StringFormatting + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/string_formatting' ! module Bio ! class TestStringFormatting < Test::Unit::TestCase include Bio::RestrictionEnzyme::StringFormatting --- 16,22 ---- require 'bio/util/restriction_enzyme/string_formatting' ! module Bio #:nodoc: ! class TestStringFormatting < Test::Unit::TestCase #:nodoc: include Bio::RestrictionEnzyme::StringFormatting Index: test_single_strand_complement.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_single_strand_complement.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_single_strand_complement.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb - Unit test for Bio::RestrictionEnzyme::SingleStrandComplement + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/single_strand_complement' ! module Bio ! class TestSingleStrandComplement < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/single_strand_complement' ! module Bio #:nodoc: ! class TestSingleStrandComplement < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 18:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme/single_strand test_cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHbl031943@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/single_strand In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme/single_strand Modified Files: test_cut_locations_in_enzyme_notation.rb Log Message: Relicense of test suites. Index: test_cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_locations_in_enzyme_notation.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb - Unit test for Bio::RestrictionEnzyme::SingleStrand::CutLocationsInEnzymeNotation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation' ! module Bio ! class TestSingleStrandCutLocationsInEnzymeNotation < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation' ! module Bio #:nodoc: ! class TestSingleStrandCutLocationsInEnzymeNotation < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 18:46:16 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:16 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util test_color_scheme.rb, 1.1, 1.2 test_contingency_table.rb, 1.2, 1.3 Message-ID: <200612311846.kBVIkGx8031914@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util In directory dev.open-bio.org:/tmp/cvs-serv31881/util Modified Files: test_color_scheme.rb test_contingency_table.rb Log Message: Relicense of test suites. Index: test_contingency_table.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_contingency_table.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_contingency_table.rb 23 Nov 2005 11:55:17 -0000 1.2 --- test_contingency_table.rb 31 Dec 2006 18:46:14 -0000 1.3 *************** *** 2,20 **** # test/unit/bio/util/test_contingency_table.rb - Unit test for Bio::ContingencyTable # ! # Copyright (C) 2005 Trevor Wennblom ! # ! # 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$ --- 2,8 ---- # test/unit/bio/util/test_contingency_table.rb - Unit test for Bio::ContingencyTable # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ *************** *** 28,33 **** require 'bio/util/contingency_table' ! module Bio ! class TestContingencyTable < Test::Unit::TestCase def lite_example(sequences, max_length, characters) --- 16,21 ---- require 'bio/util/contingency_table' ! module Bio #:nodoc: ! class TestContingencyTable < Test::Unit::TestCase #:nodoc: def lite_example(sequences, max_length, characters) Index: test_color_scheme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_color_scheme.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_color_scheme.rb 23 Oct 2005 08:40:41 -0000 1.1 --- test_color_scheme.rb 31 Dec 2006 18:46:14 -0000 1.2 *************** *** 2,20 **** # test/unit/bio/util/test_color_scheme.rb - Unit test for Bio::ColorScheme # ! # Copyright (C) 2005 Trevor Wennblom ! # ! # 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$ --- 2,8 ---- # test/unit/bio/util/test_color_scheme.rb - Unit test for Bio::ColorScheme # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ *************** *** 28,33 **** require 'bio/util/color_scheme' ! module Bio ! class TestColorScheme < Test::Unit::TestCase def test_buried --- 16,21 ---- require 'bio/util/color_scheme' ! module Bio #:nodoc: ! class TestColorScheme < Test::Unit::TestCase #:nodoc: def test_buried From trevor at dev.open-bio.org Sun Dec 31 18:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme/analysis test_calculated_cuts.rb, 1.1, 1.2 test_sequence_range.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHHk031922@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/analysis In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme/analysis Modified Files: test_calculated_cuts.rb test_sequence_range.rb Log Message: Relicense of test suites. Index: test_sequence_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_sequence_range.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_sequence_range.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb - Unit test for Bio::RestrictionEnzyme::Analysis::SequenceRange + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 12,18 **** require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio ! class TestAnalysisSequenceRange < Test::Unit::TestCase def setup --- 22,28 ---- require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio #:nodoc: ! class TestAnalysisSequenceRange < Test::Unit::TestCase #:nodoc: def setup Index: test_calculated_cuts.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_calculated_cuts.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_calculated_cuts.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb - Unit test for Bio::RestrictionEnzyme::Analysis::CalculatedCuts + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 10,16 **** require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio ! class TestAnalysisCalculatedCuts < Test::Unit::TestCase def setup --- 20,26 ---- require 'bio/util/restriction_enzyme/analysis/cut_ranges' ! module Bio #:nodoc: ! class TestAnalysisCalculatedCuts < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 18:46:17 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 18:46:17 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util/restriction_enzyme/double_stranded test_aligned_strands.rb, 1.1, 1.2 test_cut_location_pair.rb, 1.1, 1.2 test_cut_location_pair_in_enzyme_notation.rb, 1.1, 1.2 test_cut_locations.rb, 1.1, 1.2 test_cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612311846.kBVIkHnt031934@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded In directory dev.open-bio.org:/tmp/cvs-serv31881/util/restriction_enzyme/double_stranded Modified Files: test_aligned_strands.rb test_cut_location_pair.rb test_cut_location_pair_in_enzyme_notation.rb test_cut_locations.rb test_cut_locations_in_enzyme_notation.rb Log Message: Relicense of test suites. Index: test_cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_locations_in_enzyme_notation.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocationsInEnzymeNotation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation' ! module Bio ! class TestDoubleStrandedCutLocationsInEnzymeNotation < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocationsInEnzymeNotation < Test::Unit::TestCase #:nodoc: def setup Index: test_aligned_strands.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_aligned_strands.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_aligned_strands.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::AlignedStrands + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 7,13 **** require 'bio/util/restriction_enzyme/double_stranded' ! module Bio ! class TestDoubleStrandedAlignedStrands < Test::Unit::TestCase def setup --- 17,23 ---- require 'bio/util/restriction_enzyme/double_stranded' ! module Bio #:nodoc: ! class TestDoubleStrandedAlignedStrands < Test::Unit::TestCase #:nodoc: def setup Index: test_cut_locations.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_locations.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_locations.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocations + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_locations' ! module Bio ! class TestDoubleStrandedCutLocations < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_locations' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocations < Test::Unit::TestCase #:nodoc: def setup Index: test_cut_location_pair_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_location_pair_in_enzyme_notation.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_location_pair_in_enzyme_notation.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocationPairInEnzymeNotation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation' ! module Bio ! class TestDoubleStrandedCutLocationPairInEnzymeNotation < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocationPairInEnzymeNotation < Test::Unit::TestCase #:nodoc: def setup Index: test_cut_location_pair.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_cut_location_pair.rb 1 Feb 2006 07:38:12 -0000 1.1 --- test_cut_location_pair.rb 31 Dec 2006 18:46:15 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb - Unit test for Bio::RestrictionEnzyme::DoubleStranded::CutLocationPair + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 6, 'lib')).cleanpath.to_s *************** *** 6,12 **** require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair' ! module Bio ! class TestDoubleStrandedCutLocationPair < Test::Unit::TestCase def setup --- 16,22 ---- require 'bio/util/restriction_enzyme/double_stranded/cut_location_pair' ! module Bio #:nodoc: ! class TestDoubleStrandedCutLocationPair < Test::Unit::TestCase #:nodoc: def setup From trevor at dev.open-bio.org Sun Dec 31 19:47:37 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 19:47:37 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util color_scheme.rb,1.2,1.3 Message-ID: <200612311947.kBVJlbXV032099@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32077/util Modified Files: color_scheme.rb Log Message: Update license for ColorScheme. Index: color_scheme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** color_scheme.rb 13 Dec 2005 14:58:07 -0000 1.2 --- color_scheme.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 1,120 **** - module Bio - # # bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 # ! #++ # # - =begin rdoc - bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids - - == Synopsis - - The Bio::ColorScheme module contains classes that return popular color codings - for nucleic and amino acids in RGB hex format suitable for HTML code. - - The current schemes supported are: - * Buried - Buried index - * Helix - Helix propensity - * Hydropathy - Hydrophobicity - * Nucleotide - Nucelotide color coding - * Strand - Strand propensity - * Taylor - Taylor color coding - * Turn - Turn propensity - * Zappo - Zappo color coding - - Planned color schemes include: - * BLOSUM62 - * ClustalX - * Percentage Identity (PID) - - Color schemes BLOSUM62, ClustalX, and Percentage Identity are all dependent - on the alignment consensus. - - This data is currently referenced from the JalView alignment editor. - Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), - "The Jalview Java Alignment Editor," Bioinformatics, 12, 426-7 - http://www.jalview.org - - Currently the score data for things such as hydropathy, helix, turn, etc. are contained - here but should be moved to bio/data/aa once a good reference is found for these - values. - - - == Usage - - require 'bio/util/color_scheme' - - seq = 'gattaca' - scheme = Bio::ColorScheme::Zappo - postfix = '
' - html = '' - seq.each_byte do |c| - color = scheme[c.chr] - prefix = %Q() - html += prefix + c.chr + postfix - end - - puts html - - - === Accessing colors - - puts Bio::ColorScheme::Buried['A'] # 00DC22 - puts Bio::ColorScheme::Buried[:c] # 00BF3F - puts Bio::ColorScheme::Buried[nil] # nil - puts Bio::ColorScheme::Buried['-'] # FFFFFF - puts Bio::ColorScheme::Buried[7] # FFFFFF - puts Bio::ColorScheme::Buried['junk'] # FFFFFF - puts Bio::ColorScheme::Buried['t'] # 00CC32 - - - == Author - Trevor Wennblom - - - == Copyright - Copyright (C) 2005 Trevor Wennblom - Licensed under the same terms as BioRuby. - - =end module ColorScheme ! cs_location = 'bio/util/color_scheme' # Score sub-classes ! autoload :Buried, "#{cs_location}/buried" ! autoload :Helix, "#{cs_location}/helix" ! autoload :Hydropathy, "#{cs_location}/hydropathy" ! autoload :Strand, "#{cs_location}/strand" ! autoload :Turn, "#{cs_location}/turn" # Simple sub-classes ! autoload :Nucleotide, "#{cs_location}/nucleotide" ! autoload :Taylor, "#{cs_location}/taylor" ! autoload :Zappo, "#{cs_location}/zappo" # Consensus sub-classes --- 1,97 ---- # # bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + module Bio #:nodoc: + # ! # bio/util/color_scheme.rb - Popular color codings for nucleic and amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # + # = Description + # + # The Bio::ColorScheme module contains classes that return popular color codings + # for nucleic and amino acids in RGB hex format suitable for HTML code. + # + # The current schemes supported are: + # * Buried - Buried index + # * Helix - Helix propensity + # * Hydropathy - Hydrophobicity + # * Nucleotide - Nucelotide color coding + # * Strand - Strand propensity + # * Taylor - Taylor color coding + # * Turn - Turn propensity + # * Zappo - Zappo color coding + # + # Planned color schemes include: + # * BLOSUM62 + # * ClustalX + # * Percentage Identity (PID) + # + # Color schemes BLOSUM62, ClustalX, and Percentage Identity are all dependent + # on the alignment consensus. + # + # This data is currently referenced from the JalView alignment editor. + # Clamp, M., Cuff, J., Searle, S. M. and Barton, G. J. (2004), + # "The Jalview Java Alignment Editor," Bioinformatics, 12, 426-7 + # http://www.jalview.org + # + # Currently the score data for things such as hydropathy, helix, turn, etc. are contained + # here but should be moved to bio/data/aa once a good reference is found for these + # values. + # + # + # = Usage + # + # require 'bio' + # + # seq = 'gattaca' + # scheme = Bio::ColorScheme::Zappo + # postfix = '' + # html = '' + # seq.each_byte do |c| + # color = scheme[c.chr] + # prefix = %Q() + # html += prefix + c.chr + postfix + # end + # + # puts html + # + # + # == Accessing colors + # + # puts Bio::ColorScheme::Buried['A'] # 00DC22 + # puts Bio::ColorScheme::Buried[:c] # 00BF3F + # puts Bio::ColorScheme::Buried[nil] # nil + # puts Bio::ColorScheme::Buried['-'] # FFFFFF + # puts Bio::ColorScheme::Buried[7] # FFFFFF + # puts Bio::ColorScheme::Buried['junk'] # FFFFFF + # puts Bio::ColorScheme::Buried['t'] # 00CC32 + # module ColorScheme ! cs_location = File.join(File.dirname(File.expand_path(__FILE__)), 'color_scheme') # Score sub-classes ! autoload :Buried, File.join(cs_location, 'buried') ! autoload :Helix, File.join(cs_location, 'helix') ! autoload :Hydropathy, File.join(cs_location, 'hydropathy') ! autoload :Strand, File.join(cs_location, 'strand') ! autoload :Turn, File.join(cs_location, 'turn') # Simple sub-classes ! autoload :Nucleotide, File.join(cs_location, 'nucleotide') ! autoload :Taylor, File.join(cs_location, 'taylor') ! autoload :Zappo, File.join(cs_location, 'zappo') # Consensus sub-classes *************** *** 125,129 **** # A very basic class template for color code referencing. ! class Simple def self.[](x) return if x.nil? --- 102,106 ---- # A very basic class template for color code referencing. ! class Simple #:nodoc: def self.[](x) return if x.nil? *************** *** 149,153 **** # that are score based. This template is expected to change # when the scores are moved into bio/data/aa ! class Score def self.[](x) return if x.nil? --- 126,130 ---- # that are score based. This template is expected to change # when the scores are moved into bio/data/aa ! class Score #:nodoc: def self.[](x) return if x.nil? *************** *** 207,212 **** ! # NOTE todo ! class Consensus end --- 184,189 ---- ! # TODO ! class Consensus #:nodoc: end From trevor at dev.open-bio.org Sun Dec 31 19:47:37 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 19:47:37 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/color_scheme buried.rb, 1.2, 1.3 helix.rb, 1.2, 1.3 hydropathy.rb, 1.2, 1.3 nucleotide.rb, 1.2, 1.3 strand.rb, 1.3, 1.4 taylor.rb, 1.2, 1.3 turn.rb, 1.2, 1.3 zappo.rb, 1.2, 1.3 Message-ID: <200612311947.kBVJlbjS032104@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/color_scheme In directory dev.open-bio.org:/tmp/cvs-serv32077/util/color_scheme Modified Files: buried.rb helix.rb hydropathy.rb nucleotide.rb strand.rb taylor.rb turn.rb zappo.rb Log Message: Update license for ColorScheme. Index: strand.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/strand.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** strand.rb 13 Dec 2005 14:58:07 -0000 1.3 --- strand.rb 31 Dec 2006 19:47:35 -0000 1.4 *************** *** 2,35 **** # bio/util/color_scheme/strand.rb - Color codings for strand propensity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Strand < Score ######### --- 2,16 ---- # bio/util/color_scheme/strand.rb - Color codings for strand propensity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Strand < Score #:nodoc: ######### Index: turn.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/turn.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** turn.rb 13 Dec 2005 14:58:07 -0000 1.2 --- turn.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/turn.rb - Color codings for turn propensity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Turn < Score ######### --- 2,16 ---- # bio/util/color_scheme/turn.rb - Color codings for turn propensity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Turn < Score #:nodoc: ######### Index: hydropathy.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/hydropathy.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** hydropathy.rb 13 Dec 2005 14:58:07 -0000 1.2 --- hydropathy.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,30 **** # bio/util/color_scheme/hydropathy.rb - Color codings for hydrophobicity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' --- 2,11 ---- # bio/util/color_scheme/hydropathy.rb - Color codings for hydrophobicity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' *************** *** 36,40 **** # 1157, 105-132, 1982 ! class Hydropathy < Score ######### --- 17,21 ---- # 1157, 105-132, 1982 ! class Hydropathy < Score #:nodoc: ######### Index: nucleotide.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/nucleotide.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nucleotide.rb 13 Dec 2005 14:58:07 -0000 1.2 --- nucleotide.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/nucleotide.rb - Color codings for nucleotides # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Nucleotide < Simple ######### --- 2,16 ---- # bio/util/color_scheme/nucleotide.rb - Color codings for nucleotides # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Nucleotide < Simple #:nodoc: ######### Index: buried.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/buried.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** buried.rb 13 Dec 2005 14:58:07 -0000 1.2 --- buried.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/buried.rb - Color codings for buried amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Buried < Score ######### --- 2,16 ---- # bio/util/color_scheme/buried.rb - Color codings for buried amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Buried < Score #:nodoc: ######### Index: helix.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/helix.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** helix.rb 13 Dec 2005 14:58:07 -0000 1.2 --- helix.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/helix.rb - Color codings for helix propensity # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Helix < Score ######### --- 2,16 ---- # bio/util/color_scheme/helix.rb - Color codings for helix propensity # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Helix < Score #:nodoc: ######### Index: taylor.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/taylor.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** taylor.rb 13 Dec 2005 14:58:07 -0000 1.2 --- taylor.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/taylor.rb - Taylor color codings for amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Taylor < Simple ######### --- 2,16 ---- # bio/util/color_scheme/taylor.rb - Taylor color codings for amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Taylor < Simple #:nodoc: ######### Index: zappo.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/color_scheme/zappo.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** zappo.rb 13 Dec 2005 14:58:07 -0000 1.2 --- zappo.rb 31 Dec 2006 19:47:35 -0000 1.3 *************** *** 2,35 **** # bio/util/color_scheme/zappo.rb - Zappo color codings for amino acids # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # 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 - # - #++ - # - # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Zappo < Simple ######### --- 2,16 ---- # bio/util/color_scheme/zappo.rb - Zappo color codings for amino acids # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # require 'bio/util/color_scheme' module Bio::ColorScheme ! class Zappo < Simple #:nodoc: ######### From trevor at dev.open-bio.org Sun Dec 31 19:57:34 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 19:57:34 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.76,1.77 Message-ID: <200612311957.kBVJvY08032147@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv32127 Modified Files: bio.rb Log Message: Added ContingencyTable to autoload series. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** bio.rb 24 Dec 2006 10:04:51 -0000 1.76 --- bio.rb 31 Dec 2006 19:57:32 -0000 1.77 *************** *** 248,251 **** --- 248,252 ---- autoload :SiRNA, 'bio/util/sirna' autoload :ColorScheme, 'bio/util/color_scheme' + autoload :ContingencyTable, 'bio/util/contingency_table' ### Service libraries From trevor at dev.open-bio.org Sun Dec 31 20:02:22 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:02:22 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util contingency_table.rb,1.4,1.5 Message-ID: <200612312002.kBVK2Mpv032181@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32161 Modified Files: contingency_table.rb Log Message: Updated license for ContingencyTable. Index: contingency_table.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/contingency_table.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** contingency_table.rb 27 Feb 2006 13:23:01 -0000 1.4 --- contingency_table.rb 31 Dec 2006 20:02:20 -0000 1.5 *************** *** 1,11 **** # ! # = bio/util/contingency_table.rb - Statistical contingency table analysis for aligned sequences # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # License:: LGPL # # $Id$ # ! # == Synopsis # # The Bio::ContingencyTable class provides basic statistical contingency table --- 1,22 ---- # ! # bio/util/contingency_table.rb - Statistical contingency table analysis for aligned sequences # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # ! ! module Bio #:nodoc: ! ! # ! # bio/util/contingency_table.rb - Statistical contingency table analysis for aligned sequences ! # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby ! # ! # = Description # # The Bio::ContingencyTable class provides basic statistical contingency table *************** *** 34,44 **** # # ! # == Further Reading # # * http://en.wikipedia.org/wiki/Contingency_table # * http://www.physics.csbsju.edu/stats/exact.details.html # * Numerical Recipes in C by Press, Flannery, Teukolsky, and Vetterling ! # # ! # == Usage # # What follows is an example of ContingencyTable in typical usage --- 45,55 ---- # # ! # = Further Reading # # * http://en.wikipedia.org/wiki/Contingency_table # * http://www.physics.csbsju.edu/stats/exact.details.html # * Numerical Recipes in C by Press, Flannery, Teukolsky, and Vetterling ! # ! # = Usage # # What follows is an example of ContingencyTable in typical usage *************** *** 46,50 **** # # require 'bio' - # require 'bio/contingency_table' # # seqs = {} --- 57,60 ---- *************** *** 79,85 **** # # ! # == Tutorial ! # ! # ContingencyTable returns the statistical significance of change # between two positions in an alignment. If you would like to see how --- 89,94 ---- # # ! # = Tutorial ! # # ContingencyTable returns the statistical significance of change # between two positions in an alignment. If you would like to see how *************** *** 210,216 **** # # ! # == A Note on Efficiency # - # ContingencyTable is slow. It involves many calculations for even a # seemingly small five-string data set. Even worse, it's very --- 219,224 ---- # # ! # = A Note on Efficiency # # ContingencyTable is slow. It involves many calculations for even a # seemingly small five-string data set. Even worse, it's very *************** *** 218,222 **** # hashes which dashes any hope of decent speed. # - # Finally, half of the matrix is redundant and positions could be # summed with their companion position to reduce calculations. For --- 226,229 ---- *************** *** 230,257 **** # BioRuby project moves towards C extensions in the future a # professional caliber version will likely be created. - # - # - #-- - # - # 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 ! class ContingencyTable # Since we're making this math-notation friendly here is the layout of @table: --- 237,242 ---- # BioRuby project moves towards C extensions in the future a # professional caliber version will likely be created. # ! class ContingencyTable # Since we're making this math-notation friendly here is the layout of @table: *************** *** 338,343 **** end ! end ! end # Bio --- 323,327 ---- end ! end # ContingencyTable end # Bio From trevor at dev.open-bio.org Sun Dec 31 20:11:02 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:11:02 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.77,1.78 Message-ID: <200612312011.kBVKB2E2032233@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv32213 Modified Files: bio.rb Log Message: Added REBASE to autoload series. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** bio.rb 31 Dec 2006 19:57:32 -0000 1.77 --- bio.rb 31 Dec 2006 20:11:00 -0000 1.78 *************** *** 116,119 **** --- 116,120 ---- autoload :PDB, 'bio/db/pdb' autoload :NBRF, 'bio/db/nbrf' + autoload :REBASE, 'bio/db/rebase' autoload :Newick, 'bio/db/newick' From trevor at dev.open-bio.org Sun Dec 31 20:44:23 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:44:23 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db rebase.rb,1.4,1.5 Message-ID: <200612312044.kBVKiNrv032287@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv32267 Modified Files: rebase.rb Log Message: Updated license for REBASE. Index: rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/rebase.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rebase.rb 28 Feb 2006 21:21:03 -0000 1.4 --- rebase.rb 31 Dec 2006 20:44:21 -0000 1.5 *************** *** 1,12 **** # ! # = bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files # ! # Copyright:: Copyright (C) 2005 Trevor Wennblom ! # License:: LGPL # # $Id$ # # ! # == Synopsis # # Bio::REBASE provides utilties for interacting with REBASE data in EMBOSS --- 1,27 ---- # ! # bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + autoload :YAML, 'yaml' + + module Bio #:nodoc: + + autoload :Reference, 'bio/reference' + + # + # bio/db/rebase.rb - Interface for EMBOSS formatted REBASE files # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby ! # ! # ! # = Description # # Bio::REBASE provides utilties for interacting with REBASE data in EMBOSS *************** *** 14,18 **** # can be found here: # - # * http://rebase.neb.com # --- 29,32 ---- *************** *** 31,37 **** # # ! # == Usage # ! # require 'bio/db/rebase' # require 'pp' # --- 45,51 ---- # # ! # = Usage # ! # require 'bio' # require 'pp' # *************** *** 93,127 **** # pp "#{name}: #{info.methylation}" unless info.methylation.empty? # end - # - # - #-- # - # 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 - # - #++ - # - - autoload :YAML, 'yaml' - - module Bio - - autoload :Reference, 'bio/reference' - class REBASE ! class DynamicMethod_Hash < Hash # Define a writer or reader # * Allows hash[:kay]= to be accessed like hash.key= --- 107,115 ---- # pp "#{name}: #{info.methylation}" unless info.methylation.empty? # end # class REBASE ! class DynamicMethod_Hash < Hash #:nodoc: # Define a writer or reader # * Allows hash[:kay]= to be accessed like hash.key= *************** *** 143,147 **** end ! class EnzymeEntry < DynamicMethod_Hash @@supplier_data = {} def self.supplier_data=(d); @@supplier_data = d; end --- 131,135 ---- end ! class EnzymeEntry < DynamicMethod_Hash #:nodoc: @@supplier_data = {} def self.supplier_data=(d); @@supplier_data = d; end *************** *** 154,157 **** --- 142,146 ---- end + # Iterate over each entry def each @data.each { |v| yield v } *************** *** 162,166 **** # def []( key ); @data[ key ]; end # def size; @data.size; end ! def method_missing(method_id, *args) self.class.class_eval do define_method(method_id) { |a| Hash.instance_method(method_id).bind(@data).call(a) } --- 151,155 ---- # def []( key ); @data[ key ]; end # def size; @data.size; end ! def method_missing(method_id, *args) #:nodoc: self.class.class_eval do define_method(method_id) { |a| Hash.instance_method(method_id).bind(@data).call(a) } *************** *** 169,174 **** end ! # All your REBASE are belong to us. def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) if yaml @enzyme_data = enzyme_lines --- 158,168 ---- end ! # [+enzyme_lines+] contents of EMBOSS formatted enzymes file (_required_) ! # [+reference_lines+] contents of EMBOSS formatted references file (_optional_) ! # [+supplier_lines+] contents of EMBOSS formatted suppliers files (_optional_) ! # [+yaml+] enzyme_lines, reference_lines, and supplier_lines are read as YAML if set to true (_default_ +false+) def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) + # All your REBASE are belong to us. + if yaml @enzyme_data = enzyme_lines *************** *** 410,413 **** end # REBASE - end # Bio --- 404,406 ---- From trevor at dev.open-bio.org Sun Dec 31 20:50:45 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:50:45 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme enzymes.yaml, 1.1, 1.2 Message-ID: <200612312050.kBVKojaJ032315@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv32295 Modified Files: enzymes.yaml Log Message: Update REBASE enzymes reference to v701 published Dec 29, 2006 Index: enzymes.yaml =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** enzymes.yaml 1 Feb 2006 07:34:11 -0000 1.1 --- enzymes.yaml 31 Dec 2006 20:50:43 -0000 1.2 *************** *** 1,6731 **** --- TspRI: :c4: "0" :c1: "7" - :len: "5" - :c2: "-3" - :c3: "0" :pattern: CASTG :name: TspRI ! :blunt: "0" [...13703 lines suppressed...] BseMI: + :blunt: "0" + :c2: "6" :c4: "0" :c1: "8" :pattern: GCAATG + :len: "6" :name: BseMI ! :c3: "0" :ncuts: "2" EcoRII: + :blunt: "0" + :c2: "5" :c4: "0" :c1: "-1" :pattern: CCWGG + :len: "5" :name: EcoRII ! :c3: "0" :ncuts: "2" From trevor at dev.open-bio.org Sun Dec 31 20:54:27 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 20:54:27 +0000 Subject: [BioRuby-cvs] bioruby/lib bio.rb,1.78,1.79 Message-ID: <200612312054.kBVKsROF032343@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib In directory dev.open-bio.org:/tmp/cvs-serv32323 Modified Files: bio.rb Log Message: Added RestrictionEnzyme to autoload series. Index: bio.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio.rb,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** bio.rb 31 Dec 2006 20:11:00 -0000 1.78 --- bio.rb 31 Dec 2006 20:54:25 -0000 1.79 *************** *** 250,253 **** --- 250,254 ---- autoload :ColorScheme, 'bio/util/color_scheme' autoload :ContingencyTable, 'bio/util/contingency_table' + autoload :RestrictionEnzyme, 'bio/util/restriction_enzyme' ### Service libraries From trevor at dev.open-bio.org Sun Dec 31 21:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/double_stranded aligned_strands.rb, 1.1, 1.2 cut_location_pair.rb, 1.1, 1.2 cut_location_pair_in_enzyme_notation.rb, 1.1, 1.2 cut_locations.rb, 1.1, 1.2 cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoXs8032447@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme/double_stranded Modified Files: aligned_strands.rb cut_location_pair.rb cut_location_pair_in_enzyme_notation.rb cut_locations.rb cut_locations_in_enzyme_notation.rb Log Message: Updated license for RestrictionEnzyme. Index: aligned_strands.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** aligned_strands.rb 1 Feb 2006 07:34:11 -0000 1.1 --- aligned_strands.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/aligned_strands.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 12,48 **** # ! # bio/util/restriction_enzyme/double_stranded/aligned_strands.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/aligned_strands.rb - - - Align two SingleStrand::Pattern objects and return a Result - object with +primary+ and +complement+ accessors. - =end class AlignedStrands extend CutSymbol --- 21,33 ---- # ! # bio/util/restrction_enzyme/double_stranded/aligned_strands.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # Align two SingleStrand::Pattern objects and return a Result ! # object with +primary+ and +complement+ accessors. # class AlignedStrands extend CutSymbol *************** *** 142,148 **** end end ! ! end ! ! end ! end --- 127,131 ---- end end ! end # AlignedStrands ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_locations.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_locations.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_locations.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_locations.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,43 **** # ! # bio/util/restriction_enzyme/double_stranded/cut_locations.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_locations.rb - - =end class CutLocations < Array --- 19,28 ---- # ! # bio/util/restrction_enzyme/double_stranded/cut_locations.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # class CutLocations < Array *************** *** 69,76 **** end end ! ! ! end ! ! end ! end --- 54,58 ---- end end ! end # CutLocations ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_locations_in_enzyme_notation.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 11,44 **** # ! # bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - - =end class CutLocationsInEnzymeNotation < CutLocations --- 20,29 ---- # ! # bio/util/restrction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # class CutLocationsInEnzymeNotation < CutLocations *************** *** 103,109 **** end end ! ! end ! ! end ! end --- 88,92 ---- end end ! end # CutLocationsInEnzymeNotation ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_location_pair_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_location_pair_in_enzyme_notation.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_location_pair_in_enzyme_notation.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 11,46 **** # ! # bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - - - See CutLocationPair - =end class CutLocationPairInEnzymeNotation < CutLocationPair --- 20,31 ---- # ! # bio/util/restrction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # See CutLocationPair # class CutLocationPairInEnzymeNotation < CutLocationPair *************** *** 62,68 **** end end ! ! end ! ! end ! end --- 47,51 ---- end end ! end # CutLocationPair ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: cut_location_pair.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_location_pair.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_location_pair.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded/cut_location_pair.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 9,60 **** class Bio::RestrictionEnzyme class DoubleStranded ! ! # ! # bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb - - - Stores a cut location pair in 0-based index notation - - Input: - +pair+:: May be two values represented as an Array, a Range, or a - combination of Integer and nil values. The first value - represents a cut on the primary strand, the second represents - a cut on the complement strand. - - Example: - clp = CutLocationPair.new(3,2) - clp.primary # 3 - clp.complement # 2 - - Notes: - * a value of +nil+ is an explicit representation of 'no cut' - =end class CutLocationPair < Array attr_reader :primary, :complement --- 18,45 ---- class Bio::RestrictionEnzyme class DoubleStranded ! # ! # bio/util/restrction_enzyme/double_stranded/cut_location_pair.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # Stores a cut location pair in 0-based index notation ! # ! # Input: ! # +pair+:: May be two values represented as an Array, a Range, or a ! # combination of Integer and nil values. The first value ! # represents a cut on the primary strand, the second represents ! # a cut on the complement strand. ! # ! # Example: ! # clp = CutLocationPair.new(3,2) ! # clp.primary # 3 ! # clp.complement # 2 ! # ! # Notes: ! # * a value of +nil+ is an explicit representation of 'no cut' # class CutLocationPair < Array attr_reader :primary, :complement *************** *** 112,118 **** end end ! ! end ! ! end ! end --- 97,101 ---- end end ! end # CutLocationPair ! end # DoubleStranded ! end # Bio::RestrictionEnzyme \ No newline at end of file From trevor at dev.open-bio.org Sun Dec 31 21:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/single_strand cut_locations_in_enzyme_notation.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoX4s032456@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme/single_strand Modified Files: cut_locations_in_enzyme_notation.rb Log Message: Updated license for RestrictionEnzyme. Index: cut_locations_in_enzyme_notation.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_locations_in_enzyme_notation.rb 1 Feb 2006 07:34:12 -0000 1.1 --- cut_locations_in_enzyme_notation.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 14,60 **** # bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # ! ! =begin rdoc ! bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation ! ! Stores the cut location in thier enzyme index notation ! ! May be initialized with a series of cuts or an enzyme pattern marked ! with cut symbols. ! ! Enzyme index notation:: 1.._n_, value before 1 is -1 ! ! Notes: ! * 0 is invalid as it does not refer to any index ! * +nil+ is not allowed here as it has no meaning ! * +nil+ values are kept track of in DoubleStranded::CutLocations as they ! need a reference point on the correlating strand. +nil+ represents no ! cut or a partial digestion. ! ! =end class CutLocationsInEnzymeNotation < Array include CutSymbol --- 23,44 ---- # bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb - The cut locations, in enzyme notation # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # Stores the cut location in thier enzyme index notation ! # ! # May be initialized with a series of cuts or an enzyme pattern marked ! # with cut symbols. ! # ! # Enzyme index notation:: 1.._n_, value before 1 is -1 ! # ! # Notes: ! # * 0 is invalid as it does not refer to any index ! # * +nil+ is not allowed here as it has no meaning ! # * +nil+ values are kept track of in DoubleStranded::CutLocations as they ! # need a reference point on the correlating strand. +nil+ represents no ! # cut or a partial digestion. ! # class CutLocationsInEnzymeNotation < Array include CutSymbol *************** *** 132,138 **** end ! ! end ! ! end ! end --- 116,120 ---- end ! end # CutLocationsInEnzymeNotation ! end # SingleStrand ! end # Bio::RestrictionEnzyme \ No newline at end of file From trevor at dev.open-bio.org Sun Dec 31 21:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme analysis.rb, 1.5, 1.6 cut_symbol.rb, 1.1, 1.2 double_stranded.rb, 1.1, 1.2 integer.rb, 1.1, 1.2 single_strand.rb, 1.1, 1.2 single_strand_complement.rb, 1.1, 1.2 string_formatting.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoXo1032428@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme Modified Files: analysis.rb cut_symbol.rb double_stranded.rb integer.rb single_strand.rb single_strand_complement.rb string_formatting.rb Log Message: Updated license for RestrictionEnzyme. Index: integer.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/integer.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** integer.rb 1 Feb 2006 07:34:11 -0000 1.1 --- integer.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,35 **** # ! # bio/util/restrction_enzyme/integer.rb - # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ ! # ! # ! ! =begin rdoc ! bio/util/restrction_enzyme/integer.rb - ! =end ! class Integer def negative? self < 0 --- 1,12 ---- # ! # bio/util/restrction_enzyme/integer.rb - Adds method to check for negative values # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # ! class Integer #:nodoc: def negative? self < 0 Index: string_formatting.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/string_formatting.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** string_formatting.rb 1 Feb 2006 07:34:11 -0000 1.1 --- string_formatting.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 11,41 **** # bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # - =begin rdoc - bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation - =end module StringFormatting include CutSymbol --- 20,27 ---- # bio/util/restriction_enzyme/string_formatting.rb - Useful functions for string manipulation # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # module StringFormatting include CutSymbol *************** *** 103,109 **** ret ? ret : '' # Don't pass nil values end ! ! ! end ! ! end --- 89,92 ---- ret ? ret : '' # Don't pass nil values end ! end # StringFormatting ! end # Bio::RestrictionEnzyme Index: cut_symbol.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/cut_symbol.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_symbol.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_symbol.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,37 **** - module Bio; end - class Bio::RestrictionEnzyme - # # bio/util/restrction_enzyme/cut_symbol.rb - # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restrction_enzyme/cut_symbol.rb - - =end module CutSymbol --- 1,24 ---- # # bio/util/restrction_enzyme/cut_symbol.rb - # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + nil # separate file-level rdoc from following statement + + module Bio; end + class Bio::RestrictionEnzyme + # ! # bio/util/restrction_enzyme/cut_symbol.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # module CutSymbol *************** *** 67,70 **** end ! end ! end --- 54,57 ---- end ! end # CutSymbol ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: single_strand_complement.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand_complement.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** single_strand_complement.rb 1 Feb 2006 07:34:11 -0000 1.1 --- single_strand_complement.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 11,47 **** # bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - =begin rdoc - bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation - - A single strand of restriction enzyme sequence pattern with a 3' to 5' orientation. - =end class SingleStrandComplement < SingleStrand # Orientation of the strand, 3' to 5' def orientation; [3, 5]; end ! end ! ! end --- 20,32 ---- # bio/util/restriction_enzyme/single_strand_complement.rb - Single strand restriction enzyme sequence in complement orientation # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # A single strand of restriction enzyme sequence pattern with a 3' to 5' orientation. # class SingleStrandComplement < SingleStrand # Orientation of the strand, 3' to 5' def orientation; [3, 5]; end ! end # SingleStrandComplement ! end # Bio::RestrictionEnzyme Index: double_stranded.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/double_stranded.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** double_stranded.rb 1 Feb 2006 07:34:11 -0000 1.1 --- double_stranded.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 16,58 **** # ! # bio/util/restriction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # ! ! =begin rdoc ! bio/util/restriction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence ! ! A pair of +SingleStrand+ and +SingleStrandComplement+ objects with methods to ! add utility to their relation. ! ! == Notes ! * This is created by Bio::RestrictionEnzyme.new for convenience. ! * The two strands accessible are +primary+ and +complement+. ! * SingleStrand methods may be used on DoubleStranded and they will be passed to +primary+. ! ! =end class DoubleStranded include CutSymbol --- 25,42 ---- # ! # bio/util/restrction_enzyme/double_stranded.rb - DoubleStranded restriction enzyme sequence # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # A pair of +SingleStrand+ and +SingleStrandComplement+ objects with methods to ! # add utility to their relation. ! # ! # = Notes ! # * This is created by Bio::RestrictionEnzyme.new for convenience. ! # * The two strands accessible are +primary+ and +complement+. ! # * SingleStrand methods may be used on DoubleStranded and they will be passed to +primary+. ! # class DoubleStranded include CutSymbol *************** *** 73,78 **** attr_reader :cut_locations_in_enzyme_notation ! # +erp+:: Enzyme or Rebase or Pattern. One of three: The name of an enzyme. A REBASE::EnzymeEntry object. A nucleotide pattern. ! # +raw_cut_pairs+:: The cut locations in enzyme index notation. # # Enzyme index notation:: 1.._n_, value before 1 is -1 --- 57,62 ---- attr_reader :cut_locations_in_enzyme_notation ! # [+erp+] One of three possible parameters: The name of an enzyme, a REBASE::EnzymeEntry object, or a nucleotide pattern with a cut mark. ! # [+raw_cut_pairs+] The cut locations in enzyme index notation. # # Enzyme index notation:: 1.._n_, value before 1 is -1 *************** *** 94,97 **** --- 78,82 ---- # def initialize(erp, *raw_cut_pairs) + # 'erp' : 'E'nzyme / 'R'ebase / 'P'attern k = erp.class *************** *** 217,221 **** end ! end ! ! end --- 202,205 ---- end ! end # DoubleStranded ! end # Bio::RestrictionEnzyme Index: single_strand.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/single_strand.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** single_strand.rb 1 Feb 2006 07:34:11 -0000 1.1 --- single_strand.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s *************** *** 13,50 **** # bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 # ! #++ # - - =begin rdoc - bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence - - A single strand of restriction enzyme sequence pattern with a 5' to 3' - orientation. - - DoubleStranded puts the SingleStrand and SingleStrandComplement together to - create the sequence pattern with cuts on both strands. - =end class SingleStrand < Bio::Sequence::NA include CutSymbol --- 22,35 ---- # bio/util/restriction_enzyme/single_strand.rb - Single strand of a restriction enzyme sequence # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # ! # A single strand of restriction enzyme sequence pattern with a 5' to 3' ! # orientation. ! # ! # DoubleStranded puts the SingleStrand and SingleStrandComplement together to ! # create the sequence pattern with cuts on both strands. # class SingleStrand < Bio::Sequence::NA include CutSymbol *************** *** 142,146 **** end ! # NOTE: BEING WORKED ON, BUG EXISTS IN Bio::NucleicAcid =begin --- 127,131 ---- end ! # FIXME recheck this # NOTE: BEING WORKED ON, BUG EXISTS IN Bio::NucleicAcid =begin *************** *** 198,202 **** once :pattern, :with_cut_symbols, :with_spaces, :to_re ! end ! ! end --- 183,186 ---- once :pattern, :with_cut_symbols, :with_spaces, :to_re ! end # SingleStrand ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: analysis.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** analysis.rb 1 Mar 2006 01:40:00 -0000 1.5 --- analysis.rb 31 Dec 2006 21:50:31 -0000 1.6 *************** *** 1,2 **** --- 1,13 ---- + # + # bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + + #-- #if RUBY_VERSION[0..2] == '1.9' or RUBY_VERSION == '2.0' # err = "This class makes use of 'include' on ranges quite a bit. Possibly unstable in development Ruby. 2005/12/20." *************** *** 4,7 **** --- 15,19 ---- # raise err #end + #++ require 'pathname' *************** *** 10,15 **** require 'bio' - class Bio::Sequence::NA def cut_with_enzyme(*args) Bio::RestrictionEnzyme::Analysis.cut(self, *args) --- 22,27 ---- require 'bio' class Bio::Sequence::NA + # See Bio::RestrictionEnzyme::Analysis.cut def cut_with_enzyme(*args) Bio::RestrictionEnzyme::Analysis.cut(self, *args) *************** *** 24,59 **** class Bio::RestrictionEnzyme # # bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ ! # # - - =begin rdoc - bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes - =end class Analysis --- 36,47 ---- class Bio::RestrictionEnzyme + # # bio/util/restrction_enzyme/analysis.rb - Does the work of fragmenting the DNA from the enzymes # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # class Analysis *************** *** 375,378 **** end ! end ! end --- 363,366 ---- end ! end # Analysis ! end # Bio::RestrictionEnzyme From trevor at dev.open-bio.org Sun Dec 31 21:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme/analysis calculated_cuts.rb, 1.1, 1.2 cut_range.rb, 1.1, 1.2 cut_ranges.rb, 1.1, 1.2 fragment.rb, 1.1, 1.2 fragments.rb, 1.1, 1.2 horizontal_cut_range.rb, 1.1, 1.2 sequence_range.rb, 1.1, 1.2 tags.rb, 1.1, 1.2 vertical_cut_range.rb, 1.1, 1.2 Message-ID: <200612312150.kBVLoXKt032436@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis In directory dev.open-bio.org:/tmp/cvs-serv32395/restriction_enzyme/analysis Modified Files: calculated_cuts.rb cut_range.rb cut_ranges.rb fragment.rb fragments.rb horizontal_cut_range.rb sequence_range.rb tags.rb vertical_cut_range.rb Log Message: Updated license for RestrictionEnzyme. Index: vertical_cut_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/vertical_cut_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vertical_cut_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- vertical_cut_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/vertical_cut_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,44 **** # ! # bio/util/restriction_enzyme/analysis/vertical_cut_range.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/vertical_cut_range.rb - - =end class VerticalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right --- 19,28 ---- # ! # bio/util/restrction_enzyme/analysis/vertical_cut_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class VerticalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right *************** *** 67,73 **** @range.include?(i) end ! ! end ! ! end ! end --- 51,55 ---- @range.include?(i) end ! end # VerticalCutRange ! end # Analysis ! end # Bio::RestrictionEnzyme Index: fragment.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/fragment.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fragment.rb 1 Feb 2006 07:34:11 -0000 1.1 --- fragment.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/fragment.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 13,47 **** # ! # bio/util/restriction_enzyme/analysis/fragment.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/fragment.rb - - =end class Fragment --- 22,31 ---- # ! # bio/util/restrction_enzyme/analysis/fragment.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class Fragment *************** *** 74,82 **** df end ! ! ! ! end ! ! end ! end --- 58,62 ---- df end ! end # Fragment ! end # Analysis ! end # Bio::RestrictionEnzyme Index: horizontal_cut_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/horizontal_cut_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** horizontal_cut_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- horizontal_cut_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/horizontal_cut_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,44 **** # ! # bio/util/restriction_enzyme/analysis/horizontal_cut_range.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/horizontal_cut_range.rb - - =end class HorizontalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right --- 19,28 ---- # ! # bio/util/restrction_enzyme/analysis/horizontal_cut_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class HorizontalCutRange < CutRange attr_reader :p_cut_left, :p_cut_right *************** *** 69,75 **** @range.include?(i) end ! ! end ! ! end ! end --- 53,57 ---- @range.include?(i) end ! end # HorizontalCutRange ! end # Analysis ! end # Bio::RestrictionEnzyme Index: fragments.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/fragments.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fragments.rb 1 Feb 2006 07:34:11 -0000 1.1 --- fragments.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/fragments.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 8,42 **** # ! # bio/util/restriction_enzyme/analysis/fragments.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/fragments.rb - - =end class Fragments < Array --- 17,26 ---- # ! # bio/util/restrction_enzyme/analysis/fragments.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class Fragments < Array *************** *** 58,64 **** pretty_fragments end ! ! end ! ! end ! end --- 42,46 ---- pretty_fragments end ! end # Fragments ! end # Analysis ! end # Bio::RestrictionEnzyme Index: tags.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/tags.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tags.rb 1 Feb 2006 07:34:11 -0000 1.1 --- tags.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- + # to be removed require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,45 **** class Analysis - # - # bio/util/restriction_enzyme/analysis/tags.rb - - # - # Copyright:: Copyright (C) 2006 Trevor Wennblom - # 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 - # - #++ - # - # - - =begin rdoc - bio/util/restriction_enzyme/analysis/tags.rb - - =end class Tags < Hash end --- 11,14 ---- Index: cut_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/cut_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # bio/util/restrction_enzyme/analysis/cut_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,47 **** # ! # bio/util/restriction_enzyme/analysis/cut_range.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/cut_range.rb - - =end class CutRange ! end ! ! end ! end --- 20,31 ---- # ! # bio/util/restrction_enzyme/analysis/cut_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class CutRange ! end # CutRange ! end # Analysis ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: cut_ranges.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/cut_ranges.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cut_ranges.rb 1 Feb 2006 07:34:11 -0000 1.1 --- cut_ranges.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/cut_ranges.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 10,50 **** # ! # bio/util/restriction_enzyme/analysis/cut_ranges.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/cut_ranges.rb - - =end class CutRanges < Array def min; self.collect{|a| a.min}.flatten.sort.first; end def max; self.collect{|a| a.max}.flatten.sort.last; end def include?(i); self.collect{|a| a.include?(i)}.include?(true); end ! end ! ! end ! end --- 19,33 ---- # ! # bio/util/restrction_enzyme/analysis/cut_ranges.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class CutRanges < Array def min; self.collect{|a| a.min}.flatten.sort.first; end def max; self.collect{|a| a.max}.flatten.sort.last; end def include?(i); self.collect{|a| a.include?(i)}.include?(true); end ! end # CutRanges ! end # Analysis ! end # Bio::RestrictionEnzyme Index: calculated_cuts.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/calculated_cuts.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** calculated_cuts.rb 1 Feb 2006 07:34:11 -0000 1.1 --- calculated_cuts.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,12 ---- + # + # bio/util/restrction_enzyme/analysis/calculated_cuts.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # + require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 11,56 **** # ! # bio/util/restriction_enzyme/analysis/calculated_cuts.rb - ! # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/calculated_cuts.rb - - - - 1 2 3 4 5 6 7 - G A|T T A C A - +-----+ - C T A A T|G T - 1 2 3 4 5 6 7 - - Primary cut = 2 - Complement cut = 5 - Horizontal cuts = 3, 4, 5 - =end class CalculatedCuts include CutSymbol --- 21,40 ---- # ! # bio/util/restrction_enzyme/analysis/calculated_cuts.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # 1 2 3 4 5 6 7 + # G A|T T A C A + # +-----+ + # C T A A T|G T + # 1 2 3 4 5 6 7 + # + # Primary cut = 2 + # Complement cut = 5 + # Horizontal cuts = 3, 4, 5 # class CalculatedCuts include CutSymbol *************** *** 214,220 **** end ! ! end ! ! end ! end --- 198,202 ---- end ! end # CalculatedCuts ! end # Analysis ! end # Bio::RestrictionEnzyme \ No newline at end of file Index: sequence_range.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis/sequence_range.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sequence_range.rb 1 Feb 2006 07:34:11 -0000 1.1 --- sequence_range.rb 31 Dec 2006 21:50:31 -0000 1.2 *************** *** 1,2 **** --- 1,11 ---- + # + # bio/util/restrction_enzyme/analysis/sequence_range.rb - + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby + # + # $Id$ + # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s *************** *** 15,51 **** class Bio::RestrictionEnzyme class Analysis - - # - # bio/util/restriction_enzyme/analysis/sequence_range.rb - - # - # Copyright:: Copyright (C) 2006 Trevor Wennblom - # 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 ! # ! #++ # # - - =begin rdoc - bio/util/restriction_enzyme/analysis/sequence_range.rb - - =end class SequenceRange --- 24,34 ---- class Bio::RestrictionEnzyme class Analysis # ! # bio/util/restrction_enzyme/analysis/sequence_range.rb - # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # class SequenceRange *************** *** 224,231 **** @cut_ranges << HorizontalCutRange.new( left, right ) end ! ! ! end ! ! end ! end --- 207,211 ---- @cut_ranges << HorizontalCutRange.new( left, right ) end ! end # SequenceRange ! end # Analysis ! end # Bio::RestrictionEnzyme \ No newline at end of file From trevor at dev.open-bio.org Sun Dec 31 21:53:34 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:53:34 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/hmmer report.rb,1.10,1.11 Message-ID: <200612312153.kBVLrYml032489@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/hmmer In directory dev.open-bio.org:/tmp/cvs-serv32469/lib/bio/appl/hmmer Modified Files: report.rb Log Message: s/Lisence/License Index: report.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/hmmer/report.rb,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** report.rb 2 Feb 2006 17:08:36 -0000 1.10 --- report.rb 31 Dec 2006 21:53:32 -0000 1.11 *************** *** 6,10 **** # Copyright:: Copyright (C) 2005 # Masashi Fujita ! # Lisence:: LGPL # # $Id$ --- 6,10 ---- # Copyright:: Copyright (C) 2005 # Masashi Fujita ! # License:: LGPL # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio reference.rb,1.22,1.23 Message-ID: <200612312154.kBVLsprG032533@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio Modified Files: reference.rb Log Message: s/Lisence/License Index: reference.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/reference.rb,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** reference.rb 26 Mar 2006 02:32:56 -0000 1.22 --- reference.rb 31 Dec 2006 21:54:49 -0000 1.23 *************** *** 5,9 **** # Toshiaki Katayama , # Ryan Raaum ! # Lisence:: Ruby's # # $Id$ --- 5,9 ---- # Toshiaki Katayama , # Ryan Raaum ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl/blast xmlparser.rb,1.15,1.16 Message-ID: <200612312154.kBVLsp6X032543@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl/blast In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/appl/blast Modified Files: xmlparser.rb Log Message: s/Lisence/License Index: xmlparser.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/blast/xmlparser.rb,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** xmlparser.rb 19 Sep 2006 06:12:37 -0000 1.15 --- xmlparser.rb 31 Dec 2006 21:54:49 -0000 1.16 *************** *** 6,10 **** # Copyright:: Copyright (C) 2003 # Toshiaki Katayama ! # Lisence:: Ruby's # # $Id$ --- 6,10 ---- # Copyright:: Copyright (C) 2003 # Toshiaki Katayama ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db fasta.rb,1.26,1.27 Message-ID: <200612312154.kBVLsphC032548@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/db Modified Files: fasta.rb Log Message: s/Lisence/License Index: fasta.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/fasta.rb,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** fasta.rb 19 Sep 2006 06:03:51 -0000 1.26 --- fasta.rb 31 Dec 2006 21:54:49 -0000 1.27 *************** *** 5,9 **** # GOTO Naohisa , # Toshiaki Katayama ! # Lisence:: Ruby's # # $Id$ --- 5,9 ---- # GOTO Naohisa , # Toshiaki Katayama ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/appl hmmer.rb,1.7,1.8 Message-ID: <200612312154.kBVLspwq032538@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/appl In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/appl Modified Files: hmmer.rb Log Message: s/Lisence/License Index: hmmer.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/hmmer.rb,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** hmmer.rb 19 Sep 2006 06:29:37 -0000 1.7 --- hmmer.rb 31 Dec 2006 21:54:49 -0000 1.8 *************** *** 4,8 **** # Copyright:: Copyright (C) 2002 # Toshiaki Katayama ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2002 # Toshiaki Katayama ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/data test_na.rb,1.6,1.7 Message-ID: <200612312154.kBVLsprO032563@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/data In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio/data Modified Files: test_na.rb Log Message: s/Lisence/License Index: test_na.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/data/test_na.rb,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_na.rb 8 Feb 2006 13:57:01 -0000 1.6 --- test_na.rb 31 Dec 2006 21:54:49 -0000 1.7 *************** *** 3,7 **** # # Copyright:: Copyright (C) 2005,2006 Mitsuteru Nakao ! # Lisence:: Ruby's # # $Id$ --- 3,7 ---- # # Copyright:: Copyright (C) 2005,2006 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/io fastacmd.rb,1.13,1.14 Message-ID: <200612312154.kBVLspMV032551@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/io In directory dev.open-bio.org:/tmp/cvs-serv32497/lib/bio/io Modified Files: fastacmd.rb Log Message: s/Lisence/License Index: fastacmd.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/io/fastacmd.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fastacmd.rb 25 Jul 2006 18:18:21 -0000 1.13 --- fastacmd.rb 31 Dec 2006 21:54:49 -0000 1.14 *************** *** 7,11 **** # Mitsuteru C. Nakao , # Jan Aerts ! # Lisence:: LGPL # # $Id$ --- 7,11 ---- # Mitsuteru C. Nakao , # Jan Aerts ! # License:: LGPL # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/sequence test_aa.rb, 1.1, 1.2 test_na.rb, 1.2, 1.3 Message-ID: <200612312154.kBVLsp8m032573@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/sequence In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio/sequence Modified Files: test_aa.rb test_na.rb Log Message: s/Lisence/License Index: test_na.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_na.rb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** test_na.rb 27 Jun 2006 05:44:57 -0000 1.2 --- test_na.rb 31 Dec 2006 21:54:49 -0000 1.3 *************** *** 4,8 **** # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ Index: test_aa.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/sequence/test_aa.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_aa.rb 8 Feb 2006 07:20:24 -0000 1.1 --- test_aa.rb 31 Dec 2006 21:54:49 -0000 1.2 *************** *** 4,8 **** # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio test_reference.rb,1.1,1.2 Message-ID: <200612312154.kBVLspeT032558@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio Modified Files: test_reference.rb Log Message: s/Lisence/License Index: test_reference.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/test_reference.rb,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_reference.rb 8 Feb 2006 15:06:26 -0000 1.1 --- test_reference.rb 31 Dec 2006 21:54:49 -0000 1.2 *************** *** 4,8 **** # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # Lisence:: Ruby's # # $Id$ --- 4,8 ---- # Copyright:: Copyright (C) 2006 # Mitsuteru C. Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:54:51 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:54:51 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/db/embl test_sptr.rb,1.5,1.6 Message-ID: <200612312154.kBVLspJF032568@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/db/embl In directory dev.open-bio.org:/tmp/cvs-serv32497/test/unit/bio/db/embl Modified Files: test_sptr.rb Log Message: s/Lisence/License Index: test_sptr.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_sptr.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_sptr.rb 5 Oct 2006 07:39:30 -0000 1.5 --- test_sptr.rb 31 Dec 2006 21:54:49 -0000 1.6 *************** *** 3,7 **** # # Copyright::: Copyright (C) 2005 Mitsuteru Nakao ! # Lisence:: Ruby's # # $Id$ --- 3,7 ---- # # Copyright::: Copyright (C) 2005 Mitsuteru Nakao ! # License:: Ruby's # # $Id$ From trevor at dev.open-bio.org Sun Dec 31 21:50:33 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 21:50:33 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util restriction_enzyme.rb,1.4,1.5 Message-ID: <200612312150.kBVLoXSW032423@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32395 Modified Files: restriction_enzyme.rb Log Message: Updated license for RestrictionEnzyme. Index: restriction_enzyme.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme.rb,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** restriction_enzyme.rb 28 Feb 2006 21:45:56 -0000 1.4 --- restriction_enzyme.rb 31 Dec 2006 21:50:31 -0000 1.5 *************** *** 1,10 **** # ! # = bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns # ! # Copyright:: Copyright (C) 2006 Trevor Wennblom ! # License:: LGPL # # $Id$ # # # NOTE: This documentation and the module are still very much under --- 1,26 ---- # ! # bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns # ! # Author:: Trevor Wennblom ! # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) ! # License:: Distributes under the same terms as Ruby # # $Id$ # + + require 'bio/db/rebase' + require 'bio/util/restriction_enzyme/double_stranded' + require 'bio/util/restriction_enzyme/single_strand' + require 'bio/util/restriction_enzyme/cut_symbol' + require 'bio/util/restriction_enzyme/analysis' + + module Bio #:nodoc: + + # + # bio/util/restriction_enzyme.rb - Digests DNA based on restriction enzyme cut patterns + # + # Author:: Trevor Wennblom + # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) + # License:: Distributes under the same terms as Ruby # # NOTE: This documentation and the module are still very much under *************** *** 12,16 **** # comments would be appreciated. # ! # == Synopsis # # Bio::RestrictionEnzyme allows you to fragment a DNA strand using one --- 28,33 ---- # comments would be appreciated. # ! # ! # = Description # # Bio::RestrictionEnzyme allows you to fragment a DNA strand using one *************** *** 20,30 **** # such circumstances. # ! ! # Using Bio::RestrictionEnzyme you may simply use the name of common ! # enzymes to cut with or you may construct your own unique enzymes to use. # # ! # == Basic Usage # # # EcoRI cut pattern: # # G|A A T T C --- 37,49 ---- # such circumstances. # ! # When using Bio::RestrictionEnzyme you may simply use the name of common ! # enzymes to cut your sequence or you may construct your own unique enzymes ! # to use. # # ! # = Usage # + # == Basic + # # # EcoRI cut pattern: # # G|A A T T C *************** *** 35,39 **** # # G^AATTC # ! # require 'bio/restriction_enzyme' # require 'pp' # --- 54,58 ---- # # G^AATTC # ! # require 'bio' # require 'pp' # *************** *** 66,73 **** # p cuts.complement # ["g", "gcccttaa", "cttaa"] # # ! # == Advanced Usage ! # ! # require 'bio/restriction_enzyme' # require 'pp' # enzyme_1 = Bio::RestrictionEnzyme.new('anna', [1,1], [3,3]) --- 85,91 ---- # p cuts.complement # ["g", "gcccttaa", "cttaa"] # + # == Advanced # ! # require 'bio' # require 'pp' # enzyme_1 = Bio::RestrictionEnzyme.new('anna', [1,1], [3,3]) *************** *** 160,209 **** # # ! # == Todo ! # ! # Currently under development: # - # * Optimizations in restriction_enzyme/analysis.rb to cut down on - # factorial growth of computation space. # * Circular DNA cutting - # * Tagging of sequence data - # * Much more documentation - # - # - #-- - # - # 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 # ! #++ ! # ! # ! ! ! require 'bio/db/rebase' ! require 'bio/util/restriction_enzyme/double_stranded' ! require 'bio/util/restriction_enzyme/single_strand' ! require 'bio/util/restriction_enzyme/cut_symbol' ! require 'bio/util/restriction_enzyme/analysis' ! ! ! module Bio ! class Bio::RestrictionEnzyme include CutSymbol extend CutSymbol # Factory for DoubleStranded def self.new(users_enzyme_or_rebase_or_pattern, *cut_locations) DoubleStranded.new(users_enzyme_or_rebase_or_pattern, *cut_locations) --- 178,198 ---- # # ! # = Currently under development # # * Circular DNA cutting # ! class Bio::RestrictionEnzyme include CutSymbol extend CutSymbol + # [+users_enzyme_or_rebase_or_pattern+] One of three possible parameters: The name of an enzyme, a REBASE::EnzymeEntry object, or a nucleotide pattern with a cut mark. + # [+cut_locations+] The cut locations in enzyme index notation. + # + # See Bio::RestrictionEnzyme::DoubleStranded.new for more information. + # + #-- # Factory for DoubleStranded + #++ def self.new(users_enzyme_or_rebase_or_pattern, *cut_locations) DoubleStranded.new(users_enzyme_or_rebase_or_pattern, *cut_locations) *************** *** 214,219 **** # Returns a Bio::REBASE object loaded with all of the enzyme data on file. # ! #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml') def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml') @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml) @@rebase_enzymes --- 203,212 ---- # Returns a Bio::REBASE object loaded with all of the enzyme data on file. # ! #-- ! # FIXME: Use File.join ! #++ def self.rebase(enzymes_yaml = File.dirname(__FILE__) + '/restriction_enzyme/enzymes.yaml') + #def self.rebase(enzymes_yaml = '/home/trevor/tmp5/bioruby/lib/bio/util/restriction_enzyme/enzymes.yaml') + @@rebase_enzymes ||= Bio::REBASE.load_yaml(enzymes_yaml) @@rebase_enzymes *************** *** 222,230 **** # Primitive way of determining if a string is an enzyme name. # ! # Should work just fine thanks to dumb luck. A nucleotide or nucleotide # set can't ever contain an 'i'. Restriction enzymes always end in 'i'. # #-- ! # Could also look for cut symbols. #++ # --- 215,223 ---- # Primitive way of determining if a string is an enzyme name. # ! # A nucleotide or nucleotide # set can't ever contain an 'i'. Restriction enzymes always end in 'i'. # #-- ! # FIXME: Change this to actually look up the enzyme name to see if it's valid. #++ # *************** *** 238,242 **** end ! end ! end # Bio --- 231,234 ---- end ! end # RestrictionEnzyme end # Bio From trevor at dev.open-bio.org Sun Dec 31 23:04:07 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 23:04:07 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/util contingency_table.rb,1.5,1.6 Message-ID: <200612312304.kBVN475k032648@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32628 Modified Files: contingency_table.rb Log Message: Standardized documentation for ContingencyTable to meet README.DEV Index: contingency_table.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/util/contingency_table.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** contingency_table.rb 31 Dec 2006 20:02:20 -0000 1.5 --- contingency_table.rb 31 Dec 2006 23:04:04 -0000 1.6 *************** *** 249,252 **** --- 249,257 ---- # Create a ContingencyTable that has characters_in_sequence.size rows and # characters_in_sequence.size columns for each row + # + # --- + # *Arguments* + # * +characters_in_sequences+: (_optional_) The allowable characters that will be present in the aligned sequences. + # *Returns*:: +ContingencyTable+ object to be filled with values and calculated upon def initialize(characters_in_sequences = nil) @characters = ( characters_in_sequences or %w{a c d e f g h i k l m n p q r s t v w y - x u} ) *************** *** 256,259 **** --- 261,269 ---- # Report the sum of all values in a given row + # + # --- + # *Arguments* + # * +i+: Row to sum + # *Returns*:: +Integer+ sum of row def row_sum(i) total = 0 *************** *** 263,266 **** --- 273,281 ---- # Report the sum of all values in a given column + # + # --- + # *Arguments* + # * +j+: Column to sum + # *Returns*:: +Integer+ sum of column def column_sum(j) total = 0 *************** *** 273,276 **** --- 288,295 ---- # * This is the same thing as asking for the sum of all values in the table. # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Integer+ sum of all columns def column_sum_all total = 0 *************** *** 283,286 **** --- 302,309 ---- # * This is the same thing as asking for the sum of all values in the table. # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Integer+ sum of all rows def row_sum_all total = 0 *************** *** 290,296 **** alias table_sum_all row_sum_all # ! # e(sub:ij) = (r(sub:i)/N) * (c(sub:j)) ! # def expected(i, j) (row_sum(i).to_f / table_sum_all) * column_sum(j) --- 313,323 ---- alias table_sum_all row_sum_all + # Calculate _e_, the _expected_ value. # ! # --- ! # *Arguments* ! # * +i+: row ! # * +j+: column ! # *Returns*:: +Float+ e(sub:ij) = (r(sub:i)/N) * (c(sub:j)) def expected(i, j) (row_sum(i).to_f / table_sum_all) * column_sum(j) *************** *** 298,301 **** --- 325,333 ---- # Report the chi square of the entire table + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Float+ chi square value def chi_square total = 0 *************** *** 310,314 **** end ! # Report the chi square relation of two elements in the table def chi_square_element(i, j) eij = expected(i, j) --- 342,352 ---- end ! # Report the chi-square relation of two elements in the table ! # ! # --- ! # *Arguments* ! # * +i+: row ! # * +j+: column ! # *Returns*:: +Float+ chi-square of an intersection def chi_square_element(i, j) eij = expected(i, j) *************** *** 318,321 **** --- 356,364 ---- # Report the contingency coefficient of the table + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Float+ contingency_coefficient of the table def contingency_coefficient c_s = chi_square From trevor at dev.open-bio.org Sun Dec 31 23:22:05 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 23:22:05 +0000 Subject: [BioRuby-cvs] bioruby/lib/bio/db rebase.rb,1.5,1.6 Message-ID: <200612312322.kBVNM5gh032698@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/lib/bio/db In directory dev.open-bio.org:/tmp/cvs-serv32678 Modified Files: rebase.rb Log Message: Updated REBASE to conform to README.DEV Index: rebase.rb =================================================================== RCS file: /home/repository/bioruby/bioruby/lib/bio/db/rebase.rb,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rebase.rb 31 Dec 2006 20:44:21 -0000 1.5 --- rebase.rb 31 Dec 2006 23:22:03 -0000 1.6 *************** *** 142,148 **** end ! # Iterate over each entry def each ! @data.each { |v| yield v } end --- 142,153 ---- end ! # Calls _block_ once for each element in @data hash, passing that element as a parameter. ! # ! # --- ! # *Arguments* ! # * Accepts a block ! # *Returns*:: results of _block_ operations def each ! @data.each { |item| yield item } end *************** *** 158,165 **** end ! # [+enzyme_lines+] contents of EMBOSS formatted enzymes file (_required_) ! # [+reference_lines+] contents of EMBOSS formatted references file (_optional_) ! # [+supplier_lines+] contents of EMBOSS formatted suppliers files (_optional_) ! # [+yaml+] enzyme_lines, reference_lines, and supplier_lines are read as YAML if set to true (_default_ +false+) def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) # All your REBASE are belong to us. --- 163,175 ---- end ! # Constructor ! # ! # --- ! # *Arguments* ! # * +enzyme_lines+: (_required_) contents of EMBOSS formatted enzymes file ! # * +reference_lines+: (_optional_) contents of EMBOSS formatted references file ! # * +supplier_lines+: (_optional_) contents of EMBOSS formatted suppliers files ! # * +yaml+: (_optional_, _default_ +false+) enzyme_lines, reference_lines, and supplier_lines are read as YAML if set to true ! # *Returns*:: Bio::REBASE def initialize( enzyme_lines, reference_lines = nil, supplier_lines = nil, yaml = false ) # All your REBASE are belong to us. *************** *** 180,183 **** --- 190,198 ---- # List the enzymes available + # + # --- + # *Arguments* + # * _none_ + # *Returns*:: +Array+ sorted enzyme names def enzymes @data.keys.sort *************** *** 188,195 **** --- 203,218 ---- # rebase.save_yaml( 'enz.yaml', 'ref.yaml' ) # rebase.save_yaml( 'enz.yaml', 'ref.yaml', 'sup.yaml' ) + # + # --- + # *Arguments* + # * +f_enzyme+: (_required_) Filename to save YAML formatted output of enzyme data + # * +f_reference+: (_optional_) Filename to save YAML formatted output of reference data + # * +f_supplier+: (_optional_) Filename to save YAML formatted output of supplier data + # *Returns*:: nothing def save_yaml( f_enzyme, f_reference=nil, f_supplier=nil ) File.open(f_enzyme, 'w') { |f| f.puts YAML.dump(@enzyme_data) } File.open(f_reference, 'w') { |f| f.puts YAML.dump(@reference_data) } if f_reference File.open(f_supplier, 'w') { |f| f.puts YAML.dump(@supplier_data) } if f_supplier + return end *************** *** 198,201 **** --- 221,231 ---- # rebase = Bio::REBASE.read( 'emboss_e', 'emboss_r' ) # rebase = Bio::REBASE.read( 'emboss_e', 'emboss_r', 'emboss_s' ) + # + # --- + # *Arguments* + # * +f_enzyme+: (_required_) Filename to read enzyme data + # * +f_reference+: (_optional_) Filename to read reference data + # * +f_supplier+: (_optional_) Filename to read supplier data + # *Returns*:: Bio::REBASE object def self.read( f_enzyme, f_reference=nil, f_supplier=nil ) e = IO.readlines(f_enzyme) *************** *** 209,212 **** --- 239,249 ---- # rebase = Bio::REBASE.load_yaml( 'enz.yaml', 'ref.yaml' ) # rebase = Bio::REBASE.load_yaml( 'enz.yaml', 'ref.yaml', 'sup.yaml' ) + # + # --- + # *Arguments* + # * +f_enzyme+: (_required_) Filename to read YAML-formatted enzyme data + # * +f_reference+: (_optional_) Filename to read YAML-formatted reference data + # * +f_supplier+: (_optional_) Filename to read YAML-formatted supplier data + # *Returns*:: Bio::REBASE object def self.load_yaml( f_enzyme, f_reference=nil, f_supplier=nil ) e = YAML.load_file(f_enzyme) From trevor at dev.open-bio.org Sun Dec 31 23:50:36 2006 From: trevor at dev.open-bio.org (Trevor Wennblom) Date: Sun, 31 Dec 2006 23:50:36 +0000 Subject: [BioRuby-cvs] bioruby/test/unit/bio/util test_restriction_enzyme.rb, NONE, 1.1 Message-ID: <200612312350.kBVNoaNQ032767@dev.open-bio.org> Update of /home/repository/bioruby/bioruby/test/unit/bio/util In directory dev.open-bio.org:/tmp/cvs-serv32747 Added Files: test_restriction_enzyme.rb Log Message: Added TestRestrictionEnzyme --- NEW FILE: test_restriction_enzyme.rb --- # # test/unit/bio/util/restriction_enzyme.rb - Unit test for Bio::RestrictionEnzyme # # Author:: Trevor Wennblom # Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com) # License:: Distributes under the same terms as Ruby # # $Id: test_restriction_enzyme.rb,v 1.1 2006/12/31 23:50:34 trevor Exp $ # require 'pathname' libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 4, 'lib')).cleanpath.to_s $:.unshift(libpath) unless $:.include?(libpath) require 'test/unit' require 'bio/util/restriction_enzyme.rb' module Bio #:nodoc: class TestRestrictionEnzyme < Test::Unit::TestCase #:nodoc: def setup @t = Bio::RestrictionEnzyme end def test_rebase assert_equal(@t.rebase.respond_to?(:enzymes), true) assert_not_nil @t.rebase['AarI'] assert_nil @t.rebase['blah'] end def test_enzyme_name assert_equal(@t.enzyme_name?('AarI'), true) assert_equal(@t.enzyme_name?('atgc'), false) assert_equal(@t.enzyme_name?('aari'), true) assert_equal(@t.enzyme_name?('EcoRI'), true) assert_equal(@t.enzyme_name?('EcoooRI'), true) # FIXME should actually be false end end end