[BioRuby] help to understand the codes

chen li chen_li3 at yahoo.com
Fri Jun 19 15:21:27 UTC 2009

Hi Tomoaki,
 Thank you for the info.
 Now I think I understand much better about the codes: What the script does is to search a stretch  nts of 23 bp and check if it fits the rules: the first two nts and the last two nts are actually the overhanged nts and 
the middle part is the core of the sirna.
 One more question:
 When I read method # uitei?(target) I see an instant variable called @target_size but it is defined in another method # design(rule='uitei').
 Since Ruby reads codes from top to bottom, isn't' it better to define #design(rule='uitei') first  then followed by # uitei?(target)? Or it is just personal preference?
 # Ui-Tei's rule.
    def uitei?(target)    
       ...line code....
      start_pos  = @target_size - one_third - 1      
      return true
    #  rule can be one of 'uitei' (default) and 'reynolds'.
    def design(rule = 'uitei')
      @target_size = @antisense_size + 2
      ....line code....     


More information about the BioRuby mailing list