thresholdSmoothedMutations {netDx} | R Documentation

## Apply discretization to the matrix resulted from the propagation on the sparse patient matrix

### Description

Apply discretization to the matrix resulted from the propagation on the sparse patient matrix

### Usage

    thresholdSmoothedMutations(smoothedMutProfile, unsmoothedMutProfile,
      nameDataset, n_topXmuts = c(10))

### Arguments

`smoothedMutProfile` | (data.frame) continous matrix of patient profiles resulting from applying :.,$ s/network-based propagation algorithm (smoothMutations_LabelProp()) on a binary somatic mutation sparse matrix.
`unsmoothedMutProfile` | (data.frame) binary somatic mutation sparse matrix. Rownames are unique genes. Colnames are unique patients. A cell contains a zero or a one.
`nameDataset` | (char) for titles on plot
`n_topXmuts` | (numeric between 0 and 1) percent of top mutations to keep. This function converts these to 1.0 when binarizing, so they remain in the thresholded output matrix; other mutations are set to zero.

### Details

This function is included in the netDx use case which involves propagating the sparse matrix of patient's profiles to reduce its sparsity. This function applies discretization on the propagated matrix of patient profiles. It sets to 1 the genes which got the highest propagation value. While, the remaining genes are set to 0. This discretization is driven by the fact that higher is the propagation value and higher is the chance that the gene is involved in the patient condition and expression/mutation profile. On the contrary, genes which got either a medium or a low value are not trustable.

### Value

(data.frame) binary somatic mutation matrix which sparsity has been decreased

### Examples

    suppressWarnings(suppressMessages(require(MultiAssayExperiment)))
    require(doParallel)

    # load mutation and phenotype data
    genoFile <- system.file("extdata","TGCT_mutSmooth_geno.txt",package="netDx")
    geno <- read.delim(genoFile,sep="\t",header=TRUE,as.is=TRUE)
    phenoFile <- system.file("extdata", "TGCT_mutSmooth_pheno.txt",
    			package="netDx")
    pheno <- read.delim(phenoFile,sep="\t",header=TRUE,as.is=TRUE)
    rownames(pheno) <- pheno$ID

    # load interaction nets to smooth over
    require(BiocFileCache)
    netFileURL <- paste("http://download.baderlab.org/netDx/",
    	"supporting_data/CancerNets.txt",sep="")
    cache <- rappdirs::user_cache_dir(appname = "netDx")
    bfc <- BiocFileCache::BiocFileCache(cache,ask=FALSE)
    netFile <- bfcrpath(bfc,netFileURL)
    cancerNets <- read.delim(netFile,sep="\t",header=TRUE,as.is=TRUE)
    # smooth mutations
    prop_net <- smoothMutations_LabelProp(geno,cancerNets,numCores=1L)
    genoP <- thresholdSmoothedMutations(
       prop_net,geno,"TGCT_CancerNets",c(20)
      )

[Package netDx version 1.1.4 Index]