InspectOutfile#

class pyopenms.InspectOutfile#

Bases: object

Cython implementation of _InspectOutfile

Original C++ documentation is available here

__init__()#

Overload:

__init__(self) None

This class serves to read in an Inspect outfile and write an idXML file

Overload:

__init__(self, in_0: InspectOutfile) None

Methods

__init__

Overload:

compressTrieDB(self, database_filename, ...)

Generates a trie database from another one, using the wanted records only

generateTrieDB(self, ...)

Generates a trie database from a given one (the type of database is determined by getLabels)

getACAndACType(self, line, accession, ...)

Retrieve the accession type and accession number from a protein description line

getExperiment(self, exp, type_, in_filename)

Get the experiment from a file

getLabels(self, source_database_filename, ...)

Retrieve the labels of a given database (at the moment FASTA and Swissprot)

getSearchEngineAndVersion(self, cmd_output, ...)

Get the search engine and its version from the output of the InsPecT executable without parameters.

getSequences(self, database_filename, ...)

Retrieve sequences from a trie database

getWantedRecords(self, result_filename, ...)

Loads only results which exceeds a given p-value threshold

load(self, result_filename, ...)

Load the results of an Inspect search

readOutHeader(self, filename, header_line, ...)

Read the header of an inspect output file and retrieve various information

compressTrieDB(self, database_filename: bytes | str | String, index_filename: bytes | str | String, wanted_records: List[int], snd_database_filename: bytes | str | String, snd_index_filename: bytes | str | String, append: bool) None#

Generates a trie database from another one, using the wanted records only

generateTrieDB(self, source_database_filename: bytes | str | String, database_filename: bytes | str | String, index_filename: bytes | str | String, append: bool, species: bytes | str | String) None#

Generates a trie database from a given one (the type of database is determined by getLabels)

getACAndACType(self, line: bytes | str | String, accession: String, accession_type: String) None#

Retrieve the accession type and accession number from a protein description line

getExperiment(self, exp: MSExperiment, type_: String, in_filename: bytes | str | String) None#

Get the experiment from a file

getLabels(self, source_database_filename: bytes | str | String, ac_label: String, sequence_start_label: String, sequence_end_label: String, comment_label: String, species_label: String) None#

Retrieve the labels of a given database (at the moment FASTA and Swissprot)

getSearchEngineAndVersion(self, cmd_output: bytes | str | String, protein_identification: ProteinIdentification) bool#

Get the search engine and its version from the output of the InsPecT executable without parameters. Returns true on success, false otherwise

getSequences(self, database_filename: bytes | str | String, wanted_records: Dict[int, int], sequences: List[bytes]) List[int]#

Retrieve sequences from a trie database

getWantedRecords(self, result_filename: bytes | str | String, p_value_threshold: float) List[int]#

Loads only results which exceeds a given p-value threshold

Parameters:
  • result_filename – The filename of the results file

  • p_value_threshold – Only identifications exceeding this threshold are read

Raises:

Exception: FileNotFound is thrown if the given file could not be found

Raises:

Exception: FileEmpty is thrown if the given file is empty

load(self, result_filename: bytes | str | String, peptide_identifications: List[PeptideIdentification], protein_identification: ProteinIdentification, p_value_threshold: float, database_filename: bytes | str | String) List[int]#

Load the results of an Inspect search

Parameters:
  • result_filename – Input parameter which is the file name of the input file

  • peptide_identifications – Output parameter which holds the peptide identifications from the given file

  • protein_identification – Output parameter which holds the protein identifications from the given file

  • p_value_threshold

  • database_filename

Raises:

Exception: FileNotFound is thrown if the given file could not be found

Raises:

Exception: ParseError is thrown if the given file could not be parsed

Raises:

Exception: FileEmpty is thrown if the given file is empty

readOutHeader(self, filename: bytes | str | String, header_line: bytes | str | String, spectrum_file_column: int, scan_column: int, peptide_column: int, protein_column: int, charge_column: int, MQ_score_column: int, p_value_column: int, record_number_column: int, DB_file_pos_column: int, spec_file_pos_column: int, number_of_columns: int) None#

Read the header of an inspect output file and retrieve various information