####--- Start of Prologue ---#### print("Method - PCA of OCL samples expression") ## --------------------------------------------------------- ## Analyze the current MAExplorer array data creating PDF and .out files. # The input file contains the format as genes(rows) x experiments(columns). print("Data for current Ordered Condition List (OCL).") print("The OCL consists of multiple conditions of samples:") oclTbl <- mae.readHSfile("R-inputCurOCL.txt") oclData <- oclTbl$hData condNames <- oclTbl$condNames allCondNames <- oclTbl$allCondNames sampleNames <- oclTbl$sampleNames nConds <- oclTbl$nConds nGenes <- oclTbl$nGenes isVertStacked <- oclTbl$isVertStacked paste("The Ordered Condition List has ",nGenes," genes") paste("The Ordered Condition List has ",nConds," conditions") paste("The Ordered Condition List has ",length(sampleNames)," samples") print("Computing the PCA of the current MAExplorer data by 'arrays'") maePCAarrays <- mae.simplePCAanalysis(data=oclData, plotFile="simplePCAarrays.pdf", mode="arrays", scale.data=TRUE, uniqGroups=allCondNames, group=condNames) cat("Number of Eigen Vectors=",maePCAarrays$nEigenVecs,"\n") summary(maePCAarrays) summary(maePCAarrays$pca) mae.writeEigenData(maePCAarrays$pca, eigenValFile="EigenValuesArrays.out", eigenVecsFile="EigenVectorsArrays.out", points3Dfile="Points3DArrays.out") print("Computing the PCA of the current MAExplorer data by 'genes'") maePCAgenes <- mae.simplePCAanalysis(data=oclData, plotFile="simplePCAgenes.pdf", mode="genes", scale.data=TRUE, uniqGroups=allCondNames, group=condNames) cat("Number of Eigen Vectors=",maePCAgenes $nEigenVecs,"\n") summary(maePCAgenes) summary(maePCAgenes$pca) mae.writeEigenData(maePCAgenes$pca, eigenValFile="EigenValuesGenes.out", eigenVecsFile="EigenVectorsGenes.out", points3Dfile="Points3DGenes.out") # ####--- Start of Epilogue - Don't edit below this line ---#### ####--- End of Epilogue ---####