[med-svn] [iva] 02/04: Imported Upstream version 1.0.6+ds

Sascha Steinbiss sascha at steinbiss.name
Thu May 12 10:54:55 UTC 2016


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to branch master
in repository iva.

commit ba127d06e2993756de608350306a9b4f0432aa4d
Author: Sascha Steinbiss <sascha at steinbiss.name>
Date:   Thu May 12 09:50:33 2016 +0000

    Imported Upstream version 1.0.6+ds
---
 .travis.yml             | 18 ++++++++++
 README.md               |  6 ++++
 install_dependencies.sh | 92 +++++++++++++++++++++++++++++++++++++++++++++++++
 iva/common.py           |  2 +-
 scripts/iva             |  7 +++-
 scripts/iva_qc          |  0
 scripts/iva_qc_make_db  |  0
 setup.py                |  2 +-
 8 files changed, 124 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..aefa37f
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+language: python
+addons:
+  apt:
+    packages:
+    - zlib1g-dev
+    - libncurses5-dev
+    - libncursesw5-dev
+cache:
+  directories:
+  - "build"
+  - "$HOME/.cache/pip"
+python:
+  - "3.4"
+sudo: false
+install:
+  - "source ./install_dependencies.sh"
+script:
+  - "python setup.py test"
diff --git a/README.md b/README.md
index 93f8bcc..3209e67 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,12 @@ including installation instructions.
 For usage help and examples, see the [IVA wiki page] [IVA wiki page].
 
 
+---------------------------------
+
+Build status: [![Build Status](https://travis-ci.org/sanger-pathogens/iva.svg?branch=master)](https://travis-ci.org/sanger-pathogens/iva)
+
+
+
 
   [IVA wiki page]: https://github.com/sanger-pathogens/iva/wiki
   [IVA website]: http://sanger-pathogens.github.io/iva/
diff --git a/install_dependencies.sh b/install_dependencies.sh
new file mode 100755
index 0000000..b306373
--- /dev/null
+++ b/install_dependencies.sh
@@ -0,0 +1,92 @@
+#!/bin/bash
+set -e
+set -x
+
+start_dir=$(pwd)
+
+KMC_VERSION=2.3.0
+MUMMER_VERSION=3.23
+SAMTOOLS_VERSION=1.3
+SMALT_VERSION=0.7.6
+
+KMC_DOWNLOAD_URL=http://sun.aei.polsl.pl/REFRESH/kmc/downloads/${KMC_VERSION}/linux/kmc
+KMCDUMP_DOWNLOAD_URL=http://sun.aei.polsl.pl/REFRESH/kmc/downloads/${KMC_VERSION}/linux/kmc_dump
+MUMMER_DOWNLOAD_URL="http://downloads.sourceforge.net/project/mummer/mummer/${MUMMER_VERSION}/MUMmer${MUMMER_VERSION}.tar.gz"
+SAMTOOLS_DOWNLOAD_URL="https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2"
+SMALT_DOWNLOAD_URL=http://downloads.sourceforge.net/project/smalt/smalt-${SMALT_VERSION}-bin.tar.gz
+
+
+# Make an install location
+if [ ! -d 'build' ]; then
+  mkdir build
+fi
+cd build
+build_dir=$(pwd)
+
+# DOWNLOAD ALL THE THINGS
+download () {
+  url=$1
+  download_location=$2
+
+  if [ -e $download_location ]; then
+    echo "Skipping download of $url, $download_location already exists"
+  else
+    echo "Downloading $url to $download_location"
+    wget $url -O $download_location
+  fi
+}
+
+
+
+# --------------- kmc -----------------
+kmc_dir="$build_dir/kmc-${KMC_VERSION}"
+rm -fr $kmc_dir
+mkdir $kmc_dir
+cd $kmc_dir
+download $KMC_DOWNLOAD_URL "kmc"
+download $KMCDUMP_DOWNLOAD_URL "kmc_dump"
+chmod +x kmc kmc_dump
+
+
+# --------------- mummer ------------------
+cd $build_dir
+download $MUMMER_DOWNLOAD_URL "MUMmer${MUMMER_VERSION}.tar.gz"
+mummer_dir="$build_dir/MUMmer${MUMMER_VERSION}"
+tar -zxf MUMmer${MUMMER_VERSION}.tar.gz
+cd $mummer_dir
+make
+
+
+# --------------- samtools -----------------
+cd $build_dir
+download $SAMTOOLS_DOWNLOAD_URL "samtools-${SAMTOOLS_VERSION}.tar.bz2"
+samtools_dir="$build_dir/samtools-${SAMTOOLS_VERSION}"
+tar -xjf samtools-${SAMTOOLS_VERSION}.tar.bz2
+cd $samtools_dir
+make
+
+
+# --------------- smalt -----------------
+cd $build_dir
+download $SMALT_DOWNLOAD_URL "smalt-${SMALT_VERSION}-bin.tar.gz"
+tar zxf smalt-${SMALT_VERSION}-bin.tar.gz
+smalt_dir="$build_dir/smalt-${SMALT_VERSION}-bin"
+cd $smalt_dir
+ln -fs smalt_x86_64 smalt
+
+
+cd $start_dir
+
+update_path () {
+  new_dir=$1
+  if [[ ! "$PATH" =~ (^|:)"${new_dir}"(:|$) ]]; then
+    export PATH=${new_dir}:${PATH}
+  fi
+}
+
+update_path ${kmc_dir}
+update_path ${mummer_dir}
+update_path ${samtools_dir}
+update_path ${smalt_dir}
+
+
diff --git a/iva/common.py b/iva/common.py
index dfaed4d..b7d7418 100644
--- a/iva/common.py
+++ b/iva/common.py
@@ -16,7 +16,7 @@ import argparse
 import os
 import sys
 import subprocess
-version = '1.0.5'
+version = '1.0.6'
 
 class abspathAction(argparse.Action):
     def __call__(self, parser, namespace, value, option_string):
diff --git a/scripts/iva b/scripts/iva
old mode 100644
new mode 100755
index 55dd7e2..7ae78c0
--- a/scripts/iva
+++ b/scripts/iva
@@ -34,7 +34,7 @@ io_group.add_argument('-r', '--reads_rev', action=iva.common.abspathAction, help
 io_group.add_argument('--fr', action=iva.common.abspathAction, dest='reads', help='Name of interleaved fasta/q file', metavar='filename[.gz]')
 io_group.add_argument('--keep_files', action='store_true', help='Keep intermediate files (could be many!). Default is to delete all unnecessary files')
 io_group.add_argument('--contigs', action=iva.common.abspathAction, help='Fasta file of contigs to be extended. Incompatible with --reference', metavar='filename[.gz]')
-io_group.add_argument('--reference', action=iva.common.abspathAction, help='Fasta file of reference genome, or parts thereof. IVA will try to assemble one contig per sequence in this file. Incompatible with --contigs', metavar='filename[.gz]')
+io_group.add_argument('--reference', action=iva.common.abspathAction, help='EXPERIMENTAL! This option is EXPERIMENTAL, not recommended, and has not been tested! Fasta file of reference genome, or parts thereof. IVA will try to assemble one contig per sequence in this file. Incompatible with --contigs', metavar='filename[.gz]')
 io_group.add_argument('-v', '--verbose', action='count', help='Be verbose by printing messages to stdout. Use up to three times for increasing verbosity.', default=0)
 
 
@@ -112,6 +112,9 @@ if options.contigs and options.reference:
     print('Error! Cannot use both of --contgs and --reference. Cannot continue', file=sys.stderr)
     sys.exit(1)
 
+if options.reference:
+    print('WARNING. The option --reference has been used. It is EXPERIMENTAL and it is probably better to not use it!', file=sys.stderr)
+
 if os.path.exists(options.outdir):
     print('Error! Output directory', options.outdir, 'already exists. Cannot continue', file=sys.stderr)
     sys.exit(1)
@@ -209,6 +212,8 @@ if options.contigs:
     contigs = 'contigs_to_extend.fasta'
     pyfastaq.tasks.to_fasta(options.contigs, contigs, line_length=60, strip_after_first_whitespace=True)
 elif options.reference:
+    print('WARNING. The option --reference has been used. Trying to use reference file to generate starting contig.', file=sys.stderr)
+    print(' ... if this throws errors, then try running without the --reference option', file=sys.stderr)
     reference = 'reference_in.fasta'
     pyfastaq.tasks.to_fasta(options.reference, reference, line_length=60, strip_after_first_whitespace=True)
     p = iva.seed_processor.SeedProcessor(
diff --git a/scripts/iva_qc b/scripts/iva_qc
old mode 100644
new mode 100755
diff --git a/scripts/iva_qc_make_db b/scripts/iva_qc_make_db
old mode 100644
new mode 100755
diff --git a/setup.py b/setup.py
index f6b1f93..cdd1d09 100644
--- a/setup.py
+++ b/setup.py
@@ -47,7 +47,7 @@ if not found_all_progs:
 
 setup(
     name='iva',
-    version='1.0.5',
+    version='1.0.6',
     description='Iterative Virus Assembler',
     packages = find_packages(),
     package_data={'iva': ['gage/*', 'ratt/*', 'read_trim/*', 'test_run_data/*']},

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/iva.git



More information about the debian-med-commit mailing list