Jun
3rd
Tue
3rd
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'