Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recipe for fusioncatcher #13676

Merged
merged 2 commits into from
Feb 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions recipes/fusioncatcher/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# copy main scripts
chmod +x bin/*.py
cp bin/* ${PREFIX}/bin/
cp etc/configuration.cfg ${PREFIX}/etc/

# copy script to download database
chmod +x ${RECIPE_DIR}/download-db.sh
cp ${RECIPE_DIR}/download-db.sh ${PREFIX}/bin

# create folder for database download
target=${PREFIX}/share/${PKG_NAME}-${PKG_VERSION}
mkdir -p ${target}/db/
touch ${target}/db/.empty

# set FC DB PATH variable on env activation
mkdir -p ${PREFIX}/etc/conda/activate.d ${PREFIX}/etc/conda/deactivate.d
cat <<EOF >> ${PREFIX}/etc/conda/activate.d/fusioncatcher.sh
export FC_DB_PATH=${target}/db/
EOF

cat <<EOF >> ${PREFIX}/etc/conda/deactivate.d/fusioncatcher.sh
unset FC_DB_PATH
EOF
17 changes: 17 additions & 0 deletions recipes/fusioncatcher/download-db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

echo "Downloading Human Ensembl v90 database to ${FC_DB_PATH}/current/..."

# Direct download:
cd ${FC_DB_PATH}
rm -rf human_v90.tar.gz.*
wget http://sourceforge.net/projects/fusioncatcher/files/data/human_v90.tar.gz.aa
wget http://sourceforge.net/projects/fusioncatcher/files/data/human_v90.tar.gz.ab
wget http://sourceforge.net/projects/fusioncatcher/files/data/human_v90.tar.gz.ac
wget http://sourceforge.net/projects/fusioncatcher/files/data/human_v90.tar.gz.ad
cat human_v90.tar.gz.* | tar xz
ln -s human_v90 current

echo "Human Ensembl v90 database is downloaded."

exit 0
89 changes: 89 additions & 0 deletions recipes/fusioncatcher/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{% set name = "fusioncatcher" %}
{% set version = "1.00" %}
{% set sha256 = "46cd7ab4f06160b9735b03893254171ecc387d35c12796998448cd1594775dbc" %}

package:
name: {{ name }}
version: {{ version }}

source:
url: https://sourceforge.net/projects/{{ name }}/files/{{ name }}_v{{ version }}.zip
sha256: {{ sha256 }}
patches:
- paths.patch

build:
number: 0
skip: True # [py3k]

requirements:
host:
- python
- biopython >=1.50
- bowtie=1.2.0
- fusioncatcher-seqtk=1.2
- star=2.5.2b
- bowtie2=2.3.0
- bbmap
- blat=35
- lzo
- bwa=0.7.12
- ucsc-faToTwoBit
- velvet=1.2.10
- openpyxl=2.5.0a2
- xlrd=1.0.0
- pigz=2.3
- samtools=0.1.19
- picard=2.10.6
- numpy=1.13.1
- parallel=20171222
- ucsc-liftover
- oases
- lzop
- java-jdk
- sra-tools=2.6.2
- zip
run:
- python
- biopython >=1.50
- bowtie=1.2.0
- fusioncatcher-seqtk=1.2
- star=2.5.2b
- bowtie2=2.3.0
- bbmap
- blat=35
- lzo
- bwa=0.7.12
- ucsc-faToTwoBit
- velvet=1.2.10
- openpyxl=2.5.0a2
- xlrd=1.0.0
- pigz=2.3
- samtools=0.1.19
- picard=2.10.6
- numpy=1.13.1
- parallel=20171222
- ucsc-liftover
- oases
- lzop
- java-jdk
- sra-tools=2.6.2
- zip

test:
commands:
- export FC_DB_PATH=${PREFIX}/share/${PKG_NAME}-${PKG_VERSION}/db && fusioncatcher -h
- export FC_DB_PATH=${PREFIX}/share/${PKG_NAME}-${PKG_VERSION}/db && fusioncatcher-build -h

about:
home: https://github.com/ndaniel/fusioncatcher
license: GPL-3.0
summary: "Finder of Somatic Fusion Genes in RNA-seq data."
license_family: GPL
license_file: LICENSE

extra:
identifiers:
- doi:10.1101/011650
skip-lints:
- uses_javajdk
100 changes: 100 additions & 0 deletions recipes/fusioncatcher/paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
--- etc/configuration.cfg 2018-10-17 18:23:40.361288543 -0500
+++ etc/configuration.cfg.new 2018-10-17 18:46:16.142296785 -0500
@@ -1,37 +1,35 @@
[paths]
-python = /usr/bin/
+python = ${CONDA_PREFIX}/bin/
#
# for changing the shebang for all Python scripts used by FusionCatcher
# to '#!/some/other/python'
# one could run 'fusioncatcher/bin/shebang.py' -s #!/some/other/python
#
-data = /apps/fusioncatcher/data/current/
-scripts = /apps/fusioncatcher/bin/
-bowtie = /apps/fusioncatcher/tools/bowtie/
-bowtie2 = /apps/fusioncatcher/tools/bowtie2/
-blat = /apps/fusioncatcher/tools/blat/
-bwa = /apps/fusioncatcher/tools/bwa/
-bbmap = /apps/fusioncatcher/tools/bbmap/
-liftover = /apps/fusioncatcher/tools/liftover/
-velvet = /apps/fusioncatcher/tools/velvet/
-oases = /apps/fusioncatcher/tools/oases/
-fatotwobit = /apps/fusioncatcher/tools/blat/
-samtools = /apps/fusioncatcher/tools/samtools/
-seqtk = /apps/fusioncatcher/tools/seqtk/
-star = /apps/fusioncatcher/tools/star/source/
-sra = /apps/fusioncatcher/tools/sratoolkit/bin/
-numpy = /apps/fusioncatcher/tools/numpy/
-biopython = /apps/fusioncatcher/tools/biopython/
-xlrd = /apps/fusioncatcher/tools/xlrd/
-openpyxl = /apps/fusioncatcher/tools/openpyxl/
-lzo = /apps/fusioncatcher/tools/lzo/
-lzop = /apps/fusioncatcher/tools/lzop/src/
-coreutils = /apps/fusioncatcher/tools/coreutils/src/
-parallel = /appsfusioncatcher/tools/paralell/src/
-pigz = /apps/fusioncatcher/tools/pigz/
-pxz = /apps/fusioncatcher/tools/pxz/
-picard = /apps/fusioncatcher/tools/picard/
-java = /usr/bin/
+data = ${FC_DB_PATH}/current/
+scripts = ${CONDA_PREFIX}/bin/
+bowtie = ${CONDA_PREFIX}/bin/
+bowtie2 = ${CONDA_PREFIX}/bin/
+blat = ${CONDA_PREFIX}/bin/
+bwa = ${CONDA_PREFIX}/bin/
+bbmap = ${CONDA_PREFIX}/bin/
+liftover = ${CONDA_PREFIX}/bin/
+velvet = ${CONDA_PREFIX}/bin/
+oases = ${CONDA_PREFIX}/bin/
+fatotwobit = ${CONDA_PREFIX}/bin/
+samtools = ${CONDA_PREFIX}/bin/
+seqtk = ${CONDA_PREFIX}/bin/
+star = ${CONDA_PREFIX}/bin/
+sra = ${CONDA_PREFIX}/bin/
+numpy = ${CONDA_PREFIX}/lib/python*/site-packages/numpy/
+biopython = ${CONDA_PREFIX}/lib/python*/site-packages/
+xlrd = ${CONDA_PREFIX}/lib/python*/site-packages/xlrd/
+openpyxl = ${CONDA_PREFIX}/lib/python*/site-packages/openpyxl/
+lzop = ${CONDA_PREFIX}/bin/
+coreutils = ${CONDA_PREFIX}/bin/
+parallel = ${CONDA_PREFIX}/bin/
+pigz = ${CONDA_PREFIX}/bin/
+picard = ${CONDA_PREFIX}/bin/
+java = ${CONDA_PREFIX}/bin/

[parameters]
threads = 0
@@ -39,9 +37,3 @@

[versions]
fusioncatcher = 1.00
-
-
-
-
-
-
--- bin/sort_ttdb.py 2018-10-17 18:23:40.372288599 -0500
+++ bin/sort_ttdb.py.new 2018-10-17 18:23:40.378288630 -0500
@@ -1,4 +1,4 @@
-#!/mnt/software/bin/python2.7-real
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
It sorts the input file (text tab separated file) based on the specified columns.
--- bin/add_custom_gene.py 2018-10-17 18:23:40.362288548 -0500
+++ bin/add_custom_gene.py.new 2018-10-17 18:23:40.377288625 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Add the custom human genes which are missing from the Ensembl database.
--- bin/add_gap_gene.py 2018-10-17 18:23:40.371288594 -0500
+++ bin/add_gap_gene.py.new 2018-10-17 18:23:40.377288625 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Add the custom human genes which are known to have random inserts at fusion junction.
8 changes: 8 additions & 0 deletions recipes/fusioncatcher/post-link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

cat <<EOF >> ${PREFIX}/.messages.txt

Please run download-db.sh to download the Human Ensembl v90 database to ${PREFIX}/share/${PKG_NAME}-${PKG_VERSION}/db/current/.
If you have a custom database, please use "fusioncatcher" with the option "--data".

EOF