Try our Gene Validation Tool

We are on the second half of the development period and the structure of the code looks like this:

 
If you have doubts about some genes you use in your analysis or you are just curios about the progress of our project, try the steps described below:

* How to use the tool at this point:   

    1. Prerequisite: ncbi blast >=2.2 and R >= 2.14.2

    2. Get the source code
$ git clone git@github.com:monicadragan/GeneValidator.git
    3. Be sudo and build the gem

$ sudo rake
    4. Run GeneValidation
$ genevalidatior [-x xml_file_path]
[-r raw_seq_file_path] fasta_file_path

Example:
$ genevalidator -x data/all_validations_prot/all_validations_prot.xml data/all_validations_prot/all_validations_prot.fasta -r data/all_validations_prot/all_validations_prot.xml.raw_seq


This will provide validation results in yaml and html format, at the same path with your input file. In html format you can visualize the plots and histograms for certain statistics used in the validation steps.

Other things:
 
    5. Run unit tests

$ rake test

     6. Generate documentation

$ rake doc
 
* How to add a new validation (3 steps)
Steps 1 and 2: Each validation is defined by 2 extended classes:
(1)- extend ValidatioReport - stores the output of the validation test and some methods used for data representation (validation, print, color)
(2)- extend ValidationTest ('run' method must be overloaded, run must return ValidationReport class type,  some fields have to be updated: the validation name used in the header, description, plot_files)
Step 3:  Add the validation to the validations list, which is further processed for yaml/html/console visualization

Code:
validations = []
validations.push LengthClusterValidation.new(@type, prediction, hits, plot_path, plots)
 ...
validations.push YourValidationClass(@type, prediction, hits, other_arguments)

# check the class type of the elements in the list
# this will raise an error if YourValidationClass does not extend ValidationTest validations.map do |v|
  raise ValidationClassError unless v.is_a? ValidationTest
end

# run validations
validations.map{|v| v.run}

# check the class type of the validation reports
# this will raise an error if the run method of YourValidationClass does not return ValidationReport
validations.map do |v|
  raise ValidationClassError unless v.validation_report.is_a? ValidationReport
end


Hope this was helpful and we look forward to your feedback!

0 comments:

Post a Comment