Hi All,

I have a galaxy installation on an OSX system that has been running fine with our custom tools.  However, now we want to start using for some simple BAC mapping.  

When I go to the main toolshed to install bwa, it lists the following dependencies.

Repository package_bwa_0_7_10_039ea20639 revision 5b9aca1e1c07 owned by devteam
Repository package_samtools_1_1 revision 43f2fbec5d52 owned by iuc

However, when running through this process, it fails at the package_samtools_1_1 stage with an Error. Looking at the INSTALLATION.LOG i see the following.

#############################################
sed -i 's/-lcurses/-lncurses/' Makefile
STDOUT

#############################################

#############################################
sed -i 's/-lcurses/-lncurses/' Makefile
STDERR
sed: 1: "Makefile": invalid command code M
#############################################

However, looking at the tool_dependencies.xml for this particular package, I see the following. I've highlighted in yellow a key configuration.

<?xml version="1.0"?>
<tool_dependency>
    <package name="samtools" version="1.1">
        <install version="1.0">
            <actions_group>
                <actions architecture="x86_64" os="linux">
                    <action type="download_by_url">http://depot.galaxyproject.org/package/linux/x86_64/samtools/samtools-1.1-Linux-x86_64.tgz</action>
                    <action type="move_directory_files">
                        <source_directory>.</source_directory>
                        <destination_directory>$INSTALL_DIR</destination_directory>
                    </action>
                </actions>
                <actions>
                    <package name="ncurses" version="5.9">
                        <repository changeset_revision="5e1760c773ba" name="package_ncurses_5_9" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
                    </package>
                    <package name="zlib" version="1.2.8">
                        <repository changeset_revision="63a4a902cda2" name="package_zlib_1_2_8" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
                    </package>
                    <action type="download_by_url">http://downloads.sourceforge.net/project/samtools/samtools/1.1/samtools-1.1.tar.bz2</action>
                    <action type="set_environment_for_install">
                        <repository changeset_revision="5e1760c773ba" name="package_ncurses_5_9" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu">
                            <package name="ncurses" version="5.9" />
                        </repository>
                        <repository changeset_revision="63a4a902cda2" name="package_zlib_1_2_8" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu">
                            <package name="zlib" version="1.2.8" />
                        </repository>
                    </action>
                    <action type="shell_command">sed -i 's/-lcurses/-lncurses/' Makefile</action>
                    <action type="shell_command">sed -i -e "s|CFLAGS=\s*-g\s*-Wall\s*-O2\s*|CFLAGS= -g -Wall -O2 -I$NCURSES_INCLUDE_PATH/ncurses/ -I$NCURSES_INCLUDE_PATH -L$NCURSES_LIB_PATH|g" Makefile<
/action>
                    <action type="shell_command">make</action>
                    <action type="move_file">
                        <source>samtools</source>
                        <destination>$INSTALL_DIR/bin</destination>
                    </action>
                </actions>
                <action type="set_environment">
                    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
                    <environment_variable action="set_to" name="SAMTOOLS_ROOT_PATH">$INSTALL_DIR</environment_variable>
                </action>
            </actions_group>
        </install>


So, to me, it sounds like this is trying to compile/install a distribution meant for linux, but I'm on OSX.  I was able to successfully install samtools 1.2 with no errors.  

Is there anyway to update, or modify the code for the BWA installation recipe to use as a dependency samtools 1.2 rather then 1.1?  Or does anyone have any suggestions on how to get samtools 1.1 to work?

I tried making a bin/ directory and moving a precompiled samtools binary for 1.1 in the directory.  But galaxy didn't seem to recognize that the dependency was satisfied manually.

Any advice would be greatly appreciated.

Thank you,
-Hans