Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern documentation #2138

Open
3 of 7 tasks
cmungall opened this issue Oct 16, 2020 · 9 comments
Open
3 of 7 tasks

Pattern documentation #2138

cmungall opened this issue Oct 16, 2020 · 9 comments

Comments

@cmungall
Copy link
Member

cmungall commented Oct 16, 2020

Manually authored README:

https://github.com/monarch-initiative/mondo/blob/master/src/patterns/README.md

  • all links are broken

Auto-generated docs, all in one page:

https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/README.md

  • IRIs are broken
  • link to TSVs are broken
  • many say This is auto-generated. Add your description here @nicolevasilevsky can you make nice text
  • some say things like Variables | owl_thing (owl:Thing) which is not good
  • these should be integrated with main mondo docs
  • variable names should be meaningful. Stuff that came from patternizer may have variable names like v0
@cmungall
Copy link
Member Author

It would be awesome if in addition to a link to a head foo.tsv | tbl2ghwiki to make a sample table

#!/usr/bin/perl

my $n=0;
my $len;
my $hlen;
while(<>) {
    chomp;
    if ($n==0 && m@^\#@) {
        s@^\#@@;
    }
    my (@vals) = split(/\t/,$_);
    @vals = map {s@\|@, @g; $_} @vals;
    if (!$hlen) {
        $hlen = scalar(@vals);
    }
    while (scalar(@vals) < $hlen) {
        push(@vals, '');
    }
    print '|'.join('|',@vals)."|\n";
    $nulen = scalar(@vals);
    if ($n > 0) {
        if ($len ne $nulen) {
            print STDERR "MISMATCH: $len != $nulen\n";
        }
    }
    $len = $nulen;
    if ($n ==0) {
        @vals = map {"---"} @vals;
        print '|'.join('|',@vals)."|\n";
    }
    $n++;
}

@matentzn
Copy link
Member

I have updated the pages:

  • all links and IRIs fixed
  • Data preview tables added with links to the whole tables.

The rest would have to be done by curating the patterns themselves. @cmungall can you check that, aside from the content, this looks ok to you:
https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/README.md

@matentzn
Copy link
Member

(I am using python for the generation of this table, pandas has a nice .to_markdown() function.)

@cmungall
Copy link
Member Author

(I am using python for the generation of this table, pandas has a nice .to_markdown() function.)

much better than my hack, awesome. pandas + dosdp-query is a powerful combo!

@cmungall
Copy link
Member Author

@nicolevasilevsky when curating patterns take a look at the patternizer output to see if there is useful stuff to add

E.g.

https://github.com/cmungall/owl_patternizer/blob/master/examples/mondo/X_has_modifier_has_an_isolated_presentation.yaml#L38-L43

looks like a good synonym pattern for isolated!

See https://github.com/monarch-initiative/mondo/pull/2162/files

@cmungall
Copy link
Member Author

the new markdown is looking great

I don't think the vars field is correct
https://github.com/monarch-initiative/mondo/blob/master/src/patterns/dosdp-patterns/README.md#isolated

image

it should say disease (owl:Thing) based on:

classes:
    isolated: MONDO:0021128

    owl_thing: owl:Thing
relations:
    has modifier: RO:0002573

vars:
    disease: owl_thing

of course, we should just change the range to the root of mondo here, we obviously don't want to allow this to be any thing

The patternizer actually does a good job here, I recommend using it:

https://github.com/cmungall/owl_patternizer/blob/master/examples/mondo/X_has_modifier_has_an_isolated_presentation.yaml#L11

@matentzn
Copy link
Member

Are you sure that is how you want the variable slot to be rendered? Just check the second example you posted (https://github.com/cmungall/owl_patternizer/blob/master/examples/mondo/X_has_modifier_has_an_isolated_presentation.yaml#L11). IN this case, the overview would read: v0 (MONDO:0000001). Anyways, I will do this now, but better double-check this is what you want.

@cmungall
Copy link
Member Author

cmungall commented Oct 21, 2020 via email

@nicolevasilevsky
Copy link
Member

Reassigning this to @sabrinatoro, I don't have the bandwidth to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants