SYMBOL INDEX (794 symbols across 112 files) FILE: downloads-generation/allele_sequences/filter_sequences.py function run (line 26) | def run(): FILE: downloads-generation/allele_sequences/make_allele_sequences.py function normalize_allele_name_optional (line 37) | def normalize_allele_name_optional(s): function run (line 40) | def run(): FILE: downloads-generation/allele_sequences/select_alleles_to_disambiguate.py function run (line 27) | def run(): FILE: downloads-generation/analysis_predictor_info/generate_artifacts.py function run (line 106) | def run(): function do_job (line 246) | def do_job(tasks, constant_data=GLOBAL_DATA): FILE: downloads-generation/analysis_predictor_info/generate_model_selection_with_decoys.py function run (line 41) | def run(): FILE: downloads-generation/analysis_predictor_info/predict_on_model_selection_data.py function do_predict (line 57) | def do_predict(predictor, key, sub_df, constant_data=None): function run (line 69) | def run(): FILE: downloads-generation/data_curated/curate.py function normalize_allele_name_or_return_unknown (line 15) | def normalize_allele_name_or_return_unknown(s): function load_data_kim2014 (line 88) | def load_data_kim2014(filename): function load_data_systemhc_atlas (line 110) | def load_data_systemhc_atlas(filename, min_probability=0.99): function load_data_iedb (line 139) | def load_data_iedb(iedb_csv, include_qualitative=True): function load_data_additional_ms (line 252) | def load_data_additional_ms(filename): function run (line 276) | def run(): FILE: downloads-generation/data_curated/curate_ms_by_pmid.py function normalize_allele_name_or_return_unknown (line 17) | def normalize_allele_name_or_return_unknown(s): function load (line 61) | def load(filenames, **kwargs): function debug (line 74) | def debug(*filenames): function handle_pmid_27600516 (line 80) | def handle_pmid_27600516(filename): function handle_pmid_23481700 (line 115) | def handle_pmid_23481700(filename): function handle_pmid_24616531 (line 154) | def handle_pmid_24616531(filename): function handle_pmid_25576301 (line 177) | def handle_pmid_25576301(filename): function handle_pmid_26992070 (line 246) | def handle_pmid_26992070(*filenames): function handle_pmid_27412690 (line 307) | def handle_pmid_27412690(filename): function handle_pmid_28832583 (line 359) | def handle_pmid_28832583(*filenames): function handle_pmid_31495665 (line 470) | def handle_pmid_31495665(filename): function handle_pmid_27869121 (line 656) | def handle_pmid_27869121(filename): function handle_pmid_31154438 (line 711) | def handle_pmid_31154438(*filenames): function handle_pmid_31844290 (line 767) | def handle_pmid_31844290(*filenames): function make_expression_groups (line 865) | def make_expression_groups(dataset_identifier, df, groups): function handle_expression_GSE113126 (line 877) | def handle_expression_GSE113126(*filenames): function handle_expression_expression_atlas_22460905 (line 900) | def handle_expression_expression_atlas_22460905(filename): function handle_expression_human_protein_atlas (line 939) | def handle_expression_human_protein_atlas(*filenames): function make_expression_mixtures (line 995) | def make_expression_mixtures(expression_df): function run (line 1027) | def run(): FILE: downloads-generation/data_evaluation/join_with_precomputed.py function load_results (line 31) | def load_results(dirname, result_df=None, columns=None): function run (line 67) | def run(): FILE: downloads-generation/data_evaluation/make_benchmark.py function run (line 63) | def run(): FILE: downloads-generation/data_evaluation/split_by_sample.py function run (line 30) | def run(): FILE: downloads-generation/data_mass_spec_annotated/annotate.py function run (line 51) | def run(): FILE: downloads-generation/data_predictions/run_predictors.py function load_results (line 97) | def load_results(dirname, result_df=None, dtype="float32"): function run (line 140) | def run(argv=sys.argv[1:]): function do_predictions_mhctools (line 361) | def do_predictions_mhctools(work_item_dicts, constant_data=None): function do_predictions_mhcflurry (line 444) | def do_predictions_mhcflurry(work_item_dicts, constant_data=None): FILE: downloads-generation/data_predictions/write_allele_list.py function run (line 24) | def run(): FILE: downloads-generation/data_predictions/write_proteome_peptides.py function run (line 51) | def run(): FILE: downloads-generation/data_references/process.py function run (line 41) | def run(): FILE: downloads-generation/models_class1/write_validation_data.py function run (line 49) | def run(argv): FILE: downloads-generation/models_class1_kim_benchmark/curate.py function normalize_allele_name_or_return_unknown (line 13) | def normalize_allele_name_or_return_unknown(s): function load_data_kim2014 (line 71) | def load_data_kim2014(filename): function load_data_systemhc_atlas (line 92) | def load_data_systemhc_atlas(filename, min_probability=0.99): function load_data_abelin_mass_spec (line 120) | def load_data_abelin_mass_spec(filename): function load_data_iedb (line 143) | def load_data_iedb(iedb_csv, include_qualitative=True, include_mass_spec... function run (line 232) | def run(): FILE: downloads-generation/models_class1_kim_benchmark/write_validation_data.py function run (line 49) | def run(argv): FILE: downloads-generation/models_class1_pan/reassign_mass_spec_training_data.py function go (line 21) | def go(args): FILE: downloads-generation/models_class1_pan_variants/exclude_data_from_training.py function normalize_allele_name_or_return_unknown (line 13) | def normalize_allele_name_or_return_unknown(s): function load_30377561 (line 49) | def load_30377561(filename): function go (line 83) | def go(args): FILE: downloads-generation/models_class1_pan_variants/generate_hyperparameters.py function transform_to_single_hidden (line 26) | def transform_to_single_hidden(hyperparameters): function transform_to_no_pretrain (line 35) | def transform_to_no_pretrain(hyperparameters): function transform_to_compact_peptide (line 41) | def transform_to_compact_peptide(hyperparameters): FILE: downloads-generation/models_class1_presentation/make_train_data.py function run (line 63) | def run(): FILE: downloads-generation/models_class1_processing/annotate_hits_with_expression.py function run (line 33) | def run(): FILE: downloads-generation/models_class1_processing/generate_hyperparameters.base.py function hyperparrameters_grid (line 26) | def hyperparrameters_grid(): FILE: downloads-generation/models_class1_processing/generate_hyperparameters.variants.py function transform (line 26) | def transform(kind, hyperparameters): FILE: downloads-generation/models_class1_processing/make_train_data.py function do_process_samples (line 79) | def do_process_samples(samples, constant_data=None): function run (line 166) | def run(): FILE: downloads-generation/random_peptide_predictions/random_predictions.py function run (line 25) | def run(): FILE: mhcflurry/allele_encoding.py class AlleleEncoding (line 6) | class AlleleEncoding(object): method __init__ (line 7) | def __init__(self, alleles=None, allele_to_sequence=None, borrow_from=... method compact (line 73) | def compact(self): method allele_representations (line 89) | def allele_representations(self, encoding_name): method fixed_length_vector_encoded_sequences (line 121) | def fixed_length_vector_encoded_sequences(self, encoding_name): FILE: mhcflurry/amino_acid.py function available_vector_encodings (line 82) | def available_vector_encodings(): function vector_encoding_length (line 94) | def vector_encoding_length(name): function index_encoding (line 109) | def index_encoding(sequences, letter_to_index_dict): function fixed_vectors_encoding (line 137) | def fixed_vectors_encoding(index_encoded_sequences, letter_to_vector_df): FILE: mhcflurry/calibrate_percentile_ranks_command.py function run (line 130) | def run(argv=sys.argv[1:]): function run_class1_presentation_predictor (line 173) | def run_class1_presentation_predictor(args, peptides): function run_class1_affinity_predictor (line 233) | def run_class1_affinity_predictor(args, peptides): function do_class1_affinity_calibrate_percentile_ranks (line 365) | def do_class1_affinity_calibrate_percentile_ranks( function class1_affinity_calibrate_percentile_ranks (line 383) | def class1_affinity_calibrate_percentile_ranks( FILE: mhcflurry/class1_affinity_predictor.py class Class1AffinityPredictor (line 40) | class Class1AffinityPredictor(object): method __init__ (line 50) | def __init__( method manifest_df (line 128) | def manifest_df(self): method clear_cache (line 162) | def clear_cache(self): method neural_networks (line 178) | def neural_networks(self): method merge (line 193) | def merge(cls, predictors): method merge_in_place (line 230) | def merge_in_place(self, others): method canonicalize_allele_name (line 285) | def canonicalize_allele_name(self, raw_name): method supported_alleles (line 314) | def supported_alleles(self): method supported_peptide_lengths (line 330) | def supported_peptide_lengths(self): method check_consistency (line 350) | def check_consistency(self): method save (line 371) | def save(self, models_dir, model_names_to_write=None, write_metadata=T... method load (line 489) | def load(models_dir=None, max_models=None, optimization_level=None): method __repr__ (line 681) | def __repr__(self): method optimize (line 700) | def optimize(self, warn=True): method model_name (line 739) | def model_name(allele, num): method weights_path (line 761) | def weights_path(models_dir, model_name): method master_allele_encoding (line 777) | def master_allele_encoding(self): method fit_allele_specific_predictors (line 793) | def fit_allele_specific_predictors( method fit_class1_pan_allele_models (line 933) | def fit_class1_pan_allele_models( method add_pan_allele_model (line 1025) | def add_pan_allele_model(self, model, models_dir_for_save=None): method percentile_ranks (line 1052) | def percentile_ranks(self, affinities, allele=None, alleles=None, thro... method predict (line 1114) | def predict( method predict_to_dataframe (line 1164) | def predict_to_dataframe( method calibrate_percentile_ranks (line 1462) | def calibrate_percentile_ranks( method model_select (line 1614) | def model_select( FILE: mhcflurry/class1_neural_network.py class Class1NeuralNetworkModel (line 44) | class Class1NeuralNetworkModel(nn.Module): method __init__ (line 49) | def __init__( method _initialize_weights (line 232) | def _initialize_weights(self, init): method forward (line 247) | def forward(self, inputs): method get_weights_list (line 342) | def get_weights_list(self): method set_weights_list (line 358) | def set_weights_list(self, weights, auto_convert_keras=True): method to_json (line 632) | def to_json(self): class Class1NeuralNetwork (line 686) | class Class1NeuralNetwork(object): method apply_hyperparameter_renames (line 796) | def apply_hyperparameter_renames(cls, hyperparameters): method __init__ (line 816) | def __init__(self, **hyperparameters): method clear_model_cache (line 836) | def clear_model_cache(klass): method borrow_cached_network (line 843) | def borrow_cached_network(klass, network_json, network_weights): method _parse_keras_json_config (line 880) | def _parse_keras_json_config(cls, config): method _create_model_from_config (line 1005) | def _create_model_from_config(cls, config, instance_hyperparameters=No... method _create_merged_model_from_config (line 1105) | def _create_merged_model_from_config(cls, config, instance_hyperparame... method model_cache_key (line 1164) | def model_cache_key(network_json): method keras_network_cache_key (line 1187) | def keras_network_cache_key(network_json): method network (line 1193) | def network(self, borrow=False): method update_network_description (line 1229) | def update_network_description(self): method get_config (line 1290) | def get_config(self): method from_config (line 1307) | def from_config(cls, config, weights=None, weights_loader=None): method load_weights (line 1347) | def load_weights(self): method get_weights (line 1355) | def get_weights(self): method get_weights_list (line 1368) | def get_weights_list(self): method set_weights_list (line 1379) | def set_weights_list(self, weights, auto_convert_keras=True): method __getstate__ (line 1404) | def __getstate__(self): method __setstate__ (line 1420) | def __setstate__(self, state): method peptides_to_network_input (line 1427) | def peptides_to_network_input(self, peptides): method supported_peptide_lengths (line 1448) | def supported_peptide_lengths(self): method allele_encoding_to_network_input (line 1463) | def allele_encoding_to_network_input(self, allele_encoding): method data_dependent_weights_initialization (line 1487) | def data_dependent_weights_initialization(network, x_dict=None, method... method _regularized_parameters (line 1510) | def _regularized_parameters(network): method _regularization_penalty (line 1524) | def _regularization_penalty(parameters, l1=0.0, l2=0.0): method get_device (line 1539) | def get_device(self): method fit_generator (line 1543) | def fit_generator( method _create_optimizer (line 1747) | def _create_optimizer(self, network): method fit (line 1768) | def fit( method predict (line 2171) | def predict( method merge (line 2254) | def merge(cls, models, merge_method="average"): method make_network (line 2294) | def make_network( method clear_allele_representations (line 2339) | def clear_allele_representations(self): method set_allele_representations (line 2356) | def set_allele_representations(self, allele_representations, force_sur... method _update_embedding (line 2383) | def _update_embedding(self, network, reshaped, force_surgery): class MergedClass1NeuralNetwork (line 2421) | class MergedClass1NeuralNetwork(nn.Module): method __init__ (line 2426) | def __init__(self, networks, merge_method="average"): method forward (line 2431) | def forward(self, inputs): method get_weights_list (line 2444) | def get_weights_list(self): method set_weights_list (line 2451) | def set_weights_list(self, weights, auto_convert_keras=False): FILE: mhcflurry/class1_presentation_predictor.py class Class1PresentationPredictor (line 36) | class Class1PresentationPredictor(object): method __init__ (line 51) | def __init__( method supported_alleles (line 72) | def supported_alleles(self): method supported_peptide_lengths (line 79) | def supported_peptide_lengths(self): method supports_affinity_prediction (line 86) | def supports_affinity_prediction(self): method supports_processing_prediction (line 91) | def supports_processing_prediction(self): method supports_presentation_prediction (line 98) | def supports_presentation_prediction(self): method predict_affinity (line 105) | def predict_affinity( method predict_processing (line 264) | def predict_processing( method fit (line 323) | def fit( method get_model (line 398) | def get_model(self, name=None): method predict (line 425) | def predict( method predict_sequences (line 598) | def predict_sequences( method save (line 856) | def save( method load (line 935) | def load(cls, models_dir=None, max_models=None): method __repr__ (line 1014) | def __repr__(self): method percentile_ranks (line 1020) | def percentile_ranks(self, presentation_scores, throw=True): method calibrate_percentile_ranks (line 1044) | def calibrate_percentile_ranks(self, scores, bins=None): FILE: mhcflurry/class1_processing_neural_network.py class Class1ProcessingModel (line 20) | class Class1ProcessingModel(nn.Module): method __init__ (line 25) | def __init__( method forward (line 117) | def forward(self, inputs): method _process_n_flank (line 170) | def _process_n_flank(self, conv_result, peptide_length): method _process_c_flank (line 204) | def _process_c_flank(self, conv_result, peptide_length): method _max_pool_over_peptide_n (line 237) | def _max_pool_over_peptide_n(self, x, peptide_length): method _max_pool_over_peptide_c (line 262) | def _max_pool_over_peptide_c(self, x, peptide_length): method _extract_c_cleavage (line 284) | def _extract_c_cleavage(self, x, peptide_length): method _extract_c_flank_avg (line 294) | def _extract_c_flank_avg(self, conv_result, peptide_length): method _extract_n_flank_avg (line 318) | def _extract_n_flank_avg(self, conv_result): method get_weights_list (line 336) | def get_weights_list(self): method set_weights_list (line 345) | def set_weights_list(self, weights, auto_convert_keras=True): method _reorder_keras_weights (line 399) | def _reorder_keras_weights(self, weights): class Class1ProcessingNeuralNetwork (line 452) | class Class1ProcessingNeuralNetwork(object): method __init__ (line 513) | def __init__(self, **hyperparameters): method sequence_lengths (line 523) | def sequence_lengths(self): method get_device (line 540) | def get_device(self): method network (line 544) | def network(self): method _regularized_parameters (line 568) | def _regularized_parameters(network): method _regularization_penalty (line 582) | def _regularization_penalty(parameters, l1=0.0, l2=0.0): method update_network_description (line 597) | def update_network_description(self): method fit (line 607) | def fit( method _create_optimizer (line 835) | def _create_optimizer(self, network): method predict (line 855) | def predict( method predict_encoded (line 893) | def predict_encoded( method network_input (line 947) | def network_input(self, sequences, throw=True): method make_network (line 978) | def make_network( method __getstate__ (line 1016) | def __getstate__(self): method __setstate__ (line 1030) | def __setstate__(self, state): method get_weights (line 1036) | def get_weights(self): method get_config (line 1048) | def get_config(self): method from_config (line 1063) | def from_config(cls, config, weights=None): FILE: mhcflurry/class1_processing_predictor.py class Class1ProcessingPredictor (line 23) | class Class1ProcessingPredictor(object): method __init__ (line 29) | def __init__( method sequence_lengths (line 60) | def sequence_lengths(self): method add_models (line 84) | def add_models(self, models): method manifest_df (line 122) | def manifest_df(self): method model_name (line 145) | def model_name(num): method weights_path (line 161) | def weights_path(models_dir, model_name): method predict (line 176) | def predict( method predict_to_dataframe (line 215) | def predict_to_dataframe( method predict_to_dataframe_encoded (line 245) | def predict_to_dataframe_encoded( method check_consistency (line 280) | def check_consistency(self): method save (line 294) | def save(self, models_dir, model_names_to_write=None, write_metadata=T... method load (line 361) | def load(cls, models_dir=None, max_models=None): method __repr__ (line 414) | def __repr__(self): FILE: mhcflurry/cluster_parallelism.py function add_cluster_parallelism_args (line 25) | def add_cluster_parallelism_args(parser): function cluster_results_from_args (line 62) | def cluster_results_from_args( function cluster_results (line 106) | def cluster_results( function worker_entry_point (line 380) | def worker_entry_point(argv=sys.argv[1:]): FILE: mhcflurry/common.py function normalize_allele_name (line 16) | def normalize_allele_name( function normalize_pytorch_backend (line 98) | def normalize_pytorch_backend(backend): function configure_pytorch (line 123) | def configure_pytorch(backend=None, gpu_device_nums=None, num_threads=No... function configure_tensorflow (line 154) | def configure_tensorflow(backend=None, gpu_device_nums=None, num_threads... function get_pytorch_device (line 190) | def get_pytorch_device(): function configure_logging (line 226) | def configure_logging(verbose=False): function amino_acid_distribution (line 246) | def amino_acid_distribution(peptides, smoothing=0.0): function random_peptides (line 270) | def random_peptides(num, length=9, distribution=None): function positional_frequency_matrix (line 306) | def positional_frequency_matrix(peptides): function save_weights (line 333) | def save_weights(weights_list, filename): function load_weights (line 348) | def load_weights(filename): class NumpyJSONEncoder (line 366) | class NumpyJSONEncoder(json.JSONEncoder): method default (line 371) | def default(self, obj): FILE: mhcflurry/custom_loss.py function get_loss (line 23) | def get_loss(name): class Loss (line 49) | class Loss(object): method __init__ (line 61) | def __init__(self, name=None): method __str__ (line 64) | def __str__(self): method loss (line 67) | def loss(self, y_true, y_pred): method get_keras_loss (line 70) | def get_keras_loss(self, reduction="sum_over_batch_size"): class StandardKerasLoss (line 83) | class StandardKerasLoss(Loss): method __init__ (line 90) | def __init__(self, loss_name="mse"): method encode_y (line 96) | def encode_y(y): class TransformPredictionsLossWrapper (line 100) | class TransformPredictionsLossWrapper(Loss): method __init__ (line 107) | def __init__( method encode_y (line 117) | def encode_y(self, *args, **kwargs): method loss (line 120) | def loss(self, y_true, y_pred): class MSEWithInequalities (line 125) | class MSEWithInequalities(Loss): method __init__ (line 154) | def __init__(self): method encode_y (line 158) | def encode_y(y, inequalities=None): method _max_value (line 162) | def _max_value(values): method loss (line 167) | def loss(self, y_true, y_pred): class MSEWithInequalitiesAndMultipleOutputs (line 175) | class MSEWithInequalitiesAndMultipleOutputs(Loss): method __init__ (line 200) | def __init__(self): method encode_y (line 204) | def encode_y(y, inequalities=None, output_indices=None): method loss (line 209) | def loss(self, y_true, y_pred): class MultiallelicMassSpecLoss (line 226) | class MultiallelicMassSpecLoss(Loss): method __init__ (line 234) | def __init__(self, delta=0.2, multiplier=1.0): method encode_y (line 240) | def encode_y(y): method loss (line 243) | def loss(self, y_true, y_pred): function check_shape (line 251) | def check_shape(name, arr, expected_shape): FILE: mhcflurry/data_dependent_weights_initialization.py function svd_orthonormal (line 46) | def svd_orthonormal(shape): function get_activations_pytorch (line 72) | def get_activations_pytorch(model, layer_name, x_dict, device=None): function get_activations (line 133) | def get_activations(model, layer, X_batch): function lsuv_init (line 152) | def lsuv_init(model, batch, verbose=True, margin=0.1, max_iter=100): FILE: mhcflurry/downloads.py function get_downloads_dir (line 34) | def get_downloads_dir(): function get_current_release (line 41) | def get_current_release(): function get_downloads_metadata (line 48) | def get_downloads_metadata(): function get_default_class1_models_dir (line 60) | def get_default_class1_models_dir(test_exists=True): function get_default_class1_presentation_models_dir (line 91) | def get_default_class1_presentation_models_dir(test_exists=True): function get_default_class1_processing_models_dir (line 123) | def get_default_class1_processing_models_dir(test_exists=True): function get_current_release_downloads (line 157) | def get_current_release_downloads(): function get_path (line 198) | def get_path(download_name, filename='', test_exists=True): function configure (line 228) | def configure(): FILE: mhcflurry/downloads_command.py function run (line 105) | def run(argv=sys.argv[1:]): function mkdir_p (line 122) | def mkdir_p(path): function yes_no (line 138) | def yes_no(boolean): class TqdmUpTo (line 143) | class TqdmUpTo(tqdm): method update_to (line 145) | def update_to(self, b=1, bsize=1, tsize=None): function fetch_subcommand (line 159) | def fetch_subcommand(args): function info_subcommand (line 273) | def info_subcommand(args): function path_subcommand (line 324) | def path_subcommand(args): function url_subcommand (line 331) | def url_subcommand(args): FILE: mhcflurry/encodable_sequences.py class EncodingError (line 12) | class EncodingError(ValueError): method __init__ (line 16) | def __init__(self, message, supported_peptide_lengths): class EncodableSequences (line 23) | class EncodableSequences(object): method create (line 35) | def create(klass, sequences): method __init__ (line 45) | def __init__(self, sequences): method __len__ (line 60) | def __len__(self): method variable_length_to_fixed_length_categorical (line 63) | def variable_length_to_fixed_length_categorical( method variable_length_to_fixed_length_vector_encoding (line 111) | def variable_length_to_fixed_length_vector_encoding( method sequences_to_fixed_length_index_encoded_array (line 187) | def sequences_to_fixed_length_index_encoded_array( FILE: mhcflurry/ensemble_centrality.py function _nanmean_no_warnings (line 10) | def _nanmean_no_warnings(log_values): function _nanmedian_no_warnings (line 22) | def _nanmedian_no_warnings(log_values): function robust_mean (line 33) | def robust_mean(log_values): FILE: mhcflurry/fasta.py function read_fasta_to_dataframe (line 15) | def read_fasta_to_dataframe(filename, full_descriptions=False): class FastaParser (line 37) | class FastaParser(object): method __init__ (line 41) | def __init__(self): method iterate_over_file (line 45) | def iterate_over_file(self, fasta_path, full_descriptions=False): method _current_entry (line 85) | def _current_entry(self): method open_file (line 96) | def open_file(fasta_path): method _parse_header_id (line 106) | def _parse_header_id(line, full_description=False): FILE: mhcflurry/flanking_encoding.py class FlankingEncoding (line 18) | class FlankingEncoding(object): method __init__ (line 31) | def __init__(self, peptides, n_flanks, c_flanks): method __len__ (line 51) | def __len__(self): method vector_encode (line 57) | def vector_encode( method encode (line 115) | def encode( FILE: mhcflurry/hyperparameters.py class HyperparameterDefaults (line 7) | class HyperparameterDefaults(object): method __init__ (line 16) | def __init__(self, **defaults): method extend (line 19) | def extend(self, other): method with_defaults (line 36) | def with_defaults(self, obj): method subselect (line 49) | def subselect(self, obj): method check_valid_keys (line 59) | def check_valid_keys(self, obj): method models_grid (line 72) | def models_grid(self, **kwargs): FILE: mhcflurry/local_parallelism.py function add_local_parallelism_args (line 22) | def add_local_parallelism_args(parser): function worker_pool_with_gpu_assignments_from_args (line 76) | def worker_pool_with_gpu_assignments_from_args(args): function worker_pool_with_gpu_assignments (line 101) | def worker_pool_with_gpu_assignments( function validate_worker_pool_args (line 165) | def validate_worker_pool_args( function worker_init_kwargs_for_scheduler (line 193) | def worker_init_kwargs_for_scheduler( function make_worker_pool (line 233) | def make_worker_pool( function worker_init_entry_point (line 309) | def worker_init_entry_point( function worker_init (line 329) | def worker_init( class WrapException (line 350) | class WrapException(Exception): method __init__ (line 355) | def __init__(self): method __str__ (line 359) | def __str__(self): function call_wrapped (line 363) | def call_wrapped(function, *args, **kwargs): function call_wrapped_kwargs (line 384) | def call_wrapped_kwargs(function, kwargs): FILE: mhcflurry/percent_rank_transform.py class PercentRankTransform (line 8) | class PercentRankTransform(object): method __init__ (line 13) | def __init__(self): method fit (line 17) | def fit(self, values, bins): method transform (line 39) | def transform(self, values): method to_series (line 54) | def to_series(self): method from_series (line 69) | def from_series(series): FILE: mhcflurry/predict_command.py function run (line 176) | def run(argv=sys.argv[1:]): FILE: mhcflurry/predict_scan_command.py function parse_peptide_lengths (line 185) | def parse_peptide_lengths(value): function run (line 202) | def run(argv=sys.argv[1:]): FILE: mhcflurry/pytorch_layers.py function get_activation (line 9) | def get_activation(name): class LocallyConnected1D (line 36) | class LocallyConnected1D(nn.Module): method __init__ (line 57) | def __init__(self, in_channels, out_channels, input_length, kernel_size, method forward (line 82) | def forward(self, x): FILE: mhcflurry/pytorch_losses.py class MSEWithInequalities (line 14) | class MSEWithInequalities(nn.Module): method encode_y (line 27) | def encode_y(y, inequalities=None): method forward (line 61) | def forward(self, y_pred, y_true, sample_weights=None): class MSEWithInequalitiesAndMultipleOutputs (line 108) | class MSEWithInequalitiesAndMultipleOutputs(nn.Module): method encode_y (line 119) | def encode_y(y, inequalities=None, output_indices=None): method forward (line 149) | def forward(self, y_pred, y_true, sample_weights=None): class MultiallelicMassSpecLoss (line 208) | class MultiallelicMassSpecLoss(nn.Module): method __init__ (line 223) | def __init__(self, delta=0.2, multiplier=1.0): method encode_y (line 229) | def encode_y(y): method forward (line 235) | def forward(self, y_pred, y_true, sample_weights=None): class StandardLoss (line 288) | class StandardLoss(nn.Module): method __init__ (line 295) | def __init__(self, loss_name="mse"): method encode_y (line 306) | def encode_y(y): method forward (line 310) | def forward(self, y_pred, y_true, sample_weights=None): function get_pytorch_loss (line 350) | def get_pytorch_loss(name): FILE: mhcflurry/random_negative_peptides.py class RandomNegativePeptides (line 11) | class RandomNegativePeptides(object): method __init__ (line 50) | def __init__(self, **hyperparameters): method plan (line 56) | def plan(self, peptides, affinities, alleles=None, inequalities=None): method plan_by_length (line 134) | def plan_by_length(self, df_all, df_binders=None, df_nonbinders=None): method plan_by_allele (line 165) | def plan_by_allele(self, df_all, df_binders=None, df_nonbinders=None): method plan_by_allele_equalize_nonbinders (line 196) | def plan_by_allele_equalize_nonbinders( method get_alleles (line 245) | def get_alleles(self): method get_peptides (line 262) | def get_peptides(self): method get_total_count (line 284) | def get_total_count(self): FILE: mhcflurry/regression_target.py function from_ic50 (line 4) | def from_ic50(ic50, max_ic50=50000.0): function to_ic50 (line 23) | def to_ic50(x, max_ic50=50000.0): FILE: mhcflurry/scoring.py function make_scores (line 12) | def make_scores( FILE: mhcflurry/select_allele_specific_models_command.py function run (line 185) | def run(argv=sys.argv[1:]): class ScrambledPredictor (line 411) | class ScrambledPredictor(object): method __init__ (line 412) | def __init__(self, predictor): method predict (line 417) | def predict(self, peptides, allele): function model_select (line 426) | def model_select(allele, constant_data=GLOBAL_DATA): function cache_encoding (line 490) | def cache_encoding(predictor, peptides): class ScoreFunction (line 497) | class ScoreFunction(object): method __init__ (line 502) | def __init__(self, function, summary=None): method __call__ (line 506) | def __call__(self, *args, **kwargs): class CombinedModelSelector (line 510) | class CombinedModelSelector(object): method __init__ (line 514) | def __init__(self, model_selectors, weights=None, min_contribution_per... method usable_for_allele (line 521) | def usable_for_allele(self, allele): method plan_summary (line 526) | def plan_summary(self, allele): method score_function (line 529) | def score_function(self, allele, dry_run=False): class ConsensusModelSelector (line 580) | class ConsensusModelSelector(object): method __init__ (line 585) | def __init__( method usable_for_allele (line 602) | def usable_for_allele(self, allele): method max_absolute_value (line 605) | def max_absolute_value(self, allele): method plan_summary (line 608) | def plan_summary(self, allele): method score_function (line 611) | def score_function(self, allele): class MSEModelSelector (line 630) | class MSEModelSelector(object): method __init__ (line 635) | def __init__( method usable_for_allele (line 647) | def usable_for_allele(self, allele): method max_absolute_value (line 650) | def max_absolute_value(self, allele): method plan_summary (line 656) | def plan_summary(self, allele): method score_function (line 659) | def score_function(self, allele): class MassSpecModelSelector (line 711) | class MassSpecModelSelector(object): method __init__ (line 716) | def __init__( method ppv (line 755) | def ppv(y_true, predictions): method usable_for_allele (line 761) | def usable_for_allele(self, allele): method max_absolute_value (line 765) | def max_absolute_value(self, allele): method plan_summary (line 771) | def plan_summary(self, allele): method score_function (line 774) | def score_function(self, allele): FILE: mhcflurry/select_pan_allele_models_command.py function mse (line 93) | def mse( function run (line 134) | def run(argv=sys.argv[1:]): function do_model_select_task (line 296) | def do_model_select_task(item, constant_data=GLOBAL_DATA): function model_select (line 302) | def model_select( FILE: mhcflurry/select_processing_models_command.py function run (line 87) | def run(argv=sys.argv[1:]): function do_model_select_task (line 229) | def do_model_select_task(item, constant_data=GLOBAL_DATA): function model_select (line 233) | def model_select( FILE: mhcflurry/testing_utils.py function startup (line 8) | def startup(): function cleanup (line 15) | def cleanup(): FILE: mhcflurry/train_allele_specific_models_command.py function run (line 131) | def run(argv=sys.argv[1:]): function alleles_by_similarity (line 331) | def alleles_by_similarity(allele): function train_model (line 345) | def train_model( function subselect_df_held_out (line 418) | def subselect_df_held_out(df, recriprocal_held_out_fraction=10, seed=0): FILE: mhcflurry/train_pan_allele_models_command.py function assign_folds (line 134) | def assign_folds(df, num_folds, held_out_fraction, held_out_max): function pretrain_data_iterator (line 210) | def pretrain_data_iterator( function run (line 263) | def run(argv=sys.argv[1:]): function main (line 282) | def main(args): function initialize_training (line 296) | def initialize_training(args): function train_models (line 424) | def train_models(args): function train_model (line 537) | def train_model( FILE: mhcflurry/train_presentation_models_command.py function run (line 66) | def run(argv=sys.argv[1:]): function main (line 85) | def main(args): FILE: mhcflurry/train_processing_models_command.py function assign_folds (line 113) | def assign_folds(df, num_folds, held_out_samples): function run (line 153) | def run(argv=sys.argv[1:]): function main (line 172) | def main(args): function initialize_training (line 186) | def initialize_training(args): function train_models (line 270) | def train_models(args): function train_model (line 378) | def train_model( FILE: scripts/compare_tf_pytorch_random_outputs.py function _json_default (line 94) | def _json_default(value): function _self_cmd (line 102) | def _self_cmd(*args: str) -> list[str]: function _run_subprocess_json (line 106) | def _run_subprocess_json(cmd: list[str]) -> dict: function _run_subprocess (line 115) | def _run_subprocess(cmd: list[str]) -> None: function _append_if_set (line 119) | def _append_if_set(cmd: list[str], flag: str, value: str | None) -> None: function _repo_root_default (line 124) | def _repo_root_default() -> Path: function _random_sequences (line 128) | def _random_sequences(rng: np.random.Generator, lengths: np.ndarray) -> ... function _generate_dataset (line 139) | def _generate_dataset( function _apply_allele_panel (line 171) | def _apply_allele_panel( function cmd_backend_metadata (line 194) | def cmd_backend_metadata(args: argparse.Namespace) -> None: function cmd_predict_backend (line 261) | def cmd_predict_backend(args: argparse.Namespace) -> None: function _numeric_stats (line 369) | def _numeric_stats( function cmd_analyze (line 433) | def cmd_analyze(args: argparse.Namespace) -> None: function cmd_run (line 533) | def cmd_run(args: argparse.Namespace) -> None: function _add_common_model_dir_args (line 701) | def _add_common_model_dir_args(parser: argparse.ArgumentParser) -> None: function build_parser (line 708) | def build_parser() -> argparse.ArgumentParser: function main (line 780) | def main() -> None: FILE: scripts/cross_allele_parity_analysis.py function _repo_root_default (line 85) | def _repo_root_default() -> Path: function _compare_script_path (line 89) | def _compare_script_path() -> Path: function _self_cmd (line 93) | def _self_cmd(*args: str) -> list[str]: function _run_subprocess_json (line 97) | def _run_subprocess_json(cmd: list[str]) -> dict: function _run_subprocess (line 105) | def _run_subprocess(cmd: list[str]) -> None: function _append_if_set (line 109) | def _append_if_set(cmd: list[str], flag: str, value: str | None) -> None: function _select_alleles (line 114) | def _select_alleles( function _lengths_to_sample (line 149) | def _lengths_to_sample( function _random_sequences (line 166) | def _random_sequences( function _generate_uniform_peptides (line 189) | def _generate_uniform_peptides( function _cross_join_dataset (line 239) | def _cross_join_dataset(peptides_df: pd.DataFrame, alleles: list[str]) -... function _pre_run_sanity_checks (line 271) | def _pre_run_sanity_checks(peptides_df: pd.DataFrame, dataset: pd.DataFr... function _enforce_presentation_score_requirements (line 290) | def _enforce_presentation_score_requirements( function _numeric_output_columns (line 324) | def _numeric_output_columns(df: pd.DataFrame) -> list[str]: function _make_diff_frame (line 328) | def _make_diff_frame(merged: pd.DataFrame, numeric_columns: list[str]) -... function _per_output_summary (line 340) | def _per_output_summary(diff_df: pd.DataFrame, numeric_columns: list[str... function _break_thresholds_for_output (line 360) | def _break_thresholds_for_output(output: str) -> float: function _break_analysis (line 368) | def _break_analysis( function _plot_output_ranges (line 400) | def _plot_output_ranges(summary_df: pd.DataFrame, out_path: Path) -> None: function _plot_row_max_hist (line 437) | def _plot_row_max_hist(row_summary: pd.DataFrame, out_path: Path) -> None: function _plot_length_breakdown (line 459) | def _plot_length_breakdown( function _safe_plot_name (line 490) | def _safe_plot_name(name: str) -> str: function _plot_per_output_hists (line 494) | def _plot_per_output_hists( function _write_break_report (line 542) | def _write_break_report( function build_parser (line 590) | def build_parser() -> argparse.ArgumentParser: function main (line 620) | def main() -> None: FILE: scripts/extract_high_presentation_fixture.py function _collect_model_metadata (line 33) | def _collect_model_metadata() -> dict: function build_parser (line 58) | def build_parser() -> argparse.ArgumentParser: function main (line 76) | def main() -> None: FILE: scripts/generate_fixture_error_report.py class MetricReport (line 52) | class MetricReport: method summary (line 64) | def summary(self) -> dict: function build_parser (line 81) | def build_parser() -> argparse.ArgumentParser: function _format_number (line 91) | def _format_number(value: float, digits: int = 6) -> str: function _format_percent (line 102) | def _format_percent(value: float) -> str: function _as_float_array (line 108) | def _as_float_array(values: Iterable[float]) -> np.ndarray: function _clip_positive (line 112) | def _clip_positive(values: np.ndarray) -> np.ndarray: function _make_error_frame (line 118) | def _make_error_frame( function _load_affinity_fixture (line 137) | def _load_affinity_fixture() -> dict: function _load_presentation_fixture (line 142) | def _load_presentation_fixture() -> tuple[pd.DataFrame, dict]: function _predict_current_outputs (line 149) | def _predict_current_outputs() -> tuple[dict, pd.DataFrame, dict]: function _compute_metric_reports (line 290) | def _compute_metric_reports( function _axis_range (line 401) | def _axis_range(values: np.ndarray) -> tuple[float, float]: function _tick_values (line 411) | def _tick_values(start: float, stop: float, count: int = 5) -> list[float]: function _format_tick (line 417) | def _format_tick(value: float, log_scale: bool = False) -> str: function _render_scatter_svg (line 423) | def _render_scatter_svg( function _render_histogram_svg (line 500) | def _render_histogram_svg( function _render_summary_table (line 582) | def _render_summary_table(reports: list[MetricReport]) -> str: function _render_top_error_table (line 611) | def _render_top_error_table(report: MetricReport, limit: int = 10) -> str: function _render_metric_section (line 641) | def _render_metric_section(report: MetricReport) -> str: function _write_outputs (line 691) | def _write_outputs( function main (line 925) | def main() -> None: FILE: scripts/modal_train_mhcflurry.py function _install_repo (line 39) | def _install_repo(): function run_training_job (line 85) | def run_training_job(job: dict) -> dict: function main (line 131) | def main(command_template: str, workers: int = 1): FILE: scripts/plot_fixture_diffs.py function load_fixture (line 40) | def load_fixture(): function generate_predictions (line 47) | def generate_predictions(fixture_df): function plot_output (line 136) | def plot_output(col, tf_vals, pt_vals, out_dir): function main (line 232) | def main(): FILE: scripts/validate_allele_sequences.py function load_raw_csv (line 27) | def load_raw_csv(path): function renormalize (line 32) | def renormalize(raw_mapping): function main (line 53) | def main(): FILE: test/__init__.py function data_path (line 9) | def data_path(name): function initialize (line 17) | def initialize(): FILE: test/conftest.py function pytest_configure (line 9) | def pytest_configure(config): FILE: test/expensive_verify_pretrain_optimizable.py function verify_optimizable (line 63) | def verify_optimizable(): FILE: test/pytest_helpers.py function mhcflurry_cli (line 20) | def mhcflurry_cli(command): function eq_ (line 32) | def eq_(a, b, msg=None): function assert_less (line 40) | def assert_less(a, b, msg=None): function assert_greater (line 48) | def assert_greater(a, b, msg=None): function assert_almost_equal (line 56) | def assert_almost_equal(a, b, places=7, msg=None): function assert_raises (line 68) | def assert_raises(exc_class, func=None, *args, **kwargs): FILE: test/test_allele_encoding.py function test_allele_encoding_speed (line 9) | def test_allele_encoding_speed(): FILE: test/test_amino_acid.py function test_index_and_one_hot_encoding (line 15) | def test_index_and_one_hot_encoding(): function test_index_encoding_no_downcast_futurewarning (line 54) | def test_index_encoding_no_downcast_futurewarning(): FILE: test/test_api_compat_shims.py function test_legacy_configure_tensorflow_entry_point (line 11) | def test_legacy_configure_tensorflow_entry_point(): function test_legacy_worker_init_signature_kept (line 16) | def test_legacy_worker_init_signature_kept(): function test_worker_init_preserves_empty_gpu_assignment (line 21) | def test_worker_init_preserves_empty_gpu_assignment(monkeypatch): function test_legacy_cache_key_alias (line 37) | def test_legacy_cache_key_alias(): function test_legacy_get_keras_loss_accessor (line 48) | def test_legacy_get_keras_loss_accessor(): function test_legacy_get_activations_symbol_kept (line 56) | def test_legacy_get_activations_symbol_kept(): FILE: test/test_calibrate_percentile_ranks_command.py function setup_module (line 25) | def setup_module(): function run_and_check (line 31) | def run_and_check(n_jobs=0, delete=True, additional_args=[]): function test_run_serial (line 71) | def test_run_serial(): function test_run_parallel (line 75) | def test_run_parallel(): function test_run_cluster_parallelism (line 79) | def test_run_cluster_parallelism(delete=True): FILE: test/test_changing_allele_representations.py function setup_module (line 12) | def setup_module(): function test_changing_allele_representations (line 60) | def test_changing_allele_representations(): FILE: test/test_class1_affinity_predictor.py function setup_teardown (line 25) | def setup_teardown(): function warn_with_traceback (line 40) | def warn_with_traceback(message, category, filename, lineno, file=None, ... function predict_and_check (line 49) | def predict_and_check( function test_a1_known_epitopes_in_newly_trained_model (line 69) | def test_a1_known_epitopes_in_newly_trained_model(): function test_class1_affinity_predictor_a0205_memorize_training_data (line 136) | def test_class1_affinity_predictor_a0205_memorize_training_data(): function test_no_nans (line 212) | def test_no_nans(): function test_predict_implementations_equivalent (line 220) | def test_predict_implementations_equivalent(): function test_no_runtime_warnings_for_unsupported_rows (line 248) | def test_no_runtime_warnings_for_unsupported_rows(): FILE: test/test_class1_neural_network.py function setup_teardown (line 20) | def setup_teardown(): function test_class1_neural_network_a0205_training_accuracy (line 28) | def test_class1_neural_network_a0205_training_accuracy(): function test_inequalities (line 84) | def test_inequalities(): function test_basic_training (line 166) | def test_basic_training(): function test_serialization (line 194) | def test_serialization(): function test_different_peptide_lengths (line 228) | def test_different_peptide_lengths(): function test_early_stopping (line 253) | def test_early_stopping(): function test_batch_normalization (line 276) | def test_batch_normalization(): function test_dropout (line 296) | def test_dropout(): function test_multiple_outputs (line 316) | def test_multiple_outputs(): FILE: test/test_class1_pan.py function setup_module (line 18) | def setup_module(): function test_train_simple (line 94) | def test_train_simple(): FILE: test/test_class1_presentation_predictor.py function setup_module (line 23) | def setup_module(): function teardown_module (line 42) | def teardown_module(): function predictors (line 55) | def predictors(): function test_basic (line 64) | def test_basic(predictors): function test_downloaded_predictor_small (line 166) | def test_downloaded_predictor_small(predictors): function test_downloaded_predictor (line 246) | def test_downloaded_predictor(predictors): function test_downloaded_predictor_invalid_peptides (line 429) | def test_downloaded_predictor_invalid_peptides(predictors): FILE: test/test_class1_processing_neural_network.py function setup_teardown (line 22) | def setup_teardown(): function decode_matrix (line 35) | def decode_matrix(array): function test_neural_network_input (line 61) | def test_neural_network_input(): function test_small (line 138) | def test_small(): function test_more (line 144) | def test_more(): function test_basic_indexing (line 156) | def test_basic_indexing(num=10000, do_assertions=True, **hyperparameters): function train_basic_network (line 177) | def train_basic_network(num, do_assertions=True, is_hit=None, **hyperpar... function test_serialization (line 250) | def test_serialization(): function test_different_peptide_lengths (line 284) | def test_different_peptide_lengths(): function test_empty_flanks (line 312) | def test_empty_flanks(): function test_prediction_range (line 335) | def test_prediction_range(): FILE: test/test_class1_processing_predictor.py function setup (line 17) | def setup(): function teardown (line 21) | def teardown(): function test_basic (line 25) | def test_basic(): FILE: test/test_custom_loss.py function setup_module (line 15) | def setup_module(): function setup_teardown (line 21) | def setup_teardown(): function evaluate_loss (line 28) | def evaluate_loss(loss_obj, y_true, y_pred): function test_mse_with_inequalities (line 47) | def test_mse_with_inequalities(loss_obj=None): function test_mse_with_inequalities_and_multiple_outputs (line 93) | def test_mse_with_inequalities_and_multiple_outputs(): function test_multiallelic_mass_spec_loss (line 155) | def test_multiallelic_mass_spec_loss(): function test_encode_y_basic (line 226) | def test_encode_y_basic(): function test_loss_gradient_flow (line 244) | def test_loss_gradient_flow(): function test_inequality_gradient_respects_constraint (line 262) | def test_inequality_gradient_respects_constraint(): FILE: test/test_doctest.py function setup_module (line 20) | def setup_module(): function test_doctests (line 26) | def test_doctests(): FILE: test/test_download_models_class1.py function setup_module (line 17) | def setup_module(): function teardown_module (line 23) | def teardown_module(): function downloaded_predictor (line 30) | def downloaded_predictor(): function predict_and_check (line 34) | def predict_and_check( function test_a1_titin_epitope_downloaded_models (line 51) | def test_a1_titin_epitope_downloaded_models(downloaded_predictor): function test_a1_mage_epitope_downloaded_models (line 59) | def test_a1_mage_epitope_downloaded_models(downloaded_predictor): function test_a2_hiv_epitope_downloaded_models (line 67) | def test_a2_hiv_epitope_downloaded_models(downloaded_predictor): function test_caching (line 73) | def test_caching(downloaded_predictor): function test_downloaded_predictor_is_serializable (line 84) | def test_downloaded_predictor_is_serializable(downloaded_predictor): function test_downloaded_predictor_is_savable (line 99) | def test_downloaded_predictor_is_savable(downloaded_predictor): function test_downloaded_predictor_gives_percentile_ranks (line 115) | def test_downloaded_predictor_gives_percentile_ranks(downloaded_predictor): FILE: test/test_ensemble_centrality.py function test_robust_mean (line 10) | def test_robust_mean(): function test_no_runtime_warnings_for_all_nan_rows (line 33) | def test_no_runtime_warnings_for_all_nan_rows(): FILE: test/test_hyperparameters.py function test_all_combinations_of_hyperparameters (line 6) | def test_all_combinations_of_hyperparameters(): FILE: test/test_local_parallelism.py function test_worker_init_kwargs_round_robin_across_gpus (line 12) | def test_worker_init_kwargs_round_robin_across_gpus(): function test_worker_init_kwargs_without_gpu_scheduling_uses_backend (line 27) | def test_worker_init_kwargs_without_gpu_scheduling_uses_backend(): function test_worker_init_kwargs_normalizes_default_backend_alias (line 40) | def test_worker_init_kwargs_normalizes_default_backend_alias(): function test_worker_init_kwargs_with_gpus_normalizes_default_backend_alias (line 52) | def test_worker_init_kwargs_with_gpus_normalizes_default_backend_alias(): function test_backend_default_alias_parses (line 65) | def test_backend_default_alias_parses(): function test_validate_worker_pool_args_requires_parallelism_for_gpus (line 72) | def test_validate_worker_pool_args_requires_parallelism_for_gpus(): function test_validate_worker_pool_args_rejects_non_cuda_backends_for_gpus (line 82) | def test_validate_worker_pool_args_rejects_non_cuda_backends_for_gpus(): function test_validate_worker_pool_args_rejects_invalid_backend (line 92) | def test_validate_worker_pool_args_rejects_invalid_backend(): FILE: test/test_master_compat_predictions.py function setup_module (line 34) | def setup_module(): function teardown_module (line 38) | def teardown_module(): function _load_model_and_expected (line 42) | def _load_model_and_expected(name): function _predict (line 52) | def _predict(config, weights, expected, backend=None): function test_predictions_match_expected (line 72) | def test_predictions_match_expected(model_name): function test_mps_matches_cpu (line 85) | def test_mps_matches_cpu(model_name): FILE: test/test_multi_output.py function setup_module (line 13) | def setup_module(): function test_multi_output (line 19) | def test_multi_output(setup_module): FILE: test/test_network_merging.py function setup_module (line 14) | def setup_module(): function teardown_module (line 22) | def teardown_module(): function predictors (line 29) | def predictors(): function test_merge (line 33) | def test_merge(predictors): FILE: test/test_percent_rank_transform.py function test_percent_rank_transform (line 9) | def test_percent_rank_transform(): FILE: test/test_predict_command.py function setup_teardown (line 19) | def setup_teardown(): function test_csv (line 35) | def test_csv(): function test_no_csv (line 58) | def test_no_csv(): FILE: test/test_predict_scan_command.py function setup_module (line 16) | def setup_module(): function read_output_csv (line 23) | def read_output_csv(filename): function test_fasta (line 29) | def test_fasta(): function test_fasta_50nm (line 56) | def test_fasta_50nm(): function test_fasta_percentile (line 81) | def test_fasta_percentile(): function test_commandline_sequences (line 106) | def test_commandline_sequences(): FILE: test/test_pytorch_coverage.py function setup_teardown (line 21) | def setup_teardown(): class TestGetPytorchLoss (line 30) | class TestGetPytorchLoss: method test_standard_mse (line 31) | def test_standard_mse(self): method test_standard_mae (line 40) | def test_standard_mae(self): method test_custom_loss_lookup (line 48) | def test_custom_loss_lookup(self): method test_custom_multi_output_lookup (line 54) | def test_custom_multi_output_lookup(self): method test_custom_mass_spec_lookup (line 60) | def test_custom_mass_spec_lookup(self): method test_unknown_standard_loss_raises (line 65) | def test_unknown_standard_loss_raises(self): method test_unknown_custom_loss_raises (line 70) | def test_unknown_custom_loss_raises(self): class TestStandardLossWeighted (line 76) | class TestStandardLossWeighted: method test_mse_with_sample_weights (line 77) | def test_mse_with_sample_weights(self): method test_mae_with_sample_weights (line 87) | def test_mae_with_sample_weights(self): method test_mse_column_vector_predictions_do_not_warn (line 96) | def test_mse_column_vector_predictions_do_not_warn(self): class TestMSEWithInequalitiesSampleWeights (line 108) | class TestMSEWithInequalitiesSampleWeights: method test_weighted_equality_loss (line 109) | def test_weighted_equality_loss(self): method test_encode_y_nan_raises (line 121) | def test_encode_y_nan_raises(self): method test_encode_y_length_mismatch_raises (line 126) | def test_encode_y_length_mismatch_raises(self): class TestMSEMultiOutputSampleWeights (line 132) | class TestMSEMultiOutputSampleWeights: method test_weighted_multi_output (line 133) | def test_weighted_multi_output(self): method test_encode_y_negative_output_indices_raises (line 144) | def test_encode_y_negative_output_indices_raises(self): method test_encode_y_output_indices_shape_mismatch_raises (line 150) | def test_encode_y_output_indices_shape_mismatch_raises(self): class TestMultiallelicMassSpecEdgeCases (line 157) | class TestMultiallelicMassSpecEdgeCases: method test_no_hits_returns_zero (line 158) | def test_no_hits_returns_zero(self): method test_no_decoys_returns_zero (line 167) | def test_no_decoys_returns_zero(self): class TestGetActivation (line 180) | class TestGetActivation: method test_tanh (line 181) | def test_tanh(self): method test_sigmoid (line 187) | def test_sigmoid(self): method test_relu (line 192) | def test_relu(self): method test_linear_returns_none (line 198) | def test_linear_returns_none(self): method test_unknown_raises (line 203) | def test_unknown_raises(self): class TestLocallyConnected1D (line 209) | class TestLocallyConnected1D: method test_output_shape (line 210) | def test_output_shape(self): method test_deterministic_forward (line 219) | def test_deterministic_forward(self): class TestEnsembleCentralityEdgeCases (line 236) | class TestEnsembleCentralityEdgeCases: method test_robust_mean_falls_back_to_nanmean_for_few_columns (line 237) | def test_robust_mean_falls_back_to_nanmean_for_few_columns(self): method test_robust_mean_two_columns (line 244) | def test_robust_mean_two_columns(self): method test_robust_mean_all_nan_many_columns (line 250) | def test_robust_mean_all_nan_many_columns(self): method test_nanmedian_mixed_nans (line 256) | def test_nanmedian_mixed_nans(self): method test_nanmean_single_value_per_row (line 268) | def test_nanmean_single_value_per_row(self): method test_centrality_measures_dict (line 276) | def test_centrality_measures_dict(self): class TestWeightInitialization (line 284) | class TestWeightInitialization: method _make_model (line 285) | def _make_model(self, init): method test_glorot_uniform (line 298) | def test_glorot_uniform(self): method test_glorot_normal (line 302) | def test_glorot_normal(self): method test_he_uniform (line 306) | def test_he_uniform(self): method test_he_normal (line 310) | def test_he_normal(self): method test_biases_are_zero (line 314) | def test_biases_are_zero(self): class TestMergedClass1NeuralNetwork (line 324) | class TestMergedClass1NeuralNetwork: method _make_merged (line 325) | def _make_merged(self, merge_method, n_networks=2): method test_average (line 343) | def test_average(self): method test_sum (line 352) | def test_sum(self): method test_concatenate (line 360) | def test_concatenate(self): method test_unknown_merge_method_raises (line 368) | def test_unknown_merge_method_raises(self): method test_get_set_weights_roundtrip (line 375) | def test_get_set_weights_roundtrip(self): class TestSkipConnectionsTopology (line 390) | class TestSkipConnectionsTopology: method test_forward_pass (line 391) | def test_forward_pass(self): method test_different_from_feedforward (line 408) | def test_different_from_feedforward(self): class TestCanonicalizeAlleleName (line 439) | class TestCanonicalizeAlleleName: method test_common_alleles_roundtrip (line 440) | def test_common_alleles_roundtrip(self): method test_aliases_false_avoids_remapping (line 451) | def test_aliases_false_avoids_remapping(self): method test_normalize_raises_on_invalid (line 458) | def test_normalize_raises_on_invalid(self): method test_normalize_returns_default_on_invalid (line 463) | def test_normalize_returns_default_on_invalid(self): method test_forbidden_substring_raises (line 469) | def test_forbidden_substring_raises(self): method test_forbidden_substring_returns_default (line 474) | def test_forbidden_substring_returns_default(self): class TestConfigurePyTorch (line 484) | class TestConfigurePyTorch: method test_reconfigure_backend (line 485) | def test_reconfigure_backend(self): method test_invalid_backend_raises (line 494) | def test_invalid_backend_raises(self): method test_default_backend_alias_maps_to_auto (line 499) | def test_default_backend_alias_maps_to_auto(self): method test_configure_tensorflow_cpu_backend_maps_to_cpu (line 508) | def test_configure_tensorflow_cpu_backend_maps_to_cpu(self): method test_configure_tensorflow_default_alias_maps_to_auto (line 519) | def test_configure_tensorflow_default_alias_maps_to_auto(self): method test_configure_tensorflow_gpu_backend_maps_to_gpu (line 530) | def test_configure_tensorflow_gpu_backend_maps_to_gpu(self): FILE: test/test_pytorch_regressions.py function setup_teardown (line 32) | def setup_teardown(): function _make_simple_affinity_model (line 38) | def _make_simple_affinity_model(**overrides): function _make_allele_representations (line 62) | def _make_allele_representations(num_alleles=2): function _seed_all (line 66) | def _seed_all(seed=1): function test_sample_weights_affect_training (line 72) | def test_sample_weights_affect_training(): function test_validation_split_is_fixed_when_lr_zero (line 100) | def test_validation_split_is_fixed_when_lr_zero(): function test_dropout_probability_is_keep_prob (line 122) | def test_dropout_probability_is_keep_prob(): function test_batch_norm_uses_keras_defaults (line 134) | def test_batch_norm_uses_keras_defaults(): function test_processing_dropout_is_spatial (line 151) | def test_processing_dropout_is_spatial(): function test_processing_flank_averages_use_tf_masked_mean_semantics (line 178) | def test_processing_flank_averages_use_tf_masked_mean_semantics(): function test_mse_with_inequalities_rejects_out_of_range_targets (line 207) | def test_mse_with_inequalities_rejects_out_of_range_targets(): function test_mse_with_inequalities_rejects_invalid_inequality (line 214) | def test_mse_with_inequalities_rejects_invalid_inequality(): function test_multiallelic_mass_spec_encode_y_validates_values (line 219) | def test_multiallelic_mass_spec_encode_y_validates_values(): function test_merge_allele_specific_raises_not_implemented (line 224) | def test_merge_allele_specific_raises_not_implemented(): function test_merged_network_serialization_preserves_dropout_keep_probability (line 242) | def test_merged_network_serialization_preserves_dropout_keep_probability(): function test_dense_regularization_excludes_output_layer (line 279) | def test_dense_regularization_excludes_output_layer(): function test_processing_validation_uses_last_fraction_and_sample_weights (line 311) | def test_processing_validation_uses_last_fraction_and_sample_weights(): function test_optimizer_defaults_match_keras (line 380) | def test_optimizer_defaults_match_keras(): function test_weight_and_embedding_updates_preserve_device (line 407) | def test_weight_and_embedding_updates_preserve_device(): function test_cached_keras_weight_reload_preserves_device (line 459) | def test_cached_keras_weight_reload_preserves_device(): function test_l1_regularization_changes_weights_even_with_zero_data_loss (line 485) | def test_l1_regularization_changes_weights_even_with_zero_data_loss(): FILE: test/test_random_negative_peptides.py function test_random_negative_peptides_by_allele_equalize_nonbinders (line 10) | def test_random_negative_peptides_by_allele_equalize_nonbinders(): function test_random_negative_peptides_by_allele (line 63) | def test_random_negative_peptides_by_allele(): FILE: test/test_regression_target.py function test_regression_target_to_ic50 (line 9) | def test_regression_target_to_ic50(): function test_ic50_to_regression_target (line 14) | def test_ic50_to_regression_target(): FILE: test/test_released_master_predictions.py function setup_module (line 18) | def setup_module(): function teardown_module (line 22) | def teardown_module(): function _load_expected (line 26) | def _load_expected(name): function test_allele_specific_affinity_predictions (line 32) | def test_allele_specific_affinity_predictions(): function test_pan_allele_affinity_predictions (line 52) | def test_pan_allele_affinity_predictions(): FILE: test/test_released_predictors_on_hpv_dataset.py function data_path (line 19) | def data_path(name): function setup_module (line 30) | def setup_module(): function teardown_module (line 41) | def teardown_module(): function predictors (line 48) | def predictors(): function test_on_hpv (line 52) | def test_on_hpv(predictors, df=DF): FILE: test/test_released_predictors_well_correlated.py function setup (line 23) | def setup(): function setup_teardown (line 34) | def setup_teardown(): function predictors (line 53) | def predictors(): function test_correlation (line 57) | def test_correlation( FILE: test/test_released_presentation_highscore_rows.py function setup_module (line 34) | def setup_module(): function teardown_module (line 38) | def teardown_module(): function _load_expected (line 42) | def _load_expected(): function _atol_for_output (line 48) | def _atol_for_output(column): function test_expected_data_has_high_and_low_contexts (line 56) | def test_expected_data_has_high_and_low_contexts(): function test_presentation_predictions (line 72) | def test_presentation_predictions(): FILE: test/test_selected_peptides_csv.py function _normalize_allele (line 24) | def _normalize_allele(allele): function selected_peptides_predictions (line 36) | def selected_peptides_predictions(): function test_selected_peptides_mhcflurry_matches_csv (line 64) | def test_selected_peptides_mhcflurry_matches_csv(selected_peptides_predi... function test_selected_peptides_netmhcpan_affinity_close (line 93) | def test_selected_peptides_netmhcpan_affinity_close(selected_peptides_pr... FILE: test/test_speed.py function setup_module (line 28) | def setup_module(): function teardown_module (line 38) | def teardown_module(): function load_predictors (line 48) | def load_predictors(): function predictors (line 57) | def predictors(): function init (line 64) | def init(): function test_speed_allele_specific (line 68) | def test_speed_allele_specific(predictors, profile=False, num=DEFAULT_NU... function test_speed_pan_allele (line 121) | def test_speed_pan_allele(predictors, profile=False, num=DEFAULT_NUM_PRE... FILE: test/test_train_and_related_commands.py function setup_module (line 22) | def setup_module(): function run_and_check (line 65) | def run_and_check(n_jobs=0): function run_and_check_with_model_selection (line 107) | def run_and_check_with_model_selection(n_jobs=1): function test_run_parallel (line 169) | def test_run_parallel(): function test_run_serial (line 174) | def test_run_serial(): FILE: test/test_train_pan_allele_models_command.py function setup_module (line 24) | def setup_module(): function run_and_check (line 138) | def run_and_check(n_jobs=0, delete=True, additional_args=[]): function test_run_parallel (line 197) | def test_run_parallel(): function test_run_serial (line 202) | def test_run_serial(): function test_run_cluster_parallelism (line 206) | def test_run_cluster_parallelism(): FILE: test/test_train_processing_models_command.py function setup_module (line 24) | def setup_module(): function make_dataset (line 47) | def make_dataset(num=10000): function run_and_check (line 83) | def run_and_check(n_jobs=0, additional_args=[], delete=False): function Xtest_run_parallel (line 149) | def Xtest_run_parallel(): function test_run_serial (line 153) | def test_run_serial(): FILE: test/test_training_variants.py function setup_teardown (line 21) | def setup_teardown(): function _seed (line 27) | def _seed(s=42): function _make_model (line 33) | def _make_model(**overrides): function test_train_with_locally_connected (line 59) | def test_train_with_locally_connected(): function test_train_with_dropout (line 81) | def test_train_with_dropout(): function test_train_with_batch_normalization (line 100) | def test_train_with_batch_normalization(): function test_train_lc_dropout_batchnorm (line 120) | def test_train_lc_dropout_batchnorm(): function test_train_with_skip_connections (line 143) | def test_train_with_skip_connections(): function test_train_with_peptide_dense_layers (line 162) | def test_train_with_peptide_dense_layers(): function test_train_with_optimizer (line 182) | def test_train_with_optimizer(optimizer): function test_train_with_l2_regularization (line 202) | def test_train_with_l2_regularization(): function test_train_with_l1_l2_regularization (line 221) | def test_train_with_l1_l2_regularization(): function test_train_with_random_negatives (line 241) | def test_train_with_random_negatives(): function test_train_with_early_stopping (line 261) | def test_train_with_early_stopping(): function test_serialization_with_lc_dropout_batchnorm (line 285) | def test_serialization_with_lc_dropout_batchnorm(): function test_train_mixed_lengths_with_lc (line 314) | def test_train_mixed_lengths_with_lc(): function _random_aa (line 345) | def _random_aa(choices, rng): function _generate_a0201_binder (line 349) | def _generate_a0201_binder(rng, length=9): function _generate_non_binder (line 357) | def _generate_non_binder(rng, length=9): function test_learn_a0201_motif (line 367) | def test_learn_a0201_motif():