# HG changeset patch # User pjbriggs # Date 1538148497 14400 # Node ID b5e43dfe07ac7efc4a46ef85af469eba10567da3 # Parent f0917c340f1329d9e2bdfee9b1f134beacd3e078 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit e4cd2df591ac5b9da5a1731e81f921313ed9e979 diff -r f0917c340f13 -r b5e43dfe07ac README.rst --- a/README.rst Thu Aug 30 08:41:11 2018 -0400 +++ b/README.rst Fri Sep 28 11:28:17 2018 -0400 @@ -29,8 +29,12 @@ 1. Install the dependencies --------------------------- -The ``install_tool_deps.sh`` script can be used to fetch and install the -dependencies locally, for example:: +If the tool is installed from the Galaxy toolshed (recommended) then +the dependencies should be installed automatically and this step can +be skipped. + +Otherwise the ``install_tool_deps.sh`` script can be used to fetch and +install the dependencies locally, for example:: install_tool_deps.sh /path/to/local_tool_dependencies @@ -38,6 +42,8 @@ created a set of directories containing the dependencies under the specified top level directory. +*NB ``install_tool_deps.sh`` is no longer being maintained* + 2. Install the tool files ------------------------- @@ -203,9 +209,11 @@ The following dependencies are currently unavailable: - - fasta_number (need 02jun2015) + - R 3.2.1 (installed from the toolshed as the bioconda version + has conflicts ) - microbiomeutil (need r20110519) + (NB usearch 6.1.544 and 8.0.1623 are special cases which must be handled outside of Galaxy's dependency management systems.) @@ -215,7 +223,8 @@ ========== ====================================================================== Version Changes ---------- ---------------------------------------------------------------------- -1.2.2.1 Update to get dependencies from bioconda +1.2.3.0 Updated to Amplicon_Analysis_Pipeline version 1.2.3; install + dependencies from bioconda and via tool_dependencies.xml 1.2.2.0 Updated to Amplicon_Analysis_Pipeline version 1.2.2 (removes jackknifed analysis which is not captured by Galaxy tool) 1.2.1.0 Updated to Amplicon_Analysis_Pipeline version 1.2.1 (adds diff -r f0917c340f13 -r b5e43dfe07ac amplicon_analysis_pipeline.py --- a/amplicon_analysis_pipeline.py Thu Aug 30 08:41:11 2018 -0400 +++ b/amplicon_analysis_pipeline.py Fri Sep 28 11:28:17 2018 -0400 @@ -190,7 +190,7 @@ fasta_splitter = os.readlink( find_executable("fasta-splitter")) if fasta_splitter: - os.symlink(vsearch,os.path.join("bin","fasta-splitter.pl")) + os.symlink(fasta_splitter,os.path.join("bin","fasta-splitter.pl")) print "-- made symlink to %s" % fasta_splitter else: sys.stderr.write("Missing 'fasta-splitter[.pl]'\n") @@ -234,17 +234,6 @@ find_executable("single_rarefaction.py"))) os.environ["QIIME_CONFIG_FP"] = qiime_config_file print "-- set QIIME_CONFIG_FP: %s" % os.environ["QIIME_CONFIG_FP"] - # Check for fasta_number.py - fasta_number = find_executable("fasta_number.py") - if not fasta_number: - # Make a link to relabel_fasta.py - relabel_fasta_path = os.path.join(os.path.dirname(__file__), - "relabel_fasta.py") - fasta_number_path = os.path.join(os.path.abspath("bin"), - "fasta_number.py") - os.symlink(relabel_fasta_path,fasta_number_path) - print "-- linked %s to %s" % (relabel_fasta_path, - fasta_number_path) # Construct the pipeline command print "Amplicon analysis: constructing pipeline command" diff -r f0917c340f13 -r b5e43dfe07ac amplicon_analysis_pipeline.xml --- a/amplicon_analysis_pipeline.xml Thu Aug 30 08:41:11 2018 -0400 +++ b/amplicon_analysis_pipeline.xml Fri Sep 28 11:28:17 2018 -0400 @@ -1,8 +1,8 @@ - + analyse 16S rRNA data from Illumina Miseq paired-end reads - amplicon_analysis_pipeline + amplicon_analysis_pipeline microbiomeutil-chimeraslayer uclust-qiime @@ -18,6 +18,7 @@ fasta-splitter rdp_classifier vsearch + R diff -r f0917c340f13 -r b5e43dfe07ac relabel_fasta.py --- a/relabel_fasta.py Thu Aug 30 08:41:11 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -#!/usr/bin/env python - -DESCRIPTION = \ -"""Replace FASTA labels with new labels 1, 2, -3 ... ( is provided by the user via the command -line). - -Can be used to label OTUs as OTU_1, OTU_2 etc. - -This reimplements the functionality of the fasta_number.py utility -from https://drive5.com/python/fasta_number_py.html -""" - -import argparse - -def relabel_fasta(fp,prefix,include_size=False): - """ - Relabel sequence records in a FASTA file - - Arguments: - fp (File): file-like object opened for reading - input FASTA data from - prefix (str): prefix to use in new labels - include_size (bool): if True then copy - 'size=...' records into new labels (default - is not to copy the size) - - Yields: updated lines from the input FASTA. - """ - # Iterate over lines in file - nlabel = 0 - for line in fp: - # Strip trailing newlines - line = line.rstrip('\n') - if not line: - # Skip blank lines - continue - elif line.startswith('>'): - # Deal with start of a sequence record - nlabel += 1 - label = line[1:].strip() - if include_size: - # Extract size from the label - try: - size = filter( - lambda x: x.startswith("size="), - label.split(';'))[0] - except Exception as ex: - raise Exception("Couldn't locate 'size' in " - "label: %s" % label) - yield ">%s%d;%s" % (args.prefix, - nlabel, - size) - else: - yield ">%s%d" % (args.prefix, - nlabel) - else: - # Echo the line to output - yield line - -if __name__ == "__main__": - # Set up command line parser - p = argparse.ArgumentParser(description=DESCRIPTION) - p.add_argument("--needsize", - action="store_true", - help="include the size as part of the " - "output label ('size=...' must be present " - "in the input FASTA labels). Output labels " - "will be ';size='") - p.add_argument("--nosize", - action="store_true", - help="don't include the size as part of " - "the output label (this is the default)") - p.add_argument("fasta", - metavar="FASTA", - help="input FASTA file") - p.add_argument("prefix", - metavar="PREFIX", - help="prefix to use for labels in output") - # Process command line - args = p.parse_args() - # Relabel FASTA - with open(args.fasta,'rU') as fasta: - for line in relabel_fasta(fasta, - args.prefix, - include_size=args.needsize): - print line - diff -r f0917c340f13 -r b5e43dfe07ac tool_dependencies.xml --- a/tool_dependencies.xml Thu Aug 30 08:41:11 2018 -0400 +++ b/tool_dependencies.xml Fri Sep 28 11:28:17 2018 -0400 @@ -1,6 +1,6 @@ - + https://github.com/MTutino/Amplicon_analysis/archive/v1.2.2.tar.gz