1{ appdirs
2, buildPythonPackage
3, fetchFromGitHub
4, keras
5, lib
6, mhcgnomes
7, nose
8, pandas
9, pytestCheckHook
10, pyyaml
11, scikit-learn
12, tensorflow
13, tqdm
14}:
15
16buildPythonPackage rec {
17 pname = "mhcflurry";
18 version = "2.1.0";
19 format = "setuptools";
20
21 src = fetchFromGitHub {
22 owner = "openvax";
23 repo = pname;
24 rev = "refs/tags/v${version}";
25 hash = "sha256-VyPHcNlZYgNJZb2UBFX55x+nE0GnHixkcsiTNjDCju0=";
26 };
27
28 # keras and tensorflow are not in the official setup.py requirements but are required for the CLI utilities to run.
29 propagatedBuildInputs = [
30 appdirs
31 keras
32 mhcgnomes
33 pandas
34 pyyaml
35 scikit-learn
36 tensorflow
37 tqdm
38 ];
39
40 nativeCheckInputs = [ nose pytestCheckHook ];
41
42 disabledTests = [
43 # RuntimeError: Missing MHCflurry downloadable file: /homeless-shelter/.local...
44 "test_a1_mage_epitope_downloaded_models"
45 "test_a1_titin_epitope_downloaded_models"
46 "test_a2_hiv_epitope_downloaded_models"
47 "test_basic"
48 "test_caching"
49 "test_class1_neural_network_a0205_training_accuracy"
50 "test_commandline_sequences"
51 "test_correlation"
52 "test_csv"
53 "test_downloaded_predictor_gives_percentile_ranks"
54 "test_downloaded_predictor_invalid_peptides"
55 "test_downloaded_predictor_is_savable"
56 "test_downloaded_predictor_is_serializable"
57 "test_downloaded_predictor_small"
58 "test_downloaded_predictor"
59 "test_fasta_50nm"
60 "test_fasta_best"
61 "test_fasta"
62 "test_merge"
63 "test_no_csv"
64 "test_on_hpv"
65 "test_run_cluster_parallelism"
66 "test_run_parallel"
67 "test_run_serial"
68 "test_speed_allele_specific"
69 "test_speed_pan_allele"
70 ];
71
72 disabledTestPaths = [
73 # RuntimeError: Missing MHCflurry downloadable file: /homeless-shelter/.local...
74 "test/test_changing_allele_representations.py"
75 "test/test_class1_affinity_predictor.py"
76 "test/test_class1_pan.py"
77 ];
78
79 pythonImportsCheck = [ "mhcflurry" ];
80
81 meta = with lib; {
82 description = "Peptide-MHC I binding affinity prediction";
83 homepage = "https://github.com/openvax/mhcflurry";
84 license = licenses.asl20;
85 maintainers = with maintainers; [ samuela ];
86 };
87}