Skip to content

Commit

Permalink
Add RDF HDT export stage
Browse files Browse the repository at this point in the history
  • Loading branch information
john-shaffer committed Sep 26, 2023
1 parent 1aaadeb commit 03f673f
Show file tree
Hide file tree
Showing 11 changed files with 456 additions and 8 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
max_line_length = 120

[Makefile]
indent_style = tab

[*.{diff,md}]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
.*
!.editorconfig
!.envrc
!.github
!.gitignore

logs
/download
/temp
/brick
/raw
/raw
/rdf
36 changes: 31 additions & 5 deletions dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ stages:
nfiles: 337
- path: stages/3_write_brick.R
hash: md5
md5: c5dbdeded250cf30b3af70cc436cb77f
size: 942
md5: 1377f37bad12cec9d4a0e8afae48140d
size: 1159
- path: temp
hash: md5
md5: 01a6bc69d09016a79132483c28820178.dir
Expand All @@ -59,13 +59,39 @@ stages:
outs:
- path: brick/tox21.parquet
hash: md5
md5: 247348fd1254be594b21d202d514d55d
size: 1231260948
md5: 0eb67f9b2fc3b16aff313d8ea9cdc359
size: 1237116063
- path: brick/tox21_aggregated.parquet
hash: md5
md5: 4de160eb524d30b610ed369d19776af8
size: 34091575
- path: brick/tox21lib.parquet
hash: md5
md5: 0f67d0d71773dfff4e9658334b1c8895
md5: be3b8da4eebac921c7eca80177280e93
size: 825475
rml:
cmd: bash stages/4_rml.sh
deps:
- path: brick/
hash: md5
md5: 268c1928221d9976b99ecaedc9edf48f.dir
size: 1272033113
nfiles: 3
- path: morph-kgc.ini
hash: md5
md5: 4db7b2ab3384fb468b716ddc7161a00d
size: 132
- path: stages/4_rml.sh
hash: md5
md5: 1a6f8e5e301c61b24fc3023ad970d2e8
size: 112
- path: tox21.rml.ttl
hash: md5
md5: 6279d0e422d2cb7a33ae813afe3611d3
size: 2121
outs:
- path: rdf/
hash: md5
md5: 7e612fd7f1b73c26ddf5a1a2caee495f.dir
size: 355139697
nfiles: 1
13 changes: 11 additions & 2 deletions dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ stages:
outs:
- download
- temp
unzip:
unzip:
cmd: stages/2_unzip.sh
deps:
- stages/2_unzip.sh
- download
- temp
outs:
- raw
build:
build:
cmd: Rscript stages/3_write_brick.R
deps:
- stages/3_write_brick.R
Expand All @@ -26,3 +26,12 @@ stages:
- brick/tox21.parquet
- brick/tox21_aggregated.parquet
- brick/tox21lib.parquet
rml:
cmd: bash stages/4_rml.sh
deps:
- brick/
- stages/4_rml.sh
- tox21.rml.ttl
- morph-kgc.ini
outs:
- rdf/
245 changes: 245 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
description = "Tox21 biobrick";

inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
flake-utils.url = "https://flakehub.com/f/numtide/flake-utils/*.tar.gz";
biobricks-R = {
url = "github:biobricks-ai/biobricks-R";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
hdt-cpp = {
url = "github:insilica/nix-hdt";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
morph-kgc = {
url = "github:insilica/nix-morph-kgc";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils, biobricks-R, hdt-cpp, morph-kgc }:
flake-utils.lib.eachDefaultSystem (system:
with import nixpkgs { inherit system; }; {
devShells.default = mkShell {
buildInputs = [
biobricks-R.packages.${system}.rEnv
hdt-cpp.packages.${system}.default
morph-kgc.packages.${system}.default
];
};
});
}
Loading

0 comments on commit 03f673f

Please sign in to comment.