Michael Barton RSS

Archive

Jun
16th
Mon
permalink
permalink
Jun
3rd
Tue
permalink

Example bioinformatics data validations

validates_true_for :alignment, :logic => lambda {

  re = Regexp.new(/\d+\s\d+/) ! re.match(alignment) },

  :message => 'Alignment field should not contain alignment count and length'

validates_format_of :alignment,

  :with => /F(Y[A-Z]{2}\d{3}[CW](-[AB])?)/,

  :message => 'Alignment should contain an S. cerevisiae gene'

permalink

Example bioinformatics log file

W, [2008-06-03T11:29:39.719022 #29112]  WARN — : Load gene: Q0075 is not a valid coding ORF


W, [2008-06-03T11:29:40.642888 #29112]  WARN — : Load alignment: No yeast ORF found in MYBR098W alignment


W, [2008-06-03T11:29:42.254248 #29112]  WARN — : Load alignment: YDR474C is not a verified ORF


W, [2008-06-03T11:29:42.585707 #29112]  WARN — : Load alignment: YER087C-A is not a verified ORF

May
29th
Thu
permalink
permalink
May
19th
Mon
permalink

Simple Ruby markdown script using BlueCloth and RubyPants

#!/usr/local/bin/ruby

require 'rubygems'
require 'bluecloth'
require 'rubypants'

puts RubyPants.new(BlueCloth.new(File.open(ARGV.shift).read).to_html).to_html

May
8th
Thu
permalink

Yeast gene reqular expression

Y[A-Z]{2}\d{3}[CW](-[AB])?

Revisions welcome

May
4th
Sun
permalink

Git pull messages show you your hard work

Updating 60661c5..f7326c6
Fast forward
 .gitignore            |    2 ++
 Rakefile              |   22 ++++++++++++++++++++++
 analysis/project.rake |   28 ++++++++++++++++++++++++++++
 config/environment.rb |   16 ++++++++++++++++
 controller/main.rb    |    8 +++++++-
 model/project.rb      |   12 ++++++++++++
 start.rb              |   16 +++-------------
 view/index.haml       |   10 ++++++++++
 8 files changed, 100 insertions(+), 14 deletions(-)