Skip to content
Commits on Source (5)
QIIME for Debian - source
=========================
.py endings and the qiime wrapper of Bio-Linux
----------------------------------------------
Previous comment by Steffen:
Lintian complains a lot about script-with-language-extension,
i.e. the .py endings for files ending up in /usr/bin.
What to do about this is not clear for the moment. For the
time speaking it seems like lintian is wrong here, too deeply
embedded is python in the project and Debian does not
want to become incompatible.
New comments by Tim:
I borrowed the Bio-Linux approach for QIIME which may or may not be the best idea.
Essentially, the Python scripts are not in the path and instead of running:
% my_qiime_app.py
You run:
% qiime my_qiime_app.py
or equivalently just:
% qiime my_qiime_app
The 'qiime' wrapper script adds the extension if needed and sets the path. If run with
no arguments it sets the path and drops to an interactive shell.
The dependencies of QIIME essentially make it non-free despite the DFSG licence on the QIIME
code itself. Chief among these is UClust. This package is supposed to handle the lack of UClust
gracefully but it is still up to the user to fetch and install it.
Other dependencies/TODO:
------------------------
Everything else needed should be packaged, if not in Debian proper then in the SVN. QIIME
keeps adding new deps so these need to be checked with each release.
To package:
* Emperor 1.8.0+
* python-burrito-fillings
The
Build-Depends: bwa, infernal, raxml, sortmerna, swarm, vsearch
are just added to make sure the qiime package will build only on those architectures successfully
where all these dependencies exist.
QIIME data
----------
The QIIME installation instructions say that you need to download some core files from Greengenes.
Since these barely change and are included in the upstream tarball I am now putting them into the
qiime-data package for easy access. I have noted in copyright that these are CC licensed.
See here for a discussion of what these are and why they don't change:
https://groups.google.com/forum/?hl=en-US#!searchin/qiime-forum/greengenes/qiime-forum/SvXFetaLNCM/HE6bsBY0yZIJ
......@@ -102,47 +102,6 @@ Description: Quantitative Insights Into Microbial Ecology
PyCogent toolkit. It makes extensive use of unit tests, and is highly
modular to facilitate custom analyses.
Package: qiime-doc
Architecture: all
Section: doc
Depends: ${misc:Depends},
libjs-jquery,
libjs-underscore
Description: Quantitative Insights Into Microbial Ecology (tutorial)
QIIME (canonically pronounced ‘Chime’) is a pipeline for performing
microbial community analysis that integrates many third party tools which
have become standard in the field. A standard QIIME analysis begins with
sequence data from one or more sequencing platforms, including
* Sanger,
* Roche/454, and
* Illumina GAIIx.
QIIME can perform:
* library de-multiplexing and quality filtering;
* denoising with PyroNoise;
* OTU and representative set picking with uclust, cdhit, mothur, BLAST,
or other tools;
* taxonomy assignment with BLAST or the RDP classifier;
* sequence alignment with PyNAST, muscle, infernal, or other tools;
* phylogeny reconstruction with FastTree, raxml, clearcut, or other tools;
* alpha diversity and rarefaction, including visualization of results,
using over 20 metrics including Phylogenetic Diversity, chao1, and
observed species;
* beta diversity and rarefaction, including visualization of results,
using over 25 metrics including weighted and unweighted UniFrac,
Euclidean distance, and Bray-Curtis;
* summarization and visualization of taxonomic composition of samples
using pie charts and histograms
and many other features.
.
QIIME includes parallelization capabilities for many of the
computationally intensive steps. By default, these are configured to
utilize a mutli-core environment, and are easily configured to run in
a cluster environment. QIIME is built in Python using the open-source
PyCogent toolkit. It makes extensive use of unit tests, and is highly
modular to facilitate custom analyses.
.
This package contains the documentation and a tutorial.
Package: qiime-data
Architecture: all
Depends: ${misc:Depends}
......
#!/bin/sh
# strip binary JARs
COMPRESSION=xz
set -e
NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
if ! echo $@ | grep -q upstream-version ; then
VERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/\([0-9\.]\+\)-[0-9]\+$/\1/'`
else
VERSION=`echo $@ | sed "s?^.*--upstream-version \([0-9.]\+\) .*${name}.*?\1?"`
if echo "$VERSION" | grep -q "upstream-version" ; then
echo "Unable to parse version number"
exit
fi
fi
# Upstream tarball has upper case 'Q'
UPSTREAMNAME=`echo ${NAME} | tr [q] [Q]`
TARDIR=${UPSTREAMNAME}-${VERSION}
mkdir -p ../tarballs
cd ../tarballs
tar xaf ../${UPSTREAMNAME}-${VERSION}.tar.gz
# Remove useless JAR and CLASS files
find . -name "*.jar" -delete
GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESSION} "${TARDIR}"
rm -rf "$TARDIR"
The behaviour in qiime/assign_taxonomy.py is that if the taxonomy file path is
not set then the RDP classifier will not be retrained.
But the script bin/assign_taxonomy.py detects if the parameter is set to None
and replaces it with the default value.
So you always end up retraining the classifier, which is stupid.
This is a nasty but effective workaround.
--- a/scripts/assign_taxonomy.py
+++ b/scripts/assign_taxonomy.py
@@ -106,6 +106,13 @@
default_reference_seqs_fp = qiime_config['assign_taxonomy_reference_seqs_fp']
default_id_to_taxonomy_fp = qiime_config['assign_taxonomy_id_to_taxonomy_fp']
+# Setting a path that begins with '#' disables the option
+if default_reference_seqs_fp.lstrip().startswith('#'):
+ default_reference_seqs_fp = None
+if default_id_to_taxonomy_fp.lstrip().startswith('#'):
+ default_id_to_taxonomy_fp = None
+
+
script_info['optional_options'] = [
make_option('-t', '--id_to_taxonomy_fp', type="existing_filepath",
help='Path to tab-delimited file mapping sequences to assigned '
We've moved the default config file, so tell this script to look in the new
location. See the next patch for other path fixes related to support_files
--- a/scripts/print_qiime_config.py
+++ b/scripts/print_qiime_config.py
@@ -283,8 +283,7 @@
"config file as they will be ignored by QIIME.")
qiime_project_dir = get_qiime_project_dir()
- orig_config = parse_qiime_config_file(open(qiime_project_dir +
- '/qiime/support_files/qiime_config'))
+ orig_config = parse_qiime_config_file(open('/etc/qiime/qiime_config'))
# check the env qiime_config
qiime_config_env_filepath = getenv('QIIME_CONFIG_FP')
Author: Tim Booth <tbooth@ceh.ac.uk>
Last-Update: Mon, 10 Mar 2014 14:20:08 +0000
Description: Enable proper detection of mathplotlib
--- a/scripts/print_qiime_config.py
+++ b/scripts/print_qiime_config.py
@@ -306,7 +306,7 @@ class QIIMEDependencyBase(QIIMEConfig):
max_acceptable_version = (1,3,1)
try:
from matplotlib import __version__ as matplotlib_lib_version
- version = tuple(map(int,matplotlib_lib_version.split('.')))
+ version = tuple(map(lambda x: int(x.replace("rc","")),matplotlib_lib_version.split('.')))
pass_test = (version >= min_acceptable_version and
version <= max_acceptable_version)
version_string = str(matplotlib_lib_version)
This diff is collapsed.
Last-Update: Mon, 06 Aug 2012 09:22:42 +0200
Description: Fix path to binary helper for denoiser
--- a/qiime/denoiser/utils.py
+++ b/qiime/denoiser/utils.py
@@ -60,8 +60,9 @@ def get_denoiser_data_dir():
def get_flowgram_ali_exe():
"""Return the path to the flowgram alignment prog
"""
- fp = get_qiime_scripts_dir() + "/FlowgramAli_4frame"
- return fp
+ #fp = get_qiime_scripts_dir() + "/FlowgramAli_4frame"
+ #return fp
+ return "/usr/lib/qiime/support_files/denoiser/bin/FlowgramAli_4frame"
def check_flowgram_ali_exe():
"""Check if we have a working FlowgramAligner"""
Author: Tim Booth <tbooth@ceh.ac.uk>
Last-Update: Mon, 10 Mar 2014 14:20:08 +0000
Description: This may be a much simpler fix than patching every single mention
of support_files, but I'm not sure what else this function is used
to find?
--- a/qiime/util.py
+++ b/qiime/util.py
@@ -268,14 +268,10 @@
def get_qiime_project_dir():
""" Returns the top-level QIIME directory
- """
- # Get the full path of util.py
- current_file_path = abspath(__file__)
- # Get the directory containing util.py
- current_dir_path = dirname(current_file_path)
- # Return the directory containing the directory containing util.py
- return dirname(current_dir_path)
+ In Debian we know this is always /usr/lib/[qiime]
+ """
+ return "/usr/lib"
def get_qiime_scripts_dir():
"""Return the directory containing QIIME scripts.
Author: Tim Booth <tbooth@ceh.ac.uk>
Last-Update: Mon, 10 Mar 2014 14:20:08 +0000
Description: Enhancing unit tests
--- a/qiime/test.py
+++ b/qiime/test.py
@@ -15,7 +15,7 @@
from os import chdir, getcwd
from shutil import copytree, rmtree
from glob import glob
-from site import addsitedir
+import sys
from tempfile import NamedTemporaryFile
from traceback import format_exc
from skbio.util import remove_files
@@ -806,7 +806,9 @@
self._log('Scripts to test:\n %s' % ' '.join(scripts))
self._log('')
- addsitedir(scripts_dir)
+ #addsitedir(scripts_dir)
+ # This is not strong enough. The scripts-dir must be the first thing in the PATH
+ sys.path = [ scripts_dir ] + sys.path
for script_name in scripts:
self.total_scripts += 1
--- a/tests/all_tests.py
+++ b/tests/all_tests.py
@@ -96,6 +96,9 @@
bad_tests.append(unittest_name)
qiime_test_data_dir = join(get_qiime_project_dir(), 'qiime_test_data')
+ #Allow tests to be run without installing test data to system dir
+ if exists("../qiime_test_data"):
+ qiime_test_data_dir = "../qiime_test_data"
qiime_test_data_dir_exists = exists(qiime_test_data_dir)
if not opts.suppress_script_usage_tests and qiime_test_data_dir_exists:
if opts.script_usage_tests is not None:
Author: Tim Booth <tbooth@ceh.ac.uk>
Last-Update: Tue, 11 Jun 2013 16:49:19 +0100
Description: This patch twists QIIME's arm to accept running a newer version
of the RDP classifier by setting RDP_JAR_VERSION_OK, which is done
by the QIIME wrapper.
This is a nasty hack and hopefully the patch can be dropped for QIIME 1.6
--- a/qiime/assign_taxonomy.py
+++ b/qiime/assign_taxonomy.py
@@ -54,14 +54,19 @@
"http://qiime.org/install/install.html#rdp-install"
)
- rdp_jarname = os.path.basename(rdp_jarpath)
- version_match = re.search("\d\.\d", rdp_jarname)
- if version_match is None:
- raise RuntimeError(
- "Unable to detect RDP Classifier version in file %s" % rdp_jarname
- )
+ #Patch for Bio-Linux/Debian. Allow us to reassure QIIME about the version
+ #of RDP Classifier using an environment variable.
+ if os.getenv('RDP_JAR_VERSION_OK') is not None :
+ version = os.getenv('RDP_JAR_VERSION_OK')
+ else :
+ rdp_jarname = os.path.basename(rdp_jarpath)
+ version_match = re.search("\d\.\d", rdp_jarname)
+ if version_match is None:
+ raise RuntimeError(
+ "Unable to detect RDP Classifier version in file %s" % rdp_jarname
+ )
+ version = float(version_match.group())
- version = float(version_match.group())
if version < 2.1:
raise RuntimeError(
"RDP Classifier does not look like version 2.2 or greater."
--- a/scripts/assign_taxonomy.py
+++ b/scripts/assign_taxonomy.py
@@ -366,6 +366,11 @@
'training_data_properties_fp'] = opts.training_data_properties_fp
params['max_memory'] = "%sM" % opts.rdp_max_memory
+ #Record actual RDP version. This shouldn't fail as it was called once
+ #already.
+ params['real_rdp_version'] = str(validate_rdp_version())
+
+
elif assignment_method == 'rtax':
params['id_to_taxonomy_fp'] = opts.id_to_taxonomy_fp
params['reference_sequences_fp'] = opts.reference_seqs_fp
Author: Tim Booth <tbooth@ceh.ac.uk>, Andreas Tille <tille@debian.org>
Last-Update: Wed, 22 Jan 2014 08:51:45 +0100
Description: Do not try to download uclust at build time
--- a/setup.py
+++ b/setup.py
@@ -358,9 +358,8 @@
chdir(cwd)
-# don't build any of the non-Python dependencies if the following modes are
-# invoked
-if all([e not in sys.argv for e in 'egg_info', 'sdist', 'register']):
+# don't build any of the non-Python dependencies - let DPKG handle it
+if False:
catch_install_errors(build_denoiser, 'denoiser')
catch_install_errors(download_UCLUST, 'UCLUST')
catch_install_errors(build_FastTree, 'FastTree')
Author: Andreas Tille <tille@debian.org>
Last-Update: Sat, 21 Dec 2013 08:50:20 +0100
Description: Remove Google Addsense from user documentation
to save user privacy
--- a/doc/_templates/layout.html
+++ b/doc/_templates/layout.html
@@ -2,8 +2,6 @@
{% block extrahead %}
<meta http-equiv="Content-Style-Type" content="text/css" />
-<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAbW_pA971hrPgosv-Msv7hRRE2viNBUPuU405tK6p2cguOFmlFBQSwZMG6_q_v6Z42nkdo9ejT1aHmA"></script>
-<script type="text/javascript" src="{{ pathto("_static/google_feed.js",1)}}"></script>
{% endblock %}
{% block relbar1 %}
@@ -47,10 +45,6 @@
<br /></div>
{{ super() }}
<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-6636235-4");
pageTracker._trackPageview();
Author: Tim Booth <tbooth@ceh.ac.uk>
Last-Update: Mon, 10 Mar 2014 14:20:08 +0000
Description: Enable running more tests successfully by relaxing version number
--- a/scripts/print_qiime_config.py
+++ b/scripts/print_qiime_config.py
@@ -326,7 +326,7 @@
version_string = stdout.strip().split('v')[-1].strip('q')
try:
version = tuple(map(int, version_string.split('.')))
- pass_test = version == acceptable_version
+ pass_test = version >= acceptable_version
except ValueError:
pass_test = False
version_string = stdout
@@ -360,7 +360,7 @@
try:
version = tuple(map(int, version_str.split('.')))
- pass_test = version == acceptable_version
+ pass_test = version >= acceptable_version
except ValueError:
pass_test = False
@@ -460,7 +460,7 @@
version_string = stdout.strip().split(' ')[1].strip()
try:
version = tuple(map(int, version_string.split('.')))
- pass_test = version == acceptable_version
+ pass_test = version >= acceptable_version
except ValueError:
pass_test = False
version_string = stdout
@@ -481,7 +481,7 @@
version_string = stdout.strip().split(' ')[2].strip()
try:
version = tuple(map(int, version_string.split('.')))
- pass_test = version == acceptable_version
+ pass_test = version >= acceptable_version
except ValueError:
pass_test = False
version_string = stdout
@@ -548,7 +548,7 @@
version_string = stdout.strip().split(' ')[1].strip('v.')
try:
version = tuple(map(int, version_string.split('.')))
- pass_test = version == acceptable_version
+ pass_test = version >= acceptable_version
except ValueError:
pass_test = False
version_string = stdout
@@ -573,7 +573,7 @@
def test_raxmlHPC_supported_version(self):
"""raxmlHPC is in path and version is supported """
- acceptable_version = [(7, 3, 0), (7, 3, 0)]
+ acceptable_version = [(7, 3, 0), (7, 3, 5)]
self.assertTrue(which('raxmlHPC'),
"raxmlHPC not found. This may or may not be a problem depending on " +
"which components of QIIME you plan to use.")
#allow_empty_default_taxonomy.patch
#check_config_file_in_new_location.patch
#make_qiime_accept_new_rdp_classifier.patch
#fix_path_for_support_files.patch
#relax_mothur_blast_raxml_versions.patch
#prevent_google_addsense.patch
#fix_script_usage_tests.patch
#prevent_download_on_builds.patch
##exclude_tests_that_need_to_fail.patch
0000_fixme_hack_around_UnicodeDecodeError_in_bibtex.patch
Document: qiime
Title: QIIME: Quantitative Insights Into Microbial Ecology
Author: Greg Caporaso <gregcaporaso@gmail.com>
Abstract: Quantitative Insights Into Microbial Ecology
QIIME (canonically pronounced ‘Chime’) is a pipeline for performing
microbial community analysis that integrates many third party tools
which have become standard in the field.
.
Rather than reimplementing commonly used algorithms, QIIME wraps popular
implementations of those algorithms. This allows us to make use of the
many excellent tools available in this area, and allows faster
integration of new tools. If you use tools that you think would be
useful additions to QIIME, consider submitting a feature request.
.
A standard QIIME analysis begins with sequence data from one or more
sequencing platforms, including Sanger, Roche/454, and Illumina GAIIx.
QIIME can perform library de-multiplexing and quality filtering;
denoising with AmpliconNoise or the QIIME Denoiser; OTU and
representative set picking with uclust, cdhit, mothur, BLAST, or other
tools; taxonomy assignment with BLAST or the RDP classifier; sequence
alignment with PyNAST, muscle, infernal, or other tools; phylogeny
reconstruction with FastTree, raxml, clearcut, or other tools; alpha
diversity and rarefaction, including visualization of results, using
over 20 metrics including Phylogenetic Diversity, chao1, and observed
species; beta diversity and rarefaction, including visualization of
results, using over 25 metrics including weighted and unweighted
UniFrac, Euclidean distance, and Bray-Curtis; summarization and
visualization of taxonomic composition of samples using area, bar and
pie charts along with distance histograms; and many other features.
While QIIME is primarily used for analysis of amplicon data, many of the
downstream analysis pipeline (such as alpha rarefaction and jackknifed
beta diversity) can be performed on any type of sample x observation
tables if they are formatted correctly.
Section: Science/Biology
Format: html
Files: /usr/share/doc/qiime/html/*
Index: /usr/share/doc/qiime/html/index.html
usr/share/javascript/jquery/jquery.js usr/share/doc/qiime/html/_static/jquery.js
usr/share/javascript/underscore/underscore.js usr/share/doc/qiime/html/_static/underscore.js
# qiime_config
# WARNING: DO NOT EDIT OR DELETE /etc/qiime/qiime_config
# To overwrite defaults, copy this file to $HOME/.qiime_config or a path
# specified by $QIIME_CONFIG_FP and edit that copy of the file.
# This file refers to default GreenGenes data files installed by the qiime-data
# package.
cluster_jobs_fp
python_exe_fp python
working_dir .
blastmat_dir /usr/share/ncbi/data
blastall_fp blastall
pynast_template_alignment_fp /usr/share/qiime/data/core_set_aligned.fasta.imputed
#template_alignment_lanemask_fp /usr/share/qiime/data/lanemask_in_1s_and_0s
pynast_template_alignment_blastdb
jobs_to_start 1
seconds_to_sleep 60
qiime_scripts_dir /usr/lib/qiime/bin/
temp_dir /tmp
# Uncomment these to enable always re-training the RDP classifier, which is the
# default behaviour for QIIME 1.9. This takes a lot of time and RAM, so
# for Bio-Linux the default behaviour is to quickly use the built-in index.
# If you are using another assignment method you may need to specify these settings
# in all cases.
assign_taxonomy_id_to_taxonomy_fp # /usr/share/qiime/data/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt
assign_taxonomy_reference_seqs_fp # /usr/share/qiime/data/gg_13_8_otus/rep_set/97_otus.fasta
#!/bin/sh
print_qiime_config.py -t
echo
echo "Here are the versions of the packages that QIIME depends on as reported by"
echo "the system package manager:"
echo
dpkg -s qiime | perl -ne '/^Depends: (.*)/ &&
map {s/[ :].*//;
printf "%-26s: %s", $_, `dpkg -s "$_" | sed -n "/Version:/s/.* //p"`
}
grep {! /^lib/}
sort
split(/, /,"$1, mothur")' | uniq \
&& { echo ; echo OK ; }