SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
X X ∩Y                 Y


                                    p(x, y)
I(X; Y ) =             p(x, y) log
                                   p(x)p(y)
             y∈Y x∈X




      |X ∩ Y |
    min(|X|, |Y |)
$ curl quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?
db=pubmed&term=CDK2quot;

<?xml version=quot;1.0quot;?>
<!DOCTYPE eSearchResult PUBLIC quot;-//NLM//DTD eSearchResult, 11 May
2002//ENquot; quot;http://www.ncbi.nlm.nih.gov/entrez/query/DTD/
eSearch_020511.dtdquot;>
<eSearchResult>
        <Count>3778</Count>
        <RetMax>20</RetMax>
        <RetStart>0</RetStart>
        <IdList>
                 <Id>17904841</Id>
                 <Id>17904366</Id>
                 <Id>17893107</Id>
()
</eSearchResult>
$ curl quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?
db=pubmed&term=CDK6quot;

()
<eSearchResult>
        <Count>740</Count>
        <RetMax>20</RetMax>
        <RetStart>0</RetStart>
()
</eSearchResult>




$ curl quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?
db=pubmed&term=CDK2+CDK6quot;

()
<eSearchResult>
        <Count>321</Count>
        <RetMax>20</RetMax>
        <RetStart>0</RetStart>
()
</eSearchResult>
321
  |X ∩ Y |
                 =
min(|X|, |Y |)       min(3778, 740)
                     321
                 =       = 0.438
                     740
$ ruby simpson.rb CDK2 CDK6

CDK2   CDK6    3778    742    321   0.432614555256065
#!/usr/bin/env ruby

require 'rexml/document'
require 'open-uri'

def count(gene)
  fp = open(quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?
db=pubmed&term=quot;+gene)
  source = fp.read
  fp.close
  doc = REXML::Document.new source
  return doc.elements['/eSearchResult/Count'].text.to_i
end

def simpson(gene1_count, gene2_count, gene12_count)
  if gene1_count <= 0 || gene2_count <= 0
    return nil
  elsif gene1_count < gene2_count
    return gene12_count.to_f / gene1_count.to_f
  end
  return gene12_count.to_f / gene2_count.to_f
end
def main(gene1,gene2)
  gene1_count = count(gene1)
  gene2_count = count(gene2)
  gene12_count = count(gene1 + quot;+quot; + gene2)
  s = simpson(gene1_count, gene2_count, gene12_count)
  puts [gene1, gene2, gene1_count, gene2_count, gene12_count, s].join
(quot; quot;)
end

main(ARGV[0],ARGV[1])
bioinfolec7th20071005
bioinfolec7th20071005

Weitere ähnliche Inhalte

Was ist angesagt?

MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
Takahiro Inoue
 

Was ist angesagt? (9)

ONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEMONLINE STUDENT MANAGEMENT SYSTEM
ONLINE STUDENT MANAGEMENT SYSTEM
 
MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤MongoDBで作るソーシャルデータ新解析基盤
MongoDBで作るソーシャルデータ新解析基盤
 
jQuery Datatables With MongDb
jQuery Datatables With MongDbjQuery Datatables With MongDb
jQuery Datatables With MongDb
 
Phpfunction
PhpfunctionPhpfunction
Phpfunction
 
Fantastic caches and where to find them
Fantastic caches and where to find themFantastic caches and where to find them
Fantastic caches and where to find them
 
自己的JVM自己救: 解救 OOM 實務經驗談 (JCConf 2015)
自己的JVM自己救: 解救 OOM 實務經驗談  (JCConf 2015)自己的JVM自己救: 解救 OOM 實務經驗談  (JCConf 2015)
自己的JVM自己救: 解救 OOM 實務經驗談 (JCConf 2015)
 
Save JVM by Yourself: Real War Experiences of OOM
Save JVM by Yourself: Real War Experiences of OOMSave JVM by Yourself: Real War Experiences of OOM
Save JVM by Yourself: Real War Experiences of OOM
 
Power Shell Commands
Power Shell CommandsPower Shell Commands
Power Shell Commands
 
Hadoop, HDFS, MapReduce and Pig
Hadoop, HDFS, MapReduce and PigHadoop, HDFS, MapReduce and Pig
Hadoop, HDFS, MapReduce and Pig
 

Andere mochten auch (7)

Mc dermottdaniel vis1
Mc dermottdaniel vis1Mc dermottdaniel vis1
Mc dermottdaniel vis1
 
Trabajo COMPUTACION
Trabajo COMPUTACIONTrabajo COMPUTACION
Trabajo COMPUTACION
 
Fichas sanantonio
Fichas sanantonioFichas sanantonio
Fichas sanantonio
 
Helgeland Sparebank, regnskapspresentasjon 3. kvartal 2012
Helgeland Sparebank, regnskapspresentasjon 3. kvartal 2012Helgeland Sparebank, regnskapspresentasjon 3. kvartal 2012
Helgeland Sparebank, regnskapspresentasjon 3. kvartal 2012
 
Business communication
Business communicationBusiness communication
Business communication
 
Medidas de tendencia central
Medidas de tendencia centralMedidas de tendencia central
Medidas de tendencia central
 
BiologyExchange.co.uk Shared Resource
BiologyExchange.co.uk Shared ResourceBiologyExchange.co.uk Shared Resource
BiologyExchange.co.uk Shared Resource
 

Ähnlich wie bioinfolec7th20071005

bioinfolec_5th_20070713
bioinfolec_5th_20070713bioinfolec_5th_20070713
bioinfolec_5th_20070713
sesejun
 
bioinfolec_20070706 4th
bioinfolec_20070706 4thbioinfolec_20070706 4th
bioinfolec_20070706 4th
sesejun
 
20070407 Rit2007 Xmltype Samokhvalov
20070407 Rit2007 Xmltype Samokhvalov20070407 Rit2007 Xmltype Samokhvalov
20070407 Rit2007 Xmltype Samokhvalov
Nikolay Samokhvalov
 
Itsecteam shell
Itsecteam shellItsecteam shell
Itsecteam shell
ady36
 

Ähnlich wie bioinfolec7th20071005 (20)

bioinfolec_5th_20070713
bioinfolec_5th_20070713bioinfolec_5th_20070713
bioinfolec_5th_20070713
 
bioinfolec_20070706 4th
bioinfolec_20070706 4thbioinfolec_20070706 4th
bioinfolec_20070706 4th
 
Redis 101
Redis 101Redis 101
Redis 101
 
20070407 Rit2007 Xmltype Samokhvalov
20070407 Rit2007 Xmltype Samokhvalov20070407 Rit2007 Xmltype Samokhvalov
20070407 Rit2007 Xmltype Samokhvalov
 
ACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
ACM Bay Area Data Mining Workshop: Pattern, PMML, HadoopACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
ACM Bay Area Data Mining Workshop: Pattern, PMML, Hadoop
 
Latest java
Latest javaLatest java
Latest java
 
RCEC Email 3.5.03
RCEC Email 3.5.03RCEC Email 3.5.03
RCEC Email 3.5.03
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
 
CAR Email 6.5.02 (d)
CAR Email 6.5.02 (d)CAR Email 6.5.02 (d)
CAR Email 6.5.02 (d)
 
Php
PhpPhp
Php
 
Ajax и будущее Java Script
Ajax и будущее Java ScriptAjax и будущее Java Script
Ajax и будущее Java Script
 
D3.js workshop
D3.js workshopD3.js workshop
D3.js workshop
 
Let's build a parser!
Let's build a parser!Let's build a parser!
Let's build a parser!
 
Os Pruett
Os PruettOs Pruett
Os Pruett
 
Send.php
Send.phpSend.php
Send.php
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
 
Hidden treasures of Ruby
Hidden treasures of RubyHidden treasures of Ruby
Hidden treasures of Ruby
 
Itsecteam shell
Itsecteam shellItsecteam shell
Itsecteam shell
 
20190907 Julia the language for future
20190907 Julia the language for future20190907 Julia the language for future
20190907 Julia the language for future
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

bioinfolec7th20071005

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. X X ∩Y Y p(x, y) I(X; Y ) = p(x, y) log p(x)p(y) y∈Y x∈X |X ∩ Y | min(|X|, |Y |)
  • 8. $ curl quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi? db=pubmed&term=CDK2quot; <?xml version=quot;1.0quot;?> <!DOCTYPE eSearchResult PUBLIC quot;-//NLM//DTD eSearchResult, 11 May 2002//ENquot; quot;http://www.ncbi.nlm.nih.gov/entrez/query/DTD/ eSearch_020511.dtdquot;> <eSearchResult> <Count>3778</Count> <RetMax>20</RetMax> <RetStart>0</RetStart> <IdList> <Id>17904841</Id> <Id>17904366</Id> <Id>17893107</Id> () </eSearchResult>
  • 9. $ curl quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi? db=pubmed&term=CDK6quot; () <eSearchResult> <Count>740</Count> <RetMax>20</RetMax> <RetStart>0</RetStart> () </eSearchResult> $ curl quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi? db=pubmed&term=CDK2+CDK6quot; () <eSearchResult> <Count>321</Count> <RetMax>20</RetMax> <RetStart>0</RetStart> () </eSearchResult>
  • 10. 321 |X ∩ Y | = min(|X|, |Y |) min(3778, 740) 321 = = 0.438 740
  • 11.
  • 12.
  • 13. $ ruby simpson.rb CDK2 CDK6 CDK2 CDK6 3778 742 321 0.432614555256065
  • 14. #!/usr/bin/env ruby require 'rexml/document' require 'open-uri' def count(gene) fp = open(quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi? db=pubmed&term=quot;+gene) source = fp.read fp.close doc = REXML::Document.new source return doc.elements['/eSearchResult/Count'].text.to_i end def simpson(gene1_count, gene2_count, gene12_count) if gene1_count <= 0 || gene2_count <= 0 return nil elsif gene1_count < gene2_count return gene12_count.to_f / gene1_count.to_f end return gene12_count.to_f / gene2_count.to_f end
  • 15. def main(gene1,gene2) gene1_count = count(gene1) gene2_count = count(gene2) gene12_count = count(gene1 + quot;+quot; + gene2) s = simpson(gene1_count, gene2_count, gene12_count) puts [gene1, gene2, gene1_count, gene2_count, gene12_count, s].join (quot; quot;) end main(ARGV[0],ARGV[1])