Method: PepXML#type_from_base_name

Defined in:
lib/protk/pepxml.rb

#type_from_base_name(basename) ⇒ Object



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/protk/pepxml.rb', line 102

def type_from_base_name(basename)
  # A common error is for tools to include the extension in the base_name attribute.
  # We exploit this to guess the type
  ext_guess=""
  case basename
  when /.mgf$/
    ext_guess="mgf"
  when /.mzML$/
    ext_guess="mzML"
  when /.mzXML$/
    ext_guess="mzXML"
  else
    ext_guess=""
  end
  ext_guess
end