Commit 36c12bd
authored
Add option to split output according to predicates.
This commit adds a `--split-with-predicates` flag which changes the
behavior of the `--split` flag. Typically, the output is split along a
subject prefix and an object prefix, e.g. `MONDO-to-NCIT.sssom.tsv`.
When the `--split-with-predicates` flag is passed, it also includes the
CURIE of the relation in the name of the output split file, e.g.
`MONDO-skos_exactMatch-NCIT.sssom.tsv`. (Note that the colon in the
CURIE has been replaced by an underscore, since colons cannot appear in
filenames in Windows).
This (almost) matches the behavior of sssom-py:
<https://github.com/mapping-commons/sssom-py/blob/ac0f769386d35e2b1c961cac59221c816143bf07/src/sssom/parsers.py#L1033-L1035>
The difference being that sssom-py only includes the local name of the
predicate, while this pull request includes the full CURIE.1 parent 68e070b commit 36c12bd
File tree
1 file changed
+20
-3
lines changed- cli/src/main/java/org/incenp/obofoundry/sssom/cli
1 file changed
+20
-3
lines changedLines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
| |||
646 | 651 | | |
647 | 652 | | |
648 | 653 | | |
649 | | - | |
| 654 | + | |
650 | 655 | | |
651 | 656 | | |
652 | 657 | | |
| |||
660 | 665 | | |
661 | 666 | | |
662 | 667 | | |
663 | | - | |
| 668 | + | |
664 | 669 | | |
665 | 670 | | |
666 | 671 | | |
| |||
677 | 682 | | |
678 | 683 | | |
679 | 684 | | |
680 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
681 | 698 | | |
682 | 699 | | |
683 | 700 | | |
| |||
0 commit comments