Commit e88e44f7 authored by Jerome Mariette's avatar Jerome Mariette

add loading shared components

parent 5a5269d6
......@@ -16,6 +16,7 @@
import datetime
import os
from jflow.workflow import Workflow
from ng6.project import Project
......@@ -25,6 +26,13 @@ from import Run
class IlluminaFastq (Workflow):
def run(self):
# First check if files provided exists
files_to_save = []
for file in self.args["data_file"]:
if os.path.isfile(file):
sys.exit(2, "error: %s file does not exists\n" % (file))
# Build the project and the run
my_project = Project.get_from_id(self.args["project_id"])
run_date = self.args["run_date"].split("/")
......@@ -40,6 +48,7 @@ class IlluminaFastq (Workflow):
# Then add the run to the project
# archive the files
addrawfiles = self.add_component("AddRawFiles", [my_run, files_to_save, self.args["archive_mode"]])
#fastqc = self.add_component("FastQC", [self.args["contigs_file"]])
fastqc = self.add_component("FastQC", [self.args["contigs_file"]])
\ No newline at end of file
......@@ -32,11 +32,22 @@ description = illumina quality check without reference genome
# .action [store]: the basic type of action to be taken when this argument is encountered at the command line.
[parameters] = data_file
data_file.flag = --data-file = 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.required = True
data_file.action = append = archive_mode
archive_mode.flag = --archive-mode = How should data be compressed once archived (none|gz|bz2)
archive_mode.default = none
archive_mode.choices = none|gz|bz2 = project_id
project_id.flag = --project-id
project_id.type = int = The project id the run belongs to
project_id.default = None
project_id.required = True = run_name
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