1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 19:51:17 +00:00

salmon: init at 1.10.2

Co-authored-by: Arne Keller <2012gdwu+github@posteo.de>
Co-authored-by: a-n-n-a-l-e-e <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
This commit is contained in:
László Kupcsik 2024-01-06 23:07:32 +01:00
parent dcb93f2776
commit ccef24c817
2 changed files with 144 additions and 0 deletions

View file

@ -0,0 +1,60 @@
diff --git a/scripts/fetchPufferfish.sh b/scripts/fetchPufferfish.sh
index bf2574e0..42582806 100755
--- a/scripts/fetchPufferfish.sh
+++ b/scripts/fetchPufferfish.sh
@@ -11,10 +11,6 @@ CURR_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
EXTERNAL_DIR=${CURR_DIR}/../external
INSTALL_DIR=${CURR_DIR}/../external/install
-if [ -d ${EXTERNAL_DIR}/pufferfish ] ; then
- rm -fr ${EXTERNAL_DIR}/pufferfish
-fi
-
if [ -d ${INSTALL_DIR}/include/pufferfish ] ; then
rm -fr ${INSTALL_DIR}/include/pufferfish
fi
@@ -23,42 +19,10 @@ if [ -d ${INSTALL_DIR}/src/pufferfish ] ; then
rm -fr ${INSTALL_DIR}/src/pufferfish
fi
-SVER=salmon-v1.10.2
-#SVER=develop
-#SVER=sketch-mode
-
-EXPECTED_SHA256=f225b74833f71dcf767a565345224357fb091f90ce79717abc836814d9ccd101
-
-mkdir -p ${EXTERNAL_DIR}
-curl -k -L https://github.com/COMBINE-lab/pufferfish/archive/${SVER}.zip -o ${EXTERNAL_DIR}/pufferfish.zip
-
-hashcheck=""
-if exists sha256sum; then
- hashcheck="sha256sum"
-elif exists shasum; then
- hashcheck="shasum -a256"
-else
- unset hashcheck
-fi
-
-
-if [ -z "${hashcheck-}" ]; then
- echo "Couldn't find shasum command; can't verify contents of downloaded pufferfish";
-else
-
- if [[ $SVER != develop && $SVER != onetbb ]]; then
- echo "${EXPECTED_SHA256} ${EXTERNAL_DIR}/pufferfish.zip" | ${hashcheck} -c - || { echo "pufferfish.zip did not match expected SHA1! Exiting."; exit 1; }
- else
- echo "not testing sha since pulling from develop"
- fi
-fi
-
-
-rm -fr ${EXTERNAL_DIR}/pufferfish
-unzip ${EXTERNAL_DIR}/pufferfish.zip -d ${EXTERNAL_DIR}
-mv ${EXTERNAL_DIR}/pufferfish-${SVER} ${EXTERNAL_DIR}/pufferfish
mkdir -p ${INSTALL_DIR}/include/pufferfish
+# This is needed later when pufferfish is compiled for Salmon
+cp -r ${pufferFishSrc} ${EXTERNAL_DIR}/pufferfish
cp ${EXTERNAL_DIR}/pufferfish/include/ProgOpts.hpp ${INSTALL_DIR}/include/pufferfish
cp ${EXTERNAL_DIR}/pufferfish/include/BooPHF.hpp ${INSTALL_DIR}/include/pufferfish

View file

@ -0,0 +1,84 @@
{ lib
, stdenv
, autoreconfHook
, bash
, boost
, bzip2
, cereal_1_3_2
, cmake
, curl
, fetchFromGitHub
, jemalloc
, libgff
, libiconv
, libstaden-read
, pkg-config
, tbb_2021_8
, xz
, zlib
}:
stdenv.mkDerivation (finalAttrs: {
pname = "salmon";
version = "1.10.2";
pufferFishSrc = fetchFromGitHub {
owner = "COMBINE-lab";
repo = "pufferfish";
rev = "salmon-v${finalAttrs.version}";
hash = "sha256-JKbUFBEsqnENl4vFqve1FCd4TI3n9bRi2RNHC8QGQGc=";
};
src = fetchFromGitHub {
owner = "COMBINE-lab";
repo = "salmon";
rev = "v${finalAttrs.version}";
hash = "sha256-kwqoUmVCqjr/xRxJjQKaFjjCQW+MFASHJ2f9OiAumNU=";
};
patches = [
# Use pufferfish source fetched by nix
./fetch-pufferfish.patch
];
postPatch = "patchShebangs .";
buildInputs = [
(boost.override { enableShared = false; enabledStatic = true; })
bzip2
cereal_1_3_2
curl
jemalloc
libgff
libstaden-read
tbb_2021_8
xz
zlib
] ++ lib.optionals stdenv.isDarwin [ libiconv ];
nativeBuildInputs = [ cmake pkg-config ];
strictDeps = true;
meta = {
description =
"Tool for quantifying the expression of transcripts using RNA-seq data";
longDescription = ''
Salmon is a tool for quantifying the expression of transcripts
using RNA-seq data. Salmon uses new algorithms (specifically,
coupling the concept of quasi-mapping with a two-phase inference
procedure) to provide accurate expression estimates very quickly
and while using little memory. Salmon performs its inference using
an expressive and realistic model of RNA-seq data that takes into
account experimental attributes and biases commonly observed in
real RNA-seq data.
'';
homepage = "https://combine-lab.github.io/salmon";
downloadPage = "https://github.com/COMBINE-lab/salmon/releases";
changelog = "https://github.com/COMBINE-lab/salmon/releases/tag/" +
"v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.kupac ];
};
})