API — An interface for scriptable access to the Animal QTLdb

Sample code: info

## perl codes ##

use strict;
use warnings;
use LWP::Simple;

my $api= "http://www.animalgenome.org/cgi-bin/QTLdb/API";

my $query = 'info';   #- Command: 'info', 'help'
my $scope = 'cattle'; #- Species: 'cattle', 'pig', 'sheep', chicken', 'rainbow trout'
my $email = 'myname@mydomain'; 

#- option 1:
my $einfo = "$api/iinfo?q=$query&history=y";

#- option 2: with "scope"
my $einfo = "$api/iinfo?q=$query&s=$scope&history=y";

#- action:
my $getinfo = get($einfo);
print "$getinfo\n";

#- do whatever you want with what you get

© 2003-2024: USA · USDA · NRPSP8 · Program for Applied Bioinformatics.
Contact: Bioinformatics Team
Helpdesk