Getting sample names from ArraySetFiles
0
0
Entering edit mode
6.6 years ago

TL;DR I need to get the names of 150 samples from ArraySetFiles (*.ARR) to rename the array CEL files/samples either before, after or during preprocessing, annotation or DGE testing

I have 150 CEL files and their associated ARR files. The ARR files merely have a numeric identifier (1.ARR, 2.ARR, etc) and the CEL files are the same except they have the array type appended to their name (1_(MTA-1_0), 2_(MTA-2_0), etc).

Unfortunately (or fortunately, depending on what way you look at it) the samples were randomized before being loaded on the arrays. So the numeric sequence of the file names follows no specific sample or grouping order.

To get around having to generate a phenoData(?) object to inject into the HTAFeatureset object generated by oligo.

The only R tool I could find was AffyCompatible. Although I have managed to mostly follow the vignette, I am having trouble applying this package to my own data.

Here's the sketch code (using my own files as I haven't been able to find some example CEL and matching ARR files):

##find and import the cel files
files = list.celfiles(full.names = T)
cel = read.celfiles(files)

##find and get the arr files
arrFiles = list.files(pattern = '.*ARR', full = T)
arr = readArr(arrFiles)

##get all userAttributes for all objects in the list
ua = sapply(arr, userAttributes)

The above block gives a list of userAttributes (1 list element per file). Each member of the ua list is composed of a series of S4 objects which represent each ARR file.

What I'm finding impossible to do now, is extract the sample names from the userAttributes. I haven't even tried to inject them into the array object yet :/

Here is a transcription of the vignette code if anybody is willing or able to help. A demonstration of how to extract the userAttributeValue from any attribute in the vignette should allow me to at least get the sample names.

library(AffyCompatible)
arrDir = system.file('extdata', 'ARR', package = 'AffyCompatible') 
arrFiles = list.files(arrDir, pattern = '*.ARR', full = T)  
arr = sapply(arrFiles, readArr)
#the following line is not in the vignette, it is the best attempt I could make to get all the attributes 
ua = sapply(arr, userAttributes)

EDIT: thanks in advance for any help on this. I'm having great difficulty tracking down how to do this :(

affymetrix sample id arraysetfile • 1.5k views
ADD COMMENT

Login before adding your answer.

Traffic: 1819 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6