Commit 27337a78 authored by Penom Nom's avatar Penom Nom
Browse files

remove addsamples

parent caee2cd5
#
# 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
import pickle
from jflow.component import Component
from jflow.iotypes import OutputFile
from weaver.function import PythonFunction
def process_samples (run_dump_path, compression):
import pickle
# load the analysis object
run_dump = open(run_dump_path, "rb")
my_run = pickle.load(run_dump)
run_dump.close()
my_run.process_samples(compression)
class AddSamples (Component):
def define_parameters(self, runobj, compression):
self.runobj = runobj
self.compression = compression
self.stdout = OutputFile(os.path.join(self.output_directory, "addSamples.stdout"))
def process(self):
run_dump_path = self.get_temporary_file(".dump")
run_dump = open(run_dump_path, "wb")
pickle.dump(self.runobj, run_dump)
run_dump.close()
ps = PythonFunction(process_samples, cmd_format='{EXE} {ARG} > {OUT}')
ps(outputs=self.stdout, arguments=[run_dump_path, self.compression])
\ No newline at end of file
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