class GffToProteinDBTool
Attributes
print_progress[RW]
Public Class Methods
new(option_support=[])
click to toggle source
Initializes commandline options common to all such tools. Individual search tools can add their own options, but should use Capital letters to avoid conflicts
Calls superclass method
Tool::new
# File lib/protk/gff_to_proteindb_tool.rb, line 23 def initialize(option_support=[]) super(option_support) if ( option_support.include? :add_transcript_info ) add_boolean_option(:add_transcript_info,false,['--info','Include CDS Coordinates']) end @option_parser.summary_width=40 @capturing_gene=false @current_gene=nil end
Public Instance Methods
get_lines_matching(pattern,gene_lines)
click to toggle source
# File lib/protk/gff_to_proteindb_tool.rb, line 46 def get_lines_matching(pattern,gene_lines) match_lines=[] gene_lines.each do |line| if line =~ pattern match_lines << line end end match_lines end
start_new_gene(line)
click to toggle source
# File lib/protk/gff_to_proteindb_tool.rb, line 36 def start_new_gene(line) if (line =~ /maker\sgene/) new_gene = line.match(/ID=([^;]+)/).captures[0] if new_gene!=@current_gene @current_gene=new_gene return true end end end