biomaRt query Error "no upstream flank found"

19 views
Skip to first unread message

shatabdi sen

unread,
May 9, 2019, 7:22:03 PM5/9/19
to biomart-users
Upstream_flank is an attribute in biomart,how can i use my python script to retrieve the upstream_flank with a value of 1000.

I generated the following xml query:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Query>
<Query  virtualSchemaName = "zome_mart" formatter = "FASTA"
header = "0" uniqueRows = "1" count = ""
datasetConfigVersion = "0.6" >
    <Dataset name = "phytozome" interface = "default" >

        <Filter name = "organism_id" value = "447"/>
        <Filter name = "upstream_flank" value = "500"/>
        <Attribute name = "gene_name1" />
        <Attribute name = "transcript_name1" />
        <Attribute name = "transcript_exon_intron" />
        <Attribute name = "organism_name" />
        <Attribute name = "chr_name1" />
        <Attribute name = "gene_chrom_start" />
        <Attribute name = "gene_chrom_end" />
        <Attribute name = "gene_chrom_strand" />
        <Attribute name = "transcript_id" />
        <Attribute name = "transcript_chrom_start" />
        <Attribute name = "transcript_chrom_end" />
        <Attribute name = "peptide_name" />
        <Attribute name = "exon_chrom_start" />
        <Attribute name = "exon_chrom_end" />
        <Attribute name = "exon_cds_start" />
        <Attribute name = "exon_cds_end" />
        <Attribute name = "5_utr_start" />
        <Attribute name = "5_utr_end" />
        <Attribute name = "3_utr_start" />
        <Attribute name = "3_utr_end" />
    </Dataset>
</Query>

but this query is not working and its throwing biomaRt query Error "no upstream flank found" .

Kindly assist me in solving this error.


Joseph Carlson

unread,
May 10, 2019, 2:30:08 PM5/10/19
to biomart-users
Hello,

I have to admit I do not have experience writing biomart queries in python. But this can be accessed directly using the XML you've provided by URL encoding the XML and appending it to the base URL:

The complete URL is 

curl "https://phytozome.jgi.doe.gov/biomart/martservice?query=<Query+virtualSchemaName=%22zome_mart%22+formatter=%22FASTA%22+header=%220%22+uniqueRows=%221%22+count=%22%22+datasetConfigVersion=%220.6%22><Dataset+name=%22phytozome%22+interface=%22default%22><Filter+name=%22organism_id%22+value=%22447%22/><Filter+name=%22upstream_flank%22+value=%22500%22/><Attribute+name=%22gene_name1%22/><Attribute+name=%22transcript_name1%22/><Attribute+name=%22transcript_exon_intron%22/><Attribute+name=%22organism_name%22/><Attribute+name=%22chr_name1%22/><Attribute+name=%22gene_chrom_start%22/><Attribute+name=%22gene_chrom_end%22/><Attribute+name=%22gene_chrom_strand%22/><Attribute+name=%22transcript_id%22/><Attribute+name=%22transcript_chrom_start%22/><Attribute+name=%22transcript_chrom_end%22/><Attribute+name=%22peptide_name%22/><Attribute+name=%22exon_chrom_start%22/><Attribute+name=%22exon_chrom_end%22/><Attribute+name=%22exon_cds_start%22/><Attribute+name=%22exon_cds_end%22/><Attribute+name=%225_utr_start%22/><Attribute+name=%225_utr_end%22/><Attribute+name=%223_utr_start%22/><Attribute+name=%223_utr_end%22/></Dataset></Query>"

The attributes are all included with the fasta headers and it might be difficult to disentangle all of these (I don't think the order is guaranteed). So you may prefer to separate these into different queries.
Reply all
Reply to author
Forward
0 new messages