SlideShare a Scribd company logo
1 of 18
2010/06/10
                         
kaneko.satoko(at)ocha.ac.jp 
                     
BLAST       CLUSTALW        
         
BLAST CLUSTALW  
                                
TogoWS REST SOAP        (step   ) 

      (11):E‐value  
(1)                                                       
blast_clustalw.rb                                  
           blast_clustalw.rb                                                  
$ ruby blast_clustalw.rb hsa:6469 
(    has:6469                                                                    blast + clustalw
            

                                                                                      
       blast_clustalw.rb                                                  
                                                                                           
step10.rb                                              
step20.rb                                Blastp                      
step30.rb Blastp                           ID                       E‐value                    
step40.rb              ID            E‐value              E‐value                                      
step50.rb                          
step60.rb                       ClustalW mulSple alignment                        
(2) step10.rb
                                         k.step10.txt          
‐                        hsa:6469              (                      ID   kegg_id ) 
‐blast_clustalw.rb       8‐12      get_aaseq        
‐  last_clustalw.rb
  b                      get_aaseq   79                            

#!/usr/bin/env ruby 

require ‘open‐uri’ # 8          open URL                   REST                          

#                            kegg_id          
kegg_id = "hsa:6469";  
#  kegg_id                                aaseq           
aaseq = open("hap://togows.dbcls.jp/entry/kegg‐genes/" + kegg_id + "/aaseq").read  
#REST                          hap://togows.dbcls.jp/entry/kegg‐genes/has:6469/aaseq 
#                                      aaseq                 

#       aaseq            k.step10.txt                  
out = open("k.step10.txt","w") 
out.puts aaseq 
out.close 
                                                                                             
                                                                                                
CotEditor                         
(3) step20.rb 
 Sonic Hedgehog                          query       BLAST             
‐blast_clustalw.rb 15‐25                     
‐ blast_clustalw.rb 81                      
#!/usr/bin/env ruby 
require 'soap/wsdlDriver' 

# step10.rb                                       aaseq         
aaseq = File.read("k.step10.txt”) 
# SOAP         blast                         result_blast         
wsdl_blast = "hap://togows.dbcls.jp/soap/wsdl/ddbj_blast.wsdl" 
serv_blast = SOAP::WSDLDriverFactory.new(wsdl_blast).create_rpc_driver 
program    = "blastp" 
database   = "SWISS" 
result_blast = serv_blast.DdbjBlastSearchSimple(program,database,aaseq) 

# result_blast           k.step20.txt            
out = open("k.step20.txt","w") 
out.puts result_blast 
out.close
(4) step30.rb 
BLAST               clustalw                                                                    
‐ blast_clustalw.rb  27                47                  84                               

#!/usr/bin/env ruby 

#                  step20.rb blast                                 result_blast        
result_blast = File.read("k.step20.txt") 

# result_blast                                             spid_hash               

spid_hash = Hash.new #                                       
# blast                                                      line       
result_blast.each_line do |line| 
  # blast                                          sp                       
   if line =~ /^sp|(.+)|(.+)s+.+s+[0‐9]+s+(.+)$/ 
    spid = $1      # 1       ()              spid          
     spname = $2    # 2           ()             spname             
     evalue = $3    # 3         ()             evalue            
     if evalue =~ /^e/ #             evalue  e                    
                evalue = “1.0” + evalue #              1.0           
    end 
#                       
#                         
 # evalue                                   evalue_float         
     evalue_float = evalue.to_f 
    # spid_hash[spid]  name        spname  evalue         evalue_float                       
     spid_hash[spid] = {:name=>spname, :evalue=>evalue_float} 
  end 
end 

#          spid_hash                             k.step30.txt                     
# %s                              
out = open("k.step30.txt","w");  
spid_hash.each {|spid,value| 
  out.prinv("%s|%s|%sn",spid,value[:name],value[:evalue]);  
} 
out.close

step20 blast               k.step20.txt                     ID       e‐value                 
k.step30.txt           
                                       
‐                         hsa:6469                      (                ID    kegg_id ) 
‐blast_clustalw.rb        28‐47           parse_blast             
‐  last_clustalw.rb
  b                       get_aaseq        84                         
: step30.rb                                           
                                                                                       
 ‐ if line =~ /^sp|(.+)|(.+)s+.+s+[0‐9]+s+(.+)$/            
BLAST             ID
                
          sp                         
1            |                      
2            |                                  
3                                                                         
              
^:      , |: |, .:            , +:              1                  , s:          , $:     ,  
():                                                  , []: []                  
                                                                             Score E
Sequences producing significant alignments:                                  (bits) Value

sp|Q15465|SHH_HUMAN Sonic hedgehog...                                        720       0.0
sp|Q62226|SHH_MOUSE Sonic hedgehog...                                        682       0.0
sp|Q63673|SHH_RAT Sonic hedgehog...                                          679       0.0
sp|Q91035|SHH_CHICK Sonic hedgehog...                                        605       e-172
sp|Q90385|SHH_CYNPY Sonic hedgehog...                                        510       e-144
       spid
           spname
                                                         evalue

                       spid_hash[spid][:name]
                      spid_hash[spid][:evalue]
(11):E‐value
                                                

                                                   (ex. 0.0, e‐100   ) 
                                                             

query                      E‐value query                        

‐                                                               

*E‐value        
                                            
*                   
(5) step40.rb
Blast               E‐value                                           
Step30             k.step30.txt                        E‐value                              
k.step40.txt           
‐                        hsa:6469                        (               ID   kegg_id ) 
‐blast_clustalw.rb       39‐43                      
‐blast_clustalw.rb       e‐value               6                  
#!/usr/bin/env ruby 

#                 
min_evalue = 1e‐170 
# step30.rb                               
#            spid_hash            
lns_spid = File.read("k.step30.txt") 
spid_hash = Hash.new 
lns_spid.each_line do |line| 
  raise unless line =~ /^(.+)|(.+)|(.+)$/ 
  spid = $1 
  spname = $2 
  evalue = $3 
  spid_hash[spid] = 
   {:name=>spname, :evalue=>evalue.to_f} 
end #                       
#
#                                   
#                                 
spid_hash.each {|spid,value| 
  #                     
   if value[:evalue] > min_evalue then 
    spid_hash.delete(spid)   #           
   end                
} 
#                            k.step40.txt    
out = open("k.step40.txt","w");  
spid_hash.each {|spid,value| 
  out.prinv("%s|%s|%sn",  
  spid,value[:name],value[:evalue]);  
} 
out.close 
(6) step50.rb 
             Sonic Hedgehog                                   
‐ blast_clustalw.rb     49           59                87         

#!/usr/bin/env ruby 
require 'open‐uri’ 

#                                             
#            spid_hash            
lns_spid = File.read("k.step40.txt") 
spid_hash = Hash.new 
lns_spid.each_line do |line| 
  raise unless line =~ /^(.+)|(.+)|(.+)$/ 
  spid = $1 
  spname = $2 
  evalue = $3 
  spid_hash[spid] = {:name=>spname, :evalue=>evalue.to_f} 
end 
#                      
#
#           spid_hash                         
spid_hash.each {|spid,value| 
  #                                                       
   uri = "hap://togows.dbcls.jp/entry/ebi‐uniprot/" + spid + "/seq” 
# REST                
  value[:seq] = open(uri).read 
} 

#         fasta                  
out = open("k.step50.fa","w");  
spid_hash.each {|spid,value| 
  out.prinv(">%s|%s|%sn",spid,value[:name],value[:evalue]);  
  out.prinv("%sn",value[:seq]);  
} 
out.close 
(7) step60.rb 
CLUSTALW alignment                 
Step50.rb                              clustalw  SOAP                      
‐ blast_clustalw.rb  61           75             90                            
#!/usr/bin/env ruby 
require 'soap/wsdlDriver’ 

# fasta                                     query        
query           = File.read("k.step50.fa") 
# query               mulSple alignment        
wsdl_clustalw   = "hap://togows.dbcls.jp/soap/wsdl/ddbj_clustalw.wsdl" 
serv_clustalw   = SOAP::WSDLDriverFactory.new(wsdl_clustalw).create_rpc_driver 
param           = "‐align ‐matrix=blosum ‐gapdist=8 ‐maxdiv=40 ‐outorder=aligned ‐
pwmatrix=blosum” 
# SOAP                 CLUSTALW              
result_clustalw = serv_clustalw.DdbjClustalwAnalyzeParam(query,param) 

#         k.step60.txt            
out = open("k.step60.txt","w");  
out.puts result_clustalw
out.close
(8) blast_clustalw.rb                                     
blast_clustalw.rb  77‐97                 Step10‐60                                                    

                   shiy   
#     ID                                                                    hsa:6469         
                                  # step10.rb                       

                          
                                     # step20.rb                       

                              
                                                               #step30.rb       step40.rb        
                                                           

                              
                                                  #step50.rb            

                                                                                
                                             #step60.rb            
           

                                         #           auto.txt 
blast_clustalw.rb                                        

1)       hsa:6469         MIN_EVALUE          (         1.0e‐140, 1.0e‐120,  
1.0e‐100          ) mulSple alignment               (          )                 

2) rat Olr1082         mulSple alignment        human mouse         
ortholog                 
‐       
rat Olr1082 UniProt ID                   
REST Entry retrieval UniProt              KEGG ID          
                blast_clustalw.rb                   (MIN_EVALUE 1.0e‐100) 
mulSple alignment              ortholog                      
Ensembl Synteny                                    ortholog
SOAP REST
                 

                     

             

More Related Content

What's hot

From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)
Night Sailer
 
Yy
YyYy
Yy
yygh
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texte
Sai Ef
 
MongoDB (Advanced)
MongoDB (Advanced)MongoDB (Advanced)
MongoDB (Advanced)
TO THE NEW | Technology
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
 
Всеволод Струкчинский: Node.js
Всеволод Струкчинский: Node.jsВсеволод Струкчинский: Node.js
Всеволод Струкчинский: Node.js
Yandex
 

What's hot (18)

C99[2]
C99[2]C99[2]
C99[2]
 
Cod
CodCod
Cod
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giants
 
C99
C99C99
C99
 
Modern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlModern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in Perl
 
From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)From mysql to MongoDB(MongoDB2011北京交流会)
From mysql to MongoDB(MongoDB2011北京交流会)
 
How-to Integração Postfi
How-to Integração PostfiHow-to Integração Postfi
How-to Integração Postfi
 
C99.php
C99.phpC99.php
C99.php
 
Yy
YyYy
Yy
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texte
 
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find FraudstersTeaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
Minicurso Ruby e Rails
Minicurso Ruby e RailsMinicurso Ruby e Rails
Minicurso Ruby e Rails
 
dotCloud and go
dotCloud and godotCloud and go
dotCloud and go
 
Eric Redmond – Distributed Search on Riak 2.0 - NoSQL matters Barcelona 2014
Eric Redmond – Distributed Search on Riak 2.0 - NoSQL matters Barcelona 2014Eric Redmond – Distributed Search on Riak 2.0 - NoSQL matters Barcelona 2014
Eric Redmond – Distributed Search on Riak 2.0 - NoSQL matters Barcelona 2014
 
MongoDB (Advanced)
MongoDB (Advanced)MongoDB (Advanced)
MongoDB (Advanced)
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Всеволод Струкчинский: Node.js
Всеволод Струкчинский: Node.jsВсеволод Струкчинский: Node.js
Всеволод Струкчинский: Node.js
 

Viewers also liked

100513_homology_search(ensembl)
100513_homology_search(ensembl)100513_homology_search(ensembl)
100513_homology_search(ensembl)
ocha_kaneko
 
100527-TogoWS_REST
100527-TogoWS_REST100527-TogoWS_REST
100527-TogoWS_REST
ocha_kaneko
 
100603_TogoWS_SOAP
100603_TogoWS_SOAP100603_TogoWS_SOAP
100603_TogoWS_SOAP
ocha_kaneko
 
090525-homology search(ensembl, local)
090525-homology search(ensembl, local)090525-homology search(ensembl, local)
090525-homology search(ensembl, local)
ocha_kaneko
 
100617_statistics1
100617_statistics1100617_statistics1
100617_statistics1
ocha_kaneko
 
100701_statistics3
100701_statistics3100701_statistics3
100701_statistics3
ocha_kaneko
 
100624_statistics2
100624_statistics2100624_statistics2
100624_statistics2
ocha_kaneko
 

Viewers also liked (9)

100513_homology_search(ensembl)
100513_homology_search(ensembl)100513_homology_search(ensembl)
100513_homology_search(ensembl)
 
100527-TogoWS_REST
100527-TogoWS_REST100527-TogoWS_REST
100527-TogoWS_REST
 
100603_TogoWS_SOAP
100603_TogoWS_SOAP100603_TogoWS_SOAP
100603_TogoWS_SOAP
 
100520_dotplot
100520_dotplot100520_dotplot
100520_dotplot
 
090525-homology search(ensembl, local)
090525-homology search(ensembl, local)090525-homology search(ensembl, local)
090525-homology search(ensembl, local)
 
100617_statistics1
100617_statistics1100617_statistics1
100617_statistics1
 
100701_statistics3
100701_statistics3100701_statistics3
100701_statistics3
 
100624_statistics2
100624_statistics2100624_statistics2
100624_statistics2
 
090601-dotplot
090601-dotplot090601-dotplot
090601-dotplot
 

Similar to 100610_blastclustalw

Im trying to run make qemu-nox In a putty terminal but it.pdf
Im trying to run  make qemu-nox  In a putty terminal but it.pdfIm trying to run  make qemu-nox  In a putty terminal but it.pdf
Im trying to run make qemu-nox In a putty terminal but it.pdf
maheshkumar12354
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
Yasuharu Nakano
 
MapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London MeetupMapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London Meetup
Landoop Ltd
 

Similar to 100610_blastclustalw (20)

Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!
 
lldb – Debugger auf Abwegen
lldb – Debugger auf Abwegenlldb – Debugger auf Abwegen
lldb – Debugger auf Abwegen
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Ruby gems
Ruby gemsRuby gems
Ruby gems
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
 
Im trying to run make qemu-nox In a putty terminal but it.pdf
Im trying to run  make qemu-nox  In a putty terminal but it.pdfIm trying to run  make qemu-nox  In a putty terminal but it.pdf
Im trying to run make qemu-nox In a putty terminal but it.pdf
 
Practical Testing of Ruby Core
Practical Testing of Ruby CorePractical Testing of Ruby Core
Practical Testing of Ruby Core
 
JSON and the APInauts
JSON and the APInautsJSON and the APInauts
JSON and the APInauts
 
JavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovyJavaSE7 Launch Event: Java7xGroovy
JavaSE7 Launch Event: Java7xGroovy
 
Profiling Ruby
Profiling RubyProfiling Ruby
Profiling Ruby
 
Tork03 LT
Tork03 LT Tork03 LT
Tork03 LT
 
A Self Replicating Serverless Function
A Self Replicating Serverless FunctionA Self Replicating Serverless Function
A Self Replicating Serverless Function
 
Advanced cocos2d
Advanced cocos2dAdvanced cocos2d
Advanced cocos2d
 
MapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London MeetupMapReduce with Scalding @ 24th Hadoop London Meetup
MapReduce with Scalding @ 24th Hadoop London Meetup
 
Cleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityCleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-Specificity
 
Cleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityCleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-Specificity
 
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
 
Data Types Master
Data Types MasterData Types Master
Data Types Master
 
Crystal - Statically Typed Ruby
Crystal - Statically Typed RubyCrystal - Statically Typed Ruby
Crystal - Statically Typed Ruby
 
Ruby on Rails Intro
Ruby on Rails IntroRuby on Rails Intro
Ruby on Rails Intro
 

More from ocha_kaneko

100506-unix-ensembl
100506-unix-ensembl100506-unix-ensembl
100506-unix-ensembl
ocha_kaneko
 
100422-intro,setup
100422-intro,setup100422-intro,setup
100422-intro,setup
ocha_kaneko
 
090615-TogoWS SOAP
090615-TogoWS SOAP090615-TogoWS SOAP
090615-TogoWS SOAP
ocha_kaneko
 
090608-TogoWS REST
090608-TogoWS REST090608-TogoWS REST
090608-TogoWS REST
ocha_kaneko
 
090518_unix-ensembl
090518_unix-ensembl090518_unix-ensembl
090518_unix-ensembl
ocha_kaneko
 
090511-intro, setup
090511-intro, setup090511-intro, setup
090511-intro, setup
ocha_kaneko
 

More from ocha_kaneko (7)

100506-unix-ensembl
100506-unix-ensembl100506-unix-ensembl
100506-unix-ensembl
 
100422-intro,setup
100422-intro,setup100422-intro,setup
100422-intro,setup
 
Statistics_R
Statistics_RStatistics_R
Statistics_R
 
090615-TogoWS SOAP
090615-TogoWS SOAP090615-TogoWS SOAP
090615-TogoWS SOAP
 
090608-TogoWS REST
090608-TogoWS REST090608-TogoWS REST
090608-TogoWS REST
 
090518_unix-ensembl
090518_unix-ensembl090518_unix-ensembl
090518_unix-ensembl
 
090511-intro, setup
090511-intro, setup090511-intro, setup
090511-intro, setup
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

100610_blastclustalw

  • 1. 2010/06/10   kaneko.satoko(at)ocha.ac.jp   
  • 2. BLAST CLUSTALW    
  • 3. BLAST CLUSTALW   TogoWS REST SOAP  (step )  (11):E‐value  
  • 4. (1)   blast_clustalw.rb    blast_clustalw.rb    $ ruby blast_clustalw.rb hsa:6469  (  has:6469 blast + clustalw     blast_clustalw.rb      step10.rb   step20.rb Blastp   step30.rb Blastp ID E‐value   step40.rb ID E‐value  E‐value   step50.rb   step60.rb ClustalW mulSple alignment  
  • 5. (2) step10.rb k.step10.txt    ‐ hsa:6469 ( ID kegg_id )  ‐blast_clustalw.rb 8‐12 get_aaseq   ‐  last_clustalw.rb b get_aaseq 79   #!/usr/bin/env ruby  require ‘open‐uri’ # 8 open URL REST   #  kegg_id  kegg_id = "hsa:6469";   #  kegg_id  aaseq  aaseq = open("hap://togows.dbcls.jp/entry/kegg‐genes/" + kegg_id + "/aaseq").read   #REST hap://togows.dbcls.jp/entry/kegg‐genes/has:6469/aaseq  # aaseq    #  aaseq  k.step10.txt  out = open("k.step10.txt","w")  out.puts aaseq  out.close    CotEditor  
  • 6. (3) step20.rb   Sonic Hedgehog query BLAST   ‐blast_clustalw.rb 15‐25   ‐ blast_clustalw.rb 81   #!/usr/bin/env ruby  require 'soap/wsdlDriver'  # step10.rb aaseq  aaseq = File.read("k.step10.txt”)  # SOAP blast  result_blast  wsdl_blast = "hap://togows.dbcls.jp/soap/wsdl/ddbj_blast.wsdl"  serv_blast = SOAP::WSDLDriverFactory.new(wsdl_blast).create_rpc_driver  program    = "blastp"  database   = "SWISS"  result_blast = serv_blast.DdbjBlastSearchSimple(program,database,aaseq)  # result_blast  k.step20.txt  out = open("k.step20.txt","w")  out.puts result_blast  out.close
  • 7. (4) step30.rb  BLAST clustalw   ‐ blast_clustalw.rb  27 47 84   #!/usr/bin/env ruby  #  step20.rb blast  result_blast  result_blast = File.read("k.step20.txt")  # result_blast  spid_hash  spid_hash = Hash.new #    # blast  line  result_blast.each_line do |line|    # blast sp  if line =~ /^sp|(.+)|(.+)s+.+s+[0‐9]+s+(.+)$/      spid = $1      # 1 () spid  spname = $2    # 2 () spname  evalue = $3    # 3 () evalue  if evalue =~ /^e/ #  evalue  e   evalue = “1.0” + evalue #  1.0       end  #   
  • 8.    # evalue  evalue_float  evalue_float = evalue.to_f      # spid_hash[spid]  name spname  evalue evalue_float  spid_hash[spid] = {:name=>spname, :evalue=>evalue_float}    end  end  #  spid_hash  k.step30.txt    # %s out = open("k.step30.txt","w");   spid_hash.each {|spid,value|    out.prinv("%s|%s|%sn",spid,value[:name],value[:evalue]);   }  out.close step20 blast k.step20.txt  ID e‐value   k.step30.txt     ‐ hsa:6469 ( ID kegg_id )  ‐blast_clustalw.rb 28‐47 parse_blast   ‐  last_clustalw.rb b get_aaseq 84  
  • 9. : step30.rb   ‐ if line =~ /^sp|(.+)|(.+)s+.+s+[0‐9]+s+(.+)$/   BLAST ID   sp   1 |   2 |   3       ^:  , |: |, .:  , +:  1 , s:  , $:  ,   ():  , []: []   Score E Sequences producing significant alignments: (bits) Value sp|Q15465|SHH_HUMAN Sonic hedgehog... 720 0.0 sp|Q62226|SHH_MOUSE Sonic hedgehog... 682 0.0 sp|Q63673|SHH_RAT Sonic hedgehog... 679 0.0 sp|Q91035|SHH_CHICK Sonic hedgehog... 605 e-172 sp|Q90385|SHH_CYNPY Sonic hedgehog... 510 e-144 spid spname evalue spid_hash[spid][:name] spid_hash[spid][:evalue]
  • 10. (11):E‐value   (ex. 0.0, e‐100 )    query E‐value query   ‐    *E‐value     *  
  • 11. (5) step40.rb Blast E‐value   Step30 k.step30.txt  E‐value   k.step40.txt   ‐ hsa:6469 ( ID kegg_id )  ‐blast_clustalw.rb 39‐43   ‐blast_clustalw.rb e‐value 6   #!/usr/bin/env ruby  #  min_evalue = 1e‐170  # step30.rb   #  spid_hash  lns_spid = File.read("k.step30.txt")  spid_hash = Hash.new  lns_spid.each_line do |line|    raise unless line =~ /^(.+)|(.+)|(.+)$/    spid = $1    spname = $2    evalue = $3    spid_hash[spid] =     {:name=>spname, :evalue=>evalue.to_f}  end #   
  • 12. # #  #  spid_hash.each {|spid,value|    #  if value[:evalue] > min_evalue then      spid_hash.delete(spid)   #  end           }  #  k.step40.txt  out = open("k.step40.txt","w");   spid_hash.each {|spid,value|    out.prinv("%s|%s|%sn",     spid,value[:name],value[:evalue]);   }  out.close 
  • 13. (6) step50.rb  Sonic Hedgehog   ‐ blast_clustalw.rb  49 59 87   #!/usr/bin/env ruby  require 'open‐uri’  #    #  spid_hash  lns_spid = File.read("k.step40.txt")  spid_hash = Hash.new  lns_spid.each_line do |line|    raise unless line =~ /^(.+)|(.+)|(.+)$/    spid = $1    spname = $2    evalue = $3    spid_hash[spid] = {:name=>spname, :evalue=>evalue.to_f}  end  #   
  • 14. # #  spid_hash  spid_hash.each {|spid,value|    #  uri = "hap://togows.dbcls.jp/entry/ebi‐uniprot/" + spid + "/seq”  # REST     value[:seq] = open(uri).read  }  #  fasta  out = open("k.step50.fa","w");   spid_hash.each {|spid,value|    out.prinv(">%s|%s|%sn",spid,value[:name],value[:evalue]);     out.prinv("%sn",value[:seq]);   }  out.close 
  • 15. (7) step60.rb  CLUSTALW alignment   Step50.rb  clustalw  SOAP   ‐ blast_clustalw.rb  61 75 90   #!/usr/bin/env ruby  require 'soap/wsdlDriver’  # fasta  query  query           = File.read("k.step50.fa")  # query  mulSple alignment wsdl_clustalw   = "hap://togows.dbcls.jp/soap/wsdl/ddbj_clustalw.wsdl"  serv_clustalw   = SOAP::WSDLDriverFactory.new(wsdl_clustalw).create_rpc_driver  param           = "‐align ‐matrix=blosum ‐gapdist=8 ‐maxdiv=40 ‐outorder=aligned ‐ pwmatrix=blosum”  # SOAP CLUSTALW   result_clustalw = serv_clustalw.DdbjClustalwAnalyzeParam(query,param)  #  k.step60.txt  out = open("k.step60.txt","w");   out.puts result_clustalw out.close
  • 16. (8) blast_clustalw.rb   blast_clustalw.rb  77‐97 Step10‐60   shiy    # ID hsa:6469 # step10.rb    # step20.rb  #step30.rb step40.rb  #step50.rb  #step60.rb  #  auto.txt 
  • 17. blast_clustalw.rb   1)  hsa:6469 MIN_EVALUE ( 1.0e‐140, 1.0e‐120,   1.0e‐100 ) mulSple alignment ( )   2) rat Olr1082 mulSple alignment human mouse   ortholog   ‐    rat Olr1082 UniProt ID   REST Entry retrieval UniProt KEGG ID   blast_clustalw.rb (MIN_EVALUE 1.0e‐100)  mulSple alignment ortholog   Ensembl Synteny ortholog
  • 18. SOAP REST