Skip to content

Commit

Permalink
Merge branch 'master' of http://github.com/mjoppich/biogui
Browse files Browse the repository at this point in the history
  • Loading branch information
markus authored and markus committed Jan 6, 2019
2 parents 196c91e + e9ecf4b commit d8fcc7f
Show file tree
Hide file tree
Showing 18 changed files with 485 additions and 80 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,17 +500,24 @@ endif()
endif()


if (UNIX AND NOT APPLE AND FALSE)
if (UNIX AND NOT APPLE)
get_filename_component(QT5GUI_DIR ${Qt5_GuiLocation} DIRECTORY)

add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT5GUI_DIR}/libicudata.so.56 ${PROJECT_BINARY_DIR})
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT5GUI_DIR}/libicui18n.so.56 ${PROJECT_BINARY_DIR})
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT5GUI_DIR}/libicuuc.so.56 ${PROJECT_BINARY_DIR})

add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT5GUI_DIR}/libQt5DBus.so.5 ${PROJECT_BINARY_DIR})
add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${QT5GUI_DIR}/libQt5XcbQpa.so.5 ${PROJECT_BINARY_DIR})



file(GLOB biogui_linux_libs
${QT5GUI_DIR}/libicudata.so.56
${QT5GUI_DIR}/libicui18n.so.56
${QT5GUI_DIR}/libicuuc.so.56
${QT5GUI_DIR}/libQt5DBus.so.5
${QT5GUI_DIR}/libQt5XcbQpa.so.5
)


Expand Down
11 changes: 10 additions & 1 deletion install_templates/install_albacore.igui
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,16 @@ PORT=$5

echo "Sending Template to $IP at $PORT"

nc -q 0 $IP $PORT <<EOF
NCCMD=""

if [ "$(uname)" == "Darwin" ]; then
NCCMD="nc -c $IP $PORT"
else
NCCMD="nc -q 0 $IP $PORT"
fi


$NCCMD <<EOF

<template description="albacore basecaller aligner" title="albacore (python)">
<window title="albacore basecaller">
Expand Down
5 changes: 4 additions & 1 deletion install_templates/install_apple_first.igui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ if [ "$(uname)" == "Darwin" ]; then

echo "Installing brew"
yes "$2" | /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


echo "Installing wget and netcat"
brew install wget netcat

echo "Enjoy bioGUI!"
else
echo "No sudo password, not installing dependencies"
Expand Down
50 changes: 34 additions & 16 deletions install_templates/install_ballgown.igui
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
#! Install Ballgown 1.0.1

DEP_PACKAGES="R zlibc zlib1g zlib1g-dev libxml2-dev libcurl4-openssl-dev"

echo "Dependencies: $DEP_PACKAGES R: devtools, RSkittleBrewer, ballgown"
if [ ! "$2" = "" ]; then

echo $2 | sudo -S apt-get update
echo $2 | sudo -S apt-get install $DEP_PACKAGES

RLIBSUSER=`Rscript -e "cat(Sys.getenv('R_LIBS_USER'))"`
mkdir -p $RLIBUSER

Rscript -e "source(\"http://bioconductor.org/biocLite.R\"); install.packages(\"devtools\"); devtools::install_github('alyssafrazee/RSkittleBrewer'); biocLite(\"ballgown\", lib.loc=Sys.getenv('R_LIBS_USER'), lib=Sys.getenv('R_LIBS_USER'));"
if [ "$(uname)" == "Darwin" ]; then

else
echo "No sudo password, not installing dependencies"
echo "Did not install ballgown. Hoping for the best!"
echo "Installing brew gnuplot"
brew install r libxml2 libxml2 zlib

else

DEP_PACKAGES="R zlibc zlib1g zlib1g-dev libxml2-dev libcurl4-openssl-dev"

echo "Dependencies: $DEP_PACKAGES R: devtools, RSkittleBrewer, ballgown"
echo $2 | sudo -S apt-get update
echo $2 | sudo -S apt-get install $DEP_PACKAGES

fi

else
echo "No sudo password, not installing dependencies"
fi

echo "options(repos = c(CRAN = "https://cran.rstudio.com"))" > ~/.Rprofile

RLIBSUSER=`Rscript -e "cat(Sys.getenv('R_LIBS_USER'))"`
mkdir -p $RLIBUSER

Rscript -e "source(\"http://bioconductor.org/biocLite.R\"); install.packages(\"devtools\"); devtools::install_github('alyssafrazee/RSkittleBrewer'); biocLite(\"ballgown\", lib.loc=Sys.getenv('R_LIBS_USER'), lib=Sys.getenv('R_LIBS_USER'));"

RSCRIPT=`which Rscript`

## set all variables
Expand All @@ -30,8 +39,8 @@ if [ -z "${PROGDIR}" ]; then
PROGDIR=~/bioGUI/progs/
fi

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

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

nc -q 0 $IP $PORT <<EOF
NCCMD=""

if [ "$(uname)" == "Darwin" ]; then
NCCMD="nc -c $IP $PORT"
else
NCCMD="nc -q 0 $IP $PORT"
fi


$NCCMD <<EOF

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

nc -q 0 $IP $PORT <<EOF
NCCMD=""

if [ "$(uname)" == "Darwin" ]; then
NCCMD="nc -c $IP $PORT"
else
NCCMD="nc -q 0 $IP $PORT"
fi


$NCCMD <<EOF

<template description="bowtie 1.1.2 aligner" title="bowtie 1.1.2">
<window title="bowtie 1.1.2 aligner">
Expand Down
11 changes: 10 additions & 1 deletion install_templates/install_bowtie2.igui
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,16 @@ if [ $# -eq 5 ]; then
IP=$4
PORT=$5

nc -q 0 $IP $PORT <<EOF
NCCMD=""

if [ "$(uname)" == "Darwin" ]; then
NCCMD="nc -c $IP $PORT"
else
NCCMD="nc -q 0 $IP $PORT"
fi


$NCCMD <<EOF

<template description="bowtie2 2.0.4 aligner" title="bowtie2 2.0.4">
<window title="bowtie2 2.0.4 aligner">
Expand Down
44 changes: 34 additions & 10 deletions install_templates/install_canu.igui
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
#! Install canu (github)

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

if [ ! "$2" = "" ]; then
echo "Installing dependencies"
echo $2 | sudo -S apt-get update
echo $2 | sudo -S apt-get -y install gnuplot

if [ "$(uname)" == "Darwin" ]; then

echo "Installing brew gnuplot"
brew install gnuplot --with-cairo

else

echo "Installing dependencies"
echo $2 | sudo -S apt-get update
echo $2 | sudo -S apt-get -y install gnuplot

fi

else
echo "No sudo password, not installing dependencies"
echo "No sudo password, not installing dependencies"
fi



## set all variables
PROG=canu
PROGDIR=$1
Expand All @@ -26,7 +32,16 @@ fi


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


if [ "$(uname)" == "Darwin" ]; then
APPBINARYDIR=${PROGDIR}/${PROG}/Darwin-amd64/bin/
else
APPBINARYDIR=${PROGDIR}/${PROG}/Linux-amd64/bin/
fi



if [ -d "$PROGDIR/$PROG" ]; then
echo "Removing Folder $PROGDIR/$PROG"
Expand Down Expand Up @@ -64,7 +79,16 @@ PORT=$5

echo "Sending Template to $IP at $PORT"

nc -q 0 $IP $PORT <<EOF
NCCMD=""

if [ "$(uname)" == "Darwin" ]; then
NCCMD="nc -c $IP $PORT"
else
NCCMD="nc -q 0 $IP $PORT"
fi


$NCCMD <<EOF

<!--<?xml version="1.0" encoding="UTF-8")>-->

Expand Down
78 changes: 56 additions & 22 deletions install_templates/install_glimmer.igui
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
#! 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"
echo $2 | sudo -S apt-get update
echo $2 | sudo -S apt-get -y install csh


if [ "$(uname)" == "Darwin" ]; then

echo "This tool will not compile if install directory path contains spaces!"

else

echo "Installing Dependencies (aptitude/Ubuntu)"

echo "Installing dependencies"
echo $2 | sudo -S apt-get update
echo $2 | sudo -S apt-get -y install csh

fi

else
echo "No sudo password, not installing dependencies"
echo "No sudo password, not installing dependencies"
fi

## set all variables
PROG=glimmer302b
PROGDIR=$1

if [ -z "${PROGDIR}" ]; then
PROGDIR=~/bioGUI/progs/
PROGDIR=~/bioGUI/progs/
fi

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

echo "PROGDIRESC $PROGDIRESC"

APPBINARYDIR="${PROGDIRESC}/${PROG}/"

## create progdir
mkdir -p "$PROGDIR/$PROG"
Expand All @@ -35,24 +48,35 @@ tar -xzf "$PROG.tar.gz" --strip 1 -C "$PROGDIR/$PROG"
#install prog
cd "$PROGDIR/$PROG/src"


# this fixes some issues on mac, not all
for script in **/Makefile; do

echo "Escaping $script"
sed -i.bak "s/cd \.\.\/\.\.\; pwd/cd \.\.\/\.\.\; pwd \| sed \'s\/ \/\\\\\\\\ \/g\'/g" $script

done

sed -i.bak "s/cd \.\.\; pwd/cd \.\.; pwd \| sed \'s\/ \/\\\\\\\\ \/g\'/g" Makefile

make

if [ $# -gt 2 ]; then

if [ "$3" = "1" ]; then
if [ "$3" = "1" ]; then

if ! grep -q "$PROGDIRESC/$PROG" ~/.bashrc; then
echo "export PATH=\"$PROGDIRESC/$PROG:\$PATH\" " >> ~/.bashrc;
fi
fi
if ! grep -q "$PROGDIRESC/$PROG" ~/.bashrc; then
echo "export PATH=\"$PROGDIRESC/$PROG:\$PATH\" " >> ~/.bashrc;
fi
fi

fi

if [ $# -eq 5 ]; then

# fix scripts

for script in $PROGDIR/$PROG/scripts/*.csh; do
for script in $PROGDIRESC/$PROG/scripts/*.csh; do

sed -i "/set awkpath = /c\set awkpath = $PROGDIRESC/$PROG/scripts/" $script
sed -i "/set glimmerpath = /c\set glimmerpath = $PROGDIRESC/$PROG/bin/" $script
Expand All @@ -65,7 +89,17 @@ echo "sending template"
IP=$4
PORT=$5

nc -q 0 $IP $PORT <<EOF
NCCMD=""

if [ "$(uname)" == "Darwin" ]; then
NCCMD="nc -c $IP $PORT"
else
NCCMD="nc -q 0 $IP $PORT"
fi


$NCCMD <<EOF

<!--<?xml version="1.0" encoding="UTF-8")>-->
<template description="Glimmer3 scripts ($PROG)" title="Glimmer3">

Expand All @@ -74,7 +108,7 @@ nc -q 0 $IP $PORT <<EOF

<label>Run Program in WSL?</label>
<checkbox id="WSLsel" value="true" selectonwindows="true">WSL</checkbox>

<group title="Operation" exclusive="true">

<group id="fromscratch" title="From Scratch" checkable="true">
Expand All @@ -97,14 +131,14 @@ nc -q 0 $IP $PORT <<EOF



<action id="runprog" hint="click here to run program">run program</action>
<action id="runprog" hint="click here to run program">run program</action>

<streambox id="output1">
<stream id="outputstream1">OS1</stream>
<stream id="outputstream2">OS2</stream>
</streambox>


</vgroup>
</window>

Expand Down Expand Up @@ -132,11 +166,11 @@ nc -q 0 $IP $PORT <<EOF
<output type="STD" color="green" to="outputstream1" />
</execute>
</if>

</execution>
</template>

EOF


fi
fi

0 comments on commit d8fcc7f

Please sign in to comment.