Skip to content

Assistance with Accessing Expression Grid Data via Allen Brain Atlas API #2755

Open
@zangdizhbjig

Description

@zangdizhbjig

Dear Allen Institute Support Team,

I hope this email finds you well. My name is [Your Name], and I am currently working on a research project aimed at analyzing molecular mechanisms in the mouse brain, specifically focusing on gene expression patterns in the retrosplenial area (structure ID 254). For this purpose, I am utilizing the Allen Mouse Brain Atlas API to retrieve and process in situ hybridization (ISH) data.

What I Have Accomplished
So far, I have successfully:

  1. Queried the API to retrieve metadata for experiments related to structure ID 254 using the following XML query:

https://mouse.brain-map.org/api/v2/data/query.xml?criteria=model::Structure,rma::criteria,structure_sets[id$eq2],pipe::list[xstructures$eq'id'],model::SectionDataSet,rma::include,fine_structure_searches[structure_id$in254],plane_of_section,probes(orientation,gene),products[id$in1],rma::options[except$eqdescription,term,termtype,product_id,gene_id,plane_of_section_id,section_thickness,specimen_id,predicted_sequence_id,forward_sequence_id,reverse_sequence_id,label,orientation_id,probe_type,organism_id,chromosome_id,homologene_group_id,created_at,updated_at,gene_tag_type_id],[start_row$eq0][num_rows$eq39],[order$eq'gene_rank$asc'],pipe::list[xdataset$eq'id'],model::SectionDataSet[id$in$xdataset],rma::include,fine_structure_searches[structure_id$in254],plane_of_section,probes(orientation,gene),products[id$in1],rma::options[except$eqdescription,term,termtype,product_id,gene_id,plane_of_section_id,section_thickness,specimen_id,predicted_sequence_id,forward_sequence_id,reverse_sequence_id,label,orientation_id,probe_type,organism_id,chromosome_id,homologene_group_id,created_at,updated_at,gene_tag_type_id],[num_rows$eq39],[order$eq'gene_rank$asc']
This returned metadata for 39 experiments, including gene symbols (e.g., PRCP, ISOC1), experiment IDs (e.g., 70301087, 74819671), and other details.

2.Parsed the XML data to extract initial information, such as:

gene_symbol structure_id experiment_id plane_of_section probe_orientation
PRCP 254 74819671 coronal Antisense
ISOC1 254 73732145 coronal Antisense

  1. Attempted to download expression grid data for these experiments using the GridData API endpoint, for example:

http://api.brain-map.org/grid_data/download/70301087?include=expression
Difficulties Encountered
I am facing an issue when trying to access the expression grid data:
Problem: The .zip files downloaded from the GridData endpoint (e.g., Kcnab1_P56_coronal_70301087_200um.zip) contain only an XML file (e.g., SectionDataSet_70301087.xml) and lack the expected .raw or .mhd files that should provide the expression intensity data.
Impact: Without these files, I cannot compute the expression_energy values, and all my results currently show 0 (e.g., expression_energy = 0 for all genes).
Attempts to Resolve: I have tried modifying the URL with additional parameters, such as ?include=expression&resolution=200um&structure_id=254, but the result remains the same—only XML files are included in the download.

Help Needed
I would greatly appreciate your assistance with the following:

Confirmation of Data Availability: Can you confirm whether the expression grid data (.raw or .mhd files) for experiments like 70301087, 74819671, etc., are available through the GridData API for structure ID 254? If not, are there alternative ways to access this data?
Correct API Usage: Am I using the correct endpoint and parameters to download the grid data? If not, could you provide an example URL or additional parameters required to retrieve the complete .zip file with expression data?
Alternative Approaches: If the grid data is not available via this method, is there another API endpoint or resource (e.g., precomputed expression statistics) that I could use to obtain gene expression intensities for these experiments?
Thank you very much for your time and support. I am eager to proceed with my analysis and would be grateful for any guidance you can provide. Please let me know if you need additional details about my setup or code.

Best regards,
Di

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions