InspectOutfile#

class pyopenms.InspectOutfile#

Bases: object

Representation of an Inspect outfile

__init__() → None#
__init__(arg: pyopenms.InspectOutfile, /) → None

Methods

__init__()

compressTrieDB(database_filename, ...[, append])

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

generateTrieDB(source_database_filename, ...)

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

getACAndACType(line)

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

getExperiment(in_filename)

Get the experiment from a file

getLabels(source_database_filename)

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

getSearchEngineAndVersion(cmd_output, ...)

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

getSequences(database_filename, wanted_records)

Retrieve sequences from a trie database

getWantedRecords(result_filename, ...)

Loads only results which exceeds a given p-value threshold

load(result_filename, ...[, database_filename])

Load the results of an Inspect search

readOutHeader(filename, header_line)

Reads the header of an inspect output file and returns column indices as a tuple

compressTrieDB(database_filename: str, index_filename: str, wanted_records: collections.abc.Sequence[int], snd_database_filename: str, snd_index_filename: str, append: bool = False) → None#

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

generateTrieDB(source_database_filename: str, database_filename: str, index_filename: str, append: bool = False, species: str = '') → None#

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

getACAndACType(line: str) → tuple[str, str]#

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

getExperiment(in_filename: str) → tuple[pyopenms.MSExperiment, str]#

Get the experiment from a file

getLabels(source_database_filename: str) → tuple[str, str, str, str, str]#

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

getSearchEngineAndVersion(cmd_output: str, protein_identification: pyopenms.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(database_filename: str, wanted_records: collections.abc.Mapping[int, int]) → list[str]#

Retrieve sequences from a trie database

getWantedRecords(result_filename: str, 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(result_filename: str, peptide_identifications: pyopenms.PeptideIdentificationList, protein_identification: pyopenms.ProteinIdentification, p_value_threshold: float, database_filename: str = '') → 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(filename: str, header_line: str) → tuple#

Reads the header of an inspect output file and returns column indices as a tuple