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

Remove framebot index.

parent fd756123
......@@ -38,12 +38,9 @@ class GeneDiversity (NG6Workflow):
# Remove chimeric sequences
chimera = self.add_component("UsearchChimera", [dereplicate.output_files])
# Index the reference proteins for framebot
framebot_index = self.add_component("FramebotIndex", [self.args["database"]])
# Sequence traduction
framebot = self.add_component("Framebot", [chimera.nonchimeras, framebot_index.index])
# Sequence traduction
framebot = self.add_component("Framebot", [chimera.nonchimeras, self.args["database"], False])
# Merge sequences
merge = self.add_component("ConcatenateFiles", [framebot.corrected_proteins, "all_trad_sequences.fasta"])
......
......@@ -30,12 +30,17 @@ class Framebot (Component):
frameshift-corrected protein and DNA sequences and an optimal global or local protein alignment.
"""
def define_parameters(self, input_fasta, bank_index):
def define_parameters(self, input_fasta, bank, is_index=True):
"""
@param input_fasta : files to align.
@param bank_index : databank framebot index.
@param input_fasta : [list] files to align.
@param bank : [string] databank framebot index or fasta databank.
@param is_index : [bool] true if bank is a framebot index. False if bank is a fasta databank.
"""
self.bank_index = bank_index
# Parameters
self.bank = bank
self.options = ""
if not is_index:
self.options = " -N "
# Files
self.input_fasta = InputFileList(input_fasta, Formats.FASTA)
......@@ -46,15 +51,15 @@ class Framebot (Component):
self.stem_name.append( stem_with_path )
self.ok_aln = OutputFileList( self.get_outputs('{fullpath}_framebot.txt', self.stem_name) )
self.discarded_aln = OutputFileList( self.get_outputs('{fullpath}_failed_framebot.txt', self.stem_name) )
self.corrected_nucleotids = OutputFileList( self.get_outputs('{fullpath}_corr_nucl.fasta', self.stem_name) )
self.failed_nucleotids = OutputFileList( self.get_outputs('{fullpath}_failed_nucl.fasta', self.stem_name) )
self.corrected_proteins = OutputFileList( self.get_outputs('{fullpath}_corr_prot.fasta', self.stem_name) )
self.corrected_nucleotids = OutputFileList( self.get_outputs('{fullpath}_corr_nucl.fasta', self.stem_name), Formats.FASTA )
self.failed_nucleotids = OutputFileList( self.get_outputs('{fullpath}_failed_nucl.fasta', self.stem_name), Formats.FASTA )
self.corrected_proteins = OutputFileList( self.get_outputs('{fullpath}_corr_prot.fasta', self.stem_name), Formats.FASTA )
self.stderr = OutputFileList( self.get_outputs('{basename_woext}.stderr', self.input_fasta) )
def process(self):
for idx in range(len(self.input_fasta)):
framebot = ShellFunction( self.get_exec_path("FrameBot") + " framebot -o $1 " + self.bank_index + " $2 2> $3", cmd_format='{EXE} {ARG} {IN} {OUT}' )
framebot = ShellFunction( self.get_exec_path("FrameBot") + " framebot " + self.options + " -o $1 " + self.bank + " $2 2> $3", cmd_format='{EXE} {ARG} {IN} {OUT}' )
framebot( arguments=self.stem_name[idx],
inputs=self.input_fasta[idx],
outputs=[self.stderr[idx], self.ok_aln[idx], self.discarded_aln[idx], self.corrected_nucleotids[idx], self.failed_nucleotids[idx], self.corrected_proteins[idx]],
includes=self.bank_index )
\ No newline at end of file
includes=self.bank )
\ No newline at end of file
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