Module ImportFrom alias alias alias Import alias Import alias ImportFrom alias alias ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias Expr Str Assign NameStore ListLoad Str Str Str Str Str Str Assign NameStore ListLoad Str Str Str FunctionDef arguments args NameParam defaults body Expr Str If CompareEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num Assert CompareEq Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Assign NameStore ListLoad Str Str Str Str Str Str For NameStore NameLoad body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Return Call NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Dict Str Str Str Str Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad Call AttributeLoad Str attr BinOpMult ListLoad NameLoad Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword BinOpSub SubscriptLoad NameLoad Index Str Num keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str Return Call AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad Num Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad Num Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad Num Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad Num Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list decorator_list Assign NameStore Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults ListLoad Num Num Num Num Num Num NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list decorator_list
N/A __future__ print_function division absolute_import N/A logging N/A io six.moves.urllib.request urlopen Request six.moves.urllib.parse urlencode N/A pandas pd base_predictor BasePredictor epitope_collection_builder EpitopeCollectionBuilder common seq_to_str check_sequence_dictionary N/A 
A note about prediction methods, copied from the IEDB website:

The prediction method list box allows choosing from a number of MHC class I
binding prediction methods:
- Artificial neural network (ANN) (is that just NetMHC?)
- Stabilized matrix method (SMM)
- SMM with a Peptide:MHC Binding Energy Covariance matrix (SMMPMBEC)
- PickPocket
- NetMHCpan
- NetMHCcons

Excluded because IEDB results lack unique IC50 & Percentile Rank columns:
- Scoring Matrices from Combinatorial Peptide Libraries (Comblib_Sidney2008)
- Consensus
 N/A VALID_CLASS_I_METHODS N/A netmhccons netmhcpan ann smmpmbec smm pickpocket N/A VALID_CLASS_II_METHODS N/A NetMHCIIpan nn_align smm_align _parse_iedb_response N/A N/A response N/A N/A N/A Take the binding predictions returned by IEDB's web API
    and parse them into a DataFrame

    Expect response to look like:
    allele  seq_num start   end length  peptide ic50    rank
    HLA-A*01:01 1   2   10  9   LYNTVATLY   2145.70 3.7
    HLA-A*01:01 1   5   13  9   TVATLYCVH   2216.49 3.9
    HLA-A*01:01 1   7   15  9   ATLYCVHQR   2635.42 5.1
    HLA-A*01:01 1   4   12  9   NTVATLYCV   6829.04 20
    HLA-A*01:01 1   1   9   9   SLYNTVATL   8032.38 24
    HLA-A*01:01 1   8   16  9   TLYCVHQRI   8853.90 26
    HLA-A*01:01 1   3   11  9   YNTVATLYC   9865.62 29
    HLA-A*01:01 1   6   14  9   VATLYCVHQ   27575.71    58
    HLA-A*01:01 1   10  18  9   YCVHQRIDV   48929.64    74
    HLA-A*01:01 1   9   17  9   LYCVHQRID   50000.00    75
     N/A N/A N/A len response 0 N/A N/A N/A ValueError Empty response from IEDB! N/A df N/A N/A pd read_csv N/A N/A io BytesIO response delim_whitespace True header 0 N/A N/A N/A type df N/A pd DataFrame N/A df N/A N/A pd DataFrame df N/A N/A N/A len df 0 N/A N/A N/A ValueError N/A No binding predictions in response from IEDB: %s N/A response N/A required_columns N/A allele peptide ic50 rank start end N/A column required_columns N/A N/A N/A column N/A df columns N/A N/A N/A ValueError N/A Response from IEDB is missing '%s' column: %s N/A column N/A N/A df ix N/A 0 N/A df N/A _query_iedb N/A N/A request_values url N/A N/A N/A 
    Call into IEDB's web API for MHC binding prediction using request dictionary
    with fields:
        - "method"
        - "length"
        - "sequence_text"
        - "allele"

    Parse the response into a DataFrame.
     N/A data N/A urlencode request_values N/A req N/A Request url N/A N/A data encode ascii N/A response N/A N/A N/A urlopen req read N/A N/A _parse_iedb_response response N/A IedbBasePredictor N/A BasePredictor N/A __init__ N/A N/A self alleles epitope_lengths prediction_method url N/A N/A N/A N/A N/A BasePredictor __init__ self alleles alleles epitope_lengths epitope_lengths N/A N/A self prediction_method prediction_method N/A N/A N/A isinstance url str N/A N/A N/A TypeError N/A Expected URL to be string, not %s : %s N/A url N/A type url N/A N/A self url url N/A __str__ N/A N/A self N/A N/A N/A N/A %s(alleles=%s, epitope_lengths=%s, method="%s") N/A N/A N/A self __class__ __name__ N/A self alleles N/A self epitope_lengths N/A self prediction_method N/A _get_iedb_request_params N/A N/A self sequence allele N/A N/A N/A params N/A method length sequence_text allele N/A seq_to_str N/A self prediction_method N/A seq_to_str N/A self epitope_lengths sequence N/A N/A , join N/A N/A allele N/A len N/A self epitope_lengths N/A params N/A predict N/A N/A self fasta_dictionary N/A N/A N/A Given a dictionary mapping unique keys to amino acid sequences,
        run MHC binding predictions on all candidate epitopes extracted from
        sequences and return a EpitopeCollection.

        Parameters
        ----------
        fasta_dictionary : dict or string
            Mapping of protein identifiers to protein amino acid sequences.
            If string then converted to dictionary.
         N/A fasta_dictionary N/A check_sequence_dictionary fasta_dictionary N/A builder N/A EpitopeCollectionBuilder fasta_dictionary fasta_dictionary prediction_method_name N/A self prediction_method N/A N/A key amino_acid_sequence N/A N/A fasta_dictionary items N/A N/A allele N/A self alleles N/A N/A request N/A N/A self _get_iedb_request_params amino_acid_sequence allele N/A N/A N/A logging info Calling IEDB (%s) with request %s N/A self url request N/A response_df N/A _query_iedb request N/A self url N/A N/A _ row N/A N/A response_df iterrows N/A N/A N/A N/A builder add_binding_prediction source_sequence_key key offset N/A N/A row N/A start 1 allele N/A row N/A allele peptide N/A row N/A peptide ic50 N/A row N/A ic50 rank N/A row N/A rank N/A N/A N/A builder get_collection N/A N/A N/A IEDB_MHC_CLASS_I_URL http://tools-api.iedb.org/tools_api/mhci/ IedbNetMHCcons N/A IedbBasePredictor N/A __init__ N/A N/A self alleles epitope_lengths N/A N/A 8 9 10 11 N/A N/A N/A N/A IedbBasePredictor __init__ self alleles alleles epitope_lengths epitope_lengths prediction_method netmhccons url IEDB_MHC_CLASS_I_URL N/A N/A IedbNetMHCpan N/A IedbBasePredictor N/A __init__ N/A N/A self alleles epitope_lengths N/A N/A 8 9 10 11 N/A N/A N/A N/A IedbBasePredictor __init__ self alleles alleles epitope_lengths epitope_lengths prediction_method netmhcpan url IEDB_MHC_CLASS_I_URL N/A N/A IedbSMM N/A IedbBasePredictor N/A __init__ N/A N/A self alleles epitope_lengths N/A N/A 8 9 10 11 N/A N/A N/A N/A IedbBasePredictor __init__ self alleles alleles epitope_lengths epitope_lengths prediction_method smm url IEDB_MHC_CLASS_I_URL N/A N/A IedbSMM_PMBEC N/A IedbBasePredictor N/A __init__ N/A N/A self alleles epitope_lengths N/A N/A 8 9 10 11 N/A N/A N/A N/A IedbBasePredictor __init__ self alleles alleles epitope_lengths epitope_lengths prediction_method smmpmbec url IEDB_MHC_CLASS_I_URL N/A N/A N/A IEDB_MHC_CLASS_II_URL http://tools-api.iedb.org/tools_api/mhcii/ IedbNetMHCIIpan N/A IedbBasePredictor N/A __init__ N/A N/A self alleles epitope_lengths url N/A N/A 15 16 17 18 19 20 IEDB_MHC_CLASS_II_URL N/A N/A N/A N/A IedbBasePredictor __init__ self alleles alleles epitope_lengths epitope_lengths prediction_method NetMHCIIpan url IEDB_MHC_CLASS_II_URL N/A N/A