changeset 1:1c1902e12caf draft

Updated to version 1.2.1.0
author pjbriggs
date Wed, 25 Apr 2018 03:54:00 -0400
parents 47ec9c6f44b8
children 43d6f81bc667
files README.rst amplicon_analysis_pipeline.py amplicon_analysis_pipeline.xml install_tool_deps.sh
diffstat 4 files changed, 30 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/README.rst	Thu Nov 09 10:13:29 2017 -0500
+++ b/README.rst	Wed Apr 25 03:54:00 2018 -0400
@@ -218,6 +218,9 @@
 ========== ======================================================================
 Version    Changes
 ---------- ----------------------------------------------------------------------
+1.2.1.0    Updated to Amplicon_Analysis_Pipeline version 1.2.1 (adds
+           option to use the Human Oral Microbiome Database v15.1, and
+           updates SILVA database to v123)
 1.1.0      First official version on Galaxy toolshed.
 1.0.6      Expand inline documentation to provide detailed usage guidance.
 1.0.5      Updates including:
--- a/amplicon_analysis_pipeline.py	Thu Nov 09 10:13:29 2017 -0500
+++ b/amplicon_analysis_pipeline.py	Wed Apr 25 03:54:00 2018 -0400
@@ -120,6 +120,7 @@
                    type=str.lower,
                    default="vsearch")
     p.add_argument("-S",dest="use_silva",action="store_true")
+    p.add_argument("-H",dest="use_homd",action="store_true")
     p.add_argument("-r",dest="reference_data_path")
     p.add_argument("-c",dest="categories_file")
     args = p.parse_args()
@@ -150,6 +151,14 @@
             final_name.write("%s\n" % '\t'.join((r2,sample_name)))
             sample_names.append(sample_name)
 
+    # Reference database
+    if args.use_silva:
+        ref_database = "silva"
+    elif args.use_homd:
+        ref_database = "homd"
+    else:
+        ref_database = "gg"
+
     # Construct the pipeline command
     print "Amplicon analysis: constructing pipeline command"
     pipeline = PipelineCmd("Amplicon_analysis_pipeline.sh")
@@ -168,8 +177,10 @@
     if args.reference_data_path:
         pipeline.add_args("-r",args.reference_data_path)
     pipeline.add_args("-P",args.pipeline)
-    if args.use_silva:
+    if ref_database == "silva":
         pipeline.add_args("-S")
+    elif ref_database == "homd":
+        pipeline.add_args("-H")
 
     # Echo the pipeline command to stdout
     print "Running %s" % pipeline
@@ -190,6 +201,7 @@
         except Exception as ex:
             # Some other problem
             sys.stderr.write("Unexpected error: %s\n" % str(ex))
+            exit_code = 1
 
     # Write out the list of outputs
     outputs_file = "Pipeline_outputs.txt"
@@ -298,8 +310,7 @@
         boxplots_dir = os.path.abspath(
             os.path.join("RESULTS",
                          "%s_%s" % (args.pipeline.title(),
-                                    ("gg" if not args.use_silva
-                                     else "silva")),
+                                    ref_database),
                          "Alpha_diversity",
                          "Alpha_diversity_boxplot",
                          "Categories_shannon"))
--- a/amplicon_analysis_pipeline.xml	Thu Nov 09 10:13:29 2017 -0500
+++ b/amplicon_analysis_pipeline.xml	Wed Apr 25 03:54:00 2018 -0400
@@ -1,7 +1,7 @@
-<tool id="amplicon_analysis_pipeline" name="Amplicon Analysis Pipeline" version="1.0.6">
+<tool id="amplicon_analysis_pipeline" name="Amplicon Analysis Pipeline" version="1.2.1.0">
   <description>analyse 16S rRNA data from Illumina Miseq paired-end reads</description>
   <requirements>
-    <requirement type="package" version="1.1">amplicon_analysis_pipeline</requirement>
+    <requirement type="package" version="1.2.1">amplicon_analysis_pipeline</requirement>
     <requirement type="package" version="1.11">cutadapt</requirement>
     <requirement type="package" version="1.33">sickle</requirement>
     <requirement type="package" version="27-08-2013">bioawk</requirement>
@@ -22,10 +22,12 @@
   </stdio>
   <command><![CDATA[
   ## Set the reference database name
-  #if $reference_database == ""
+  #if $reference_database == "-S"
+    #set reference_database_name = "silva"
+  #else if $reference_database == "-H"
+    #set reference_database_name = "homd"
+  #else
     #set reference_database_name = "gg"
-  #else
-    #set reference_database_name = "silva"
   #end if
 
   ## Run the amplicon analysis pipeline wrapper
@@ -52,7 +54,7 @@
   -P $pipeline
   -r \$AMPLICON_ANALYSIS_REF_DATA_PATH
   #if str( $reference_database ) != ""
-    "${reference_database}"
+    ${reference_database}
   #end if
   #if str($categories_file_in) != 'None'
     -c "${categories_file_in}"
@@ -186,6 +188,7 @@
 	   label="Reference database">
       <option value="" selected="true">GreenGenes</option>
       <option value="-S">Silva</option>
+      <option value="-H">Human Oral Microbiome Database (HOMD)</option>
     </param>
   </inputs>
   <outputs>
--- a/install_tool_deps.sh	Thu Nov 09 10:13:29 2017 -0500
+++ b/install_tool_deps.sh	Wed Apr 25 03:54:00 2018 -0400
@@ -35,6 +35,9 @@
     rm -rf $wd/*
     rmdir $wd
 }
+function install_amplicon_analysis_pipeline_1_2_1() {
+    install_amplicon_analysis_pipeline $1 1.2.1
+}
 function install_amplicon_analysis_pipeline_1_1() {
     install_amplicon_analysis_pipeline $1 1.1
 }
@@ -686,7 +689,7 @@
     mkdir -p $TOP_DIR
 fi
 # Install dependencies
-install_amplicon_analysis_pipeline_1_1 $TOP_DIR
+install_amplicon_analysis_pipeline_1_2_1 $TOP_DIR
 install_cutadapt_1_11 $TOP_DIR
 install_sickle_1_33 $TOP_DIR
 install_bioawk_27_08_2013 $TOP_DIR