aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2019-06-20 08:23:30 +1000
committerJustin Bedo <cu@cua0.org>2019-08-29 09:08:04 +1000
commitfbe7543726f4321e3cb11c2fa503c27df14ac8fd (patch)
treea678a7e24123ab9a34e4f91120fcc0dcf52dea18 /tools
parent0df02e2866b910c012afa3bc24ceb7fdf9cdf6d5 (diff)
CNVkit: merge into nixpkgs
Diffstat (limited to 'tools')
-rw-r--r--tools/cnvkit-app.nix60
-rw-r--r--tools/cnvkit-batch.nix2
-rw-r--r--tools/cnvkit-scatter.nix2
-rw-r--r--tools/cnvkit.nix2
4 files changed, 2 insertions, 64 deletions
diff --git a/tools/cnvkit-app.nix b/tools/cnvkit-app.nix
deleted file mode 100644
index dc9f023..0000000
--- a/tools/cnvkit-app.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{ lib
-, fetchurl
-, rPackages
-, rWrapper
-, buildPythonPackage
-, fetchPypi
-, biopython
-, six
-, numpy
-, pillow
-, pysam
-, future
-, scipy
-, pandas
-, matplotlib
-, reportlab
-, zlib
-, bzip2
-, htslib
-, libjpeg
-, pkgconfig
-, futures
-}:
-
-let pyfaidx = buildPythonPackage rec {
- pname = "pyfaidx";
- version = "0.5.3.1";
-
- src = fetchPypi {
- inherit pname version;
- sha256 = "0mjbksbj9hh2cf0yjr951cjahhn0lg7p71kd3kvbnscqyxa44kfr";
- };
-
- propagatedBuildInputs = [ six ];
- };
-
- cghFLasso = rPackages.buildRPackage rec {
- name = "cghFLasso-${version}";
- version = "0.2-1";
- src = fetchurl {
- url = "https://cran.r-project.org/src/contrib/Archive/cghFLasso/cghFLasso_${version}.tar.gz";
- sha256 = "0b1hnjf9g0v47hbz0dy9m6jhcl1ky20yyhhmm8myng2sndcpjsbf";
- };
- };
-
- cnvR = rWrapper.override {
- packages = with rPackages; [ DNAcopy cghFLasso ];
- };
-
-in buildPythonPackage rec {
- pname = "CNVkit";
- version = "0.9.5";
-
- src = fetchPypi {
- inherit pname version;
- sha256 = "1sa70bmnxj1lzp33pbj3axk6n77czswwj9cirimxh2qrn84i7vs3";
- };
-
- propagatedBuildInputs = [ biopython numpy scipy pandas matplotlib reportlab pyfaidx pysam futures future pillow cnvR ];
-}
diff --git a/tools/cnvkit-batch.nix b/tools/cnvkit-batch.nix
index 114b6b9..5160867 100644
--- a/tools/cnvkit-batch.nix
+++ b/tools/cnvkit-batch.nix
@@ -22,7 +22,7 @@ assert (all sorted (normals ++ tumours));
stage {
name = "cnvkit";
- buildInputs = [ cnvkit.app ];
+ buildInputs = with pkgs; [ python3Packages.cnvkit ];
buildCommand = ''
ln -s ${ref} ref.fa
ln -s ${samtools.faidx indexAttrs ref} ref.fa.fai
diff --git a/tools/cnvkit-scatter.nix b/tools/cnvkit-scatter.nix
index f9dc7f6..2899584 100644
--- a/tools/cnvkit-scatter.nix
+++ b/tools/cnvkit-scatter.nix
@@ -9,7 +9,7 @@ with types;
stage {
name = "cnvkit-scatter";
- buildInputs = [ cnvkit.app ];
+ buildInputs = with pkgs; [ pkgs.python3Packages.cnvkit ];
buildCommand = ''
cnvkit.py scatter -s ${input}/*.cn{s,r} -o plot.pdf
cp plot.pdf $out
diff --git a/tools/cnvkit.nix b/tools/cnvkit.nix
index 73f4329..fc55d94 100644
--- a/tools/cnvkit.nix
+++ b/tools/cnvkit.nix
@@ -3,8 +3,6 @@
with bionix;
{
- app = lib.callPackageWith (pkgs // pkgs.pythonPackages) ./cnvkit-app.nix {};
-
/* Call CNVs
Type: callCNV :: {targets :: target file, annotations :: annotation file, ...} -> {normals :: [bam], tumours :: [bam]} -> CNVs
*/