Method: Bio::EMBOSS#exec
- Defined in:
- lib/bio/appl/emboss.rb
#exec ⇒ Object
A Bio::EMBOSS object has to be executed before it can return any result.
obj_A = Bio::EMBOSS.new('transeq -sbegin 110 -send 1171 embl:xlrhodop')
puts obj_A.result #=> nil
obj_A.exec
puts obj_A.result #=> a FASTA-formatted sequence
obj_B = Bio::EMBOSS.new('showfeat embl:xlrhodop')
obj_B.exec
puts obj_B.result
146 147 148 149 150 151 152 153 154 |
# File 'lib/bio/appl/emboss.rb', line 146 def exec begin @io = IO.popen(@cmd_line, "w+") @result = @io.read return @result ensure @io.close end end |