You are not logged in

Extracting ORegAnno data

Nightly dumps
Every night, the contents of the ORegAnno database are dumped to XML files and listed here as they become available. The DTD for this schema is available here oregano-upload-1_0.dtd
Available files: Older files prior to October 9th, 2005 have been archived and are available on request to Sept 15th, 2005.

Programmatically accessing OregAnno records using Web Services
ORegAnno records can be access programmatically via "Web Services". Two methods are currently provided using "Web Services":
  • getSearchFields()
  • searchRecords(String search_field, String query)
getSearchFields() provides the searchable fields like "all", "stable_id", "tfGene", etc.
searchRecords(String search_field, String query) searches using a search field and a query string for records in the ORegAnno database (returns a String array).
fetchRecord(String record_stable_id) fetches the record data from ORegAnno for a stable id.

Several Web Services for Genomic mappings are listed at the bottom of this page.

PERL EXAMPLE OF EXTRACTING RECORD DATA

Using SOAP::Lite modules. You can access all the records in the database with the following script.

#!/usr/bin/perl

use strict;
use Data::Dumper;
use SOAP::Lite;

my $osa = SOAP::Lite
          -> uri('OregannoServerImpl')
          -> proxy('http://www.oreganno.org/oregano/soap/');

my $response = $osa->searchRecords(
                SOAP::Data->name(field => SOAP::Data->type(string => "all")),
                SOAP::Data->name(query => SOAP::Data->type(string => "OREG*")));

if ($response->fault) {
        die $response->faultstring;
} else {
        my @results = @{$response->result};
        foreach my $result (@results) {
                my $response2 = $osa->fetchRecord(SOAP::Data->name(record_stable_id => SOAP::Data->type(string => "$result")));
                if ($response2->fault) {
                        die $response2->faultstring;
                } else {
                        my $record = $response2->result;
                        print Dumper $record;
                }
        }
}
In this example, we are pointing towards the server at www.oreganno.org and running the method searchRecords using the stable_id field and the query OREG*. This returns the stable id of all the records in the ORegAnno database (NOTE: This query takes a while, and may timeout your SOAP connection. If a timeout occurs, use the modified statement:
my $osa = SOAP::Lite
           -> uri('OregannoServerImpl')
           -> proxy('http://www.oreganno.org/oregano/soap/', timeout => 1000);
The return stable ids are stored in a String array. For each stable id, fetchRecord is called to retrieve the record data. Results from this call are stored in a hash. To access the type field of each record, we could use the statement $result->{'record'}->{'type'}; NOTE: All modules are part of Perl 5.8. Test this example using perl58.

OTHER AVAILABLE WEB SERVICES METHODS (FOR PUBLICATION QUEUE)

  • getQueueSearchFields() provides the searchable fields like "all", "abstract", etc.
  • searchQueue( String search_field_restriction, String search_query_restriction, String user_restriction, String state_restriction, String evidence_restriction, String tf_type_restriction, String score_restriction) Searches the publication queue and returns a String array of matching PubMED ids.
  • fetchQueuedPublication(String pubmed_id) Returns the queue record for a particular PubMED id.
Here is an example of a script which checks to see if a list of pubmed ids are PENDING in the queue.
#!/usr/bin/perl
use strict;
use SOAP::Lite;

my $osa = SOAP::Lite
          -> uri('OregannoServerImpl')
          -> proxy('http://www.oreganno.org/oregano/soap/');

my $file = @ARGV[0]; ##A file with a pmid on each line
if (!defined($file)) { die "No input file has been defined as argument 1"; }
open(FILE, $file) || die ("Cannot open file: $file");
while (my $line = ) {
        chomp($line);
        if ($line =~ /[0-9]+/g) {
                my $pmid = $line;
                my $response = $osa->fetchQueuedPublication(
                                SOAP::Data->name(pubmed_id => SOAP::Data->type(string => "$pmid")));

                if ($response->fault) {
                        die $response->faultstring;
                } else {
                        my $publication = $response->result;
                        my $state = $publication->{'queuedPublication'}->{'currentQueuedPublicationState'}->{'state'};
                        if ($state eq "PENDING") {
                                print $pmid . "\n";
                        } else {
                                print STDERR "Ignoring $pmid\n";
                        }
                }
        } else {
			close(FILE);
			die("Line does not contain a PMID: " . $line);
		}
}
close (FILE);
If you experience any problems with these services, please drop us a line.

OTHER AVAILABLE WEB SERVICES METHODS (FOR GENOMIC MAPPINGS)

  • getMappingGenomeBuilds(String taxon_id) For an NCBI Taxon ID get the available mapping builds
  • getMappings(String record_stable_id) For an ORegAnno stable Id get the genomic mappings
  • getMappings(String mapping_genome_id, String record_stable_id) For a particular mapping and ORegAnno stable ID get the genomic mappings
  • getMappings(String mapping_genome_id, String seq_region_name, String start, String end) Search a range for mappings
If you experience any problems with these services, please drop us a line.
 

Questions or comments to oreganno@bcgsc.ca. (Archived here)