Description Usage Arguments Details Value Examples
View source: R/smooMutationPropagation.R
Apply discretization to the matrix resulted from the propagation on the sparse patient matrix
1 2 3 4 5 6 | thresholdSmoothedMutations(
smoothedMutProfile,
unsmoothedMutProfile,
nameDataset,
n_topXmuts = c(10)
)
|
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. |
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.
(data.frame) binary somatic mutation matrix which sparsity has been decreased
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.