mspire-sequest¶ ↑
An mspire library supporting SEQUEST, Bioworks, SQT and associated formats.
Current API¶ ↑
Cite¶ ↑
Prince JT, Marcotte EM. mspire: mass spectrometry proteomics in Ruby. Bioinformatics. 2008 Dec 1;24(23):2796-7. (pubmed)
Examples¶ ↑
Provides three executables for extracting information from an Srf file (run without file for usage):
srf_to_sqt.rb file.srf # => file.sqt srf_to_search.rb file.srf # => file.mgf (also can make .dta files) srf_to_pepxml.rb file.srf # => file.xml (pepxml file)
Mspire::Sequest::Srf¶ ↑
Can read and convert Bioworks Sequest Results Files (SRF).
require 'mspire/sequest/srf' srf = Mspire::Sequest::Srf.new("file.srf")
Conversions (see api for options):
require 'mspire/sequest/srf/sqt' # require this in addition to 'mspire/sequest/srf' srf.to_sqt # (outputs a file) -> file.sqt require 'mspire/sequest/srf/search' # require this in addition to 'mspire/sequest/srf' srf.to_mgf # (outputs a file) -> file.mgf srf.to_dta # (outputs a dir) -> file srf.to_dta("file.tgz", :tgz) # on the fly tgz (requires archive-tar-minitar) require 'mspire/sequest/srf/pepxml' # require this in addition to 'mspire/sequest/srf' srf.to_pepxml # (outputs a file) -> file.xml
Object access (see Mspire::Sequest::Srf for much more):
srf.header # Mspire::Sequest::Srf::Header object srf.params # Mspire::Sequest::Params object srf.dta_files # Mspire::Sequest::Srf::Dta objects srf.out_files # Mspire::Sequest::Srf::Out objects srf.peptide_hits # Mspire::Sequest::Srf::Out::Peptide objects
Mspire::Sequest::Params¶ ↑
Object or hash access to any parameter in the file. Also provides a unified interface across several versions (3.1 - 3.3)
require 'mspire/sequest/params' params = Mspire::Sequest::Params.new("sequest.params") params.any_existing_param # -> some value or empty string if no value params['any_existing_param'] # -> some value or empty string if no value params.non_existent_param # -> nil # some unified interace methods: params.enzyme # -> enzyme name with no parentheses params.database # -> first_database_name params.enzyme_specificity # -> [offset, cleave_at, expect_if_after] params.precursor_mass_type # => "average" | "monoisotopic" params.fragment_mass_type # => "average" | "monoisotopic"
Mspire::Sequest::Sqt¶ ↑
sqt = Mspire::Sequest::Sqt.new("file.sqt") sqt.header sqt.spectra.each do |spectrum| # an Mspire::Sequest::Sqt::Spectrum object spectrum.matches.each do |match| # an Mspire::Sequest::Sqt::Match object match.loci.each do |locus| # an Mspire::Sequest::Sqt::Locus object end end end # or more direct access to Match objects: sqt.peptide_hits
Also reads Percolator SQT output files
psqt = Mspire::Sequest::Sqt.new("percolator_output.sqt") psqt.peptide_hits.each do |pmatch| pmatch.percolator_score == pmatch.xcorr pmatch.negative_q_value == pmatch.sp pmatch.q_value == -pmatch.negative_q_value end
Installation¶ ↑
gem install mspire-sequest
Copyright¶ ↑
See LICENSE (MIT)