Similar documents
BioRuby Ruby Bioinfomatics Blast BioPerl, BioJava, BIoPython Ruby

未踏成果報告会-fix.key

10000bp FASTA 1000bp 10000bp 3' i = 1 remainder = seq.window_search(10000, 9000) do subseq puts subseq.to_fasta("segment #{i}", 60) i += 1 puts remain

giw2005-bioruby-bof.key

<URL: KEGG API Ruby, Perl, Python, Java KEGG API SOAP WSDL Ruby Ruby SOAP Ruby SOAP4R, devel-logger, http-


3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,

Emacs Ruby..


54 5 PHP Web hellow.php 1:<?php 2: echo "Hellow, PHP!Y=n"; 3:?> echo PHP C 2: printf("hellow, PHP!Y=n"); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2

untitled

10 (1) s 10.2 rails c Rails 7 > item = PlanItem.new => #<PlanItem id nil, name nil,...> > item.name = "" => "" > item.valid? => true valid? true false


Ruby 50 Ruby UTF print, \n [Ruby-1] print("hello, Ruby.\n") [Ruby-2] Hello, Ruby. [Ruby-3] print("hello, \"Ruby\".\n") 2 [Ruby-4] seisuu = 10 pr

comp -MYPEDIA Programing- Ruby 1 attr_accessor :< 1>, :< 2> class Car def = carname end attr_accessor :name end car = Car.ne

r2.dvi

WEB DB PRESS Vol.1 65

新コンフィギュレータのフレームワークについて

情報システム設計論II ユーザインタフェース(1)

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV


HTML5無料セミナ.key

ruby novice ruby novice ruby novice.

parser.y 3. node.rb 4. CD-ROM

130712AJACS40

KNOB Knoppix for Bio Itoshi NIKAIDO


Open Bio* O B F -- Open Bio Foundation BioRuby BioPerl BioPython BioJava BioDAS BioMOBY BioPipe EMBOSS Ensembl OmniGene GMOD GBrowse Apollo OBDA BioCa

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

untitled

r1.dvi

1

Webデザイン論


PowerPoint Presentation

Windows [ ] [ (R)..] cmd [OK] Z:\> mkdir progi [Enter] \ ) mkdir progi ) (command ) help [Enter] help ( help ) mkdir make directory Windows ) mkdir mk

KNOB? KNOB KNOB

オンラインテスト

Kyosuke MOROHASHI

Ruby演習テキスト1

Gray [6] cross tabulation CUBE, ROLL UP Johnson [7] pivoting SQL 3. SuperSQL SuperSQL SuperSQL SQL [1] [2] SQL SELECT GENERATE <media> <TFE> GENER- AT

GeneWebⅡ利用の手引き

実験 5 CGI プログラミング 1 目的 動的にWebページを作成する手法の一つであるCGIについてプログラミングを通じて基本的な仕組みを学ぶ 2 実験 実験 1 Webサーバの設定確認と起動 (1)/etc/httpd/conf にある httpd.conf ファイルの cgi-bin に関する

明解Java入門編

リスト 1 1 <HTML> <HEAD> 3 <META http-equiv="content-type" content="text/html; charset=euc-jp"> 4 <TITLE> 住所の検索 </TITLE> 5 </HEAD> 6 <BODY> <FORM method=

GeneWebⅡ利用の手引き

2003年度 情報処理概論

CAS Yale Open Source software Authentication Authorization (nu-cas) Backend Database Authentication Authorization Powered by A

Advantage CA-Easytrieve Plus

15 Phoenix HTML 15.1 ModestGreeter RAVT web/router.ex web/router.ex : 12 scope "/", ModestGreeter do 13 pipe_through :browser get "/", TopCont

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

2009 Web B012-1

C G I 入 門 講 座

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=>

BioRuby の使い方

つくって学ぶプログラミング言語 RubyによるScheme処理系の実装

untitled

第 7 回の内容 動的な Web サイト フォーム Web システムの構成

<td width=99%><input type="file" size="80" name="file"></td> <td width=1% nowrap align=right valign=top> 削除キー : </td> <td width=99%><input type="passw

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè5²ó

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

Microsoft PowerPoint - ruby_instruction.ppt

Microsoft PowerPoint - Lecture_2

9BBH3A8_P0000

- 2 -

Sokushu2_perl

エレクトーンのお客様向けiPhone/iPad接続マニュアル

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

福沢論文

"CAS を利用した Single Sign On 環境の構築"


soturon2013

B2-Servlet-0112.PDF

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè10²ó

ngoto-biotree-public.ppt

インターネットマガジン1996年3月号―INTERNET magazine No.14

地域と文化資産


¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè1²ó




KNOB Bio KNOPPIX

PowerPoint プレゼンテーション

6 (1) app.html.eex 28 lib/nano_planner_web/templates/layout/app.html.eex 27 <footer> Oiax Inc <%= this_year() %> Oiax Inc. 29 </footer>

22 (266) / Web PF-Web Web Web Web / Web Web PF-Web Web Web Web CGI Web Web 1 Web PF-Web Web Perl C CGI A Pipe/Filter Architecture Based Software Gener

第29回日中石炭関係総合会議

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè1²ó

離散数理工学 第 2回 数え上げの基礎:漸化式の立て方

\\afs001-0m0005\project02\A32\M

2.3 ssqltool (3.1 ) postgresql (ua ) itc.db.ics.keio.ac.jp /public html/ssql SuperSQL HTML /public html/ssql /ssql/xxxx.

/var/lib/sharelatex/data/compiles/5b35c6e168aeba3d a72a7acd11f6ba07fbbff68/output.dvi

Microsoft PowerPoint _秀英体の取組み素材(予稿集).ppt

Lotus Domino XML活用の基礎!


r9.dvi

Compiled MODELSでのDFT位相検出装置のモデル化と評価

22 A Study of Framework for Semantic Filesystem

untitled

3 3.1 SSedit ua012345% ssedit SuperSQL config.ssql log.txt( logs.txt) SSedit SSedit 3.2 ssql Putty SSedit ua012345% ssql HTML /public html/ssql.ssql 4

Transcription:

class Cpd MW = { 'C'=>12.011, 'H'=>1.00794, 'N'=>14.00674, 'O' => 15.9994, 'P' => 30.973762 } def initialize @comp = Hash.new attr_accessor :name, :definition, :formula # formula def composition @formula.scan(/([a-z]+)(\d+)/) do a, b @comp[a] = b.to_i return @comp # composition def mol_weight total = 0.0 composition.each do elem, i total += MW[elem] * i return total cpd = Cpd.new cpd.name = "ATP" cpd.definition = "Adenosine 5'-triphosphate" cpd.formula = "C10H16N5O13P3" p cpd.composition p cpd.mol_weight

require /usr/local/lib/ruby/1.8 /usr/local/lib/ruby/site_ruby/ http://localhost/hello.html <html> <head><title>hello</title></head> <body> <form method="get" action="/cgi-bin/hello.cgi"> What is your name? <input type=text name="name"> <input type=submit> </form> </body> </html> #!/usr/bin/env ruby # CGI require 'cgi' cgi = CGI.new name = cgi.params['name'] cgi.out do "Hello #{name}!<br>"

#!/usr/bin/ruby #!/usr/local/bin/ruby #!/usr/bin/env ruby k@hoihoi:~% env USER=k HOME=/Users/k PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:. SHELL=/bin/zsh :

#!/usr/bin/env ruby require 'GD' filename = ARGV.shift image = GD::Image.new(100,100) bgcolor = image.colorallocate("#000000") fgcolor = image.colorallocate("#ff0000") image.line(10, 10, 90, 90, fgcolor) File.open(filename, "w+") do file image.png(file)

#!/usr/bin/env ruby % ruby seq.rb require 'bio' seq = "atgcacgggaactaa" dna = Bio::Sequence::NA.new(seq) puts dna.subseq(3,6) puts dna.complement puts dna.composition puts dna.gc # "gcac" # "ttagttcccgtgcat" # {"a"=>6, "c"=>3, "g"=>4, "t"=>2} # 46.7 protein = dna.translate puts protein puts protein.molecular_weight # "MHGN*" # 439.5

#!/usr/bin/env ruby require 'bio' # make a DNA sequence including 'tga' seq = "atgggcccatgaaaaggcttggagtaa" dna = Bio::Sequence::NA.new(seq) # translate from the frame 1 with # codon table 10 (Euplotid Nuclear) ct10 = Bio::CodonTable[10] protein = seq.translate(1, ct10) # print out the protein puts protein # => "MGPCKGLE*" # compared to the universal table puts seq.translate # => "MGP*KGLE*" 1 - Standard (Eukaryote) 2 - Vertebrate Mitochondrial 3 - Yeast mitochondorial 4 - Mold, Protozoan, Coelenterate Mitochondrial and Mycoplasma/Spiroplasma 5 - Invertebrate Mitochondrial 6 - Ciliate Macronuclear and Dasycladacean 9 - Echinoderm Mitochondrial 10 - Euplotid Nuclear 11 - Bacteria 12 - Alternative Yeast Nuclear 13 - Ascidian Mitochondrial 14 - Flatworm Mitochondrial 15 - Blepharisma Macronuclear 16 - Chlorophycean Mitochondrial 21 - Trematode Mitochondrial 22 - Scenedesmus obliquus mitochondrial 23 - Thraustochytrium Mitochondrial Code

VERSION=1.00 [embl] protocol=biofetch location=http://www.ebi.ac.uk/cgi-bin/dbfetch dbname=embl [swissprot] protocol=biosql location=db.bioruby.org dbname=biosql driver=mysql biodbname=sp

#!/usr/bin/env ruby require 'bio' serv = Bio::Registry.new db = serv.get_database("swissprot") entry = db.get_by_id("tetw_butfi") #!/usr/bin/env ruby require 'bio' serv = Bio::KEGG::API.new entry = serv.bget("sp:tetw_butfi") puts entry puts entry bget #!/usr/bin/env ruby require 'bio' serv = Bio::KEGG::API.new if /:/.match(argv[0]) list = ARGV else db = ARGV.shift list = ARGV.map { entry "#{db}:#{entry}"} puts serv.get_entries(list)

#!/usr/bin/env ruby require 'bio' file = "gbbct1.seq" Bio::GenBank.open(file).each do entry entry.each_gene do feat pos = feat.position seq = entry.seq.splicing(pos) desc = entry.entry_id + " " + pos puts seq.to_fasta(desc, 60) FEATURES Location/Qualifiers source 1..5842 /organism="streptococcus agalactiae" /db_xref="taxon:1311" /clone="pgb3634" gene join(5804..5842,1..240) /gene="copr" CDS join(5804..5842,1..240) /gene="copr" /note="circular" /codon_start=1 /transl_except=(pos:5804..5806,aa:met) /transl_table=11 /protein_id="caa50904.1" /db_xref="gi:2673854" /db_xref="swiss-prot:p24716" /translation="melafreslkkmrgtkskekfsqe KTLEQIVKLTNSTLVVDLIPNEPTEPEPETEQVTLELE

#!/usr/bin/env ruby require 'bio' % ruby flatfile.rb gbbct1.seq % ruby flatfile.rb e.coli.pep Bio::FlatFile.auto(ARGF) do ff ff.each do entry puts entry.entry_id puts entry.definition

#!/usr/bin/env ruby require 'bio' % ruby blast.rb blastp e.coli.pep query.f prog = ARGV.shift# 'blastp' db = ARGV.shift # 'e.coli.pep' blast = Bio::Blast.local(prog, db) Bio::FlatFile.auto(ARGF) do ff ff.each do entry puts entry.entry_id report = blast.query(ff.raw) report.each do hit puts hit.target_id hit.each do hsp puts [ hsp.query_id, hsp.target_id, hsp.evalue ].join("?t")

#!/usr/bin/env ruby require 'bio' require 'uri' require 'net/http' # KEGG API WSDL serv = Bio::KEGG::API.new # path = ARGV.shift 'path:eco00010' genes = serv.get_genes_by_pathway(path) # LinkDB PDB results = Hash.new genes.each do gene print gene if links = serv.get_linkdb_by_entry(gene, 'pdb') # links.each do link results[gene] = Array.new results[gene] << link.entry_id2 print "\t" + link.entry_id2 puts

# url, = serv.mark_pathway_by_genes(path, results.keys) STDERR.puts url # URL host = URI.parse(url).host path = URI.parse(url).path filename = 'pdb_on_' + File.basename(path) File.open(filename, File::CREAT File::TRUNC File::RDWR) do file file.print Net::HTTP.get_response(host, path).body