From a213228006b66229a7e3b032e34d3c709c913c81 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Fri, 14 May 2021 12:13:57 +0200 Subject: add task: BrefZipDOI --- python/refcat/tasks.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'python') diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index 3dcdd65..530eb6a 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -552,3 +552,25 @@ class FatcatMapped(Refcat): def output(self): return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) + + +class BrefZipDOI(Refcat): + """ + Run skate-reduce from two files. + """ + def requires(self): + return { + "refs": RefsDOI(), + "fatcat": FatcatDOI(), + } + + def run(self): + output = shellout(r""" + skate-reduce -m exact -r doi -F <(zstdcat -T0 {refs}) -L <(zstdcat -T0 {fatcat}) | + zstd -c -T0 > {output} + """, + refs=self.input().get("refs").path, + fatcat=self.input().get("fatcat").path) + + def output(self): + return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd) -- cgit v1.2.3