Commit a2a79c25 authored by Jerome Mariette's avatar Jerome Mariette

compression instead of archive_mode

parent e88e44f7
......@@ -46,4 +46,4 @@ class AddRun (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["archive_mode"]])
\ No newline at end of file
addrawfiles = self.add_component("AddRawFiles", [my_run, files_to_save, self.args["compression"]])
\ No newline at end of file
......@@ -38,11 +38,11 @@ data_file.help = Which data files are linked to the run (if multiple, the option
data_file.required = True
data_file.action = append
archive_mode.name = archive_mode
archive_mode.flag = --archive-mode
archive_mode.help = How should data be compressed once archived (none|gz|bz2)
archive_mode.default = none
archive_mode.choices = none|gz|bz2
compression.name = compression
compression.flag = --compression
compression.help = How should data be compressed once archived (none|gz|bz2)
compression.default = none
compression.choices = none|gz|bz2
project_id.name = project_id
project_id.flag = --project-id
......
......@@ -26,20 +26,20 @@ from weaver.abstraction import Merge, Map
from ng6.run import Run
def add_raw_files (run_dump_path, archive_mode, *files_to_save):
def add_raw_files (run_dump_path, compression, *files_to_save):
import pickle
# load the analysis object
run_dump = open(run_dump_path, "rb")
my_run = pickle.load(run_dump)
run_dump.close()
my_run.add_raw_files(files_to_save, archive_mode)
my_run.add_raw_files(files_to_save, compression)
class AddRawFiles (Component):
def define_parameters(self, runobj, files_to_save, archive_mode):
def define_parameters(self, runobj, files_to_save, compression):
self.runobj = runobj
self.files_to_save = files_to_save
self.archive_mode = archive_mode
self.compression = compression
self.stdout = os.path.join(self.output_directory, "addRawFiles.stdout")
def run(self):
......@@ -48,5 +48,5 @@ class AddRawFiles (Component):
pickle.dump(self.runobj, run_dump)
run_dump.close()
addraw = PythonFunction(add_raw_files)
addraw(outputs=self.stdout, arguments=[run_dump_path, self.archive_mode, self.files_to_save])
addraw(outputs=self.stdout, arguments=[run_dump_path, self.compression, self.files_to_save])
\ No newline at end of file
......@@ -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["archive_mode"]])
addrawfiles = self.add_component("AddRawFiles", [my_run, files_to_save, self.args["compression"]])
#fastqc = self.add_component("FastQC", [self.args["contigs_file"]])
......@@ -38,11 +38,11 @@ data_file.help = Which data files are linked to the run (if multiple, the option
data_file.required = True
data_file.action = append
archive_mode.name = archive_mode
archive_mode.flag = --archive-mode
archive_mode.help = How should data be compressed once archived (none|gz|bz2)
archive_mode.default = none
archive_mode.choices = none|gz|bz2
compression.name = compression
compression.flag = --compression
compression.help = How should data be compressed once archived (none|gz|bz2)
compression.default = none
compression.choices = none|gz|bz2
project_id.name = project_id
project_id.flag = --project-id
......
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