Class: GalaxyUtil

Inherits:
Object
  • Object
show all
Defined in:
lib/protk/galaxy_util.rb

Class Method Summary collapse

Class Method Details

.decode_galaxy_string!(mstring) ⇒ Object

Galaxy changes things like @ to __at__ we need to change it back



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/protk/galaxy_util.rb', line 28

def self.decode_galaxy_string!(mstring)
    mstring.gsub!("__at__","@")
    mstring.gsub!("__oc__","{")
    mstring.gsub!("__cc__","}")
    mstring.gsub!("__ob__","[")
    mstring.gsub!("__cb__","]")
    mstring.gsub!("__gt__",">")
    mstring.gsub!("__lt__","<")
    mstring.gsub!("__sq__","'")
    mstring.gsub!("__dq__","\"")
    mstring.gsub!("__cn__","\n")
    mstring.gsub!("__cr__","\r")
    mstring.gsub!("__tc__","\t")
    mstring.gsub!("__pd__","#")

    # For characters not allowed at all by galaxy
    mstring.gsub!("__pc__","|")

    mstring
end

.for_galaxy?Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/protk/galaxy_util.rb', line 9

def self.for_galaxy?    
  fg = ARGV[0]=="--galaxy"
  ARGV.shift if fg
  fg
end

.stage_fasta(input_path, options = {}) ⇒ Object



20
21
22
23
# File 'lib/protk/galaxy_util.rb', line 20

def self.stage_fasta(input_path,options={})
  options = { :extension => '.fasta', :force_copy => false }.merge(options)
  GalaxyStager.new(input_path, options )
end

.stage_pepxml(input_pepxml_path, options = {}) ⇒ Object



15
16
17
18
# File 'lib/protk/galaxy_util.rb', line 15

def self.stage_pepxml(input_pepxml_path,options={})
  options = { :extension => '.pep.xml', :force_copy => false }.merge(options)
  GalaxyStager.new(input_pepxml_path, options )
end