Freitag, 3. April 2015

I just had a somewhat hard time to install rmagick on a new Ubuntu 14.04 server. The first thing I realized was that the necessary packages to compile rmagick are now
apt-get install libmagickcore-dev 
apt-get install libmagickwand-dev 
apt-get install imagemagick
After I had everything set up, I had this strange error in my apache logs

App 2599 stderr:
App 2599 stderr: ActionView::TemplateError (uninitialized constant Magick::MaxRGB) on line #12 of app/views/recipes/search.html.erb:
App 2599 stderr: 9: <% if @recipes.size > 0 -%>
App 2599 stderr: 10:   <% if @is_cat_search -%>
App 2599 stderr: 11:     <%# Special case, we searched for all recipes in a category -> display the
App 2599 stderr: 12:     title %>
App 2599 stderr: 13:     <%= titlePic @cats.name, false %>
apparently Magick::MaxRGB doesnt exist in the newest rmagick version. Using

gem install -v=2.13.1 rmagick
solved the problem for me

Mittwoch, 28. Mai 2014

Installing MSstats

Installing MSStats 1.0 on R 2.15.1 (it depends on old versions of biocgenerics and biobase which are available from debian)
cd install
wget http://ftp.de.debian.org/debian/pool/main/r/r-bioc-biocgenerics/r-bioc-biocgenerics_0.8.0.orig.tar.gz
wget http://ftp.de.debian.org/debian/pool/main/r/r-bioc-biobase/r-bioc-biobase_2.20.0.orig.tar.gz

install.packages("/cluster/home/biol/hroest/lib/r-bioc-biocgenerics_0.8.0.orig.tar.gz", repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/lib/r-bioc-biobase_2.20.0.orig.tar.gz", repos = NULL, type="source")
install.packages("gmodels")
install.packages("/cluster/home/biol/hroest/lib/MSstats_1.0.tar.gz", repos = NULL, type="source")
Installing MSStats 2.1.33 on R 3.0.0 (with dependency of mzR and MSnbase removed)
cd install
wget http://www.bioconductor.org/packages/release/bioc/src/contrib/limma_3.20.4.tar.gz
wget http://www.bioconductor.org/packages/release/bioc/src/contrib/marray_1.42.0.tar.gz
wget http://www.bioconductor.org/packages/devel/bioc/src/contrib/preprocessCore_1.27.0.tar.gz

install.packages("/cluster/home/biol/hroest/lib/limma_3.20.4.tar.gz", repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/lib/marray_1.42.0.tar.gz", repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/lib/preprocessCore_1.27.0.tar.gz", repos = NULL, type="source")

install.packages("/cluster/home/biol/hroest/lib/MSstats_2.1.33.tar.gz", repos = NULL, type="source")

Dienstag, 20. Mai 2014

Installing SRMStats on R 2.15.1

I had to install the SRMstats software on a cluster running R 2.15.1. SRMstats is a statistical software for targeted mass spectrometry, see http://www.stat.purdue.edu/~chang54/SRMstats/Home.html This was not as easy as I had hoped for since it requires several outdated packages that refuse to run under R 2.15.1 and I had to find the right version of these packages. I finally managed using the following packages:
cd install
wget http://cran.r-project.org/src/contrib/Archive/Rcpp/Rcpp_0.9.11.tar.gz
wget http://cran.r-project.org/src/contrib/Archive/RcppEigen/RcppEigen_0.3.0.tar.gz
wget http://cran.r-project.org/src/contrib/Archive/lme4/lme4_0.999999-0.tar.gz
wget http://www.bioconductor.org/packages/release/bioc/src/contrib/limma_3.20.2.tar.gz
wget http://www.bioconductor.org/packages/release/bioc/src/contrib/marray_1.42.0.tar.gz
wget http://www.stat.purdue.edu/~chang54/SRMstats/R_implementation_files/SRMstats.tar.gz

install.packages("/cluster/home/biol/hroest/install/Rcpp_0.9.11.tar.gz", repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/install/RcppEigen_0.3.0.tar.gz", repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/install/lme4_0.999999-0.tar.gz",  repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/install/limma_3.20.2.tar.gz", repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/install/marray_1.42.0.tar.gz", repos = NULL, type="source")
install.packages("/cluster/home/biol/hroest/install/SRMstats.tar.gz", repos = NULL, type="source")

Mittwoch, 26. September 2012

I recently had to commit a large patch series to a largish project using SVN and edit all commit messages. This in order to preserver the original author attributions which would be lost if all committed by me against SVN. I used git-svn to do this, first I had to copy the branch and correctly rebase it as described here (I had the same problem with the floating branch so I applied to proposed solution in one of the comments):
git config --add svn-remote.newbranch.url https://svn/path_to_newbranch/
git config --add svn-remote.newbranch.fetch :refs/remotes/newbranch
git svn fetch newbranch 
git checkout -b local-newbranch -t newbranch
# determine last commit on trunk before branch (sha1_1)
# determine first commit on branch (sha1_2)
git diff-tree sha1_1 sha1_2 # make sure there is no diff
git rebase sha1_1
# Open .git/refs/remotes/newbranch and edit it to contain the full SHA1 of the new 
# commit (on the rebased newbranch) that corresponds to the old commit it's 
# currently pointing at. 
Then I could start to create the patch series, first creating all the files necessary and then using sed to rename the commit message (inserting the correct author name).
git format-patch master
grep "From:" * | cut -f 3 -d ":" | cut -f 2 -d " " | sort | uniq # show all authors
for file in `grep author1 00* | cut -f 1 -d ":"`; do
echo $file;
sed -i 's/\(Subject: \[PATCH [^ ]*\]\)/\1 [Feature] PATCH by author1:/' $file
done

git checkout master 
git branch -D featurebranch_rebased 
git checkout -b featurebranch_rebased 
for file in 00*; do
echo $file;
git am < $file
done
Thus I could attribute each patch to its owner in the SVN and then commit all patches using "git svn dcommit".