View source: R/read.raw.gene.R
read.raw.gene | R Documentation |
Read Raw Allen Gene Expression File
read.raw.gene(filename, labels = FALSE, url = FALSE)
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. |
1D vector containing Raw Gene Expression data
# 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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.