Commit cfaa03e0 authored by Penom Nom's avatar Penom Nom
Browse files

Add protein length parameter for framebot.

parent 6f86913c
......@@ -137,7 +137,7 @@ class GeneDiversity (NG6Workflow):
# Sequence traduction
split = self.add_component("SplitSeq", [chimera.nonchimeras, 6000])
split_outputs, new_samples_names = self._get_clean_list( chimera.nonchimeras, split.output_files, self.samples_names )
framebot = self.add_component("Framebot", [split_outputs, self.args["database"], False])
framebot = self.add_component("Framebot", [split_outputs, self.args["database"], self.args["protein_min_length"], False])
# Rename the pre-clusters to provide traceback after merge and cd-hit
rename_clusters = self.add_component("AddSamplesNames", [framebot.corrected_proteins, '|', ';size=', new_samples_names])
......
......@@ -30,17 +30,18 @@ class Framebot (Component):
frameshift-corrected protein and DNA sequences and an optimal global or local protein alignment.
"""
def define_parameters(self, input_fasta, bank, is_index=True):
def define_parameters(self, input_fasta, bank, length_cutoff=80, is_index=True):
"""
@param input_fasta : [list] files to align.
@param bank : [string] databank framebot index or fasta databank.
@param length_cutoff : [int] length cutoff in number of amino acids.
@param is_index : [bool] true if bank is a framebot index. False if bank is a fasta databank.
"""
# Parameters
self.bank = bank
self.options = ""
self.options = " -l " + str(length_cutoff)
if not is_index:
self.options = " -N "
self.options += " -N "
# Files
self.input_fasta = InputFileList(input_fasta, Formats.FASTA)
......
......@@ -137,10 +137,19 @@ max_n.help = The maximum number of N in a fragment after join.
max_n.type = int
max_n.default = 1
# Traduction
protein_min_length.group = 4- TRADUCTION section
# Parameter protein_min_length
protein_min_length.name = Protein length threshold
protein_min_length.flag = --protein-min-length
protein_min_length.help = The protein minimal length.
protein_min_length.type = int
protein_min_length.default = 80
# OTU
otu_identity_threshold.group = 4- OTU section
otu_length_diff_cutoff.group = 4- OTU section
otu_cluster_most_similar.group = 4- OTU section
otu_identity_threshold.group = 5- OTU section
otu_length_diff_cutoff.group = 5- OTU section
otu_cluster_most_similar.group = 5- OTU section
# Parameter identity_threshold
otu_identity_threshold.name = Identity threshold
otu_identity_threshold.flag = --otu-identity-threshold
......@@ -161,10 +170,10 @@ otu_cluster_most_similar.type = bool
otu_cluster_most_similar.default = True
# Sampling
discard.group = 5- SAMPLING section
select.group = 5- SAMPLING section
round.group = 5- SAMPLING section
obs_min.group = 5- SAMPLING section
discard.group = 6- SAMPLING section
select.group = 6- SAMPLING section
round.group = 6- SAMPLING section
obs_min.group = 6- SAMPLING section
# Parameter deletion
discard.name = Discarded sequences
discard.flag = --discard
......
Supports Markdown
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