Tips to run FigTree a graphical viewer of phylogenetic trees on LinuxMint 17

FigTree is designed as a graphical viewer of phylogenetic trees and as a program for producing publication-ready figures

The official web site http://tree.bio.ed.ac.uk/software/figtree/

when you try to run the program the first time you will notice that program does not run.

  1. unzip the program
  2. change to FigTree_v1.4.1/bin directory
  3. run the shell script to launch the FigTree desktop user interface
  4. ooops error !!!!
</pre>
$ tar -zxvf FigTree_v1.4.1.tgz

$ cd FigTree_v1.4.1/bin

$ ./figtree

Error: Unable to access jarfile lib/figtree.jar

SOLUTION

you will need to patch the figtree shell script


#!/bin/sh

FIGTREE_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."

java -Xms64m -Xmx512m -jar $FIGTREE_HOME/lib/figtree.jar $*

now try to run the shell script once again

bingo !! !it’s FIXED :D , wait noup error !!!  I fixed it :D

influenzatree

my FastQC Fedora Core 4 support

FastQC aims to provide a simple way to do some quality control checks on raw sequence data coming from high throughput sequencing pipelines.

If you want to run FastQC on your HPC Machine like Roche 454 Rig with old Fedora Core 4 OS , you will need to edit main FastQC shell script like this ;)

#!/usr/bin/perl
use warnings;
use strict;
use FindBin qw($RealBin);
use Getopt::Long;

# Check to see if they've mistakenly downloaded the source distribution
# since several people have made this mistake

if (-e "$RealBin/uk/ac/babraham/FastQC/FastQCApplication.java") {
        die "This is the source distribution of FastQC.  You need to get the compiled version if you want to run the program\n";
}

my $delimiter = ':';

if ($^O =~ /Win/) {
        $delimiter = ';';
}

if ($ENV{CLASSPATH}) {
        $ENV{CLASSPATH} .= "$delimiter$RealBin$delimiter$RealBin/sam-1.32.jar$delimiter$RealBin/jbzip2-0.9.jar";
}
else {
        $ENV{CLASSPATH} = "$RealBin$delimiter$RealBin/sam-1.32.jar$delimiter$RealBin/jbzip2-0.9.jar";
}

my @java_args;
my @files;

# We now need to scan the command line for switches which we're going
# to pass on to the main java program.

my $version;
my $help;
my $outdir;
my $unzip;
my $format;
my $contaminant;
my $threads;
my $quiet;
my $nogroup;
my $casava;
my $kmer_size;
my $java_bin = '/opt/java/jdk1.6.0_31/bin/java'; <-- add full path to your java 1.6

my $result = GetOptions('version' => \$version,
                                                'help' => \$help,
                                                'quiet' => \$quiet,
                                                'nogroup' => \$nogroup,
                                                'outdir=s' => \$outdir,
                                                'extract!' => \$unzip,
                                                'format=s' => \$format,
                                                'threads=i' => \$threads,
                                                'kmers=i' => \$kmer_size,
                                                'casava' => \$casava,
                                                'contaminants=s' => \$contaminant,
                                                'java=s' => \$java_bin,
                                                 );

# Check the simple stuff first

if ($help) {
        # Just print the help and exit
        print while(<DATA>);
        exit;
}

if ($version) {
        push @java_args ,"-Dfastqc.show_version=true";
}

# Now parse any additional options
if ($outdir) {
        unless(-e $outdir and -d $outdir) {
                die "Specified output directory '$outdir' does not exist\n";
        }

        push @java_args ,"-Dfastqc.output_dir=$outdir";
}

if ($contaminant)  {
        unless (-e $contaminant and -r $contaminant) {
                die "Contaminant file '$contaminant' did not exist, or could not be read\n";
        }
        push @java_args ,"-Dfastqc.contaminant_file=$contaminant";
}

if ($threads) {
        if ($threads < 1) {
                die "Number of threads must be a positive integer";
        }

        push @java_args ,"-Dfastqc.threads=$threads";
        my $memory = 250 * $threads;
        unshift @java_args,"-Xmx${memory}m";
}
else {
        unshift @java_args,'-Xmx250m';
}

if ($kmer_size) {
        unless ($kmer_size =~ /^\d+$/) {
                die "Kmer size '$kmer_size' was not a number";
        }

        if ($kmer_size < 2 or $kmer_size > 10) {
                die "Kmer size must be in the range 2-10";
        }

        push @java_args,"-Dfastqc.kmer_size=$kmer_size";
}

if ($quiet) {
        push @java_args ,"-Dfastqc.quiet=true";
}

if ($casava) {
        push @java_args ,"-Dfastqc.casava=true";
}

if ($nogroup) {
        push @java_args ,"-Dfastqc.nogroup=true";
}

if (defined $unzip) {

        if ($unzip) {
                $unzip = 'true';
        }
        else {
                $unzip = 'false';
        }

        push @java_args,"-Dfastqc.unzip=$unzip";
}

if ($format) {

        unless ($format eq 'bam' || $format eq 'sam' || $format eq 'fastq' || $format eq 'sam_mapped' || $format eq 'bam_mapped') {
                die "Unrecognised sequence format '$format', acceptable formats are bam,sam,bam_mapped,sam_mapped and fastq\n";
        }

        push @java_args,"-Dfastqc.sequence_format=$format";

}

if ($java_bin ne '/opt/java/jdk1.6.0_31/bin/java') {
#       $java_bin =~ s/\\/\//g;

        unless (-e $java_bin) {
                die "Couldn't find java interpreter at '$java_bin'";
        }

#       if ($java_bin =~ / /) {
#               $java_bin = "\"$java_bin\"";
#       }
}

foreach (@ARGV) {
  if (/^\-D/) {
    push @java_args,$_;
  }
  else {
    push @files,$_;
  }
}

# This is set internally as well, but on some JREs it doesn't
# pick up the internally set value properly, so we'll set it
# outside as well which should work.
if (@files or $version or $help) {
        push @java_args, "-Djava.awt.headless=true";
}

if ($java_bin ne '/opt/java/jdk1.6.0_31/bin/java') {
        system $java_bin,@java_args, "uk.ac.babraham.FastQC.FastQCApplication", @files;
}
else {
        exec $java_bin,@java_args, "uk.ac.babraham.FastQC.FastQCApplication", @files;
}

__DATA__

            FastQC - A high throughput sequence QC analysis tool

SYNOPSIS

        fastqc seqfile1 seqfile2 .. seqfileN

    fastqc [-o output dir] [--(no)extract] [-f fastq|bam|sam]
           [-c contaminant file] seqfile1 .. seqfileN

DESCRIPTION

    FastQC reads a set of sequence files and produces from each one a quality
    control report consisting of a number of different modules, each one of
    which will help to identify a different potential type of problem in your
    data.

    If no files to process are specified on the command line then the program
    will start as an interactive graphical application.  If files are provided
    on the command line then the program will run with no user interaction
    required.  In this mode it is suitable for inclusion into a standardised
    analysis pipeline.

    The options for the program as as follows:

    -h --help       Print this help file and exit

    -v --version    Print the version of the program and exit

    -o --outdir     Create all output files in the specified output directory.
                    Please note that this directory must exist as the program
                    will not create it.  If this option is not set then the
                    output file for each sequence file is created in the same
                    directory as the sequence file which was processed.

    --casava        Files come from raw casava output. Files in the same sample
                    group (differing only by the group number) will be analysed
                    as a set rather than individually. Sequences with the filter
                    flag set in the header will be excluded from the analysis.
                    Files must have the same names given to them by casava
                    (including being gzipped and ending with .gz) otherwise they
                    won't be grouped together correctly.

    --extract       If set then the zipped output file will be uncompressed in
                    the same directory after it has been created.  By default
                    this option will be set if fastqc is run in non-interactive
                    mode.

    -j --java       Provides the full path to the java binary you want to use to
                    launch fastqc. If not supplied then java is assumed to be in
                    your path.

    --noextract     Do not uncompress the output file after creating it.  You
                    should set this option if you do not wish to uncompress
                    the output when running in non-interactive mode.

    --nogroup       Disable grouping of bases for reads >50bp. All reports will
                    show data for every base in the read.  WARNING: Using this
                    option will cause fastqc to crash and burn if you use it on
                    really long reads, and your plots may end up a ridiculous size.
                    You have been warned!

    -f --format     Bypasses the normal sequence file format detection and
                    forces the program to use the specified format.  Valid
                    formats are bam,sam,bam_mapped,sam_mapped and fastq

    -t --threads    Specifies the number of files which can be processed
                    simultaneously.  Each thread will be allocated 250MB of
                    memory so you shouldn't run more threads than your
                    available memory will cope with, and not more than
                    6 threads on a 32 bit machine

    -c              Specifies a non-default file which contains the list of
    --contaminants  contaminants to screen overrepresented sequences against.
                    The file must contain sets of named contaminants in the
                    form name[tab]sequence.  Lines prefixed with a hash will
                    be ignored.

   -k --kmers       Specifies the length of Kmer to look for in the Kmer content
                    module. Specified Kmer length must be between 2 and 10. Default
                    length is 5 if not specified.

   -q --quiet       Supress all progress messages on stdout and only report errors.

BUGS

    Any bugs in fastqc should be reported either to simon.andrews@babraham.ac.uk
    or in www.bioinformatics.babraham.ac.uk/bugzilla/

How to install EMBOSS/JEMBOSS

JEMBOSS es una interfaz gráfica para EMBOSS.

En el siguiente tutorial veremos como instalar JEMBOSS. la realidad es que para instalar jEMBOSS como cliente “standalone” o “cliente/servidor” es un un poco engorroso y no precisamente por la dificultad del proceso, si no por todos los enredos del propio sistema de instalación, aunque no está mal leer un poco acerca de Axis y Tomcat de vez en cuando y aprender cosas nuevas.

Básicamente los pasos para instalar jEMBOSS en Ubuntu Linux son:

1. Descargar e instalar EMBOSS.

Descarga EMBOSS desde la siguiente liga: ftp://emboss.open-bio.org/pub/EMBOSS/EMBOSS-6.3.1.tar.gz

Nota: JEMBOSS viene dentro del tarball de EMBOSS por lo que no es necesario buscar por toda internet donde descargar JEMBOSS como a mi me paso :S

2. Descargar e instalar JAVA y configurar la variable de entorno JAVA_HOME

En Ubuntu Linux puedes simplemente instalar JAVA usando apt-get de la siguiente manera:

$sudo apt-get install sun-java6-jdk

para definir la variable de entorno “JAVA_HOME” solo hay que teclear lo siguiente:

$sudo echo “export JAVA_HOME=/usr/lib/jvm/java-6-sun” >> /etc/profile.d/java.sh

$source /etc/profile.d/java.sh

comprueba que ya tienes instalado JAVA ejecutando el siguiente comando:

$java -version

este comando imprimirá algo como:

java version “1.6.0”
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

pero ojo !! esto es en mi caso personal ya que JAVA se encuentra instalado en /usr/lib/jvm/java-6-sun, quizá en tu caso primero tienes que averiguar donde está instalado JAVA( intenta con el comando dpkg).

3. Descargar e instalar Tomcat y definir la variable de entorno CATALINA_HOME

para instalar Tomcat existen varias maneras de como hacerlo, quizá la manera mas sencilla es usar apt-get, solo recuerda que cualquiera que sea el método habrá que definir la variable de entorno “CATALINA_HOME” la cual debe apuntar hacia el directorio “bin” de Tomcat.

puedes hacer un búsqueda primero con apt-cache:

$sudo apt-cache search tomcat6

y posteriormente instalar los paquetes de tomcat6 en Ubuntu Linux:

$sudo apt-get install tomcat6-*

Después que hayas instalado Tomcat , define la variable CATALINA_HOME:

$sudo echo “export CATALINA_HOME=/usr/share/tomcat6″ >> /etc/profile.d/catalina.sh

$source /etc/profile.d/catalina.sh

4. Configurar roles y usuarios para el manager dentro de Tomcat.

independientemente del método de instalación de Tomcat busca el directorio de configuración de Tomcat y edita el archivo “tomcat-users.xml” añadiendo lo siguiente dentro de los tags <tomcat-users></tomcat-users> :

<role rolename=”admin” />
<user username=”admin” password=”admin” roles=”admin,manager” />

Para, reinicia o inicia el servicio de Tomcat , en Ubuntu y dependiendo de como hayas instalado Tomcat , si instalaste por apt-get intenta reiniciar el servicio usando: sudo /etc/init.d/tomcat restart

Haz una prueba, abre tu navegador web y navega hacia la dirección http://localhost:8080/manager/html

y seguro te preguntara un usuario y contraseña del usuario.

5. Descargar e instalar Apache Axis.

descarga los binarios, también los fuentes de Axis y descomprime todo.

copia la aplicación axis hacia el directorio “webapps” de Tomcat:

$sudo cp -r axis-1_4/webapps/axis $CATALINA_HOME/webapps/

copia todo el directorio del paquete de condigo fuente de Axis

$sudo cp -R axis-1_4-src /usr/local

y haces un enlace simbolico:

$sudo ln -s /usr/local/axis-1_4-src /usr/local/axis

6. Descargar e instalar JavaMail, Apache Xml Security(opcional o si es necesario)

prueba con http://localhost:8080/axis/

posiblemente al hacer el test “happyaxis.jsp” (Validation) te de un resultado el cual no sea de tu agrado y es que quizá haga falta instalar JavaMail y ApacheXmlSecurity,descarga y copia las libs en /usr/share/tomcat6/webapps/axis/WEB-INF/lib (si es tu caso) , en caso contrario intenta usar y exportar la variable entorno CLASSPATH y ahí definir la ruta hacia el jar de JavaMail.

intenta de nuevo con http://localhost:8080/axis/ y seleccionas la liga “Validation” y con esto ya debes quedar agusto después de ver los resultados.

7. Iniciar el proceso de instalación de EMBOSS/jEMBOSS

para ello desde la linea de comandos dirigete hacia el directorio de EMBOSS y entra al directorio de JEMBOSS y de ahi al directorio “utils” , listalo y veras un script de shell “install-jemboss-server.sh" ejecutalo de la siguiente manera:

$./install-jemboss-server.sh

sigue todo el proceso del script, para ello vas a necesitar tener instalado Clustalw y Primer3

primero se ejecuta la compilación de EMBOSS, EMBASSY y JEMBOSS , el script te mostrara una salida como la siguiente:

Note: Tomcat may still be running!
Use the tomstop & tomstart scripts to stop & start tomcat.

Try running Jemboss with the script:
/usr/local/emboss/share/EMBOSS/jemboss/runJemboss.sh

To create a web launch page see:

http://emboss.sourceforge.net/Jemboss/install/deploy.html

Sí todo el proceso es complicado para ti puedes usar apt-get para instalar JEMBOSS y EMBOSS.