Example #1
0
def wt_similarity(x, matrix='blosum62'):

    x1 = x.peptide
    x2 = x.wt
    #print(x1,x2)
    matrix = tepitope.get_matrix(matrix)
    return tepitope.similarity_score(matrix, x1, x2)
Example #2
0
def virus_similarity(x, matrix='blosum62'):

    if x.virus_match is None:
        return
    x1 = x.peptide
    x2 = x.virus_match
    matrix = tepitope.get_matrix(matrix)
    return tepitope.similarity_score(matrix, x1, x2)
Example #3
0
    Copyright (C) Damien Farrell
"""

from __future__ import absolute_import, print_function
import sys, os, subprocess
import time
import pickle
import numpy as np
import pandas as pd
pd.set_option('display.width', 150)
pd.set_option('max_colwidth', 80)
from collections import OrderedDict
from epitopepredict import base, config, analysis, sequtils, peptutils, tepitope

defaultpath = os.getcwd()
sim_matrix = tepitope.get_matrix('pmbec')
metrics = [
    'score', 'matched_score', 'binding_diff', 'perc_rank', 'wt_similarity',
    'self_similarity', 'virus_similarity', 'anchor', 'hydro', 'net_charge'
]


class NeoEpitopeWorkFlow(object):
    """Class for implementing a neo epitope workflow."""
    def __init__(self, opts={}):
        for i in opts:
            self.__dict__[i] = opts[i]
        return

    def setup(self):
        """Setup main parameters"""