Reference API

abagen.allen - Primary workflows

Functions for mapping AHBA microarray dataset to atlases and and parcellations

abagen.get_expression_data(atlas[, ...])

Assigns microarray expression data to ROIs defined in atlas

abagen.get_samples_in_mask([mask])

Returns preprocessed microarray expression data for samples in mask

abagen.get_interpolated_map(genes, mask[, ...])

Generates dense (i.e., interpolated) expression maps for genes

abagen.datasets - Fetching AHBA datasets

Functions for fetching data relevant to the Allen Brain Atlas human microarray dataset

abagen.fetch_desikan_killiany([native, surface])

Fetches Desikan-Killiany atlas shipped with abagen

abagen.fetch_donor_info()

Returns dataframe with donor demographic information

abagen.fetch_freesurfer([data_dir, donors, ...])

Downloads FreeSurfer reconstructions of the Allen Human Brain Atlas MRIs

abagen.fetch_gene_group(group)

Return list of gene acronyms belonging to provided group

abagen.fetch_microarray([data_dir, donors, ...])

Downloads the Allen Human Brain Atlas microarray expression dataset

abagen.fetch_raw_mri([data_dir, donors, ...])

Downloads the "raw" Allen Human Brain Atlas T1w/T2w MRI images

abagen.fetch_rnaseq([data_dir, donors, ...])

Downloads RNA-sequencing data from the Allen Human Brain Atlas

abagen.datasets.fetch_fsaverage5([load])

Fetches and optionally loads fsaverage5 surface

abagen.datasets.fetch_fsnative(donors[, ...])

Fetches and optionally loads fsnative surface of donor

abagen.images - Image processing functions

abagen.leftify_atlas(atlas)

Zeroes out all ROIs in the right hemisphere of volumetric atlas

abagen.check_atlas(atlas[, atlas_info, ...])

Checks that atlas is a valid atlas

abagen.annot_to_gifti(atlas)

Converts FreeSurfer-style annotation file atlas to in-memory GIFTI image

abagen.relabel_gifti(atlas[, background, offset])

Updates GIFTI images so label IDs are consecutive across hemispheres

abagen.correct - Post-processing corrections

Functions for processing and correcting gene expression data

abagen.remove_distance(coexpression, atlas)

Corrects for distance-dependent correlation effects in coexpression

abagen.keep_stable_genes(expression[, ...])

Removes genes in expression with differential stability < threshold

abagen.normalize_expression(expression[, ...])

Performs normalization on expression data

abagen.matching - Functions for matching samples

Structures and functions used for matching samples to atlas

abagen.AtlasTree(atlas[, coords, triangles, ...])

Representation of a parcellation as a cKDtree for NN lookups

abagen.matching.get_centroids(data, coordinates)

Finds centroids of data in coordinates space

abagen.matching.closest_centroid(coords, ...)

Returns index of centroids closest to coords (Euclidean distance)

abagen.reporting - Functions for generating reports

Functions for generating workflow methods reports

Note: all text contained within this module is released under a CC-0 license.

abagen.Report(atlas[, atlas_info, ...])

Generates report of methods for abagen.get_expression_data()

abagen.io - Loading AHBA data files

Functions for loading the various files associated with the AHBA microarray and RNAseq datasets.

This also contains functionality for optionally converting the downloaded CSV files to parquet format, which provides much faster I/O access / quicker load times.

abagen.io.read_annotation(fname[, copy])

Loads SampleAnnot.csv file found at fname

abagen.io.read_microarray(fname[, copy, parquet])

Loads MicroarrayExpression.csv file found at fname

abagen.io.read_ontology(fname[, copy])

Loads Ontology.csv file found at fname

abagen.io.read_pacall(fname[, copy, parquet])

Loads PACall.csv file found at fname

abagen.io.read_probes(fname[, copy])

Loads Probes.csv file found at fname

abagen.io.read_genes(fname[, copy])

Loads Genes.csv file found at fname

abagen.io.read_tpm(fname[, copy])

Loads RNAseqTPM.csv file found at fname

abagen.io.read_counts(fname[, copy])

Loads RNAseqCounts.csv file found at fname

abagen.mouse - Working with the Allen Mouse Brain Atlas

abagen.mouse.available_gene_info()

Lists available attributes for abagen.mouse.get_gene_info()

abagen.mouse.available_structure_info()

Lists available attributes for abagen.mouse.get_structure_info()

abagen.mouse.available_unionization_info()

Lists attributes for abagen.mouse.get_unionization_from_gene()

abagen.mouse.get_gene_info([id, acronym, ...])

Queries Allen API for information about given gene

abagen.mouse.get_structure_info([id, ...])

Queries Allen API for information about given gene

abagen.mouse.get_structure_coordinates([id, ...])

Finds xyz coordinates of provided structure(s) in reference_space

abagen.mouse.get_unionization_from_gene([...])

Gets unionization data for provided gene(s)

abagen.mouse.fetch_allenref_genes([...])

Loads all genes from Allen Reference database

abagen.mouse.fetch_allenref_structures([...])

Loads all anatomical structures in the Allen Reference Atlas

abagen.mouse.fetch_rubinov2015_structures([...])

Loads subset of anatomical structures in Allen Reference Atlas from [MI1]