[BioRuby-cvs] bioruby/doc Tutorial.rd,1.12,1.13
Pjotr Prins
pjotr at dev.open-bio.org
Mon Jul 9 12:28:13 UTC 2007
Update of /home/repository/bioruby/bioruby/doc
In directory dev.open-bio.org:/tmp/cvs-serv30404/doc
Modified Files:
Tutorial.rd
Log Message:
Updated tutorial to include generating a random sequence and an example
of using the rebase library.
Index: Tutorial.rd
===================================================================
RCS file: /home/repository/bioruby/bioruby/doc/Tutorial.rd,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Tutorial.rd 17 Feb 2006 14:59:26 -0000 1.12
--- Tutorial.rd 9 Jul 2007 12:28:07 -0000 1.13
***************
*** 9,16 ****
Editor: PjotrPrins <p at bioruby.org>
! Copyright (C) 2001-2003 KATAYAMA Toshiaki <k at bioruby.org>, 2005-2006 all
! others
!
! NOTE: This page is a work in progress at this point
IMPORTANT NOTICE: This page is maintained in the BioRuby CVS
--- 9,13 ----
Editor: PjotrPrins <p at bioruby.org>
! Copyright (C) 2001-2003 KATAYAMA Toshiaki <k at bioruby.org>, 2005-2007 Pjotr Prins, Naohisa Goto and others
IMPORTANT NOTICE: This page is maintained in the BioRuby CVS
***************
*** 39,43 ****
command. Showing something like:
! ruby 1.8.2 (2005-04-11) [powerpc-linux]
--- 36,40 ----
command. Showing something like:
! ruby 1.8.5 (2006-08-25) [powerpc-linux]
***************
*** 97,100 ****
--- 94,100 ----
puts seq.complement.translate # translation of complemental strand
+ counts = {'a'=>seq.count('a'),'c'=>seq.count('c'),'g'=>seq.count('g'),'t'=>seq.count('t')}
+ p randomseq = Bio::Sequence::NA.randomize(counts) # reshuffle sequence with same freq.
+
The p, print and puts methods are standard Ruby ways of outputting to
the screen. If you want to know more about standard Ruby commands you
***************
*** 463,466 ****
--- 463,500 ----
a2 = a.do_align(factory)
+ == Restriction Enzymes (Bio::RE)
+
+ BioRuby has extensive support for restriction enzymes (REs). It contains a full
+ library of commonly used REs (from REBASE) which can be used to cut single
+ stranded RNA or dubbel stranded DNA into fragments. To list all enzymes:
+
+ rebase = Bio::RestrictionEnzyme.rebase
+ rebase.each do |enzyme_name, info|
+ p enzyme_name
+ end
+
+ and cut a sequence with an enzyme follow up with:
+
+ res = seq.cut_with_enzyme('EcoRII', {:max_permutations => 0}, {:view_ranges => true})
+ if res.kind_of? Symbol #error
+ err = Err.find_by_code(res.to_s)
+ unless err
+ err = Err.new(:code => res.to_s)
+ end
+ end
+ res.each do |frag|
+ em = EnzymeMatch.new
+
+ em.p_left = frag.p_left
+ em.p_right = frag.p_right
+ em.c_left = frag.c_left
+ em.c_right = frag.c_right
+
+ em.err = nil
+ em.enzyme = ar_enz
+ em.sequence = ar_seq
+ p em
+ end
+
== Sequence homology search by using the FASTA program (Bio::Fasta)
***************
*** 1124,1135 ****
* ((<URL:http://www.genome.jp/kegg/soap/>))
== Using BioRuby with R
! The R libraries can be accessed from Ruby using the @@FIXME
! package. This allows at least use of the standard R library
! functions. Unfortunately there is no binding for dynamic R - so at
! this point you'll have to create some command line interface.
! == Using BioPerl from Ruby
== Installing required external library
--- 1158,1172 ----
* ((<URL:http://www.genome.jp/kegg/soap/>))
+ == Comparing BioProjects
+
+ For a quick functional comparison of BioRuby, BioPerl, BioPython and Bioconductor (R) see ((<http://sciruby.codeforpeople.com/sr.cgi/BioProjects>))
+
== Using BioRuby with R
! Using Ruby with R Pjotr wrote a section on SciRuby. See ((<ULR:http://sciruby.codeforpeople.com/sr.cgi/RubyWithRlang>))
! == Using BioPerl or BioPython from Ruby
!
! At the moment there is no easy way of accessing BioPerl from Ruby. The best way, perhaps, is to create a Perl server that gets accessed through XML/RPC or SOAP.
== Installing required external library
More information about the bioruby-cvs
mailing list