aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/refcat/tasks.py22
1 files changed, 22 insertions, 0 deletions
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)