Unverified Commit 9f7ea2b7 authored by kirillrdy's avatar kirillrdy Committed by GitHub
Browse files

python3Packages.mhcflurry: 2.1.5 -> 2.2.0 (#503862)

parents d75bdbcc 8ee204ce
Loading
Loading
Loading
Loading
+21 −21
Original line number Diff line number Diff line
@@ -3,53 +3,48 @@
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,

  # dependencies
  appdirs,
  keras,
  mhcgnomes,
  numpy,
  pandas,
  pyyaml,
  scikit-learn,
  tensorflow,
  tf-keras,
  torch,
  tqdm,

  # tests
  pytestCheckHook,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "mhcflurry";
  version = "2.1.5";
  version = "2.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "openvax";
    repo = "mhcflurry";
    tag = "v${version}";
    hash = "sha256-TNb3oKZvgBuXoSwsTuEJjFKEVZyHynazuPInj7wVKs8=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-xtxPQg4Hsu7PzbXdjf0MlEaOYeAZaMG3gSNsa6l9RiM=";
  };

  # pipes has been removed in python 3.13
  postPatch = ''
    substituteInPlace mhcflurry/downloads.py \
      --replace-fail \
        "from pipes import quote" \
        "from shlex import quote"
  '';
  build-system = [
    setuptools
  ];

  # keras and tensorflow are not in the official setup.py requirements but are required for the CLI utilities to run.
  dependencies = [
    appdirs
    keras
    mhcgnomes
    numpy
    pandas
    pyyaml
    scikit-learn
    tensorflow
    tf-keras
    torch
    tqdm
  ];

@@ -62,27 +57,32 @@ buildPythonPackage rec {
    "test_a1_mage_epitope_downloaded_models"
    "test_a1_titin_epitope_downloaded_models"
    "test_a2_hiv_epitope_downloaded_models"
    "test_allele_specific_affinity_predictions"
    "test_basic"
    "test_caching"
    "test_class1_neural_network_a0205_training_accuracy"
    "test_commandline_sequences"
    "test_correlation"
    "test_csv"
    "test_downloaded_predictor"
    "test_downloaded_predictor_gives_percentile_ranks"
    "test_downloaded_predictor_invalid_peptides"
    "test_downloaded_predictor_is_savable"
    "test_downloaded_predictor_is_serializable"
    "test_downloaded_predictor_small"
    "test_downloaded_predictor"
    "test_fasta"
    "test_fasta_50nm"
    "test_fasta_best"
    "test_fasta"
    "test_merge"
    "test_no_csv"
    "test_on_hpv"
    "test_pan_allele_affinity_predictions"
    "test_presentation_predictions"
    "test_run_cluster_parallelism"
    "test_run_parallel"
    "test_run_serial"
    "test_selected_peptides_mhcflurry_matches_csv"
    "test_selected_peptides_netmhcpan_affinity_close"
    "test_speed_allele_specific"
    "test_speed_pan_allele"
  ];
@@ -99,8 +99,8 @@ buildPythonPackage rec {
  meta = {
    description = "Peptide-MHC I binding affinity prediction";
    homepage = "https://github.com/openvax/mhcflurry";
    changelog = "https://github.com/openvax/mhcflurry/releases/tag/v${version}";
    changelog = "https://github.com/openvax/mhcflurry/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ samuela ];
  };
}
})
+26 −12
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  lib,

  # build-system
  setuptools,

  # dependencies
  pandas,
  pyyaml,
  serializable,
  numpy,

  # tests
  pytestCheckHook,
}:

buildPythonPackage {
buildPythonPackage (finalAttrs: {
  pname = "mhcgnomes";
  version = "1.8.6";
  format = "setuptools";
  version = "3.15.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pirl-unc";
    repo = "mhcgnomes";
    # See https://github.com/pirl-unc/mhcgnomes/issues/20. As of 2023-07-13,
    # they do no have version tags.
    rev = "c7e779b60e35a031f6e0f0ea6ae70e8a8e7671c6";
    hash = "sha256-KKiBlnFlavRnaQnOpAzG0dyxmFB+zF9L6t/H05LkFZE=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-tcJfGIJsbCdN+U/+2zsYBhKEJNy55QMf7eu9Z4nuXlk=";
  };

  propagatedBuildInputs = [
  build-system = [
    setuptools
  ];

  dependencies = [
    pandas
    pyyaml
    serializable
    numpy
  ];

  pythonImportsCheck = [ "mhcgnomes" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = {
    description = "Parsing MHC nomenclature in the wild";
    homepage = "https://github.com/pirl-unc/mhcgnomes";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ samuela ];
  };
}
})