[BioRuby-cvs] bioruby/lib/bio/util/restriction_enzyme analysis.rb, 1.13, 1.14 analysis_basic.rb, 1.6, 1.7
Trevor Wennblom
trevor at dev.open-bio.org
Fri Jan 5 06:11:17 UTC 2007
Update of /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme
In directory dev.open-bio.org:/tmp/cvs-serv15916/restriction_enzyme
Modified Files:
analysis.rb analysis_basic.rb
Log Message:
Index: analysis_basic.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis_basic.rb,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** analysis_basic.rb 5 Jan 2007 06:03:22 -0000 1.6
--- analysis_basic.rb 5 Jan 2007 06:11:15 -0000 1.7
***************
*** 90,94 ****
# * +sequence+: +String+ kind of object that will be used as a nucleic acid sequence.
# * +args+: Series of enzyme names, enzymes sequences with cut marks, or RestrictionEnzyme objects.
! # *Returns*:: Bio::RestrictionEnzyme::Analysis::Fragments object populated with Bio::RestrictionEnzyme::Analysis::Fragment objects. (Note: unrelated to SequenceRange::Fragments)
def cut_without_permutations( sequence, *args )
return fragments_for_display( {} ) if !sequence.kind_of?(String) or sequence.empty?
--- 90,94 ----
# * +sequence+: +String+ kind of object that will be used as a nucleic acid sequence.
# * +args+: Series of enzyme names, enzymes sequences with cut marks, or RestrictionEnzyme objects.
! # *Returns*:: Bio::RestrictionEnzyme::Fragments object populated with Bio::RestrictionEnzyme::Fragment objects. (Note: unrelated to SequenceRange::Fragments)
def cut_without_permutations( sequence, *args )
return fragments_for_display( {} ) if !sequence.kind_of?(String) or sequence.empty?
***************
*** 119,161 ****
end
! # A Fragment is a sequence fragment composed of a primary and
! # complementary that would be found floating in solution after a full
! # sequence is digested by a RestrictionEnzyme.
! #
! # You will notice that either the primary or complement strand will be
! # padded with spaces to make them line up according to the original DNA
! # configuration before being cut.
! #
! # Example:
! #
! # primary = "gattaca"
! # complement = " atga"
! #
! # View these with the 'primary' and 'complement' methods.
! #
! # Bio::RestrictionEnzyme::Analysis::Fragment is a simple +Struct+ object.
! #
! # *Note: unrelated to SequenceRange::Fragment*
! Fragment = Struct.new(:primary, :complement)
!
! # Fragments inherits from +Array+.
! #
! # Fragments is a container for Fragment objects. It adds the
! # methods +primary+ and +complement+ which returns an +Array+ of all
! # respective strands from it's Fragment members. Note that it will
! # not return duplicate items and does not return the spacing that you would
! # find by accessing the members directly.
! #
! # *Note: unrelated to SequenceRange::Fragments*
! class Fragments < Array
! def primary; strip_and_sort(:primary); end
! def complement; strip_and_sort(:complement); end
!
! protected
!
! def strip_and_sort( sym_strand )
! self.map {|uf| uf.send( sym_strand ).tr(' ', '') }.sort
! end
! end
#########
--- 119,123 ----
end
!
#########
***************
*** 177,181 ****
hsh.each do |permutation_id, sequence_range|
sequence_range.fragments.for_display.each do |fragment|
! ary << Fragment.new(fragment.primary, fragment.complement)
end
end
--- 139,143 ----
hsh.each do |permutation_id, sequence_range|
sequence_range.fragments.for_display.each do |fragment|
! ary << Bio::RestrictionEnzyme::Fragment.new(fragment.primary, fragment.complement)
end
end
Index: analysis.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/util/restriction_enzyme/analysis.rb,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** analysis.rb 5 Jan 2007 06:03:22 -0000 1.13
--- analysis.rb 5 Jan 2007 06:11:15 -0000 1.14
***************
*** 51,55 ****
# * +sequence+: +String+ kind of object that will be used as a nucleic acid sequence.
# * +args+: Series of enzyme names, enzymes sequences with cut marks, or RestrictionEnzyme objects.
! # *Returns*:: Bio::RestrictionEnzyme::Analysis::Fragments object populated with Bio::RestrictionEnzyme::Analysis::Fragment objects. (Note: unrelated to SequenceRange::Fragments)
def cut( sequence, *args )
return fragments_for_display( {} ) if !sequence.kind_of?(String) or sequence.empty?
--- 51,55 ----
# * +sequence+: +String+ kind of object that will be used as a nucleic acid sequence.
# * +args+: Series of enzyme names, enzymes sequences with cut marks, or RestrictionEnzyme objects.
! # *Returns*:: Bio::RestrictionEnzyme::Fragments object populated with Bio::RestrictionEnzyme::Fragment objects. (Note: unrelated to SequenceRange::Fragments)
def cut( sequence, *args )
return fragments_for_display( {} ) if !sequence.kind_of?(String) or sequence.empty?
More information about the bioruby-cvs
mailing list