Unverified Commit 8a8ed5f1 authored by Muhammad Saad Shamim's avatar Muhammad Saad Shamim Committed by GitHub
Browse files

Merge pull request #251 from dudcha/encode-mega

Pull in changes for ENCODE mega
parents 7b21fd62 ca33ac47
Loading
Loading
Loading
Loading
+1 −1
Changes for CPU/common/diploid_split.awk: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
# diff has paternal assigned to one read end and maternal assigned to the other
# mismatch has at least one SNP that doesn't match either the reference or the
# alternate
# Juicer version 1.5
# Juicer version 2.0
NF==13{
    if ($12 ~ /mismatch/ || $13 ~ /mismatch/) {
        print >> stem"mismatch.txt";
+17 −1
Changes for CPU/common/juicer_arrowhead.sh: 17 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,22 @@ printHelpAndExit() {
#set defaults
genomeID="hg19"
hic_file_path="$(pwd)/aligned/inter_30.hic"
juicer_tools_path="/broad/aidenlab/scripts/juicer_tools"

# Aiden Lab specific check
isRice=$(hostname | awk '{if ($1~/rice/){print 1}else {print 0}}')
isBCM=$(hostname | awk '{if ($1~/bcm/){print 1}else {print 0}}')
isVoltron=0
# Set default appropriately
if [ $isRice -eq 1 ]
then
    juicer_tools_path="/projects/ea14/juicer/scripts/juicer_tools"
elif [ $isBCM -eq 1 ]
then
    juicer_tools_path="/storage/aiden/juicer/scripts/juicer_tools"
else
    isVoltron=1
    juicer_tools_path="/gpfs0/juicer2/scripts/juicer_tools"
fi

while getopts "h:j:i:" opt; do
    case $opt in
@@ -62,6 +77,7 @@ fi

echo -e "${juicer_tools_path} is post-processing Hi-C for ${genomeID}\nData read from ${hic_file_path}.\n"
echo -e "ARROWHEAD:\n"
echo "${juicer_tools_path} arrowhead ${hic_file_path} ${hic_file_path%.*}_contact_domains"
${juicer_tools_path} arrowhead ${hic_file_path} ${hic_file_path%.*}"_contact_domains"
if [ $? -ne 0 ]; then
    echo "***! Problem while running Arrowhead";
+21 −3
Changes for CPU/common/juicer_hiccups.sh: 21 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -37,8 +37,25 @@ printHelpAndExit() {
#set defaults
genomeID="hg19"
hic_file_path="$(pwd)/aligned/inter_30.hic"
juicer_tools_path="/broad/aidenlab/scripts/juicer_tools"
bed_file_dir="/broad/aidenlab/references/motif"

# Aiden Lab specific check
isRice=$(hostname | awk '{if ($1~/rice/){print 1}else {print 0}}')
isBCM=$(hostname | awk '{if ($1~/bcm/){print 1}else {print 0}}')
isVoltron=0
# Set default appropriately
if [ $isRice -eq 1 ]
then
    juicer_tools_path="/projects/ea14/juicer/scripts/juicer_tools"
    bed_file_dir="/projects/ea14/juicer/references/motif"
elif [ $isBCM -eq 1 ]
then
    juicer_tools_path="/storage/aiden/juicer/scripts/juicer_tools"
    bed_file_dir="/storage/aiden/juicer/references/motif"
else
    isVoltron=1
    juicer_tools_path="/gpfs0/juicer2/scripts/juicer_tools"
    bed_file_dir="/gpfs0/juicer2/references/motif"
fi

while getopts "h:g:j:i:m:" opt; do
    case $opt in
@@ -66,6 +83,7 @@ fi
echo -e "\nHiCCUPS:\n"
if hash nvcc 2>/dev/null
then
    echo "${juicer_tools_path} hiccups ${hic_file_path} ${hic_file_path%.*}_loops"
    ${juicer_tools_path} hiccups ${hic_file_path} ${hic_file_path%.*}"_loops"
    if [ $? -ne 0 ]; then
	echo "***! Problem while running HiCCUPS";
@@ -75,7 +93,7 @@ else
    echo "GPUs are not installed so HiCCUPs cannot be run";
fi

if [ -e ${hic_file_path%.*}"_loops" ]
if [ -n "$(ls -A ${hic_file_path%.*}_loops)" ]
then
    echo -e "\nAPA:\n"
    ${juicer_tools_path} apa ${hic_file_path} ${hic_file_path%.*}"_loops/merged_loops.bedpe" "apa_results"
+22 −5
Changes for CPU/common/juicer_postprocessing.sh: 22 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -39,8 +39,25 @@ printHelpAndExit() {
#set defaults
genomeID="hg19"
hic_file_path="$(pwd)/aligned/inter_30.hic"
juicer_tools_path="/opt/juicer/scripts/juicer_tools"
bed_file_dir="/opt/juicer/references/motif"

# Aiden Lab specific check
isRice=$(hostname | awk '{if ($1~/rice/){print 1}else {print 0}}')
isBCM=$(hostname | awk '{if ($1~/bcm/){print 1}else {print 0}}')
isVoltron=0
# Set default appropriately
if [ $isRice -eq 1 ]
then
    juicer_tools_path="/projects/ea14/juicer/scripts/juicer_tools"
    bed_file_dir="/projects/ea14/juicer/references/motif"
elif [ $isBCM -eq 1 ]
then
    juicer_tools_path="/storage/aiden/juicer/scripts/juicer_tools"
    bed_file_dir="/storage/aiden/juicer/references/motif"
else
    isVoltron=1
    juicer_tools_path="/gpfs0/juicer2/scripts/juicer_tools"
    bed_file_dir="/gpfs0/juicer2/references/motif"
fi

while getopts "h:g:j:i:m:" opt; do
    case $opt in
@@ -84,17 +101,17 @@ else
    echo "GPUs are not installed so HiCCUPs cannot be run";
fi

if [ -f ${hic_file_path%.*}"_loops/merged_loops.bedpe" ]
if [ -e ${hic_file_path%.*}"_loops" ]
then
    echo -e "\nAPA:\n"
    ${juicer_tools_path} apa ${hic_file_path} ${hic_file_path%.*}"_loops/merged_loops.bedpe" "apa_results"
    ${juicer_tools_path} apa ${hic_file_path} ${hic_file_path%.*}"_loops" "apa_results"
    ## Check that bed folder exists
    if [ ! -e "${bed_file_dir}" ]; then
	echo "***! Can't find folder ${bed_file_dir}";
	echo "***! Not running motif finder";
    else
	echo -e "\nMOTIF FINDER:\n"
	${juicer_tools_path} motifs ${genomeID} ${bed_file_dir} ${hic_file_path%.*}"_loops.txt"
	${juicer_tools_path} motifs ${genomeID} ${bed_file_dir} ${hic_file_path%.*}"_loops"
    fi
    echo -e "\n(-: Feature annotation successfully completed (-:"
else
+3 −20
Changes for CPU/common/juicer_tools: 3 added lines, 20 removed lines.
Original line number Diff line number Diff line
#!/bin/bash
#!/bin/bash -l
#
# Copyright (c) 2015 Aiden Lab
#
@@ -20,22 +20,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# Juicer 1.5
if [ "$CALLEDBY" = "AWS" ]
then
    echo "AWS"
    java -Djava.io.tmpdir=/opt/juicer/tmp -Djava.awt.headless=true -Djava.library.path=`dirname $0`/lib64  -Xmx32000m -Xms8000m -jar `dirname $0`/juicer_tools.7.0.jar $*
elif [ "$CALLEDBY" = "UGER" ]
then
    echo "UGER"
    java -Djava.awt.headless=true  -Xmx16000m  -jar `dirname $0`/juicer_tools.7.5.jar  $*
elif [ "$CALLEDBY" = "SLURM" ]
then
    echo "SLURM"
    java -Djava.awt.headless=true -Djava.library.path=`dirname $0`/lib64 -Xmx16000m -Xms16000m -Xgcthreads1 -jar `dirname $0`/juicer_tools.7.5.jar $*
elif [ "$CALLEDBY" = "LSF" ] 
then
    java -Djava.awt.headless=true -Djava.library.path=`dirname $0`/lib64 -Xmx16000m -Xms16000m -Xgcthreads1 -jar `dirname $0`/juicer_tools.7.0.jar $*
else # default, don't use temp directory or gpus, use CUDA 7.0
    java -Djava.awt.headless=true  -Xmx16000m  -jar `dirname $0`/juicer_tools.jar  $*
fi
# Juicer version 2.0
java -Djava.awt.headless=true -Djava.library.path=`dirname $0`/lib64 -Ddevelopment=false -jar `dirname $0`/juicer_tools.jar $*
Loading