| Class | Bio::Alignment::FactoryTemplate::Simple |
| In: |
lib/bio/alignment.rb
(CVS)
|
| Parent: | Object |
Template class for alignment application factory. The program acts: input: stdin or file, format = fasta format output: stdout (parser should be specified by DEFAULT_PARSER)
| command | [R] | Last command-line string. Returns nil or an array of String. Note that filenames described in the command-line may already be removed because these files may be temporary files. |
| data_stdout | [RW] | Last output to the stdout. |
| exit_status | [R] | Last exit status |
| options | [RW] | options |
| output | [R] | Last raw result of the program. Return a string (or nil). |
| program | [RW] | program name |
| report | [R] | Last result object performed by the factory. |
Executes the program. If seqs is not nil, perform alignment for seqs. If seqs is nil, simply executes the program.
Compatibility note: When seqs is nil, returns true if the program exits normally, and returns false if the program exits abnormally.
# File lib/bio/alignment.rb, line 2271 def query(seqs) if seqs then query_alignment(seqs) else exec_local(@options) @exit_status.exitstatus == 0 ? true : false end end
alias of query_alignment.
Compatibility Note: query_align will renamed to query_alignment.
# File lib/bio/alignment.rb, line 2292 def query_align(seqs) #warn 'query_align is renamed to query_alignment.' query_alignment(seqs) end
Performs alignment for seqs. seqs should be Bio::Alignment or Array of sequences or nil.
# File lib/bio/alignment.rb, line 2282 def query_alignment(seqs) unless seqs.respond_to?(:output_fasta) then seqs = Bio::Alignment.new(seqs) end query_string(seqs.output_fasta(:width => 70)) end
Performs alignment of sequences in the file named fn.
# File lib/bio/alignment.rb, line 2305 def query_by_filename(filename_in) _query_local(filename_in, @options) @report end