News:New biostar-tools metaport for FreeBSD
1
5
Entering edit mode
3.4 years ago
bacon4000 ▴ 80

FYI, FreeBSD users can now install all the bioinformatics software referenced by the Biostar Handbook via FreeBSD ports. Everything except bedGraphToBigWig can be installed simply by running

pkg install biostar-tools

bedGraphToBigWig is part of ucsc-userapps, which cannot be redistributed for licensing reasons, so there is no binary package. However, the FreeBSD ports system allows installing from source as easily as from a binary package (though it will take much longer), so restrictive licenses are not a major hurdle. ucsc-userapps can be easily installed separately by running

cd /usr/ports/biology/ucsc-userapps && make install

This will prompt you to accept the license terms and then automatically download from UCSC, build, and install.

Note that these installations are an alternative to conda/pip. If you have installed via FreeBSD ports/packages, you can skip all of the conda/pip commands in the handbook.

All programs are installed into the default PATH (/usr/local/bin) except for emboss and ucsc-userapps, which have multiple command-name conflicts with other programs. To use emboss commands, add /usr/local/emboss/bin to your PATH:

For Bourne-shell derivatives: (sh, bash, dash, zsh, ...)

export PATH=/usr/local/emboss/bin:$PATH

For C-shell derivatives: (csh, tcsh)

setenv PATH /usr/local/emboss/bin:$PATH

Or from any shell, you can run a separate shell process with the augmented PATH rather than hack the environment of your current shell:

env PATH=/usr/local/emboss/bin:$PATH bash

Replace "bash" with the shell of your choice. Then simply exit the shell to restore your previous PATH.

For UCSC-userapps, add /usr/local/bin/userapps.

The ports also install convenience scripts ucsc-shell and emboss-shell for quickly enabling the tools for interactive use. These scripts run a sub-shell with the proper directory prepended to PATH.

For anyone who is not a FreeBSD user but interested in trying it out, I would recommend GhostBSD for Unix novices. It's very much like Ubuntu Linux with a graphical installer and management tools.

For the more Unix-savvy, there is also the desktop-installer app, which adds virtually any desktop environment to a stock FreeBSD system:

http://acadix.biz/desktop-installer.php

Please report any problems with biostar-tools or other FreeBSD ports on the FreeBSD site:

https://www.freebsd.org/support/bugreports/

Questions posted on this forum may never be seen by the right people.

Cheers,

-Jason

freebsd software • 1.3k views
ADD COMMENT
0
Entering edit mode
3.1 years ago
bacon4000 ▴ 80

Added these wrappers for emboss and ucsc-utils so that we don't have to load a module or alter PATH in any other way. So now we can run all the tools necessary for the handbook from a standard directory.

Maybe they'll be useful to others as well.

/***************************************************************************
 *  Description:
 *      Wrapper to turn emboss commands into subcommands.  The emboss suite
 *      contains executables that conflict with multiple other software
 *      packages and therefore cannot be safely installed directly under a
 *      standard prefix.  This wrapper can be installed under the standard
 *      PATH and used to to execute emboss commands installed under a
 *      private prefix, without altering PATH, activating a special
 *      environment, opening a container, etc.  This sub-command paradigm
 *      is already familiar to bioinformaticians thanks to other suites
 *      like samtools, bedtools, etc.
 *
 *      Example:
 *
 *          emboss seqret args
 *
 *      instead of one of the following:
 *
 *          prefix/bin/seqret args
 *
 *          env PATH=prefix/bin:$PATH seqret args
 *
 *          conda activate emboss
 *          seqret args
 *
 *  Arguments:
 *      The full emboss command you would use if it were in PATH.
 *
 *  Compile with EMBOSS_PREFIX set to the parent of the bin directory
 *  containing the emboss binaries.
 *
 *  History: 
 *  Date        Name        Modification
 *  2021-09-13  Jason Bacon Begin
 ***************************************************************************/

#include <stdio.h>
#include <sysexits.h>
#include <limits.h>
#include <unistd.h>

#ifndef EMBOSS_PREFIX
#define EMBOSS_PREFIX   "/usr/local/emboss"
#endif

int     main(int argc,char *argv[])

{
    char    cmd[PATH_MAX + 1];

    if ( argc < 2 )
    {
        fprintf(stderr, "Usage: %s emboss-command [args]\n", argv[0]);
        return EX_USAGE;
    }

    snprintf(cmd, PATH_MAX, "%s/bin/%s", EMBOSS_PREFIX, argv[1]);
    execv(cmd, argv + 1);
}

/***************************************************************************
 *  Description:
 *      Wrapper to turn ucsc kent commands into subcommands.  The kent suite
 *      contains executables that conflict with multiple other software
 *      packages and therefore cannot be safely installed directly under a
 *      standard prefix.  This wrapper can be installed under the standard
 *      PATH and used to to execute kent commands installed under a
 *      private prefix, without altering PATH, activating a special
 *      environment, opening a container, etc.  This sub-command paradigm
 *      is already familiar to bioinformaticians thanks to other suites
 *      like samtools, bedtools, etc.
 *
 *      Example:
 *
 *          kent bigWigToBedGraph args
 *
 *      instead of one of the following:
 *
 *          prefix/bin/bigWigToBedGraph args
 *
 *          env PATH=prefix/bin:$PATH bigWigToBedGraph args
 *
 *          conda activate kent
 *          bigWigToBedGraph args
 *
 *  Arguments:
 *      The full kent utils command you would use if it were in PATH.
 *
 *  Compile with UCSC_PREFIX set to the parent of the bin directory
 *  containing the kent binaries.
 *
 *  History: 
 *  Date        Name        Modification
 *  2021-09-13  Jason Bacon Begin
 ***************************************************************************/

#include <stdio.h>
#include <sysexits.h>
#include <limits.h>
#include <unistd.h>

#ifndef UCSC_PREFIX
#define UCSC_PREFIX   "/usr/local/userapps"
#endif

int     main(int argc,char *argv[])

{
    char    cmd[PATH_MAX + 1];

    if ( argc < 2 )
    {
        fprintf(stderr, "Usage: %s UCSC-userapps-command [args]\n", argv[0]);
        return EX_USAGE;
    }

    snprintf(cmd, PATH_MAX, "%s/bin/%s", UCSC_PREFIX, argv[1]);
    execv(cmd, argv + 1);
}
ADD COMMENT

Login before adding your answer.

Traffic: 1633 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6