Fred2.EpitopePrediction Module¶
EpitopePrediction.External¶
-
class
Fred2.EpitopePrediction.External.
AExternalEpitopePrediction
¶ Bases:
Fred2.Core.Base.AEpitopePrediction
,Fred2.Core.Base.AExternal
Abstract class representing an external prediction function. Implementations shall wrap external binaries by following the given abstraction.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts alleles into the internal allele representation of the predictor and returns a string representation
Parameters: alleles (list( Allele
)) – The alleles for which the internal predictor representation is neededReturns: Returns a string representation of the input alleles Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – - Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to _file in the specific format
NO return value!
Param: list(str) _input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
supportedAlleles
¶ A list of valid allele models
-
supportedLength
¶ A list of supported peptide lengths
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetCTLpan_1_1
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Interface for NetCTLpan 1.1.
Note
NetCTLpan - Pan-specific MHC class I epitope predictions Stranzl T., Larsen M. V., Lundegaard C., Nielsen M. Immunogenetics. 2010 Apr 9. [Epub ahead of print]
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
No return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHCII_2_2
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Implements a wrapper for NetMHCII
Note
Nielsen, M., & Lund, O. (2009). NN-align. An artificial neural network-based alignment algorithm for MHC class II peptide binding prediction. BMC Bioinformatics, 10(1), 296.
Nielsen, M., Lundegaard, C., & Lund, O. (2007). Prediction of MHC class II binding affinity using SMM-align, a novel stabilization matrix alignment method. BMC Bioinformatics, 8(1), 238.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to _file in the specific format
No return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHCIIpan_3_0
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Implements a wrapper for NetMHCIIpan.
Note
Andreatta, M., Karosiene, E., Rasmussen, M., Stryhn, A., Buus, S., & Nielsen, M. (2015). Accurate pan-specific prediction of peptide-MHC class II binding affinity with improved binding core identification. Immunogenetics, 1-10.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to _file in the specific format
No return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHCIIpan_3_1
¶ Bases:
Fred2.EpitopePrediction.External.NetMHCIIpan_3_0
Implementation of NetMHCIIpan 3.1 adapter.
Note
Andreatta, M., Karosiene, E., Rasmussen, M., Stryhn, A., Buus, S., & Nielsen, M. (2015). Accurate pan-specific prediction of peptide-MHC class II binding affinity with improved binding core identification. Immunogenetics, 1-10.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to _file in the specific format
No return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHC_3_0
¶ Bases:
Fred2.EpitopePrediction.External.NetMHC_3_4
Implements the NetMHC binding (for netMHC3.0):
.. note::
NetMHC-3.0: accurate web accessible predictions of human, mouse and monkey MHC class I affinities for peptides of length 8-11. Lundegaard C, Lamberth K, Harndahl M, Buus S, Lund O, Nielsen M. Nucleic Acids Res. 1;36(Web Server issue):W509-12. 2008
Accurate approximation method for prediction of class I MHC affinities for peptides of length 8, 10 and 11 using prediction tools trained on 9mers. Lundegaard C, Lund O, Nielsen M. Bioinformatics, 24(11):1397-98, 2008.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: dict
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
NO return value!
Param: list(str) input: The : sequences to write into _file Parameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHC_3_4
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Implements the NetMHC binding (in current form for netMHC3.4).
Note
NetMHC-3.0: accurate web accessible predictions of human, mouse and monkey MHC class I affinities for peptides of length 8-11. Lundegaard C, Lamberth K, Harndahl M, Buus S, Lund O, Nielsen M. Nucleic Acids Res. 1;36(Web Server issue):W509-12. 2008
Accurate approximation method for prediction of class I MHC affinities for peptides of length 8, 10 and 11 using prediction tools trained on 9mers. Lundegaard C, Lund O, Nielsen M. Bioinformatics, 24(11):1397-98, 2008.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: dict
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
NO return value!
Param: list(str) input: The : sequences to write into _file Parameters: file (File) – File-handler to input file for external tool
-
supportedAlleles
¶ A list of valid allele models
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHC_4_0
¶ Bases:
Fred2.EpitopePrediction.External.NetMHC_3_4
Implements the NetMHC 4.0 binding
Note
Andreatta M, Nielsen M. Gapped sequence alignment using artificial neural networks: application to the MHC class I system. Bioinformatics (2016) Feb 15;32(4):511-7
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
NO return value!
Param: list(str) input: The : sequences to write into _file Parameters: file (File) – File-handler to input file for external tool
-
supportedAlleles
¶ A list of valid allele models
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHCpan_2_4
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Implements the NetMHC binding (in current form for netMHCpan 2.4). Supported MHC alleles currently only restricted to HLA alleles.
Note
Nielsen, Morten, et al. “NetMHCpan, a method for quantitative predictions of peptide binding to any HLA-A and-B locus protein of known sequence.” PloS one 2.8 (2007): e796.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
NO return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHCpan_2_8
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Implements the NetMHC binding (in current form for netMHCpan 2.8). Supported MHC alleles currently only restricted to HLA alleles.
Note
Nielsen, Morten, et al. “NetMHCpan, a method for quantitative predictions of peptide binding to any HLA-A and-B locus protein of known sequence.” PloS one 2.8 (2007): e796.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
No return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.External.
NetMHCpan_3_0
¶ Bases:
Fred2.EpitopePrediction.External.NetMHCpan_2_8
Implements the NetMHC binding version 3.0 Supported MHC alleles currently only restricted to HLA alleles.Note
Nielsen, M., & Andreatta, M. (2016). NetMHCpan-3.0; improved prediction of binding to MHC class I molecules integrating information from multiple receptor and peptide length datasets. Genome Medicine, 8(1), 1.
-
command
¶
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
No return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
version
¶
-
-
class
Fred2.EpitopePrediction.External.
NetMHCstabpan_1_0
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Implements a wrapper to NetMHCstabpan 1.0
Pan-specific prediction of peptide-MHC-I complex stability; a correlate of T cell immunogenicity M Rasmussen, E Fenoy, M Nielsen, Buus S, Accepted JI June, 2016
-
command
¶
-
convert_alleles
(alleles)¶ Converts
Allele
into the internal allele representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from self.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
NO return value!
Param: list(str) input: The Peptide
sequences to write into fileParameters: file (File) – File-handler to input file for external tool
-
supportedAlleles
¶
-
supportedLength
¶
-
version
¶
-
-
class
Fred2.EpitopePrediction.External.
PickPocket_1_1
¶ Bases:
Fred2.EpitopePrediction.External.AExternalEpitopePrediction
Implementation of PickPocket adapter.
Note
Zhang, H., Lund, O., & Nielsen, M. (2009). The PickPocket method for predicting binding specificities for receptors based on receptor pocket similarities: application to MHC-peptide binding. Bioinformatics, 25(10), 1293-1299.
-
command
¶ Defines the commandline call for external tool
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles ( Allele
) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
get_external_version
(path=None)¶ Returns the external version of the tool by executing >{command} –version
might be dependent on the method and has to be overwritten therefore it is declared abstract to enforce the user to overwrite the method. The function in the base class can be called with super()
Parameters: path (str) – Optional specification of executable path if deviant from elf.__command
Returns: The external version of the tool or None if tool does not support versioning Return type: str
-
is_in_path
()¶ Checks whether the specified execution command can be found in PATH
Returns: Whether or not command could be found in PATH Return type: bool
-
name
¶ The name of the predictor
-
parse_external_result
(file)¶ Parses external results and returns the result
Parameters: file (str) – The file path or the external prediction results Returns: A dictionary containing the prediction results Return type: dict
-
predict
(peptides, alleles=None, command=None, options=None, **kwargs)¶ Overwrites AEpitopePrediction.predict
Parameters: - peptides (list(
Peptide
) orPeptide
) – A list of or a singlePeptide
object - alleles (list(
Allele
)/Allele
) – A list of or a singleAllele
object. If noAllele
are provided, predictions are made for allAllele
supported by the prediction method - command (str) – The path to a alternative binary (can be used if binary is not globally executable)
- options (str) – A string of additional options directly past to the external tool.
- chunksize – denotes the chunksize in which the number of peptides are bulk processed
Returns: A
EpitopePredictionResult
objectReturn type: - peptides (list(
-
prepare_input
(input, file)¶ Prepares input for external tools and writes them to file in the specific format
No return value!
Param: list(str) input: The Peptide
sequences to write into _fileParameters: file (File) – File-handler to input file for external tool
-
version
¶ The version of the predictor
-
EpitopePrediction.PSSM¶
-
class
Fred2.EpitopePrediction.PSSM.
APSSMEpitopePrediction
¶ Bases:
Fred2.Core.Base.AEpitopePrediction
Abstract base class for PSSM predictions. Implements predict functionality
-
convert_alleles
(alleles)¶ Converts alleles into the internal allele representation of the predictor and returns a string representation
Parameters: alleles (list( Allele
)) – The alleles for which the internal predictor representation is neededReturns: Returns a string representation of the input alleles Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
supportedAlleles
¶ A list of valid allele models
-
supportedLength
¶ A list of supported peptide lengths
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
ARB
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Implements IEDBs ARB method.
Note
Bui HH, Sidney J, Peters B, Sathiamurthy M, Sinichi A, Purton KA, Mothe BR, Chisari FV, Watkins DI, Sette A. 2005. Automated generation and evaluation of specific MHC binding predictive tools: ARB matrix applications. Immunogenetics 57:304-314.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
BIMAS
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Represents the BIMAS PSSM predictor.
Note
Parker, K.C., Bednarek, M.A. and Coligan, J.E. Scheme for ranking potential HLA-A2 binding peptides based on independent binding of individual peptide side-chains. The Journal of Immunology 1994;152(1):163-175.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
CalisImm
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Implements the Immunogenicity propensity score proposed by Calis et al.
..note:
Calis, Jorg JA, et al.(2013). Properties of MHC class I presented peptides that enhance immunogenicity. PLoS Comput Biol 9.10 e1003266.-
convert_alleles
(alleles)¶ Converts alleles into the internal allele representation of the predictor and returns a string representation
Parameters: alleles (list( Allele
)) – The alleles for which the internal predictor representation is neededReturns: Returns a string representation of the input alleles Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
pandas.DataFrame
object with the prediction resultsReturn type: pandas.DataFrame
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
ComblibSidney2008
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Implements IEDBs Comblib_Sidney2008 PSSM method.
Note
Sidney J, Assarsson E, Moore C, Ngo S, Pinilla C, Sette A, Peters B. 2008. Quantitative peptide binding motifs for 19 human and mouse MHC class I molecules derived using positional scanning combinatorial peptide libraries. Immunome Res 4:2.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
Epidemix
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Represents the Epidemix PSSM predictor.
Note
Feldhahn, M., et al. FRED-a framework for T-cell epitope detection. Bioinformatics 2009;25(20):2758-2759.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
Hammer
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Represents the virtual pockets approach by Sturniolo et al.
Note
Sturniolo, T., et al. Generation of tissue-specific and promiscuous HLA ligand databases using DNA microarrays and virtual HLA class II matrices. Nature biotechnology 1999;17(6):555-561.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
SMM
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Implements IEDBs SMM PSSM method.
Note
Peters B, Sette A. 2005. Generating quantitative models describing the sequence specificity of biological processes with the stabilized matrix method. BMC Bioinformatics 6:132.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
SMMPMBEC
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Implements IEDBs SMMPMBEC PSSM method.
Note
Kim, Y., Sidney, J., Pinilla, C., Sette, A., & Peters, B. (2009). Derivation of an amino acid similarity matrix for peptide: MHC binding and its application as a Bayesian prior. BMC Bioinformatics, 10(1), 394.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
Syfpeithi
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Represents the Syfpeithi PSSM predictor.
Note
Rammensee, H. G., Bachmann, J., Emmerich, N. P. N., Bachor, O. A., & Stevanovic, S. (1999). SYFPEITHI: database for MHC ligands and peptide motifs. Immunogenetics, 50(3-4), 213-219.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.PSSM.
TEPITOPEpan
¶ Bases:
Fred2.EpitopePrediction.PSSM.APSSMEpitopePrediction
Implements TEPITOPEpan.
Note
TEPITOPEpan: Extending TEPITOPE for Peptide Binding Prediction Covering over 700 HLA-HLA-DR Molecules Zhang L, Chen Y, Wong H-S, Zhou S, Mamitsuka H, et al. (2012) TEPITOPEpan: Extending TEPITOPE for Peptide Binding Prediction Covering over 700 HLA-HLA-DR Molecules. PLoS ONE 7(2): e30483.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an
Allele
. If noAllele
are given, predictions for all available models are made.Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-
EpitopePrediction.SVM¶
-
class
Fred2.EpitopePrediction.SVM.
ASVMEpitopePrediction
¶ Bases:
Fred2.Core.Base.AEpitopePrediction
,Fred2.Core.Base.ASVM
Implements default prediction routine for SVM based epitope prediction tools
-
convert_alleles
(alleles)¶ Converts alleles into the internal allele representation of the predictor and returns a string representation
Parameters: alleles (list( Allele
)) – The alleles for which the internal predictor representation is neededReturns: Returns a string representation of the input alleles Return type: list(str)
-
encode
(peptides)¶ Returns the feature encoding for peptides
Parameters: peptides (list( Peptide
)/Peptide
) – List of or a singlePeptide
objectReturns: Feature encoding of the Peptide objects Return type: list(Object)
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an alleles. If no alleles are given, predictions for all available models are made.
Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
supportedAlleles
¶ A list of valid allele models
-
supportedLength
¶ A list of supported peptide lengths
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.SVM.
SVMHC
¶ Bases:
Fred2.EpitopePrediction.SVM.ASVMEpitopePrediction
Implements SVMHC epitope prediction for MHC-I alleles (SYFPEITHI models).
Note
Doennes, P. and Kohlbacher, O. SVMHC: a server for prediction of MHC-binding peptides. Nucleic Acids Res, 2006, 34, W194-W197
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
encode
(peptides)¶ Encodes the input with binary sparse encoding of the
Peptide
Parameters: peptides (str) – A list of Peptide
sequencesReturns: Dictionary with Peptide
as key and feature encoding as value (see svmlight encoding scheme http://svmlight.joachims.org/)Return type: dict( Peptide
, (tuple(int, list(tuple(int,float))))
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an alleles. If no alleles are given, predictions for all available models are made.
Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
supportedAlleles
¶ A list of supported allele models
-
version
¶ The version of the predictor
-
-
class
Fred2.EpitopePrediction.SVM.
UniTope
¶ Bases:
Fred2.EpitopePrediction.SVM.ASVMEpitopePrediction
Implements UniTope prediction for MHC-I.
Note
Toussaint, N. C., Feldhahn, M., Ziehm, M., Stevanovic, S., & Kohlbacher, O. (2011, August). T-cell epitope prediction based on self-tolerance. In Proceedings of the 2nd ACM Conference on Bioinformatics, Computational Biology and Biomedicine (pp. 584-588). ACM.
-
convert_alleles
(alleles)¶ Converts
Allele
into the internalAllele
representation of the predictor and returns a string representationParameters: alleles (list( Allele
)) – TheAllele
for which the internal predictor representation is neededReturns: Returns a string representation of the input Allele
Return type: list(str)
-
encode
(peptides, allele)¶ Encodes the input with binary sparse encoding of the
Peptide
Parameters: Returns: Dictionary with
Peptide
as key and feature encoding as value (see svmlight encoding scheme http://svmlight.joachims.org/)Return type: dict(
Peptide
, (tuple(int, list(tuple(int,float))))`
-
name
¶ The name of the predictor
-
predict
(peptides, alleles=None, **kwargs)¶ Returns predictions for given peptides an alleles. If no alleles are given, predictions for all available models are made.
Parameters: Returns: Returns a
EpitopePredictionResult
object with the prediction resultsReturn type:
-
version
¶ The version of the predictor
-