Fred2.EpitopeAssembly Module

EpitopeAssembly.EpitopeAssembly

class Fred2.EpitopeAssembly.EpitopeAssembly.EpitopeAssembly(peptides, pred, solver='glpk', weight=0.0, matrix=None, verbosity=0)

Bases: object

Implements the epitope assembly approach proposed by Toussaint et al. using proteasomal cleavage site prediction and formulating the problem as TSP.

Note

Toussaint, N.C., et al. Universal peptide vaccines - Optimal peptide vaccine design based on viral sequence conservation. Vaccine 2011;29(47):8745-8753.

Parameters:
  • peptides (list(Peptide)) – A list of Peptide which shell be arranged
  • pred (ACleavageSitePredictor) – A ACleavageSitePrediction
  • solver (str) – Specifies the solver to use (mused by callable by pyomo)
  • weight (float) – Specifies how strong unwanted cleavage sites should be punished [0,1], where 0 means they will be ignored, and 1 the sum of all unwanted cleave sites is subtracted from the cleave site between two epitopes
  • verbosity (int) – Specifies how verbos the class will be, 0 means normal, >0 debug mode
approximate()

Approximates the eptiope assembly problem by applying Lin-Kernighan traveling salesman heuristic

Note

LKH implementation must be downloaded, compiled, and globally executable. Source code can be found here: http://www.akira.ruc.dk/~keld/research/LKH/

Returns:An order list of the Peptide (based on the sting-of-beads ordering)
Return type:list(Peptide)
solve(options=None)

Solves the Epitope Assembly problem and returns an ordered list of the peptides

Note

This can take quite long and should not be done for more and 30 epitopes max!

Parameters:options (str) – Solver specific options as string (will not be checked for correctness)
Returns:An order list of the Peptide (based on the string-of-beads ordering)
Return type:list(Peptide)
class Fred2.EpitopeAssembly.EpitopeAssembly.EpitopeAssemblyWithSpacer(peptides, cleav_pred, epi_pred, alleles, k=5, en=9, threshold=None, solver='glpk', alpha=0.99, beta=0, verbosity=0)

Bases: object

Implements the epitope assembly approach proposed by Toussaint et al. using proteasomal cleavage site prediction and formulating the problem as TSP.

It also extends it by optimal spacer design. (currently only allowed with PSSM cleavage site and epitope prediction)

The ILP model is implemented. So be reasonable with the size of epitope to be arranged.

approximate(start=0, threads=1, options=None)

Approximates the Eptiope Assembly problem by applying Lin-Kernighan traveling salesman heuristic

LKH implementation must be downloaded, compiled, and globally executable.

Source code can be found here: http://www.akira.ruc.dk/~keld/research/LKH/

Parameters:
  • start (int) – Start length for spacers (default 0).
  • threads (int) – Number of threads used for spacer design. Be careful, if options contain solver threads it will allocate threads*solver_threads cores!
  • options (dict(str,str)) – Solver specific options (threads for example)
Returns:

A list of ordered Peptide

Return type:

list(Peptide)

solve(start=0, threads=None, options=None)

Solve the epitope assembly problem with spacers optimally using integer linear programming.

Note

This can take quite long and should not be done for more and 30 epitopes max! Also, one has to disable pre-solving steps in order to use this model.

Parameters:
  • start (int) – Start length for spacers (default 0).
  • threads (int) – Number of threads used for spacer design. Be careful, if options contain solver threads it will allocate threads*solver_threads cores!
  • options (dict(str,str)) – Solver specific options as keys and parameters as values
Returns:

A list of ordered Peptide

Return type:

list(Peptide)

class Fred2.EpitopeAssembly.EpitopeAssembly.ParetoEpitopeAssembly(peptides, cl_pred, ep_pred, alleles, threshold, comparator, length=9, solver='glpk', weight=0.0, matrix=None, verbosity=0)

Bases: object

This implementation extends Toussaint et al.s TSP implementation which a bi-objective approach that also minimizes the neoepitope formation at the junctions as second objective. (Unpublished)

Note

Toussaint, N.C., et al. Universal peptide vaccines - Optimal peptide vaccine design based on viral sequence conservation. Vaccine 2011;29(47):8745-8753.

Parameters:
  • peptides (list(Peptide)) – A list of Peptide which shell be arranged
  • cl_pred (ACleavageSitePredictor) – A ACleavageSitePrediction
  • ep_pred (AEpitopePrediction) – A AEpitopePrediction
  • alleles (List(Allele)) – A list of HLA alleles
  • threshold (dict(str,float)) – a dictionary with key=allele.name and value the binding threshold of this allele
  • comparator – A boolean function consuming two parameters a,b and comparing a comp b
  • length (int) – the epitope length to consider (default: 9)
  • solver (str) – Specifies the solver to use (mused by callable by pyomo)
  • weight (float) – Specifies how strong unwanted cleavage sites should be punished [0,1], where 0 means they will be ignored, and 1 the sum of all unwanted cleave sites is subtracted from the cleave site between two epitopes
  • verbosity (int) – Specifies how verbos the class will be, 0 means normal, >0 debug mode
paretosolve(nof_sol=None, options={}, rel_tol=1e-09, abs_tol=0.0001)

returns the whole pareto front of the be-objective optimization problem

Parameters:
  • nof_sol (int) – the number of solutions to max. obtain (if front is bigger)
  • options (dict) – the solver options
  • rel_tol (float) – relative floating point similarity tolerance
  • abs_tol (float) – absolute floating point similarity tolerance
Returns:

the pareto front of possible assemblies

Return type:

list(tuple(float,float,list(Peptide)))

solve(eps=1000000.0, order=(0, 1), options={})

solves a bi-objective problem using the epsilon-constraint method

Parameters:
  • options (str) – options directly handed to the solver
  • eps – the epsilon bound on the second objective
  • order (tuple(int,int)) – The oder in which the two objective should be solved
Returns:

The two objective values and the pareot-optimal assembly as triple

Return type:

tuple(float,float,list(Peptide))

EpitopeAssembly.MosaicVaccine