I attempted to install Casava on OS X (10.6.5 Snow Leopard) and it didn't go so well out of the box. I was told it's not supported. I did a cursory search for others that have done this and didn't see anything.
These were the steps I took to get an executable CASAVA binary installed - it seems like it wouldn't be that hard to be rolled into the official installation.
I'm using GCC 4.5.1 (installed with MacPorts and managed with gcc_select), but this will likely work with the standard GCC 4.2.1 installation.
Here's my setup:
- Step 1
-- Update CMake to at least 2.8.3
CMake needs to be updated to work with the latest version of OS X, or else you'll get "jni.h" not found errors.
It's available here -
Check where it gets installed, likely /usr/local/bin
- Step 2
-- Get ChartDirector for Perl on OS X
- Step 3
-- Expand CASAVA
- Step 4
-- Emend packaged CodeMin
Now edit CodeMin-1.0.1/include/test_float.h -
line 64 is -
is_float_nan(FloatType x){ return isnan(x); }
change line 64 to -
is_float_nan(FloatType x){ return std::isnan(x); }
line 68 is -
is_float_inf(FloatType x){ return isinf(x); }
change line 68 to -
is_float_inf(FloatType x){ return std::isinf(x); }
And then recreate the package -
- Step 5
-- Update src files
A few modifications to the files in the 'src' directory. Here's the patchfile.
- Step 6
-- Configure and compile
Goto the CASAVA-build directory.
'make install' will crash with a CMake permissions error. This is where you want to update ChartDirector.
- Step 7
-- Update ChartDiretor
In the current CASAVA-build directory -
- Step 8
-- Final install
In the current CASAVA-build directory -
You should now have CASAVA installed.
These were the steps I took to get an executable CASAVA binary installed - it seems like it wouldn't be that hard to be rolled into the official installation.
I'm using GCC 4.5.1 (installed with MacPorts and managed with gcc_select), but this will likely work with the standard GCC 4.2.1 installation.
Here's my setup:
Code:
% sw_vers ProductName: Mac OS X ProductVersion: 10.6.5 BuildVersion: 10H574 % gcc --version gcc (GCC) 4.5.1
- Step 1
-- Update CMake to at least 2.8.3
CMake needs to be updated to work with the latest version of OS X, or else you'll get "jni.h" not found errors.
It's available here -
Check where it gets installed, likely /usr/local/bin
Code:
% which cmake /usr/local/bin/cmake % cmake --version cmake version 2.8.3
- Step 2
-- Get ChartDirector for Perl on OS X
Code:
cd /tmp curl -O http://download2.advsofteng.com/chartdir_perl_mac.tar.gz tar xvf chartdir_perl_mac.tar.gz
- Step 3
-- Expand CASAVA
Code:
tar xvf CASAVA_v1.7.0.tar.bz2 cd CASAVA_v1.7.0 mkdir CASAVA-build
- Step 4
-- Emend packaged CodeMin
Code:
cd redist tar xvf CodeMin-1.0.1.tar.gz mv CodeMin-1.0.1.tar.gz CodeMin-1.0.1.tar.gz.orig
line 64 is -
is_float_nan(FloatType x){ return isnan(x); }
change line 64 to -
is_float_nan(FloatType x){ return std::isnan(x); }
line 68 is -
is_float_inf(FloatType x){ return isinf(x); }
change line 68 to -
is_float_inf(FloatType x){ return std::isinf(x); }
And then recreate the package -
Code:
tar cvf CodeMin-1.0.1.tar.gz CodeMin-1.0.1 cd ..
- Step 5
-- Update src files
A few modifications to the files in the 'src' directory. Here's the patchfile.
Code:
diff --git c++/include/alignment/GlobalUtilities.hh c++/include/alignment/GlobalUtilities.hh index 2aec781..77eccce 100644 --- c++/include/alignment/GlobalUtilities.hh +++ c++/include/alignment/GlobalUtilities.hh @@ -37,6 +37,10 @@ AUTHOR: A. J. Cox // inner_product requires numeric #include <numeric> +typedef unsigned int uint; +typedef unsigned char uchar; +typedef unsigned short ushort; +#include <iostream> #include "common/Sequence.hh" // Identifier to embed in source and binary files @@ -47,9 +51,6 @@ AUTHOR: A. J. Cox using namespace std; namespace fs = boost::filesystem; -typedef unsigned int uint; -typedef unsigned char uchar; -typedef unsigned short ushort; static const char baseNames [] = "ACGT"; diff --git c++/include/alignment/aligner.h c++/include/alignment/aligner.h index d52e45b..d8fce73 100755 --- c++/include/alignment/aligner.h +++ c++/include/alignment/aligner.h @@ -35,6 +35,7 @@ using namespace std; +typedef unsigned int uint; typedef unsigned char uchar; #define QUALSCALE 0.0333 diff --git c++/include/common/Alignment.hh c++/include/common/Alignment.hh index 9df4c45..503e45a 100644 --- c++/include/common/Alignment.hh +++ c++/include/common/Alignment.hh @@ -19,6 +19,7 @@ #ifndef CASAVA_COMMON_ALIGNMENT_HH #define CASAVA_COMMON_ALIGNMENT_HH +#include "alignment/GlobalUtilities.hh" #include "common/Sequence.hh" namespace casava diff --git c++/include/common/Sequence.hh c++/include/common/Sequence.hh index b0490dd..46fc61d 100644 --- c++/include/common/Sequence.hh +++ c++/include/common/Sequence.hh @@ -26,6 +26,9 @@ #include <string> #include <vector> +typedef unsigned int uint; +typedef unsigned char uchar; +typedef unsigned short ushort; #include "common/Spot.hh" #include "common/FilteringStreams.hh" diff --git c++/lib/alignment/aligner.cpp c++/lib/alignment/aligner.cpp index f3c87c2..43b7a2d 100755 --- c++/lib/alignment/aligner.cpp +++ c++/lib/alignment/aligner.cpp @@ -26,6 +26,7 @@ using namespace std; +typedef unsigned int uint; typedef unsigned char uchar; #define QUALSCALE 0.0333 diff --git c++/lib/applications/AlignCandIndelReads.cpp c++/lib/applications/AlignCandIndelReads.cpp index 0795f21..b78a80b 100644 --- c++/lib/applications/AlignCandIndelReads.cpp +++ c++/lib/applications/AlignCandIndelReads.cpp @@ -122,7 +122,7 @@ int AlignCandIndelReads::run() if (line[0] == '#') { continue; } // Load export line into export record object - Export::Export record(line, 1); + Export record(line, 1); // Get reference region to align tag too string refSeq;
- Step 6
-- Configure and compile
Goto the CASAVA-build directory.
Code:
../src/configure --with-cmake=/usr/local/bin/cmake make make install
- Step 7
-- Update ChartDiretor
In the current CASAVA-build directory -
Code:
mkdir -p opt/ChartDirector/Darwin/i386/lib/fonts touch opt/ChartDirector/Darwin/i386/lib/chartdir.lic cp -R /tmp/ChartDirector/lib/* opt/ChartDirector/Darwin/i386/lib/fonts
- Step 8
-- Final install
In the current CASAVA-build directory -
Code:
sudo make install
Code:
% /usr/local/bin/CASAVA --version Info: @CASAVA_VERSION_FULL@
Comment