<commit_before>#
# Cookbook Name:: chef-bioinf-worker
# Recipe:: openms
#
# Copyright (c) 2015 <NAME>, All Rights Reserved.


openms_src_dir = "#{node.dir.software}/OpenMS/OpenMS-src"
openms_build_dir = "#{node.dir.software}/OpenMS/OpenMS-build"

contrib_src_dir = "#{node.dir.software}/OpenMS/contrib-src"
contrib_build_dir = "#{node.dir.software}/OpenMS/contrib-build"

package "cmake"
package "g++"
package "autoconf"
package "zlib1g-dev"
package "qt4-dev-tools" do
  retries 1
end
package "patch"
package "libtool"
package "git"
package "libboost-regex-dev"
package "libboost-iostreams-dev"
package "libboost-date-time-dev"
package "libboost-math-dev"
package "libsvm-dev"
package "libglpk-dev"
package "libzip-dev"
package "libxerces-c-dev"
package "libbz2-dev"
package "libeigen3-dev"

directory node.dir.software
directory "#{node.dir.software}/OpenMS"
directory openms_build_dir
directory contrib_build_dir

# fetch OpenMS source code
git "git_clone_openms_src" do
  action :checkout
  repository "https://github.com/OpenMS/OpenMS.git"
  revision "4776889fe40e1b001407b50b9a3de2fd1c175515"
  destination openms_src_dir
  retries 1
  timeout 3600
end


# fetch OpenMS contrib
git "git_clone_openms_contrib" do
  action :checkout
  repository "https://github.com/OpenMS/contrib.git"
  revision "f6b44d770b6c1b23972a8891753472e60a356253"
  destination contrib_src_dir
  retries 1
end


# build seqan
bash "build_openms_contrib_seqan" do
  code "cmake -DBUILD_TYPE=SEQAN #{contrib_src_dir}"
  cwd contrib_build_dir
  not_if "#{Dir.exists?( "#{contrib_build_dir}/src/seqan-1.4.1" )}"
  retries 1<commit_msg>Increased the number of retries for openms checkout.<commit_after>#
# Cookbook Name:: chef-bioinf-worker
# Recipe:: openms
#
# Copyright (c) 2015 <NAME>, All Rights Reserved.


openms_src_dir = "#{node.dir.software}/OpenMS/OpenMS-src"
openms_build_dir = "#{node.dir.software}/OpenMS/OpenMS-build"

contrib_src_dir = "#{node.dir.software}/OpenMS/contrib-src"
contrib_build_dir = "#{node.dir.software}/OpenMS/contrib-build"

package "cmake"
package "g++"
package "autoconf"
package "zlib1g-dev"
package "qt4-dev-tools" do
  retries 1
end
package "patch"
package "libtool"
package "git"
package "libboost-regex-dev"
package "libboost-iostreams-dev"
package "libboost-date-time-dev"
package "libboost-math-dev"
package "libsvm-dev"
package "libglpk-dev"
package "libzip-dev"
package "libxerces-c-dev"
package "libbz2-dev"
package "libeigen3-dev"

directory node.dir.software
directory "#{node.dir.software}/OpenMS"
directory openms_build_dir
directory contrib_build_dir

# fetch OpenMS source code
git "git_clone_openms_src" do
  action :checkout
  repository "https://github.com/OpenMS/OpenMS.git"
  revision "4776889fe40e1b001407b50b9a3de2fd1c175515"
  destination openms_src_dir
  retries 4
  timeout 1200
end


# fetch OpenMS contrib
git "git_clone_openms_contrib" do
  action :checkout
  repository "https://github.com/OpenMS/contrib.git"
  revision "f6b44d770b6c1b23972a8891753472e60a356253"
  destination contrib_src_dir
  retries 1
end


# build seqan
bash "build_openms_contrib_seqan" do
  code "cmake -DBUILD_TYPE=SEQAN #{contrib_src_dir}"
  cwd contrib_build_dir
  not_if "#{Dir.exists?( "#{contrib_build_dir}/src/seqan-1.4.1" )}"
  retries 1
{'fraction_non_alphanumeric': 0.11690702669530531, 'fraction_numerical': 0.04786744400122737, 'mean_word_length': 5.639511201629328, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4965081', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1229, 'n_words': 250}