Skip to content

Commit

Permalink
Fixed some more build errors and updated ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewThe committed Mar 11, 2019
1 parent 17a94a6 commit 31d7486
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 48 deletions.
12 changes: 10 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,22 @@ This repository holds the source code for clustering and merging of fragment spe

### Installation

Installers for several operating systems can be found on the [Release page](https://github.com/statisticalbiotechnology/maracluster/releases).
Installers for several operating systems can be found on the [Release page](https://github.com/statisticalbiotechnology/maracluster/releases). Both a command line as well as a graphical user interface are available for all platforms.

If you prefer to compile from source, or are running on a different operating system, [click here](#installation-from-source).

### Interface
### Example

An example, including spectrum files and a shell script, can be downloaded from http://kaell.org/files/maracluster_sample.zip.

### Graphical User Interface (GUI)

To run the example, simply select the spectrum files after clicking the `Add ms2 files` button, select an output folder and click the `Run MaRaCluster` button.

A more elaborate guide for using the GUI can be found from the Help menu in the menu bar of the GUI.

### Command Line Interface (CLI)

The main functionality of MaRaCluster is provided by the `maracluster` command. This command has several sub-commands to execute different parts of the clustering and merging. The most important ones are `maracluster batch` and `maracluster consensus`. The first takes a list of ms2 spectra as input and outputs a list of clusters, the second takes one of these outputs and creates consensus spectra for each cluster.

To run `maracluster batch`, a flat text file with the absolute/relative path to each of the ms2 spectrum files (one per line) is needed. Such a file can easily be generated using a `ls -1` command, *e.g.* `ls -1 ms2/* > files.txt`. Any ms2 spectrum format readable by ProteoWizard can be used as input. Use the following command to start clustering:
Expand Down
2 changes: 1 addition & 1 deletion admin/builders/centos64_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi

rm -f $build_dir/{maracluster,maracluster-gui}/mar*.rpm

sudo yum install -y gcc gcc-c++ rpm-build cmake
sudo yum install -y gcc gcc-c++ rpm-build cmake rsync
CMAKE_BINARY=cmake # this can be overridden if a newer version of cmake is needed

mkdir -p ${build_dir}/tools
Expand Down
8 changes: 3 additions & 5 deletions admin/builders/install_proteowizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ echo "Building ProteoWizard and Boost, this may take some time.."
find build-*-x86_64/ -type f | grep -i libboost_regex-.*\.a$ | xargs -I{} cp {} ../lib
find build-*-x86_64/ -type f | grep -i libboost_program_options-.*\.a$ | xargs -I{} cp {} ../lib

cd libraries/zlib-1.2.3
find ./ -type f | grep -i '.h$\|.hpp$' | xargs -I{} cp --parents {} ../../../include/
cd ../../
rsync -ap libraries/boost_aux/boost/ ../include/boost
rsync -ap --include '*.ipp' --exclude '*' libraries/boost_1_67_0/boost/ ../include/boost
rsync -ap --include "*/" --include "*.h" --include "*.hpp" --exclude "*" libraries/zlib-1.2.3/ ../include/zlib
rsync -ap --include "*/" --include "*.h" --include "*.hpp" --exclude "*" libraries/boost_aux/boost/ ../include/boost
rsync -ap --include "*/" --include '*.ipp' --exclude '*' libraries/boost_1_67_0/boost/ ../include/boost

# the boost libraries' naming convention does not always work well with cmake, so we force a more simple naming convention
ln -s -f ../lib/libboost_system-*.a ../lib/libboost_system.a
Expand Down
8 changes: 4 additions & 4 deletions admin/builders/install_qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ if [ ! -d Qt-dynamic ]; then
tar xf ${linux_qt}.tar.xz
cd ${linux_qt}

./configure -prefix ${tools_dir}/Qt-dynamic -opensource -confirm-license -nomake tools -nomake examples -nomake tests
./configure -prefix ${tools_dir}/Qt-dynamic -opensource -confirm-license -nomake tools -nomake examples -nomake tests -release > ../qt_config.log 2>&1

echo "Building Qt base, this may take some time.."

make -j4 > ../qt_installation.log 2>&1
make install -j4
make -j4 > ../qt_build.log 2>&1
make install -j4 > ../qt_install.log 2>&1
fi

cd ${tools_dir}

# Qt5 requires CMake >= 3.5
function version_lt() { test "$(echo "$@" | tr " " "\n" | (sort -rV || gsort -rV | head -n 1)" != "$1"; }
function version_lt() { test "$(echo "$@" | tr " " "\n" | (sort -rV || gsort -rV) | head -n 1)" != "$1"; }

if version_lt $(cmake --version | head -n1 | cut -f3 -d ' ') "3.5"; then
wget https://github.com/Kitware/CMake/releases/download/v3.13.3/cmake-3.13.3-Linux-x86_64.sh
Expand Down
54 changes: 27 additions & 27 deletions admin/vagrant/batch.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#!/bin/bash
export LANG=en_US.UTF-8
export LC_ALL="en_US.UTF-8"
release_dir=${HOME}/release

echo "Building Ubuntu binaries"
./manager.sh -p ubuntu -r ${release_dir}/ubuntu64 > ubuntu_output.txt 2>&1
if [[ $? -eq 0 ]]; then
echo "Building of Ubuntu binaries succeeded"
fi
trap 'echo "Batch script killed"; exit 1' INT TERM

echo "Building Fedora binaries"
./manager.sh -p fedora -r ${release_dir}/fedora64 > fedora_output.txt 2>&1
if [[ $? -eq 0 ]]; then
echo "Building of Fedora binaries succeeded"
fi
release_dir=${HOME}/release

echo "Building CentOS binaries"
./manager.sh -p centos -r ${release_dir}/centos64 > centos_output.txt 2>&1
if [[ $? -eq 0 ]]; then
echo "Building of CentOS binaries succeeded"
fi
platforms=()
platforms+=(osx)
#platforms+=(win64)
#platforms+=(win32)
#platforms+=(centos)
#platforms+=(fedora)
#platforms+=(ubuntu)

echo "Building native 64-bit Windows binaries"
./manager.sh -p nw64 -r ${release_dir}/win64 > nw64_output.txt 2>&1
if [[ $? -eq 0 ]]; then
echo "Building of native 64-bit Windows binaries succeeded"
fi
for platform in ${platforms[@]}; do
echo "Building $platform binaries"
./manager.sh -p $platform -r ${release_dir}/$platform > ${platform}_output.txt 2>&1
if [[ $? -eq 0 ]]; then
echo "Building of ${platform} binaries succeeded"
else
echo "Building of ${platform} binaries failed"
fi
done

echo "Building native 32-bit Windows binaries"
./manager.sh -p nw32 -r ${release_dir}/win32 > nw32_output.txt 2>&1
if [[ $? -eq 0 ]]; then
echo "Building of native 32-bit Windows binaries succeeded"
fi
# for the osx build, root priviliges are necessary but we can skip the password prompt:
# Vagrant NFS access https://www.vagrantup.com/docs/synced-folders/nfs.html#root-privilege-requirement
# add the following lines with $sudo visudo
#Cmnd_Alias VAGRANT_EXPORTS_CHOWN = /bin/chown 0\:0 /tmp/*
#Cmnd_Alias VAGRANT_EXPORTS_MV = /bin/mv -f /tmp/* /etc/exports
#Cmnd_Alias VAGRANT_NFSD_CHECK = /etc/init.d/nfs-kernel-server status
#Cmnd_Alias VAGRANT_NFSD_START = /bin/systemctl start nfs-server.service
#Cmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar
#%sudo ALL=(root) NOPASSWD: VAGRANT_EXPORTS_CHOWN, VAGRANT_EXPORTS_MV, VAGRANT_NFSD_CHECK, VAGRANT_NFSD_START, VAGRANT_NFSD_APPLY
11 changes: 6 additions & 5 deletions admin/vagrant/manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ usage: $0
[[-h]] [[-a]]
[[-b branch]]|[[-s source_directory]]
[[-r release_directory]]
-p ubuntu|centos|fedora|nw32|nw64
-p ubuntu|centos|fedora|win32|win64|osx
If no branch and source_directory is provided, the source
code from which the sourcecode is checked out from will be used.
Expand Down Expand Up @@ -61,14 +61,14 @@ while getopts “hab:s:r:p:” OPTION; do
vagbox_url=""
package_ext="rpm"
;;
nw32)
win32)
post="nativew32"
batfile=true
vagbox_name="win10vs15"
vagbox_url="~/VagrantWin7/win10vs15.box"
package_ext="exe"
;;
nw64)
win64)
post="nativew64"
batfile=true
vagbox_name="win10vs15"
Expand Down Expand Up @@ -181,7 +181,7 @@ Vagrant.configure("2") do |config|
config.vm.box = "${vagbox_name}"
config.vm.box_url = "${vagbox_url}"
config.ssh.insert_key = false
config.ssh.password = "vagrant" # private key authentication does not work on this box
#config.ssh.password = "vagrant" # private key authentication does not work on this box
config.vm.boot_timeout = 600
config.vm.network "private_network", ip: "192.168.56.10"
Expand Down Expand Up @@ -239,7 +239,7 @@ Vagrant.configure("2") do |config|
end
config.vm.provision :shell do |shell|
shell.path = "${tmp_dir}/${builder}"
shell.args = "-s /vagrant/src -r /vagrant/"
shell.args = "-s /vagrant/src -b /vagrant/build -r /vagrant/"
end
end
EOF
Expand Down Expand Up @@ -295,6 +295,7 @@ if [[ $? -eq 0 ]] && [[ -z ${alive} ]]; then
vagrant destroy -f
else
echo "-a option set or encountered error: keeping the VM alive, remember to close and delete the VM manually."
exit 1
fi

#---------------------------------------------------------------------------------------
8 changes: 4 additions & 4 deletions src/qt-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 3.5)
project(MARACLUSTER_GUI)
set(MARACLUSTER_GUI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

if (UNIX)
if (APPLE)
set(MARACLUSTER_BIN_DESTINATION maracluster-gui.app/Contents/MacOS)
elseif (UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
set(MARACLUSTER_BIN_DESTINATION lib/maracluster)
elseif (APPLE)
set(MARACLUSTER_BIN_DESTINATION maracluster-gui.app/Contents/MacOS)
elseif (MSVC)
set(MARACLUSTER_BIN_DESTINATION bin)
endif (UNIX)
endif (APPLE)

# get the maracluster executable
set(SKIP_MAIN_CPACK ON)
Expand Down

0 comments on commit 31d7486

Please sign in to comment.