Permalink
Browse files

Fixed sample code in README

  • Loading branch information...
1 parent d272bff commit dbfd85fd7ac365e672938ff4f60cd6b2937d0ce9 @nakao committed Jul 22, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 README.md
View
@@ -92,7 +92,7 @@ Getting Started with Ruby
# =========================================================
# 1. Use UniProt accession to get target details
# =========================================================
- ";
+ "
accession = "Q00534"
target = BioChEMBL::Target.find_by_uniprot(accession)
@@ -106,11 +106,11 @@ Getting Started with Ruby
# =========================================================
# 2. Get all bioactivties for target CHEMBL_ID
# =========================================================
- ";
+ "
bioactivities = target.bioactivities
- puts "Bioactivity count: #{bioacitivites.size}"
+ puts "Bioactivity count: #{bioactivities.size}"
puts "Bioactivity count (IC50's): #{bioactivities.find_all {|x| x.bioactivity__type =~ /IC50/}.size}"
@@ -119,7 +119,7 @@ Getting Started with Ruby
# =========================================================
# 3. Get compounds with high binding affinity (IC50 < 100)
# =========================================================
- ";
+ "
bioactivities.find_all {|x| x.bioactivity__type =~ /IC50/ and x.value.to_i < 100 }.each do |ba|
compound = ba.parent_compound
@@ -132,7 +132,7 @@ Getting Started with Ruby
# =========================================================
# 4. Get assay details for Ki actvity types
# =========================================================
- ";
+ "
bioactivities.find_all {|x| x.bioactivity__type =~ /Ki/i }.each do |ba|
assay = ba.assay

0 comments on commit dbfd85f

Please sign in to comment.