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

Clinker #10244

Merged
merged 3 commits into from
Aug 6, 2018
Merged

Clinker #10244

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
19 changes: 19 additions & 0 deletions recipes/clinker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Setup path variables
BINARY_HOME=$PREFIX/bin
PACKAGE_HOME=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM

# Create destination directories
mkdir -p $PACKAGE_HOME

# Copy files over into $PACKAGE_HOME
cp -aR * $PACKAGE_HOME

DEST_FILE=$PACKAGE_HOME/clinker
cp $RECIPE_DIR/clinker-wrapper.sh $DEST_FILE
chmod +x $DEST_FILE
ln -s $DEST_FILE $PREFIX/bin



63 changes: 63 additions & 0 deletions recipes/clinker/clinker-wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash
CLINKERLOGO=$(cat <<END
___ ___ ___ ___ ___ ___
/\ \ /\__\ ___ /\__\ /\__\ /\ \ /\ \
/::\ \ /:/ / /\ \ /::| | /:/ / /::\ \ /::\ \
/:/\:\ \ /:/ / \:\ \ /:|:| | /:/__/ /:/\:\ \ /:/\:\ \
/:/ \:\ \ /:/ / /::\__\/:/|:| |__ /::\__\____ /::\~\:\ \ /::\~\:\ \
/:/__/ \:\__/:/__/ __/:/\/__/:/ |:| /\__/:/\:::::\__/:/\:\ \:\__/:/\:\ \:\__\
\:\ \ \/__\:\ \/\/:/ / \/__|:|/:/ \/_|:|~~|~ \:\~\:\ \/__\/_|::\/:/ /
\:\ \ \:\ \::/__/ |:/:/ / |:| | \:\ \:\__\ |:|::/ /
\:\ \ \:\ \:\__\ |::/ / |:| | \:\ \/__/ |:|\/__/
\:\__\ \:\__\/__/ /:/ / |:| | \:\__\ |:| |
\/__/ \/__/ \/__/ \|__| \/__/ \|__|
END
)
# Clinker wrapper - invoke bpipe

#bpipe -p option1="something" -p option2="something_else" [...] $CLINKERDIR/workflow/clinker.pipe /path/to/*.fastq.gz
# parse and accept parameters in bpipe style, then pass on to fixed clinker.pipe location
CLINKERFILES=()
CLINKEROPTIONS=()
ECHO="echo usage: call clinker -h for more detailed information or clinker -w to run:"
while [[ $# -gt 0 ]]
do
arg="$1"

case $arg in
-h)
echo "$CLINKERLOGO"
echo ""
echo "Clinker Wrapper Script"
echo ""
echo "The command clinker will invoke the Clinker bpipe pipeline with simple options. Use the direct pipeline method to use any advanced bpipe features."
echo "See https://github.com/Oshlack/Clinker/wiki/ for further information onusing Clinker."
echo ""
echo -e "\nusage (info): clinker [-h] "
echo -e "\nusage (wrapper): clinker -w [-p option1=\"values\" -p option2=\"values\" ...]\" *.fastq.gz "
echo -e "\nusage (direct):\n export \$CLINKERDIR=$PACKAGE_HOME;\n bpipe run [-p option1=\"values\" -p option2=\"values\" ...] [ <other bpipe options >] \n\t \$CLINKERDIR/workflow/clinker.pipe *.fastq.gz"
echo ""
exit 0
shift
;;
-w)
ECHO=""
shift
;;
-p)
OPTIONNAME="${2%=*}"
OPTIONVAL="${2#*=}"
CLINKEROPTIONS+=("-p $OPTIONNAME=\"$OPTIONVAL\"")
shift
shift
;;
*) # files
CLINKERFILES+=("$1")
shift
;;
esac
done

set -- "${CLINKERFILES[@]}"
$ECHO bpipe run "${CLINKEROPTIONS[@]}" $PACKAGE_HOME/workflow/clinker.pipe "$@"

38 changes: 38 additions & 0 deletions recipes/clinker/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{% set name = "clinker" %}
{% set version = "1.32" %}

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

source:
fn: "v{{ version }}.tar.gz"
url: https://github.com/Oshlack/Clinker/archive/v{{ version }}.tar.gz
sha256: "5dbb97da27f29f53a8282e456ba0093bbdde292eb9e76405434117da4d1a76be"

build:
number: 0
skip: True # [not py27]

requirements:
run:
- samtools
- bpipe
- star >= 2.5.3a
- bioconductor-gviz
- bioconductor-biomart
- python

test:
commands:
- clinker -h
- bpipe --help

about:
home: https://github.com/Oshlack/Clinker
summary: "Clinker is a bioinformatics pipeline that generates a superTranscriptome from popular fusion finder outputs (JAFFA, tophatFusion, SOAP, deFUSE, Pizzly, etc), that can be then be either viewed in genome viewers such as IGV or through the included plotting feature developed with GViz."
license: MIT

extra:
notes: "Wrapper script provided to indicate clinker is a bpipe pipeline, provide example command from wiki, and also a passthrough option."