Hello,

I am trying to retrieve a transcript sequence using the BioMart perl API, and I 
am also interested in the 100bp flanking the transcript.

When I use the Ensembl BioMart web page, everything works fine. However, using 
the perl code automatically generated by the online query (see below), flanks 
can never be retrieved. Ensembl's HelpDesk redirected me to BioMart, where the 
problem allegedly lies.

Can someone explain how to retrieve flanking regions?

Thank you,

Francesco Marass


###
# An example script demonstrating the use of BioMart API.
# This perl API representation is only available for configuration versions >=  
0.5
use strict;
use BioMart::Initializer;
use BioMart::Query;
use BioMart::QueryRunner;

my $confFile = "ensembl.xml";
#
# NB: change action to 'clean' if you wish to start a fresh configuration
# and to 'cached' if you want to skip configuration step on subsequent runs 
from the same registry
#

my $action='cached';
my $initializer = BioMart::Initializer->new('registryFile'=>$confFile, 
'action'=>$action);
my $registry = $initializer->getRegistry;


my $query = 
BioMart::Query->new('registry'=>$registry,'virtualSchemaName'=>'default');

$query->setDataset("hsapiens_gene_ensembl");
$query->addFilter("downstream_flank", ["100"]);
$query->addFilter("upstream_flank", ["100"]);
$query->addFilter("ensembl_transcript_id", ["ENST00000478798"]);
$query->addAttribute("ensembl_gene_id");
$query->addAttribute("ensembl_transcript_id");
$query->addAttribute("transcript_exon_intron");

$query->formatter("FASTA");

my $query_runner = BioMart::QueryRunner->new();

$query_runner->execute($query);
$query_runner->printHeader();
$query_runner->printResults();
$query_runner->printFooter();

###

NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for the above-named 
person(s). If you are not the intended recipient, notify the sender 
immediately, delete this email from your system and do not disclose or use for 
any purpose. 

We may monitor all incoming and outgoing emails in line with current 
legislation. We have taken steps to ensure that this email and attachments are 
free from any virus, but it remains your responsibility to ensure that viruses 
do not adversely affect you. 
Cancer Research UK
Registered in England and Wales
Company Registered Number: 4325234.
Registered Charity Number: 1089464 and Scotland SC041666
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.
_______________________________________________
Users mailing list
[email protected]
https://lists.biomart.org/mailman/listinfo/users

Reply via email to