changeset 49:cf5597dc7d2a draft

planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 28fc368669a17c197073f8c32f75a95941d63963-dirty
author pjbriggs
date Wed, 18 Dec 2019 09:51:18 +0000
parents 04e71fda5b9c
children dac038bd896d
files amplicon_analysis_pipeline.py
diffstat 1 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/amplicon_analysis_pipeline.py	Tue Dec 17 09:24:17 2019 +0000
+++ b/amplicon_analysis_pipeline.py	Wed Dec 18 09:51:18 2019 +0000
@@ -155,12 +155,15 @@
             sample_names.append(sample_name)
 
     # Reference database
-    if args.use_silva:
+    if args.pipeline == "Vsearch":
+        if args.use_silva:
+            ref_database = "silva"
+        elif args.use_homd:
+            ref_database = "homd"
+        else:
+            ref_database = "gg"
+    elif args.pipeline == "DADA2":
         ref_database = "silva"
-    elif args.use_homd:
-        ref_database = "homd"
-    else:
-        ref_database = "gg"
 
     # Construct the pipeline command
     print "Amplicon analysis: constructing pipeline command"
@@ -180,10 +183,11 @@
     if args.reference_data_path:
         pipeline.add_args("-r",args.reference_data_path)
     pipeline.add_args("-P",args.pipeline)
-    if ref_database == "silva":
-        pipeline.add_args("-S")
-    elif ref_database == "homd":
-        pipeline.add_args("-H")
+    if args.pipeline == "Vsearch":
+        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