Page Tools:

Ruby Programming for Medicine and Biology

Author(s): Jules J. Berman, PhD, MD
  • ISBN-13: 9780763750909
  • ISBN-10:0763750905
  • Paperback    378 pages      © 2008
Price: $138.95 US List
Add to Cart Request a Review Copy


Once again, Jules J. Berman provides biomedical researchers and hospital professionals with an introduction to a time-saving programming language.  In this new how-to manual, Berman expertly guides  both experienced and inexperienced programmers through the Ruby programming language.  Ruby Programming for Medicine and Biology opens with three chapters of Ruby language instruction followed by discussions of 100 ruby scripts covering the most common computational tasks in the field of biomedicine.  With helpful explanations of how scripts work, and how they might be implemented in real-world situations, readers will become familiar with this free, open source, object-oriented programming language that is quickly gaining momentum within the bioinformatics community.

Interested in becoming a Biomedical Informatics Series author?  Click HERE to learn more!

0.1. Background
0.2. Choosing a Programming Language
0.3. Is Ruby Likely to Grow in Importance Over the Next Few Years?
0.4. The Common Computational Tasks of Biology and Medicine
0.5. How to Read this Book
0.6. Acknowledgments
Nota Bene
Author Biography

Chapter 1. Overview of the Ruby Language (Level 1)
1.1. Background
1.2. A Quick Peek at Ruby
1.3. Getting Screen Input
1.4. A Simple Ruby Script
1.5. A Ruby Script with Class Definition
1.6. Chapter Conclusion

Chapter 2. Survey of Ruby Classes and the Ruby Standard Library (Level 1)
2.1. Background
2.2. Downloading and Installing Ruby
2.3. Objects and Ruby Scripts
2.4. Instance Methods and Class Methods
2.5. Ruby Classes
2.6. Class String
2.7. Class Array
2.8. Class Hash
2.9. Classes File And IO
2.10. Class Dir
2.11. Class Numeric
2.12. Class Time

Chapter 3. Object Orientation in Ruby (Level 2)
3.1. Background
3.2. Ruby Upper Level Hierarchy
3.3. Inheritance, Polymorphism, Encapsulation, and Abstraction
3.4. Modules, Namespaces and Mixins
3.5. Composition (Layering, Aggregation, Delegation)
3.6. Who am I Really? Reflection on Ruby Classes and Objects

Chapter 4. Ruby Extensions and Standard Libraries (Level 2)
4.1. Background
4.2. Selected Ruby Standard Libraries
4.3. Downloading Ruby Gems
4.4. Converting Ruby Scripts to Executable Files

Chapter 5. Biomedical Data Files Used in Later Chapters (Level 1)
5.1. Background
5.2. Downloading Biomedical Data Files
5.3. Text Records: OMIM, The Online Mendelian Inheritance In Man
5.4. Text Records: Pubmed Download Files
5.5. Comma-delimited Data Files: Census Data Example
5.6. Byte-designated Data Files: SEER Data Example
5.7. UMLS Metathesaurus
5.8. An SQL File, The Foundational Model Of Anatomy
5.9. Neoplasm Classification (an XML File)
5.10. Structured Text: Mesh (MEedical Subject Headings)
5.11. Structured Text: Taxonomy
5.12. RDF Syntax File, Gene Ontology (GO)
5.13. RDF Schema File: Dublin Core RDFS
5.14. Image Files: JPEG and DICOM Files

Chapter 6. Using Ruby Strings, Hashes, Arrays, Files and Directories (Level 1)
6.1. Background
6.2. Reading a Little Bit of a File (regardless of its Size)
6.3. A File Zipf Distribution in 4 Lines of Ruby Code
6.4. Extracting SNOMED Terms from the UMLS
6.5. Selecting a Subset of SNOMED Terms Using MRSTY
6.6. Creating a Persistent Database Object (using Ruby SDBM)
6.7. Retrieving Information from a Persistent Database Object

Chapter 7. Pattern Searching With Regular Expressions (Level 1)
7.1. Background
7.2. Pseudocode for Common Uses of Regex (Regular Expression Pattern Matching)
7.3. A Regex Example
7.4. Regular Expression Modifiers and Examples
7.5. Using Ruby Regular Expressions
7.6. A Simple Script for File Searching Using Regex
7.7. Sample Project: Extracting Email Addresses from a Pubmed Search

Chapter 8. File/Dataset Transformations (Level 1)
8.1. Background
8.2. ASCII Characters
8.3. Converting Binary to Base64
8.4. Copying Files From One Directory to Another
8.5. Converting DICOM to JPEG Image Files
8.6. Extracting and Inserting JPEG and DICOM Image Headers
8.7. Sample Project: Creating an Excel-compatible Spreadsheet from Pubmed Data

Chapter 9. Indexing Text (Level 1)
9.1. Background
9.2. Concordance
9.3. Indexes

Chapter 10. Searching and Mining Data (Level 1)
10.1. Background
10.2. Finding Needles Fast Using a Binary-tree Search of the Haystack
10.3. Sorting Large Files, Quickly
10.4. Extracting Terms From The Functional Model Of Anatomy's SQL Database
10.5. United States Census Data

Chapter 11. Scrubbing Confidential Medical Data (Level 1)
11.1. Background
11.2. Scrubbing Text Using the Doublet Algorithm

Chapter 12. Autocoding Biomedical Data Using Nomenclatures (Level 3)
12.1. Background
12.2. Doublet Algorithm for a Fast Lexical Autocoder
12.3. Classy Autocoder
12.4. Collecting the ICD Codes from the UMLS Metathesaurus
12.5. Analysis of the SEER Public Use Data Sets

Chapter 13. Some Mathematical and Statistical Methods (Level 2)
13.1. Background
13.2. Cumulative Addition
13.3. Class Math
13.4. Math Standard Libraries
13.5. Fibonacci Series
13.6. Statistics
13.7. Computing The Standard Deviation From An Array Of Numbers
13.8. Using Random Numbers
13.9. Resampling and Monte Carlo Statistics
13.10. How Often Can I Have a Bad Day?

Chapter 14. Cryptography and Deidentification (Level 2)
14.1. Background
14.2. Using the Standard Library, Digest
14.3. Anonymization Using One-way Hashing Algorithms
14.4. One-way Hash Weaknesses: Dictionary Attacks and Collisions
14.5. The Threshold Protocol
14.6. Implementation of the Threshold Protocol

Chapter 15. Common Gateway Interface, CGI (Level 4)
15.1. Background
15.2. CGI Scripts
15.3. Security Considerations
15.4. CGI Programming as a  Modest Introduction to Distributed Computing

Chapter 16. Enter Ruby On Rails (Level 4)
16.1. Background
16.2. Installing Ruby On Rails
16.3. Step-by-step Ruby On Rails Example
16.4. ROR.

Chapter 17. The Bioinformatics Library, Bio and Ruby (Level 3)
17.1. Background
17.2. Installing Bio and BioRuby
17.3. Sample Hack

Chapter 18. Ruby and RDF (Level 3)
18.1. Background
18.2. The Limitations of XML
18.3. The Value of RDF
18.4. Statements of Meaning
18.5. RDF Triples
18.6. RDF Schemas
18.7. Properties (the Other Half of the RDF Schema)
18.8. The Differences Between Classes and Properties
18.9. Creating Instances of Classes
18.10. Preserving Namespaces for Classes and Properties
18.11. Validating RDF
18.12. RDF, Semantic Logic and Biomedical Ontologies
18.13. Data Specifications Contrasted with Data Standards
18.14. Parsing an RDF Document with Ruby
18.15. Sample Textual Annotation
18.16. Five Options for Preparing an Rdf Specification for an Image Object
18.17. Option One: RDF Document with Pointer to Image File
18.18. Option Two: RDF Document Containing Image Binary Converted to Base64 ASCII
18.19. Converting a JPEG (Binary) Image File to Base64
18.20. Option Three: Inserting an RDF Document into a JPEG Header
18.21. Option Four: Specifying an Image with Multiple RDF Files
18.22. Option Five: Specifying Multiple Image Files and Multiple RDF Documents
18.23. Porting Between Data Specifications and Data Standards
18.24. Chapter Summary

Chapter 19. Ruby and Biological Classifications (Level 3)
19.1. Background
19.2. Computing Ancestry in Taxonomy.dat
19.3. Parsing XML Files with REXML

Chapter 20. Book Summary (Level 3)
20.1. Background
20.2. Recommendations for Simple Ruby Scripts
20.3. Short Ruby Scripts Solve Common Tasks
20.4. Adding Classes Increases Complexity
20.5. Avoid Creating Polymorphic Methods or Over-riding Existing Class Methods
20.6. Never Use Mixins as a Work-around to Multi-class Inheritance
20.7. Model Ruby Classes Along the Same Principles as Biological Classifications
20.8. Whenever Possible, Rely on Built-in Ruby Classes and Methods in Your Scripts
20.9. Use Comment Lines and RDoc to Fully Document Your Class Libraries
20.10. Write Command-line Programs
20.11. Choose Names that Describe the Object Represented by the Name
20.12. Avoid Multi-purpose Scripts
20.13. Ensure that Your Scripts are Sufficiently Fast for Their Intended Purposes
20.14. If Possible, Create New Scripts from Pre-existing Working Scripts

References (Commented)
List of Ruby Scripts

Jules J. Berman, PhD, MD

Jules Berman received his bachelor's degrees in Mathematics and Earth and Planetary Sciences from Massachusetts Institute of Technology, his Ph.D. from Temple University, and his M.D. from the University of Miami.  He received post-doctoral training in the Laboratory of Experimental Pathology in the National Cancer Institute, at NIH.  He received residency training at the George Washington University Medical Center and is board certified in anatomic pathology and in cytopathology.  He served as the chief of anatomic pathology at the VA Hospital in Baltimore where he held adjunct appointments at Johns Hopkins Medical Center and the University of Maryland Medical Center.  From 1998 to 2005 he was program director for Pathology Informatics in the Cancer Diagnosis Program at the National Cancer Institute.  Jules Berman has first-authored more than 100 publications.  He is now a free-lance author and the past President of the Association for Pathology Informatics.



Additional Titles by this Author
Please contact your sales rep to order.

Complete Ruby Scripts


Click on the link below to download the complete Ruby scripts for Ruby Programming for Medicine and Biology.


Complete Ruby Scripts