70 likes | 166 Views
Ensembl gene, transcript ids chromosome 1 bands p33.63 - q44 mapped to MSD PDB ids experiment type NMR. MartView. Web service. <Query virtualSchemaName="central_server_1"> <Dataset name=" hsapiens_gene_ensembl " > <Attribute name=" ensembl_gene_id "/>
E N D
Ensembl gene, transcript idschromosome 1bands p33.63 - q44 mapped to MSD PDB idsexperiment type NMR
Web service <Query virtualSchemaName="central_server_1"> <Dataset name="hsapiens_gene_ensembl" > <Attribute name="ensembl_gene_id"/> <Attribute name="ensembl_transcript_id"/> <Filter name="chromosome_name" value="1"/> <Filter name="band_end" value=”p36.33"/> <Filter name="band_start" value=”q44"/> </Dataset> <Dataset name="msd"> <Attribute name="pdb_id"/> <Attribute name=”experiment_type"/> <Filter name="experiment_type" value=”NMR"/> </Dataset> </Query>
API my $initializer = BioMart::Initializer->new('registryFile'=>$confFile); my $registry = $initializer->getRegistry; my $query = BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>’central_server_1'); $query->setDataset("hsapiens_gene_ensembl"); $query->addAttribute("ensembl_transcript_id"); $query->addAttribute("chromosome_name"); $query->addFilter("chromosome_name", [”1"]); $query->addFilter(”band_end", [”p36.33"]); $query->addFilter(”band_start", [”q44"]); $query->setDataset(“msd”); $query->addAttribute("pdb_id"); $query->addAttribute("experiment_type"); $query->addFilter(”experiment_type", [”NMR"]); my $query_runner = BioMart::QueryRunner->new(); $query_runner->execute($query); $query_runner->printResults();
Modifiers $query->formatter('HTML'); $query_runner->printHeader(); $query_runner->printResults(); $query_runner->printFooter();
Web service use strict; use LWP::UserAgent; my $path="http://test.biomart.org/cgi-bin/martservice?"; open (FH,$ARGV[0]) || die ("\nUsage: perl webExample.pl Query.xml\n\n"); my $xml; while (<FH>){ $xml .= $_;} close(FH); my $request = HTTP::Request->new("POST",$path,HTTP::Headers->new(),'query='.$xml."\n"); my $ua = LWP::UserAgent->new; my $response; $ua->request($request, sub{ my($data, $response) = @_; if ($response->is_success) { print "$data"; } else { warn ("Problems with the web server: ".$response->status_line); } },1000);