Commit 269e2e81 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 21ff28bf
......@@ -106,85 +106,28 @@ class MiSeqDiversity (NG6Workflow):
fileExtension = os.path.splitext(concat_read1_files[0])[1]
if fileExtension == fileFormat:
gunzip = self.add_component("GunZipFiles",[concat_read1_files,concat_read2_files])
makecontigs = self.add_component("MothurMakeContigs",
kwargs={'read1_files':gunzip.fastq_R1,
'read2_files':gunzip.fastq_R2,
'sample_name': self.args["sample_name"],
'maxambig':self.args["max_ambiguous"],
'maxlength':self.args["max_contigs_length"],
'processors':self.args["processors"]},
component_prefix="with_gz",
parent=fastqilluminafilter)
makecontigs = self.add_component("MothurMakeContigs", kwargs={'read1_files':gunzip.fastq_R1, 'read2_files':gunzip.fastq_R2, 'sample_name': self.args["sample_name"], 'maxambig':self.args["max_ambiguous"], 'maxlength':self.args["max_contigs_length"], 'processors':self.args["processors"]}, component_prefix="with_gz", parent=fastqilluminafilter)
else:
makecontigs = self.add_component("MothurMakeContigs",
kwargs={'read1_files':concat_read1_files,
'read2_files':concat_read2_files,
'sample_name': self.args["sample_name"],
'maxambig':self.args["max_ambiguous"],
'maxlength':self.args["max_contigs_length"],
'processors':self.args["processors"]},
component_prefix="without_gz",
parent=fastqilluminafilter)
makecontigs = self.add_component("MothurMakeContigs", kwargs={'read1_files':concat_read1_files, 'read2_files':concat_read2_files,'sample_name': self.args["sample_name"],'maxambig':self.args["max_ambiguous"],'maxlength':self.args["max_contigs_length"],'processors':self.args["processors"]},component_prefix="without_gz",parent=fastqilluminafilter)
uniqueseqs = self.add_component("MothurUniqueSeqs", [makecontigs.good_fasta_files])
countseqs = self.add_component("MothurCountSeqs", [uniqueseqs.unique_names_files,makecontigs.good_groups_files])
alignment_template = self.args["reference_alignment"]
if self.args["trunk_ref"]:
pcrseqs = self.add_component("MothurPcrSeqs",
kwargs={'fasta_files':self.args["reference_alignment"],
'forward_primer':self.args["forward_primer"],
'reverse_primer':self.args["reverse_primer"]})
pcrseqs = self.add_component("MothurPcrSeqs", kwargs={'fasta_files':self.args["reference_alignment"],'forward_primer':self.args["forward_primer"],'reverse_primer':self.args["reverse_primer"]})
alignment_template = pcrseqs.pcr_fasta_files
alignseqs = self.add_component("MothurAlign",
kwargs={'fasta_files':uniqueseqs.unique_fasta_files,
'reference_alignment_files':alignment_template,
'count_table_files':countseqs.count_table_files,
'maxhomop':self.args["max_homopolymers"],
'maxambig':self.args["max_ambiguous"],
'processors':self.args["processors"]},
parent=makecontigs)
filterseqs = self.add_component("MothurFilterSeqs",
kwargs={'align_files':alignseqs.good_fasta_files,
'processors':self.args["processors"]})
uniqueseqs_filter = self.add_component("MothurUniqueSeqs",
kwargs={'fasta_files':filterseqs.filtered_fasta_files,
'count_table_files':alignseqs.good_count_table_files},
component_prefix="after_filter")
precluster = self.add_component("MothurPreCluster",
kwargs={'fasta_files':uniqueseqs_filter.unique_fasta_files,
'count_table_files':uniqueseqs_filter.unique_count_table_files,
'processors':self.args["processors"]})
chimerauchime = self.add_component("MothurChimeraUchime",
kwargs={'fasta_files':precluster.precluster_fasta_files,
'count_table_files':precluster.precluster_count_table_files,
'processors':self.args["processors"]},
parent=alignseqs)
alignseqs = self.add_component("MothurAlign", kwargs={'fasta_files':uniqueseqs.unique_fasta_files,'reference_alignment_files':alignment_template,'count_table_files':countseqs.count_table_files,'maxhomop':self.args["max_homopolymers"],'maxambig':self.args["max_ambiguous"],'processors':self.args["processors"]},parent=makecontigs)
filterseqs = self.add_component("MothurFilterSeqs",kwargs={'align_files':alignseqs.good_fasta_files,'processors':self.args["processors"]})
uniqueseqs_filter = self.add_component("MothurUniqueSeqs", kwargs={'fasta_files':filterseqs.filtered_fasta_files,'count_table_files':alignseqs.good_count_table_files},component_prefix="after_filter")
precluster = self.add_component("MothurPreCluster",kwargs={'fasta_files':uniqueseqs_filter.unique_fasta_files,'count_table_files':uniqueseqs_filter.unique_count_table_files,'processors':self.args["processors"]})
chimerauchime = self.add_component("MothurChimeraUchime",kwargs={'fasta_files':precluster.precluster_fasta_files,'count_table_files':precluster.precluster_count_table_files,'processors':self.args["processors"]},parent=alignseqs)
# classify reads with the provided taxonomy
classifyseqs = self.add_component("MothurClassifySeqs",
kwargs={'fasta_files':chimerauchime.pick_fasta_files,
'template_files':self.args["classify_template"],
'taxonomy_files':self.args["classify_taxonomy"],
'count_table_files':chimerauchime.good_count_table_files,
'without_krona':self.args["without_krona"],
'processors':self.args["processors"]},
parent=chimerauchime)
classifyseqs = self.add_component("MothurClassifySeqs",kwargs={'fasta_files':chimerauchime.pick_fasta_files,'template_files':self.args["classify_template"],'taxonomy_files':self.args["classify_taxonomy"],'count_table_files':chimerauchime.good_count_table_files,'without_krona':self.args["without_krona"],'processors':self.args["processors"]},parent=chimerauchime)
# OTUs approach
distseqs = self.add_component("MothurDistSeqs",
kwargs={'fasta_files':chimerauchime.pick_fasta_files,
'processors':self.args["processors"]})
cluster = self.add_component("MothurCluster",
kwargs={'dist_files':distseqs.dist_files,
'count_table_files':chimerauchime.good_count_table_files})
distseqs = self.add_component("MothurDistSeqs", kwargs={'fasta_files':chimerauchime.pick_fasta_files,'processors':self.args["processors"]})
cluster = self.add_component("MothurCluster", kwargs={'dist_files':distseqs.dist_files,'count_table_files':chimerauchime.good_count_table_files})
otuanalysis = self.add_component("MothurOTUAnalysis",
kwargs={'an_list_files':cluster.an_list_files,
'count_table_files':chimerauchime.good_count_table_files,
'taxonomy_files':classifyseqs.taxonomy_files,
'label':self.args["labels"],
'tree_label':self.args["labels"],
'without_krona':self.args["without_krona"]},
parent=chimerauchime)
otuanalysis = self.add_component("MothurOTUAnalysis", kwargs={'an_list_files':cluster.an_list_files,'count_table_files':chimerauchime.good_count_table_files,'taxonomy_files':classifyseqs.taxonomy_files,'label':self.args["labels"],'tree_label':self.args["labels"],'without_krona':self.args["without_krona"]},parent=chimerauchime)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment