aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/refcat/tasks.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py
index 877e2be..9d4c982 100644
--- a/python/refcat/tasks.py
+++ b/python/refcat/tasks.py
@@ -564,3 +564,26 @@ class BrefZipDOI(Refcat):
def output(self):
return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd)
+
+
+class BrefZipPMID(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 pmid -F <(zstdcat -T0 {refs}) -L <(zstdcat -T0 {fatcat}) |
+ zstd -c -T0 > {output}
+ """,
+ refs=self.input().get("refs").path,
+ fatcat=self.input().get("fatcat").path)
+ luigi.LocalTarget(output).move(self.output().path)
+
+ def output(self):
+ return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd)