Class: Unipept::Commands::Prot2pept

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/prot2pept.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#root_commandObject (readonly)

Returns the value of attribute root_command.



3
4
5
# File 'lib/commands/prot2pept.rb', line 3

def root_command
  @root_command
end

#valid_formatsObject (readonly)

Returns the value of attribute valid_formats.



3
4
5
# File 'lib/commands/prot2pept.rb', line 3

def valid_formats
  @valid_formats
end

Class Method Details

.run(args) ⇒ void

This method returns an undefined value.

Invokes the uniprot command-line tool with the given arguments.

Parameters:

  • args (Array<String>)

    An array of command-line arguments



57
58
59
# File 'lib/commands/prot2pept.rb', line 57

def self.run(args)
  @root_command.run(args)
end

.split(protein, pattern) ⇒ Object



48
49
50
# File 'lib/commands/prot2pept.rb', line 48

def self.split(protein, pattern)
  protein.tr('*', "\n").gsub(pattern, "\\1\n\\2").gsub(pattern, "\\1\n\\2").split("\n").reject(&:empty?)
end