read.raw.gene: Read Raw Allen Gene Expression File

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

read.raw.geneR Documentation

Read Raw Allen Gene Expression File

Description

Read Raw Allen Gene Expression File

Usage

read.raw.gene(filename, labels = FALSE, url = FALSE)

Arguments

filename

Filename (or URL) of Raw Gene Expression File

labels

logical. If TRUE, then file is read as a string of integers

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

1D vector containing Raw Gene Expression data

Examples

# Download gene expression files from the Allen Brain Institute
# In this example, I downloaded Pdyn expression energy (http://api.brain-map.org/grid_data/download/71717084)

filename=system.file('extdata/Pdyn_P56_coronal_71717084_200um.zip',package="ABIgeneRMINC")
gene.expression=read.raw.gene(filename)

##Make coronal slice image
# First convert data from 1-D vector to 3-D array
gene.expression.array=array(gene.expression,rev(attr(gene.expression,'sizes')))

#Coronal slice
image(gene.expression.array[10,,], ylab='Left-Right' ,xlab='Superior-Inferior')

#Sagittal Slice
image(gene.expression.array[,,5], ylab='Superior-Inferior' ,xlab='Anterior-Posterior')

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