class MyWorkerEst
Public Instance Methods
blastEST(array_seqs)
click to toggle source
CUSTOM FUNCTIONS
# File lib/full_lengther_next/my_worker_EST.rb, line 30 def blastEST(array_seqs) blast = run_blast(array_seqs, @blast_path, 'blastn', 1e-6, nil, FALSE) if blast.nil? $LOG.info 'BLAST FAILED' Process.exit(-1) else blast_analysis(blast, array_seqs) end end
blast_analysis(blast, array_seqs)
click to toggle source
# File lib/full_lengther_next/my_worker_EST.rb, line 40 def blast_analysis(blast, array_seqs) blast.querys.each_with_index do |query, i| if query.hits.first.nil? if !array_seqs[i].type == CODING #Keep if is coding @unmatch << array_seqs[i] end else seq = array_seqs[i] seq.hit = query.hits.first @match << seq end end end
process_object(array_seqs)
click to toggle source
# File lib/full_lengther_next/my_worker_EST.rb, line 19 def process_object (array_seqs) $WORKER_LOG.info "Worker LIST #{array_seqs.length}" array_seqs.sort!{|s1, s2| s2.t_code <=> s1.t_code} #Order by testcode blastEST(array_seqs) return [@match, @unmatch] end
receive_initial_config(params)
click to toggle source
WORKER FUNCTIONS
# File lib/full_lengther_next/my_worker_EST.rb, line 11 def receive_initial_config(params) # Reads the parameters @options = params.first @blast_path = params.last @match = [] # Any sequence matching with a EST @unmatch = [] # Sequences with :test_code annotation that it hasn't match with a EST end