epytope.Core Module¶
Core.Allele¶
- class epytope.Core.Allele.AlleleFactory[source]¶
Bases:
type- mro()¶
Return a type’s method resolution order.
- class epytope.Core.Allele.Allele(name, prob=None)[source]¶
Bases:
MetadataLoggerThis class represents an HLA Allele and stores additional information
- get_metadata(label, only_first=False)¶
Getter for the saved metadata with the key
label- Parameters:
label (str) – key for the metadata that is inferred
only_first (bool) – true if only the the first element of the matadata list is to be returned
- log_metadata(label, value)¶
Inserts a new metadata
- Parameters:
label (str) – key for the metadata that will be added
value (list(object)) – any kindy of additional value that should be kept
- class epytope.Core.Allele.CombinedAllele(name, prob=None)[source]¶
Bases:
AlleleThis class represents combined HLA class II Alleles with an alpha and beta chain
- property locus¶
- property supertype¶
- property subtype¶
- get_metadata(label, only_first=False)¶
Getter for the saved metadata with the key
label- Parameters:
label (str) – key for the metadata that is inferred
only_first (bool) – true if only the the first element of the matadata list is to be returned
- log_metadata(label, value)¶
Inserts a new metadata
- Parameters:
label (str) – key for the metadata that will be added
value (list(object)) – any kindy of additional value that should be kept
- class epytope.Core.Allele.MouseAllele(name, prob=None)[source]¶
Bases:
AlleleThis class represents a mouse MHC allele with the following nomenclature: H2-Xxx
- property locus¶
- property supertype¶
- property subtype¶
- get_metadata(label, only_first=False)¶
Getter for the saved metadata with the key
label- Parameters:
label (str) – key for the metadata that is inferred
only_first (bool) – true if only the the first element of the matadata list is to be returned
- log_metadata(label, value)¶
Inserts a new metadata
- Parameters:
label (str) – key for the metadata that will be added
value (list(object)) – any kindy of additional value that should be kept
Core.Base¶
https://docs.python.org/3/library/abc.html
- class epytope.Core.Base.MetadataLogger[source]¶
Bases:
objectThis class provides a simple interface for assigning additional metadata to any object in our data model. Examples: storing ANNOVAR columns like depth, base count, dbSNP id, quality information for variants, additional prediction information for peptides etc. This functionality is not used from core methods of epytope.
The saved values are accessed via
log_metadata()andget_metadata()
- class epytope.Core.Base.APluginRegister(name, bases, namespace, **kwargs)[source]¶
Bases:
ABCMetaThis class allows automatic registration of new plugins.
- mro()¶
Return a type’s method resolution order.
- register(subclass)¶
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.
- class epytope.Core.Base.ACleavageSitePrediction[source]¶
Bases:
object- abstract property name¶
The name of the predictor
- abstract property version¶
Parameter specifying the version of the prediction method
- abstract property supportedLength¶
The supported lengths of the predictor
- abstract property cleavagePos¶
Parameter specifying the position of aa (within the prediction window) after which the sequence is cleaved (starting from 1)
- class epytope.Core.Base.ACleavageFragmentPrediction[source]¶
Bases:
object- abstract property name¶
The name of the predictor
- abstract property version¶
Parameter specifying the version of the prediction method
- abstract property supportedLength¶
The supported lengths of the predictor
- abstract property cleavagePos¶
Parameter specifying the position of aa (within the prediction window) after which the sequence is cleaved
- class epytope.Core.Base.AEpitopePrediction[source]¶
Bases:
object- abstract property name¶
The name of the predictor
- abstract property version¶
The version of the predictor
- abstract property supportedAlleles¶
A list of valid allele models
- abstract property supportedLength¶
A list of supported peptide lengths
- abstract convert_alleles(alleles)[source]¶
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 needed- Returns:
Returns a string representation of the input alleles
- Return type:
list(str)
- abstract predict(peptides, alleles=None, **kwargs)[source]¶
Predicts the binding affinity for a given peptide or peptide lists for a given list of alleles. If alleles is not given, predictions for all valid alleles of the predictor is performed. If, however, a list of alleles is given, predictions for the valid allele subset is performed.
- Parameters:
- Returns:
Returns a
AResultobject for the specifiedPeptideandAllele- Return type:
AResult
- class epytope.Core.Base.AExternal[source]¶
Bases:
objectBase class for external tools
- abstract property command¶
Defines the commandline call for external tool
- abstract parse_external_result(file)[source]¶
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
- is_in_path()[source]¶
Checks whether the specified execution command can be found in PATH
- Returns:
Whether or not command could be found in PATH
- Return type:
bool
- abstract get_external_version(path=None)[source]¶
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
- class epytope.Core.Base.ATAPPrediction[source]¶
Bases:
object- abstract property name¶
The name of the predictor
- abstract property version¶
Parameter specifying the version of the prediction method
- abstract property supportedLength¶
The supported lengths of the predictor
- class epytope.Core.Base.AHLATyping[source]¶
Bases:
object- abstract property name¶
The name of the predictor
- abstract property version¶
Parameter specifying the version of the prediction method
- abstract predict(ngsFile, output, **kwargs)[source]¶
Prediction method for inferring the HLA typing
- Parameters:
ngsFile (str) – The path to the input file containing the NGS reads
output (str) – The path to the output file or directory
- Returns:
A list of HLA alleles representing the genotype predicted by the algorithm
- Return type:
list(
Allele)