Skip to content

Commit

Permalink
Split GenerateReportForExperiment from SubmitExperimentDataToGemma so…
Browse files Browse the repository at this point in the history
… it can be run concurrently

Introduce an intermediary SubmitExperimentReportToGemma task that handle report
submission. It is not implemented at this moment, so we use a WrapperTask to
override the run() definition to be based solely on the
GenerateReportForExperiment task completedness.
  • Loading branch information
arteymix committed Feb 8, 2022
1 parent 3dbdbb0 commit 9ce76e6
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions rnaseq_pipeline/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,29 +401,34 @@ class SubmitExperimentDataToGemma(TaskWithPriorityMixin, RerunnableTaskMixin, Ge
resources = {'submit_data_jobs': 1}

def requires(self):
yield CountExperiment(self.experiment_id,
taxon=self.taxon,
reference_id=self.reference_id,
source='gemma',
scope='genes')

# FIXME: this does not always trigger the dependencies
yield GenerateReportForExperiment(self.experiment_id,
taxon=self.taxon,
reference_id=self.reference_id,
source='gemma')
return CountExperiment(self.experiment_id,
taxon=self.taxon,
reference_id=self.reference_id,
source='gemma',
scope='genes')

def subcommand_args(self):
(count, fpkm), _ = self.input()
# TODO: submit the batch information and the MultiQC report
return ['-a', self.platform_short_name,
'-count', count.path,
'-rpkm', fpkm.path]

def output(self):
return GemmaDatasetPlatform(self.experiment_id, self.platform_short_name)

@requires(SubmitExperimentDataToGemma, SubmitExperimentBatchInfoToGemma)
class SubmitExperimentReportToGemma(TaskWithPriorityMixin, WrapperTask, GemmaTask):
"""
Submit an experiment QC report to Gemma.
TODO: This is not yet fully implemented, so only a report is being generated.
"""
def requires(self):
return GenerateReportForExperiment(self.experiment_id,
taxon=self.taxon,
reference_id=self.reference_id,
source='gemma')

@requires(SubmitExperimentDataToGemma, SubmitExperimentBatchInfoToGemma, SubmitExperimentReportToGemma)
class SubmitExperimentToGemma(TaskWithPriorityMixin, TaskWithOutputMixin, WrapperTask):
"""
Submit an experiment data, QC reports, and batch information to Gemma.
Expand Down

0 comments on commit 9ce76e6

Please sign in to comment.