Learn R Programming

geneSignatureFinder (version 2014.02.17)

removeGeneFrom: Remove the gene with the lowest importance from a signature

Description

This function implements a pruning algorithm devoted to remove the gene with the lowest importance from the signature. The importances have to be computed before calling this function. The gene with the lowest importance is removed and the set of importances are computed again. The function is designed to be used iteratively so that all the genes with importance below a cutoff value are removed. If the signature has the results of the testGEL() function just computed, they are removed.

Usage

removeGeneFrom(aSignatureFinder, cutoff = 0)

Arguments

aSignatureFinder
Structure as results from the function signatureFinder()
cutoff
is a real value used when the function works iteratively

Value

  • The function return NULL when no gene is removed, otherwise return a structure as results from the importance() function with the additional slots
  • removedGenelist of genes (as string) removed from the signature
  • originalSignaturesame as aSignatureFinder$signature
  • originalClassificationsame as aSignatureFinder$classification
  • originalTValuesame as aSignatureFinder$tValue
  • originalPValuesame as aSignatureFinder$pValue

See Also

signatureFinder, importance.

Examples

Run this code
data(geNSCLC)
geData <- geNSCLC
data(stNSCLC)
stData <- stNSCLC
# develop the signature
aMakeCluster <- makeCluster(2)
geneSeed <- which(colnames(geData) == "RNF5")
signature <- signatureFinder(geneSeed, cpuCluster = aMakeCluster,
                             stopCpuCluster = FALSE)
signature <- importance(signature, cpuCluster = aMakeCluster)
print(signature$importance)

################################
# 1 step pruning
removeGeneFrom(signature, cutoff = 0.3)$signature

##################################
# iterative pruning of the signature
signature
repeat {
  tmp <- removeGeneFrom(signature, cutoff = 0.3)
  if(is.null(tmp)) break
  signature <- tmp
}  
signature
signature$importance

Run the code above in your browser using DataLab