Commit 53e311d7 authored by Maria Bernard's avatar Maria Bernard
Browse files

No commit message

No commit message
parent 316ba61c
# Copyright (C) 2012 INRA
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <>.
import os
from jflow.component import Component
from jflow.iotypes import OutputFile, OutputFileList, InputFile, InputFileList, Formats
from weaver.function import PythonFunction, ShellFunction
class SplitBC (Component):
/home/mbernard/save/script/libPerl/INRA/ $f1 $f2 --mismatches $mismatch
--bcfile $barcode --bol --rad $rad_seq --radTAG $tag_seq --TAG_mismatch $tagMM
--trim --prefix-r1 ${prefix}_%_1.fq --prefix-r2 ${prefix}_%_2.fq
dir=`dirname ${prefix}_unmatched_1.fq`
def define_parameters(self, fastq_file1, fastq_file2 = None, barcode_file, rad,
mismatch, rad_tag, tag_mismatch, trim = True, forward = True ):
self.fastq_file1 = InputFileList(fastq_file1, Formats.FASTQ)
self.prefix_fq1 = "toto"
self.fastq_file2 = None
if fastq_file2 is not None:
self.fastq_file2 = InputFileList(fastq_file2, Formats.FASTQ)
self.prefix_fq2 = "toto2"
self.barcode_file = InputFile(barcode_file, Formats.FASTQ)
self.mismatch = mismatc
self.rad = rad
self.rad_tag = rad_tag
self.tag_mismatch = tag_mismatch
self.trim = trim
self.forward = forward
self.output_read1 = OutputFileList(self.get_outputs('{basename_woext}.fq', self.read1), Formats.BAM)
self.databank = OutputFile(os.path.join(self.output_directory, os.path.basename(input_fasta)))
self.stdout = OutputFile(os.path.join(self.output_directory, "bwaindex.stdout"))
self.stderr = OutputFile(os.path.join(self.output_directory, "bwaindex.stderr"))
def process(self):
bwaindex = PythonFunction(bwa_index, cmd_format="{EXE} {ARG} {IN} {OUT}")
bwaindex(inputs=self.input_fasta, outputs=[self.databank, self.stdout, self.stderr], arguments=[self.get_exec_path("bwa"), self.algorithm])
\ 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