read.raw.atlas: Read Raw Allen Atlas File

View source: R/read.raw.gene.R

read.raw.atlasR Documentation

Read Raw Allen Atlas File

Description

Read Raw Allen Atlas File

Usage

read.raw.atlas(filename, url = FALSE)

Arguments

filename

Filename (zip or URL) of Raw Atlas File

url

logical. If TRUE, then filename MUST be a valid URL pointing to the allen gene expression data. The zip file will be downloaded into tmp and the gene expression data extracted and read. It is recommended you download and unzip the file yourself rather than relying on this flag. Debugging becomes much harder when you use this flag.

Value

3D array containing atlas

Examples

atlas_url = 'http://download.alleninstitute.org/informatics-archive/current-release/mouse_annotation/P56_atlasVolume.zip'

# Read the atlas
nissl_atlas=read.raw.atlas(atlas_url, url=T)

##Make coronal slice image
nissl_atlas_volume=array(nissl_atlas,rev(attr(nissl_atlas,'sizes')))

#Coronal slice
colscl = colorRampPalette(c('black','white'))(100)
image(nissl_atlas_volume[300,,], ylab='Left-Right' ,xlab='Superior-Inferior', zlim=c(0,0.9), col = colscl)

#Sagittal Slice
image(nissl_atlas_volume[,,200], ylab='Superior-Inferior' ,xlab='Anterior-Posterior', zlim=c(0,0.5), col = colscl)

DJFernandes/ABIgeneRMINC documentation built on March 21, 2022, 12:05 p.m.