API — An interface for scriptable access to the Animal QTLdb

Sample code: general query

## perl codes ##

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

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

my $scope = 'cattle';              #- Species: 'cattle', 'pig', 'sheep', chicken', 'rainbow trout'
#my $query   = '2:12361-32327123'; #- Key words: genome location
my $query   = 'fat content';       #- Key words: trait name
my $query   = '3267465';           #- Key words: PubMed ID
   $query =~ s/ /\%20/g;

my $myquery = "$api/iquery?q=$query&s=$scope&history=y";
my $query_results = get($myquery);
print "$query_results\n";

 

© 2003-2024: USA · USDA · NRPSP8 · Program to Accelerate Animal Genomics Applications. Contact: Bioinformatics Team