Commit 83d1ccd9 authored by Jerome Mariette's avatar Jerome Mariette

No commit message

No commit message
parent a2a79c25
......@@ -37,7 +37,11 @@ dbname = typo3
log_file = /home/jmariett/scratch/ng6/ng6.log
[storage]
# Where should the pipelines write results, should be accessible
# by all cluster nodes
working_directory = /home/jmariett/scratch/weaver
# Where should the pipelines write temporary files, should be
# accessible by all cluster nodes
tmp_directory = /home/jmariett/scratch/tmp
[softwares]
......
......@@ -34,7 +34,7 @@ description = add a brand new run to a project
[parameters]
data_file.name = data_file
data_file.flag = --data-file
data_file.help = Which data files are linked to the run (if multiple, the option should be called as many times as there is file to add)
data_file.help = Which data files are linked to the run
data_file.required = True
data_file.action = append
......
......@@ -49,6 +49,6 @@ class IlluminaFastq (Workflow):
# Then add the run to the project
my_project.add_run(my_run)
# archive the files
addrawfiles = self.add_component("AddRawFiles", [my_run, files_to_save, self.args["compression"]])
addrawfiles = self.add_component("AddRawFiles", [my_run, files_to_save, self.args["compression"]])
#fastqc = self.add_component("FastQC", [self.args["contigs_file"]])
#
# 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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 <http://www.gnu.org/licenses/>.
#
\ No newline at end of file
#
# 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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 <http://www.gnu.org/licenses/>.
#
import os
from jflow.component import Component
from weaver.function import PythonFunction, ShellFunction
from weaver.abstraction import Merge, Map
class FastQC (Component):
def define_parameters(self, input_files):
self.input_files = input_files
self.nb_seq_per_file = nb_seq_per_file
self.renamed_seq_file = os.path.join(self.output_directory, get_file_base(input_file) + ".numeric_ids.fasta")
def run(self):
# first define if files are casava outputed files
casava_regexp = '.+\/([^\/]+_[^\/]+_L\d+_R\d)_\d+\.fastq\.gz'
casava_opts = ""
for file in self.input_files:
if re.search(casava_regexp, file):
casava_opts = "--casava"
break
fastqc = ShellFunction(self.get_exec_path("fastqc") + " --outdir " + self.output_directory + " " + casava_opts + " " +
self.blast_options + " | " + self.get_exec_path("annot_blast2dump.pl") + " -g -s '" +
self.species + "'" + " -b " + self.db_name + " -a __ID__ - $2" , cmd_format='{EXE} {IN} {OUT}')
fastqc = Map(fastqc, self.input_files, self.dumps)
#
# 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
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# 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 <http://www.gnu.org/licenses/>.
#
import os
from jflow.component import Component
from weaver.function import PythonFunction, ShellFunction
from weaver.abstraction import Merge, Map
class ConfigRunIllumina (Component):
def __init__(self):
Component.__init__(self, is_dynamic=True)
def define_parameters(self, input_file, nb_seq_per_file=None):
self.input_file = input_file
self.nb_seq_per_file = nb_seq_per_file
self.renamed_seq_file = os.path.join(self.output_directory, get_file_base(input_file) + ".numeric_ids.fasta")
def run(self):
rename = PythonFunction(split_and_rename_seq)
rename(outputs=self.renamed_seq_file, arguments=[self.input_file, self.output_directory, self.nb_seq_per_file])
......@@ -34,7 +34,7 @@ description = illumina quality check without reference genome
[parameters]
data_file.name = data_file
data_file.flag = --data-file
data_file.help = Which data files are linked to the run (if multiple, the option should be called as many times as there is file to add)
data_file.help = Which data files are linked to the run
data_file.required = True
data_file.action = append
......@@ -44,6 +44,11 @@ compression.help = How should data be compressed once archived (none|gz|bz2)
compression.default = none
compression.choices = none|gz|bz2
databank.name = databank
databank.flag = --databank
databank.help = Which databank should be used to seek contamination
databank.action = append
project_id.name = project_id
project_id.flag = --project-id
project_id.type = int
......
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