perseuspy package

Submodules

perseuspy.dependent_peptides module

Dependent peptides can be extracted from the allPeptides.txt table and are annotated using the experimentalDesign.txt.

This code forms the basis for the corresponding Perseus plugin PluginDependentPeptides.

perseuspy.dependent_peptides.count(args)[source]

count occurences in a list of lists >>> count([[‘a’,’b’],[‘a’]]) defaultdict(int, {‘a’ : 2, ‘b’ : 1})

perseuspy.dependent_peptides.read_dependent_peptides(filename)[source]

read the dependent peptides table and extract localiztion information :param filename: path to the ‘allPeptides.txt’ table. :returns dep, localization: the dependent peptide table, localization information.

perseuspy.dependent_peptides.run_dependent_peptides(allPeptides_file, rawFilesTable_file, outfile)[source]

transform a allPeptides.txt and experimentalDesign.txt table into the dependentPeptides.txt table written in outfile. :param allPeptides_file: MaxQuant ‘allPeptides.txt’ output table. :param rawFilesTable_file: MaxQuant ‘Raw files’-tab table. :param outfile: Path to the output file.

perseuspy.dependent_peptides.run_dependent_peptides_from_parameters(paramfile, outfile)[source]

transform a allPeptides.txt and experimentalDesign.txt table into the dependentPeptides.txt table written in outfile. :param paramfile: Perseus parameters.xml including at least two FileParam entries names ‘allPeptides.txt’ and ‘experimentalDesign.txt’. :param outfile: Path to the output file.

perseuspy.parameters module

Perseus parameter parsing

This module contains convenience function for parsing the Perseus parameters.xml file and extracting parameter values

perseuspy.parameters.doubleParam(parameters, name)[source]

double parameter value. :param parameters: the parameters tree. :param name: the name of the parameter.

perseuspy.parameters.fileParam(parameters, name)[source]

file parameter value. :param parameters: the parameters tree. :param name: the name of the parameter.

perseuspy.parameters.intParam(parameters, name)[source]

integer parameter value. :param parameters: the parameters tree. :param name: the name of the parameter.

perseuspy.parameters.multiChoiceParam(parameters, name, type_converter=<class 'str'>)[source]

multi choice parameter values. :param parameters: the parameters tree. :param name: the name of the parameter. :param type_converter: function to convert the chosen value to a different type (e.g. str, float, int). default = ‘str’ :returns dictionary: value -> values

perseuspy.parameters.parse_parameters(filename)[source]

parse the parameters.xml file. :param filename: ‘parameters.xml’ :returns tree: a ‘xml.etree.ElementTree’ xml object.

perseuspy.parameters.singleChoiceParam(parameters, name, type_converter=<class 'str'>)[source]

single choice parameter value. Returns -1 if no value was chosen. :param parameters: the parameters tree. :param name: the name of the parameter. :param type_converter: function to convert the chosen value to a different type (e.g. str, float, int). default = ‘str’

perseuspy.parameters.stringParam(parameters, name)[source]

string parameter value. :param parameters: the parameters tree. :param name: the name of the parameter.

Module contents

perseuspy module for Python-Perseus interop.

Currently there is no support for the following Perseus matrix features:
  • numerical annotation rows
  • multi-numeric rows