Skip to content

Commit

Permalink
Merge pull request #247476 from apraga/spip
Browse files Browse the repository at this point in the history
spip: init at unstable-2023-04-19
  • Loading branch information
JohnRTitor authored Jun 24, 2024
2 parents 416298e + 829d529 commit 759a060
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions pkgs/by-name/sp/spip/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
fetchFromGitHub,
fetchurl,
lib,
makeWrapper,
rPackages,
rWrapper,
stdenv
}:

let
my-r-packages = rWrapper.override{packages = with rPackages; [
foreach
doParallel
randomForest
];};
transcriptome-url = "https://kumisystems.dl.sourceforge.net/project/splicing-prediction-pipeline/transcriptome/";

transcriptome19 = fetchurl {
url = transcriptome-url + "/transcriptome_hg19.RData";
sha256 = "sha256-E8UmHoNoySSIde+TRE6bxVP0PrccpKDvIHBGCvWnYOw=";
};

transcriptome38 = fetchurl {
url = transcriptome-url + "/transcriptome_hg38.RData";
sha256 = "sha256-mQMMZVN1byXMYjFoRdezmoZtnhUur2CHOP/j/pmw8as=";
};

in

stdenv.mkDerivation {
pname = "spip";
version = "unstable-2023-04-19";

src = fetchFromGitHub {
owner = "raphaelleman";
repo = "SPiP";
rev = "cae95fe0ee7a2602630b7a4eacbf7cfa0e1763f0";
sha256 = "sha256-/CufUaQYnsdo8Rij/24JmixPgMi7o1CApLxeTneWAVc=";
};

nativeBuildInputs = [ makeWrapper ];
buildInput = [ my-r-packages ];

installPhase =''
runHook preInstall
mkdir -p $out/bin
cp SPiPv2.1_main.r $out/
cp -r RefFiles $out/
ln -s ${transcriptome19} $out/RefFiles/transcriptome_hg19.RData
ln -s ${transcriptome38} $out/RefFiles/transcriptome_hg38.RData
makeWrapper ${my-r-packages}/bin/Rscript $out/bin/spip \
--add-flags "$out/SPiPv2.1_main.r"
runHook postInstall
'';

meta = with lib; {
description = "A random forest model for splice prediction in genomics";
license = licenses.mit;
homepage = "https://github.com/raphaelleman/SPiP";
maintainers = with maintainers; [ apraga ];
platforms = platforms.unix;
mainProgram = "spip";
};
}

0 comments on commit 759a060

Please sign in to comment.