Hi Marcin
I can see given your filter, only one sequence is expected with NO
HEADER attributes, which is not returned. The expected out is:

>
Sequence

You may specify one attribute for header, say 
        $query->addAttribute('chromosome_name');

and you will have your sequence when there is only one sequence to be
returned given such a filter.

however, when you set the upstream/downstream filter, your query works
with above modification and I cant see the following error:

Query ERROR: caught BioMart::Exception::Usage: Requests for flank
sequence must be accompanied by an upstream_flank or downstream_flank
request

Please try the suggested way around and lets see if it solves your
problem. We will normalise this single sequence return with no header
attributes. 

Cheers
syed


On Tue, 2007-07-24 at 20:26 +0200, Marcin Piechota wrote:
> Dear all,
>  
> I have a newbie question.
> When I issue this query: 
>   $input = "ENSG00000204389";
>   $query = BioMart::Query->new('registry'=>$registry,
> 'virtualSchemaName'=>'default');
>   $query->setDataset('hsapiens_gene_ensembl');
>   $query->addFilter('ensembl_gene_id', [$input]);
>   $query->addFilter('upstream_flank', ["300"]);
>   $query->addAttribute('gene_flank');
>   $query->formatter('FASTA');
>  
>   $query_runner = BioMart::QueryRunner->new();
>   $query_runner->uniqueRowsOnly(1);
>   $query_runner->execute($query);
>  
>   $temp = $query_runner->printResults();
> 
> then I get this output:
>  
> >
> Query ERROR: caught BioMart::Exception::Usage: Requests for flank
> sequence must be accompanied by an upstream_flank or downstream_flank
> request
> 
> 5utr and other attributes work fine.
> Question:
> How to define upstream flank length value?
>  
> Marcin Piechota
> Department of Molecular Neuropharmacology
> 
> Institute of Pharmacology
> 
> Polish Academy of Sciences, Krakow
> 
> 
-- 
======================================
Syed Haider.
EMBL-European Bioinformatics Institute
Wellcome Trust Genome Campus, Hinxton,
Cambridge CB10 1SD, UK.
======================================

Reply via email to