abagen.io.read_annotation

abagen.io.read_annotation(fname, copy=False)[source]

Loads SampleAnnot.csv file found at fname

Sample annotation files contain metadata on all the tissue samples taken from a single donor brain, including the spatial location of the samples.

This information can be used to combine samples within the same anatomical region across donors.

Parameters:
  • fname (str) – Path to SampleAnnot.csv file

  • copy (bool, optional) – Whether to return a copy if fname is a pre-loaded pandas.Dataframe. Default: False

Returns:

annotation – Dataframe containing structural information on S samples. The row index is the unique sample ID (integer, beginning with 1) which can be used to match data to the information obtained with e.g., read_microarray().

Return type:

(S, 13) pandas.DataFrame

Notes

If the provided annotation file is from microarray expression data (obtained by, e.g., abagen.fetch_microarray()), then the returned DataFrame will have the following columns: ‘structure_id’, ‘slab_num’, ‘well_id’, ‘slab_type’, ‘structure_acronym’, ‘structure_name’, ‘polygon_id’, ‘mri_voxel_x’, ‘mri_voxel_y’, ‘mri_voxel_z’, ‘mni_x’, ‘mni_y’, ‘mni_z’.

If the provided annotation file is from RNAseq data (obtained by, e.g., abagen.fetch_rnaseq()), then the returned DataFrame will have the following columns: ‘RNAseq_sample_name’, ‘replicate_sample’, ‘sample_name’, ‘well_id’, ‘microarray_run_id’, ‘ontology_color’, ‘main_structure’, ‘sub_structure’, ‘structure_id’, ‘structure_acronym’, ‘hemisphere’, ‘brain’, ‘million_clusters’, ‘clip_percentage’, ‘RIN_RNA_squality’, ‘rnaseq_run_id’, ‘A.Pct’, ‘C.Pct’, ‘G.Pct’, ‘T.Pct’, ‘N.Pct’