comparison amplicon_analysis_pipeline.py @ 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
comparison
equal deleted inserted replaced
48:04e71fda5b9c 49:cf5597dc7d2a
153 final_name.write("%s\n" % '\t'.join((r1,sample_name))) 153 final_name.write("%s\n" % '\t'.join((r1,sample_name)))
154 final_name.write("%s\n" % '\t'.join((r2,sample_name))) 154 final_name.write("%s\n" % '\t'.join((r2,sample_name)))
155 sample_names.append(sample_name) 155 sample_names.append(sample_name)
156 156
157 # Reference database 157 # Reference database
158 if args.use_silva: 158 if args.pipeline == "Vsearch":
159 if args.use_silva:
160 ref_database = "silva"
161 elif args.use_homd:
162 ref_database = "homd"
163 else:
164 ref_database = "gg"
165 elif args.pipeline == "DADA2":
159 ref_database = "silva" 166 ref_database = "silva"
160 elif args.use_homd:
161 ref_database = "homd"
162 else:
163 ref_database = "gg"
164 167
165 # Construct the pipeline command 168 # Construct the pipeline command
166 print "Amplicon analysis: constructing pipeline command" 169 print "Amplicon analysis: constructing pipeline command"
167 pipeline = PipelineCmd("Amplicon_analysis_pipeline.sh") 170 pipeline = PipelineCmd("Amplicon_analysis_pipeline.sh")
168 if args.forward_pcr_primer: 171 if args.forward_pcr_primer:
178 if args.sliding_window_length: 181 if args.sliding_window_length:
179 pipeline.add_args("-l",args.sliding_window_length) 182 pipeline.add_args("-l",args.sliding_window_length)
180 if args.reference_data_path: 183 if args.reference_data_path:
181 pipeline.add_args("-r",args.reference_data_path) 184 pipeline.add_args("-r",args.reference_data_path)
182 pipeline.add_args("-P",args.pipeline) 185 pipeline.add_args("-P",args.pipeline)
183 if ref_database == "silva": 186 if args.pipeline == "Vsearch":
184 pipeline.add_args("-S") 187 if ref_database == "silva":
185 elif ref_database == "homd": 188 pipeline.add_args("-S")
186 pipeline.add_args("-H") 189 elif ref_database == "homd":
190 pipeline.add_args("-H")
187 191
188 # Echo the pipeline command to stdout 192 # Echo the pipeline command to stdout
189 print "Running %s" % pipeline 193 print "Running %s" % pipeline
190 194
191 # Run the pipeline 195 # Run the pipeline