Skip to content

Commit

Permalink
Use new support for prefixes in OBO format - WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
balhoff committed Sep 25, 2024
1 parent 5cb9a0d commit 5596ff1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ include Makefile-gafs
# The default owltools expansion makes this an OBO PURLs
# We then "reverse" this with some hacky regexes...
neo.owl: neo.obo
owltools $< -o $@.tmp && ./bin/fix-obo-uris.pl $@.tmp > $@.tmp2 && mv $@.tmp2 $@
robot convert -i $< -o $@.tmp -f owl && mv $@.tmp $@

Makefile-gafs: datasets.json
./build-neo-makefile.py -i $< > $@.tmp && mv $@.tmp $@
Expand All @@ -110,7 +110,5 @@ rnacentral.gpi: rnacentral.gpi.gz
target/neo-rnac.obo: rnacentral.gpi.gz
gzip -dc $< | ./rnacgpi2obo.pl > $@.tmp && mv $@.tmp $@

target/xneo-%.owl: target/neo-%.obo
owltools $< -o $@.tmp && mv $@.tmp $@
target/neo-%.owl: target/xneo-%.owl
./bin/fix-obo-uris.pl $< > $@.tmp && mv $@.tmp $@
target/neo-%.owl: target/neo-%.obo
robot convert -i $< -o $@.tmp -f owl && mv $@.tmp $@
4 changes: 4 additions & 0 deletions gaf2obo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
my $spn = 'generic';
my $ontid;
my $isoform_only = 0;
open my $fh, '<', 'prefixes.obo.txt' or die "error opening prefixes.obo.txt: $!";
my $prefixes = do { local $/; <$fh> };

while (@ARGV) {
my $opt = shift @ARGV;
Expand All @@ -24,6 +26,8 @@

my $is_rat = $spn eq 'Rnor';

print "format-version: 1.2\n";
print $prefixes;
print "ontology: go/noctua/$ontid\n";
print "\n";

Expand Down
4 changes: 4 additions & 0 deletions gpi2obo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
my $fill_p = 0; # fill unknown species name with taxon id
my $ontid;
my $isoform_only = 0;
open my $fh, '<', 'prefixes.obo.txt' or die "error opening prefixes.obo.txt: $!";
my $prefixes = do { local $/; <$fh> };

while (@ARGV) {
my $opt = shift @ARGV;
Expand All @@ -26,6 +28,8 @@
$ontid = $spn;
}

print "format-version: 1.2\n";
print $prefixes;
print "ontology: go/noctua/$ontid\n";
print "\n";

Expand Down
15 changes: 15 additions & 0 deletions prefixes.obo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
idspace: AGI_LocusCode http://arabidopsis.org/servlets/TairObject?type=locus&amp;name=
idspace: ComplexPortal https://www.ebi.ac.uk/complexportal/complex/
idspace: dictyBase http://identifiers.org/dictybase.gene/
idspace: FB http://identifiers.org/flybase/
idspace: GR_protein http://identifiers.org/uniprot/
idspace: MGI http://identifiers.org/mgi/
idspace: PomBase http://identifiers.org/pombase/
idspace: RGD http://identifiers.org/rgd/
idspace: RNAcentral http://rnacentral.org/rna/
idspace: SGD http://identifiers.org/sgd/
idspace: TAIR_locus http://identifiers.org/tair.locus/
idspace: UniProtKB http://identifiers.org/uniprot/
idspace: WB http://identifiers.org/wormbase/
idspace: Xenbase http://identifiers.org/xenbase/
idspace: ZFIN http://identifiers.org/zfin/
6 changes: 5 additions & 1 deletion rnacgpi2obo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@
);

my %tm = map {($_=>1)} @taxa;


open my $fh, '<', 'prefixes.obo.txt' or die "error opening prefixes.obo.txt: $!";
my $prefixes = do { local $/; <$fh> };

print "format-version: 1.2\n";
print $prefixes;
print "ontology: go/noctua/rnac\n";
print "\n";

Expand Down

0 comments on commit 5596ff1

Please sign in to comment.