How to use the luigi.LocalTarget function in luigi

To help you get started, we’ve selected a few luigi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GeoscienceAustralia / PyRate / pyrate / tasks / gamma.py View on Github external
def output(self):
        targets = [luigi.LocalTarget(self.fileName)]
        if self.masterHeader is not None:
            targets.append(luigi.LocalTarget(self.masterHeader))
        if self.slaveHeader is not None:
            targets.append(luigi.LocalTarget(self.slaveHeader))
        return targets
github miku / siskin / siskin / sources / umbi.py View on Github external
def output(self):
        return luigi.LocalTarget(path=self.path(ext="xml"))
github GeoscienceAustralia / agdc / api / source / main / python / datacube / api / workflow.py View on Github external
def output(self):
        return luigi.LocalTarget(os.path.join(self.output_directory,
                                              "TILES_{x:03d}_{y:04d}_{year_min:04d}_{year_max:04d}.csv"
                                              .format(x=self.x,
                                                      y=self.y,
                                                      year_min=self.year_min,
                                                      year_max=self.year_max)))
github gorlins / salted / salted_demo.py View on Github external
def output(self):
        return LocalTarget('data/stream/{}.tsv'.format(self.date))
github miku / siskin / docs / elag-2016 / byoi / code / part4_combine.py View on Github external
def output(self):
        return luigi.LocalTarget(path=self.path(ext='ldj.gz'))
github GeoscienceAustralia / wagl / workflow / nbar.py View on Github external
def output(self):
        out_path = self.nbar_root
        ozone_fname = pjoin(out_path, CONFIG.get('work', 'ozone_fname'))
        vapour_fname = pjoin(out_path, CONFIG.get('work', 'vapour_fname'))
        aerosol_fname = pjoin(out_path, CONFIG.get('work', 'aerosol_fname'))
        elevation_fname = pjoin(out_path, CONFIG.get('work', 'dem_fname'))
        targets = {'ozone': luigi.LocalTarget(ozone_fname),
                   'vapour': luigi.LocalTarget(vapour_fname),
                   'aerosol': luigi.LocalTarget(aerosol_fname),
                   'elevation': luigi.LocalTarget(elevation_fname)}
        return targets
github CartoDB / bigmetadata / tasks / carto.py View on Github external
def output(self):
        return LocalTarget(os.path.join('tmp', classpath(self), self.task_id + '.dump'))
github ComparativeGenomicsToolkit / Comparative-Annotation-Toolkit / CAT / cat.py View on Github external
args.ordered_genomes = ordered_genomes
        # plots derived from transMap results
        args.tm_coverage = luigi.LocalTarget(os.path.join(base_dir, 'transmap_coverage.pdf'))
        args.tm_identity = luigi.LocalTarget(os.path.join(base_dir, 'transmap_identity.pdf'))
        # plots derived from transMap filtering
        args.paralogy = luigi.LocalTarget(os.path.join(base_dir, 'paralogy.pdf'))
        args.transmap_filtering = luigi.LocalTarget(os.path.join(base_dir, 'transmap_filtering.pdf'))
        # plots derived from transcript alignment / consensus finding
        args.coverage = luigi.LocalTarget(os.path.join(base_dir, 'coverage.pdf'))
        args.identity = luigi.LocalTarget(os.path.join(base_dir, 'identity.pdf'))
        args.completeness = luigi.LocalTarget(os.path.join(base_dir, 'completeness.pdf'))
        args.gene_failure = luigi.LocalTarget(os.path.join(base_dir, 'gene_failure.pdf'))
        args.transcript_failure = luigi.LocalTarget(os.path.join(base_dir, 'transcript_failure.pdf'))
        args.consensus_extrinsic_support = luigi.LocalTarget(os.path.join(base_dir, 'consensus_extrinsic_support.pdf'))
        args.consensus_annot_support = luigi.LocalTarget(os.path.join(base_dir, 'consensus_annotation_support.pdf'))
        args.tx_modes = luigi.LocalTarget(os.path.join(base_dir, 'transcript_modes.pdf'))
        args.indel = luigi.LocalTarget(os.path.join(base_dir, 'coding_indels.pdf'))
        # plots that depend on execution mode
        if pipeline_args.augustus is True:
            args.improvement = luigi.LocalTarget(os.path.join(base_dir, 'augustus_improvement.pdf'))
        if 'augCGP' in pipeline_args.modes or 'augPB' in pipeline_args.modes:
            args.denovo = luigi.LocalTarget(os.path.join(base_dir, 'denovo.pdf'))
        if 'augPB' in pipeline_args.modes:
            args.pb_support = luigi.LocalTarget(os.path.join(base_dir, 'IsoSeq_isoform_validation.pdf'))
            args.pb_genomes = pipeline_args.isoseq_genomes
        args.split_genes = luigi.LocalTarget(os.path.join(base_dir, 'split_genes.pdf'))
        # input data
        args.metrics_jsons = OrderedDict([[genome, Consensus.get_args(pipeline_args, genome).metrics_json]
                                          for genome in ordered_genomes])
        args.tm_jsons = OrderedDict([[genome, FilterTransMap.get_args(pipeline_args, genome).metrics_json]
                                     for genome in ordered_genomes])
        args.annotation_db = PipelineTask.get_database(pipeline_args, pipeline_args.ref_genome)
github miku / siskin / siskin / sources / doaj.py View on Github external
def run(self):
        output = shellout("""jq -r '.doi' <(unpigz -c {input}) | grep -v "null" | grep -o "10.*" 2> /dev/null | sort -u > {output} """,
                          input=self.input().get('input').path)
        luigi.LocalTarget(output).move(self.output().path)
github ComparativeGenomicsToolkit / Comparative-Annotation-Toolkit / CAT / cat.py View on Github external
ordered_genomes = tools.hal.build_genome_order(pipeline_args.hal, pipeline_args.ref_genome,
                                                       genome_subset=pipeline_args.target_genomes)
        args = tools.misc.HashableNamespace()
        args.ordered_genomes = ordered_genomes
        # plots derived from transMap results
        args.tm_coverage = luigi.LocalTarget(os.path.join(base_dir, 'transmap_coverage.pdf'))
        args.tm_identity = luigi.LocalTarget(os.path.join(base_dir, 'transmap_identity.pdf'))
        # plots derived from transMap filtering
        args.paralogy = luigi.LocalTarget(os.path.join(base_dir, 'paralogy.pdf'))
        args.transmap_filtering = luigi.LocalTarget(os.path.join(base_dir, 'transmap_filtering.pdf'))
        # plots derived from transcript alignment / consensus finding
        args.coverage = luigi.LocalTarget(os.path.join(base_dir, 'coverage.pdf'))
        args.identity = luigi.LocalTarget(os.path.join(base_dir, 'identity.pdf'))
        args.completeness = luigi.LocalTarget(os.path.join(base_dir, 'completeness.pdf'))
        args.gene_failure = luigi.LocalTarget(os.path.join(base_dir, 'gene_failure.pdf'))
        args.transcript_failure = luigi.LocalTarget(os.path.join(base_dir, 'transcript_failure.pdf'))
        args.consensus_extrinsic_support = luigi.LocalTarget(os.path.join(base_dir, 'consensus_extrinsic_support.pdf'))
        args.consensus_annot_support = luigi.LocalTarget(os.path.join(base_dir, 'consensus_annotation_support.pdf'))
        args.tx_modes = luigi.LocalTarget(os.path.join(base_dir, 'transcript_modes.pdf'))
        args.indel = luigi.LocalTarget(os.path.join(base_dir, 'coding_indels.pdf'))
        # plots that depend on execution mode
        if pipeline_args.augustus is True:
            args.improvement = luigi.LocalTarget(os.path.join(base_dir, 'augustus_improvement.pdf'))
        if 'augCGP' in pipeline_args.modes or 'augPB' in pipeline_args.modes:
            args.denovo = luigi.LocalTarget(os.path.join(base_dir, 'denovo.pdf'))
        if 'augPB' in pipeline_args.modes:
            args.pb_support = luigi.LocalTarget(os.path.join(base_dir, 'IsoSeq_isoform_validation.pdf'))
            args.pb_genomes = pipeline_args.isoseq_genomes
        args.split_genes = luigi.LocalTarget(os.path.join(base_dir, 'split_genes.pdf'))
        # input data
        args.metrics_jsons = OrderedDict([[genome, Consensus.get_args(pipeline_args, genome).metrics_json]
                                          for genome in ordered_genomes])