Skip to content

Commit

Permalink
Add recipe for chexalign (#22663)
Browse files Browse the repository at this point in the history
Co-authored-by: BiocondaBot <biocondabot@gmail.com>
  • Loading branch information
PrashantKuntala and BiocondaBot committed Jun 14, 2020
1 parent 11e16d9 commit 65ec2a1
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
11 changes: 11 additions & 0 deletions recipes/chexalign/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -eu -o pipefail

outdir=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM
mkdir -p $outdir
mkdir -p $PREFIX/bin

cp ./chexalign_v0.11.jar $outdir
cp $RECIPE_DIR/chexalign.sh $outdir/chexalign
chmod +x $outdir/chexalign
ln -s $outdir/chexalign $PREFIX/bin
55 changes: 55 additions & 0 deletions recipes/chexalign/chexalign.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash
# Wraps CHEXALIGN tool
set -o pipefail

# Find original directory of bash script, resolving symlinks.
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done

DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SHARE_DIR=$DIR/..

java=java
JAR_DIR=$DIR

if [ -z "${JAVA_HOME:=}" ]; then
if [ -e "$JAVA_HOME/bin/java" ]; then
java="$JAVA_HOME/bin/java"
fi
fi

# extract memory and system property Java arguments from the list of provided arguments
# http://java.dzone.com/articles/better-java-shell-script
default_jvm_mem_opts="-Xms512m -Xmx1g"
jvm_mem_opts=""
jvm_prop_opts=""
pass_args=""
for arg in "$@"; do
case $arg in
'-D'*)
jvm_prop_opts="$jvm_prop_opts $arg"
;;
'-XX'*)
jvm_prop_opts="$jvm_prop_opts $arg"
;;
'-Xm'*)
jvm_mem_opts="$jvm_mem_opts $arg"
;;
*)
pass_args="$pass_args $arg"
;;
esac
done

if [ "$jvm_mem_opts" == "" ]; then
jvm_mem_opts="$default_jvm_mem_opts"
fi

eval "$java" $jvm_mem_opts $jvm_prop_opts -jar "$JAR_DIR/chexalign_v0.11.jar" $pass_args

exit
28 changes: 28 additions & 0 deletions recipes/chexalign/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% set version="0.11" %}
{% set sha256 = "7bcf3619f16bcd074bdacf80af6e760f22eb9301d08dee35ca21f6c5ec91b9f3" %}

package:
name: chexalign
version: '{{ version }}'

build:
noarch: generic
number: 0

source:
url: http://lugh.bmb.psu.edu/software/chexalign/chexalign_v{{ version }}.jar
sha256: '{{ sha256 }}'

requirements:
run:
- openjdk >=8

test:
commands:
- chexalign --version 2>&1 | grep {{ version }}

about:
home: https://github.com/seqcode/chexalign
license: MIT
summary: ChExAlign is used for alignment and quantification of ChIP-exo crosslinking patterns.
description: ChExAlign is a computational framework that aligns ChIP-exo crosslinking patterns from multiple proteins across a set of regulatory regions, and which detects and quantifies protein-DNA crosslinking events within the aligned profiles. The output of the alignment approach is a set of composite profiles that represent the crosslinking signatures of the complex across analyzed regulatory regions. We then use a probabilistic mixture model to deconvolve individual crosslinking events within the aligned ChIP-exo profiles, enabling consistent measurements of protein-DNA crosslinking strengths across multiple proteins.

0 comments on commit 65ec2a1

Please sign in to comment.