Description Usage Arguments Details Value Author(s) Examples
Function that will change sample names in an ExpressionSet using a translation file.
1 | translateSampleNames(object, translationFile, from, to)
|
object |
An ExpressionSet |
translationFile |
Character string with the path to a tab-separated text file with translations of names. Alternatively a data frame containing translation information. |
from |
Character string with the translationFile column name containing the values to translate from. |
to |
Character string with the translationFile column name containing the values to translate to. |
Function that can translate the sampleNames of an ExpressionSet when given translation information. The translationFile argument gives the translation between sampleNames as they are and the sampleNames as they should be. It can either be a character string with the path to a tab-separated text-file with headers or a directly a data frame with the necessary information. The variables 'from' and 'to' specify the column names that contains the translation information. They must be present in the translationFile and the entries in 'from' must be present in the sampleNames of the current ExpressionSet. Extra entries in the translationFile are omitted but samples in the ExpressionSet without samples in the translationFile will raise an error.
This package is particularly useful after running cel-files through the Affymetrix Power Tools (with getLocalProbeIntensities for example), since this program has a tendency to change any odd character in the filename to something else.
The same ExpressionSet given as argument, but with sampleNames changed as specified in translationFile
Lasse Folkersen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | data(exampleProbeLevelSet)
fromThese<-sampleNames(exampleProbeLevelSet)
toThese<-sub(".cel","", sampleNames(exampleProbeLevelSet))
toThese<-sub("X","", toThese)
translationFile<-cbind(fromThese, toThese)
translationFile<-as.data.frame(translationFile)
translateSampleNames(exampleProbeLevelSet, translationFile, from="fromThese", to="toThese")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.