Skip to content

Commit

Permalink
Adding hacky script, see #283
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Jul 23, 2018
1 parent b98a882 commit c7363bc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tools/make-entity-table.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/perl
my $efile = shift @ARGV;

my %excludeh = ();
while(<>) {
chomp;
my ($id,$n) = split(/\t/);
$excludeh{$id}=1;
}
print "entity\tentity label\n";
open(F,$efile) || die $efile;
while(<F>) {
chomp;
my ($id,$n) = split(/\t/);
$id =~ m@/obo/(\w+)_@;
my $s = $1;
next unless $s eq 'UBERON' || $s eq 'GO' || $s eq 'CL' || $s eq 'WBbt' || $s eq 'FBbt' || $s eq 'MPATH' || $s eq 'NBO';
if ($excludeh{$id}) {
print STDERR "EXCLUDING: $_\n";
next;
}
$id =~ s@^http://purl.obolibrary.org/obo/@@;
print "$id\t$n\n";

}
close(F);

0 comments on commit c7363bc

Please sign in to comment.