Skip to content

Commit

Permalink
macify install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mjoppich committed Jan 18, 2017
1 parent c397e9f commit 77f704a
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 43 deletions.
2 changes: 1 addition & 1 deletion install_templates/install_ballgown.igui
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF

<template description="Ballgown: Isoform-level differential expression analysis in R." title="${PROGNICE}">
<window title="${PROGNICE}">
Expand Down
4 changes: 2 additions & 2 deletions install_templates/install_bowtie1.igui
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF

<template description="bowtie 1.1.2 aligner" title="bowtie 1.1.2">
<window title="bowtie 1.1.2 aligner">
Expand Down Expand Up @@ -148,7 +148,7 @@ cat << EOF | netcat $IP $PORT
</window>

<execution>
<const id="bindir">${APPBINARYDIR}</const>
<const id="bindir">${PROGDIR}/${PROG}/</const>

<if id="bowtie2_build_inref_rel" comp="EQUALS" value1="WSLsel" value2="true">
<relocate from="\${bowtie2_build_inref}" wsl="true"/>
Expand Down
4 changes: 2 additions & 2 deletions install_templates/install_bowtie2.igui
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF

<template description="bowtie2 2.0.4 aligner" title="bowtie2 2.0.4">
<window title="bowtie2 2.0.4 aligner">
Expand Down Expand Up @@ -146,7 +146,7 @@ cat << EOF | netcat $IP $PORT
</window>

<execution>
<const id="bindir">${APPBINARYDIR}</const>
<const id="bindir">${PROGDIR}/${PROG}/</const>

<relocate id="bowtie2_build_inref_rel" wsl="\${WSLsel}" from="\${bowtie2_build_inref}"/>
<relocate id="bowtie2_build_idx_out_rel" wsl="\${WSLsel}" from="\${bowtie2_build_idx_out}"/>
Expand Down
6 changes: 4 additions & 2 deletions install_templates/install_glimmer.igui
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#! Install glimmer302b

echo "This tool will not compile in folders where the absolute path contains spaces!"

echo "Dependencies: csh"
if [ ! "$2" = "" ]; then
echo "Installing dependencies"
Expand Down Expand Up @@ -27,7 +29,7 @@ mkdir -p "$PROGDIR/$PROG"
#download and unzip
wget http://ccb.jhu.edu/software/glimmer/$PROG.tar.gz -O "$PROGDIR/$PROG.tar.gz"

cd $PROGDIR
cd "$PROGDIR"
tar -xzf "$PROG.tar.gz" --strip 1 -C "$PROGDIR/$PROG"

#install prog
Expand Down Expand Up @@ -63,7 +65,7 @@ echo "sending template"
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF
<!--<?xml version="1.0" encoding="UTF-8")>-->
<template description="Glimmer3 scripts ($PROG)" title="Glimmer3">

Expand Down
19 changes: 11 additions & 8 deletions install_templates/install_hisat.igui
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! Install hisat2-2.0.4
#! Install hisat2-2.0.5

echo "Dependencies: unzip"
if [ ! "$2" = "" ]; then
Expand All @@ -11,7 +11,7 @@ else
fi

## set all variables
PROG=hisat2-2.0.4
PROG=hisat2-2.0.5

PROGDIR=$1
if [ -z "${PROGDIR}" ]; then
Expand All @@ -26,10 +26,9 @@ mkdir -p "$PROGDIR"

#download and unzip
if [ ! -f "$PROGDIR/$PROG.zip" ]; then
wget ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-2.0.4-source.zip -O "$PROGDIR/$PROG.zip"
wget ftp://ftp.ccb.jhu.edu/pub/infphilo/hisat2/downloads/hisat2-2.0.5-source.zip -O "$PROGDIR/$PROG.zip"
fi


if [ ! -d "$PROGDIR/$PROG" ]; then
cd "$PROGDIR"

Expand All @@ -42,6 +41,10 @@ cd "$PROGDIR/$PROG"

make

#now fix spaces in path
perl -pi -e 's/my \$align_prog_s= File::Spec->catpath\(\$vol\,\$script_path\,\$align_bin_s\);/my \$align_prog_s= "\\\"".File::Spec->catpath(\$vol,\$script_path,\$align_bin_s).\"\\\"\";/' hisat2
perl -pi -e 's/my \$align_prog_l= File::Spec->catpath\(\$vol\,\$script_path\,\$align_bin_l\);/my \$align_prog_l= "\\\"".File::Spec->catpath(\$vol,\$script_path,\$align_bin_l).\"\\\"\";/' hisat2

if [ $# -gt 2 ]; then

if [ "$3" = "1" ]; then
Expand All @@ -58,10 +61,10 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF

<template description="hisat2 2.0.4 aligner" title="hisat2 2.0.4">
<window title="hisat2 2.0.4 aligner">
<template description="hisat2 2.0.5 aligner" title="hisat2 2.0.5">
<window title="hisat2 2.0.5 aligner">
<vgroup>

<group title="Alignment Information">
Expand Down Expand Up @@ -260,7 +263,7 @@ end
<value from="hisat_align_mate_orientations"/>

</add>

<execute program="hisat2" param="\${cl}" location="\${bindir}" exec="hisat2" wsl="WSLsel">
<output type="COUT" color="green" to="outputstream1" />
<output type="CERR" color="red" to="outputstream2" />
Expand Down
24 changes: 16 additions & 8 deletions install_templates/install_hmmer.igui
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,26 @@ PROGDIRESC=$(echo $PROGDIR | sed 's/ /\\ /g')
mkdir -p "$PROGDIR"

#download and unzip
wget http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2.tar.gz -O "$PROGDIR/$PROG.tar.gz"
if [ ! -f "$PROGDIR/$PROG.tar.gz" ]; then
wget http://eddylab.org/software/hmmer3/3.1b2/hmmer-3.1b2.tar.gz -O "$PROGDIR/$PROG.tar.gz"
fi

if [ ! -d "$PROGDIR/$PROG" ]; then


cd $PROGDIR
cd "$PROGDIR"
tar -xzf $PROG.tar.gz -C "$PROGDIR/"

fi

#install prog
cd "$PROGDIR/$PROG"

./configure -prefix="$PROGDIR/$PROG"
./configure# -prefix="$PROGDIR/$PROG"
make
make check
make install
#make check
# does not really work on mac os
#make install

if [ $# -gt 2 ]; then

Expand All @@ -44,7 +52,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF
<template rootid="hmmerroot" description="HMMER ($PROG)" title="HMMER">

<window width="500" height="800" title="HMMER">
Expand Down Expand Up @@ -90,7 +98,7 @@ cat << EOF | netcat $IP $PORT
<relocate id="loc_search_db" wsl="\${WSLsel}" from="\${search_db}"/>
<relocate id="loc_search_output" wsl="\${WSLsel}" from="\${search_output}"/>

<const id="bindir">${PROGDIR}/${PROG}/bin/</const>
<const id="bindir">${PROGDIRESC}/${PROG}/src/</const>

<add id="cl_build" sep=" ">
<add sep="">
Expand Down Expand Up @@ -120,7 +128,7 @@ cat << EOF | netcat $IP $PORT

<env id="ip" get="IPv4"/>

<execute location="" exec="sh" wsl="WSLsel" param="-c &quot; \${cl} 2>&amp;1 | netcat \${ip} 55025 &quot;">
<execute location="" exec="sh" wsl="WSLsel" param="-c &quot; \${cl} 2>&amp;1 &quot;">
<output type="COUT" color="green" to="outputstream1" />
<output type="CERR" color="red" to="outputstream2" />
</execute>
Expand Down
13 changes: 7 additions & 6 deletions install_templates/install_jellyfish.igui
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ if [ ! -f "$PROGDIR/$PROG.tar.gz" ]; then
wget https://github.com/gmarcais/Jellyfish/releases/download/v2.2.6/$PROG.tar.gz -O "$PROGDIR/$PROG.tar.gz"
fi

cd $PROGDIR
cd "$PROGDIR"
tar -xzf $PROG.tar.gz -C "$PROGDIR/"

#install prog
cd $PROGDIR/$PROG
cd "$PROGDIR/$PROG"

./configure --prefix="$PROGDIR/$PROG"
make
#make check
make install
# the following intall fails on mac os, what else ...
#make install

if [ $# -gt 2 ]; then

Expand All @@ -45,7 +46,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF
<template rootid="blubb" intatt="111" description="Jellyfish ($PROG)" title="Jellyfish">

<window width="500" height="1900" title="Jellyfish">
Expand Down Expand Up @@ -190,7 +191,7 @@ cat << EOF | netcat $IP $PORT
</add>


<add id="cl">
<add id="cl" sep="">
<if comp="EQUALS" value1="sel_cite" value2="TRUE"><value from="cl_cite"/></if>
<if comp="EQUALS" value1="sel_count" value2="TRUE"><value from="cl_count"/></if>
<if comp="EQUALS" value1="sel_merge" value2="TRUE"><value from="cl_merge"/></if>
Expand All @@ -200,7 +201,7 @@ cat << EOF | netcat $IP $PORT
</add>

<env id="ip" get="IPv4"/>
<const id="bindir">${PROGDIRESC}/${PROG}/bin/</const>
<const id="bindir">${PROGDIR}/${PROG}/bin/</const>

<execute wsl="WSLsel" exec="jellyfish" location="\${bindir}" param="\${cl}">
<output type="CERR" color="red" to="outputstream2" />
Expand Down
6 changes: 3 additions & 3 deletions install_templates/install_rmats.igui
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF

<template description="rMATS replicate MATS" title="$PROGNICE">
<window title="$PROGNICE">
Expand Down Expand Up @@ -181,9 +181,9 @@ cat << EOF | netcat $IP $PORT
</add>


<const id="bindir">${PROGDIRESC}/${PROG}/</const>
<const id="bindir">${PROGDIR}/${PROG}/</const>

<execute location="" exec="python" param="\${bindir}/RNASeq-MATS.py \${cl} wsl="WSLsel">
<execute location="" exec="python" param="&quot;\${bindir}/RNASeq-MATS.py&quot; \${cl}" wsl="WSLsel">
<output type="COUT" color="green" to="outputstream1" />
<output type="CERR" color="red" to="outputstream2" />
</execute>
Expand Down
5 changes: 2 additions & 3 deletions install_templates/install_rsem.igui
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ -z "${PROGDIR}" ]; then
fi

PROGDIRESC=$(echo $PROGDIR | sed 's/ /\\ /g')
APPBINARYDIR=$PROGDIRESC/$PROG/
APPBINARYDIR="$PROGDIR/$PROG/"


## create progdir
Expand Down Expand Up @@ -59,8 +59,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT

nc $IP $PORT << EOF

<template description="RSEM: estimating gene/isoform expression levels" title="$PROGNICE">
<window title="$PROGNICE">
Expand Down
4 changes: 2 additions & 2 deletions install_templates/install_samtools.igui
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if [ -z "${PROGDIR}" ]; then
fi

PROGDIRESC=$(echo $PROGDIR | sed 's/ /\\ /g')
APPBINARYDIR=${PROGDIRESC}/${PROG}/bin
APPBINARYDIR=${PROGDIR}/${PROG}/bin


## create progdir
Expand Down Expand Up @@ -57,7 +57,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF

<template description="Samtools" title="${PROGNICE}">
<window title="Samtools 1.3.1">
Expand Down
4 changes: 2 additions & 2 deletions install_templates/install_stringtie.igui
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ -z "${PROGDIR}" ]; then
fi

PROGDIRESC=$(echo $PROGDIR | sed 's/ /\\ /g')
APPBINARYDIR=${PROGDIRESC}/${PROG}/
APPBINARYDIR=${PROGDIR}/${PROG}/

## create progdir
mkdir -p "$PROGDIR"
Expand Down Expand Up @@ -59,7 +59,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT
nc $IP $PORT << EOF

<template description="StringTie Transcript Assembler" title="${PROGNICE}">
<window title="StringTie 1.3.0">
Expand Down
7 changes: 3 additions & 4 deletions install_templates/install_trimmomatic.igui
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

cat << EOF | netcat $IP $PORT

nc $IP $PORT << EOF
<template description="Trimming short RNA-Seq Reads" title="$PROGNICE">
<window title="$PROGNICE">
<vgroup>
Expand Down Expand Up @@ -300,9 +299,9 @@ cat << EOF | netcat $IP $PORT
<value from="steps"/>
</add>

<const id="bindir">${PROGDIRESC}/${PROG}/</const>
<const id="bindir">${PROGDIR}/${PROG}/</const>

<execute location="" exec="java" param="-jar \${bindir}/trimmomatic-0.36.jar \${cl}" wsl="WSLsel">
<execute location="" exec="java" param="-jar &quot;\${bindir}/trimmomatic-0.36.jar&quot; \${cl}" wsl="WSLsel">
<output type="COUT" color="green" to="outputstream1" />
<output type="CERR" color="red" to="outputstream2" />
</execute>
Expand Down
9 changes: 9 additions & 0 deletions src/app/ProcessLauncher.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,15 @@ public slots:

if ((sString.at(i) == ' ') || (sString.size()-1 == i))
{

if (i >= 1)
{
if ((sString.at(i-1) == '\\') && (sString.at(i) == ' '))
{
continue;
}
}

size_t iOffSet = (sString.at(i) == ' ') ? 0 : 1;

std::string sPart = sString.substr(iLastArgPartStart, i-iLastArgPartStart+iOffSet);
Expand Down
5 changes: 5 additions & 0 deletions templates/WSL_install.gui
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@

<add id="cl" sep=" ">
<value from="prog_wsl"/>
<add sep="">
<const>&quot;</const>
<value from="user_instpath"/>
<const>&quot;</const>
</add>

<add sep="">
<const>&quot;</const>
<value from="sudopw"/>
Expand Down

0 comments on commit 77f704a

Please sign in to comment.